1
0
mirror of https://github.com/anope/anope.git synced 2026-07-02 01:46:39 +02:00

Fixed compile

This commit is contained in:
Adam
2011-03-14 20:16:38 -04:00
parent 2555d0d637
commit ddfb16de1a
32 changed files with 122 additions and 158 deletions
+11 -17
View File
@@ -170,11 +170,9 @@ void do_restart_services()
if (quitmsg.empty())
quitmsg = "Restarting";
/* Send a quit for all of our bots */
patricia_tree<BotInfo *, ci::ci_char_traits>::iterator it(BotListByNick);
for (bool next = it.next(); next;)
for (Anope::insensitive_map<BotInfo *>::const_iterator it = BotListByNick.begin(), it_end = BotListByNick.end(); it != it_end; ++it)
{
BotInfo *bi = *it;
next = it.next();
BotInfo *bi = it->second;
/* Don't use quitmsg here, it may contain information you don't want people to see */
ircdproto->SendQuit(bi, "Restarting");
@@ -214,11 +212,9 @@ static void services_shutdown()
if (started && UplinkSock)
{
/* Send a quit for all of our bots */
patricia_tree<BotInfo *, ci::ci_char_traits>::iterator it(BotListByNick);
for (bool next = it.next(); next;)
for (Anope::insensitive_map<BotInfo *>::const_iterator it = BotListByNick.begin(), it_end = BotListByNick.end(); it != it_end; ++it)
{
BotInfo *bi = *it;
next = it.next();
BotInfo *bi = it->second;
/* Don't use quitmsg here, it may contain information you don't want people to see */
ircdproto->SendQuit(bi, "Shutting down");
@@ -230,11 +226,10 @@ static void services_shutdown()
ircdproto->SendSquit(Config->ServerName, quitmsg);
patricia_tree<User *, ci::ci_char_traits>::iterator uit(UserListByNick);
for (bool next = uit.next(); next;)
for (Anope::insensitive_map<User *>::const_iterator it = UserListByNick.begin(); it != UserListByNick.end();)
{
User *u = *uit;
next = uit.next();
User *u = it->second;
++it;
delete u;
}
}
@@ -505,11 +500,10 @@ int main(int ac, char **av, char **envp)
FOREACH_MOD(I_OnServerDisconnect, OnServerDisconnect());
/* Clear all of our users, but not our bots */
patricia_tree<User *, ci::ci_char_traits>::iterator it(UserListByNick);
for (bool next = it.next(); next;)
for (Anope::insensitive_map<User *>::const_iterator it = UserListByNick.begin(); it != UserListByNick.end();)
{
User *u = *it;
next = it.next();
User *u = it->second;
++it;
if (u->server != Me)
delete u;
@@ -551,4 +545,4 @@ int main(int ac, char **av, char **envp)
}
return 0;
}
}