diff options
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/main.cpp b/src/main.cpp index f5eb3c915..7634a0e15 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -548,19 +548,19 @@ int main(int ac, char **av, char **envp) { FOREACH_MOD(I_OnServerDisconnect, OnServerDisconnect()); - 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; ) { - /* 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; + User *u = it->second; + ++it; - if (!findbot(u->nick)) - delete u; - } + if (!findbot(u->nick)) + delete u; + } + unsigned j = 0; + for (; j < (Config.MaxRetries ? Config.MaxRetries : j + 1); ++j) + { Alog() << "Disconnected from the server, retrying in " << Config.RetryWait << " seconds"; sleep(Config.RetryWait); |