X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Finspircd.cpp;h=12962d92d6391dcd8b3033477adbe22f58ce2547;hb=98ef89c392a63bb7a78df5e8d8283c848f9dd2af;hp=fb33f1937cb7f6ff6de11bace05aa239b79fa99e;hpb=e244cb2c63b1ac1d85bdbb4691f7b1bd940ae804;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/inspircd.cpp b/src/inspircd.cpp index fb33f1937..12962d92d 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -107,12 +107,9 @@ void InspIRCd::Cleanup() ports.clear(); /* Close all client sockets, or the new process inherits them */ - LocalUserList::reverse_iterator i = Users->local_users.rbegin(); - while (i != this->Users->local_users.rend()) - { - User* u = *i++; - Users->QuitUser(u, "Server shutdown"); - } + LocalUserList& list = Users->local_users; + for (LocalUserList::iterator i = list.begin(); i != list.end(); ++i) + Users->QuitUser(*i, "Server shutdown"); GlobalCulls.Apply(); Modules->UnloadAll();