diff options
| author | Adam <Adam@anope.org> | 2010-06-28 11:24:19 -0400 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2010-06-28 11:24:19 -0400 |
| commit | f1cb4b86b7b89430ee87cfb301f143e1e57c1b2d (patch) | |
| tree | fc8c5f3fcee5fc7beea880be7b3bc4366e7a50b4 /src/main.cpp | |
| parent | 4502038e3da0e176e194aabfd64c85544bb0aa23 (diff) | |
Delete all users when we disconnect from the uplink
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index e1b3c1ee3..f5eb3c915 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -551,6 +551,16 @@ int main(int ac, char **av, char **envp) unsigned j = 0; for (; j < (Config.MaxRetries ? Config.MaxRetries : j + 1); ++j) { + /* Clear all of our users, but not our bots */ + for (user_map::const_iterator it = UserListByNick.begin(), it_end = UserListByNick.end(); it != it_end; ) + { + User *u = it->second; + ++it; + + if (!findbot(u->nick)) + delete u; + } + Alog() << "Disconnected from the server, retrying in " << Config.RetryWait << " seconds"; sleep(Config.RetryWait); |
