diff options
| author | Adam <Adam@drink-coca-cola.info> | 2010-05-29 20:44:31 -0400 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2010-06-18 21:04:08 -0400 |
| commit | b8f9116b19eb511c4f5e6a683725f50bf732a7dd (patch) | |
| tree | a5848c9797ec4dc3477621fc42211f4985eaec7b /src/core | |
| parent | 435c9116e9997634eb7215e998c8f01a5e46fb2c (diff) | |
Rewrote all of the command handling to get rid of all the nasty strtoks() everywhere, and added a bot map by uid
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/bs_botlist.cpp | 8 | ||||
| -rw-r--r-- | src/core/db_plain.cpp | 2 | ||||
| -rw-r--r-- | src/core/os_defcon.cpp | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/core/bs_botlist.cpp b/src/core/bs_botlist.cpp index 935e6d18a..12c90ab8b 100644 --- a/src/core/bs_botlist.cpp +++ b/src/core/bs_botlist.cpp @@ -25,13 +25,13 @@ class CommandBSBotList : public Command { unsigned count = 0; - if (BotList.empty()) + if (BotListByNick.empty()) { notice_lang(Config.s_BotServ, u, BOT_BOTLIST_EMPTY); return MOD_CONT; } - for (botinfo_map::const_iterator it = BotList.begin(); it != BotList.end(); ++it) + for (botinfo_map::const_iterator it = BotListByNick.begin(); it != BotListByNick.end(); ++it) { BotInfo *bi = it->second; @@ -44,11 +44,11 @@ class CommandBSBotList : public Command } } - if (u->Account()->HasCommand("botserv/botlist") && count < BotList.size()) + if (u->Account()->HasCommand("botserv/botlist") && count < BotListByNick.size()) { notice_lang(Config.s_BotServ, u, BOT_BOTLIST_PRIVATE_HEADER); - for (botinfo_map::const_iterator it = BotList.begin(); it != BotList.end(); ++it) + for (botinfo_map::const_iterator it = BotListByNick.begin(); it != BotListByNick.end(); ++it) { BotInfo *bi = it->second; diff --git a/src/core/db_plain.cpp b/src/core/db_plain.cpp index 8808539bd..98e055ee8 100644 --- a/src/core/db_plain.cpp +++ b/src/core/db_plain.cpp @@ -1006,7 +1006,7 @@ class DBPlain : public Module FOREACH_MOD(I_OnDatabaseWriteMetadata, OnDatabaseWriteMetadata(WriteMetadata, na)); } - for (botinfo_map::const_iterator it = BotList.begin(); it != BotList.end(); ++it) + for (botinfo_map::const_iterator it = BotListByNick.begin(); it != BotListByNick.end(); ++it) { BotInfo *bi = it->second; diff --git a/src/core/os_defcon.cpp b/src/core/os_defcon.cpp index 6f9197a2b..5945ad3ba 100644 --- a/src/core/os_defcon.cpp +++ b/src/core/os_defcon.cpp @@ -211,7 +211,7 @@ class OSDEFCON : public Module return EVENT_CONTINUE; } - EventReturn OnPreCommandRun(const std::string &service, User *u, const char *cmd, Command *c) + EventReturn OnPreCommandRun(User *u, BotInfo *bi, const ci::string &command, const ci::string &message, Command *c) { if (!c) { @@ -222,7 +222,7 @@ class OSDEFCON : public Module { if (!CheckDefCon(DEFCON_SILENT_OPER_ONLY)) { - notice_lang(service, u, OPER_DEFCON_DENIED); + notice_lang(bi->nick.c_str(), u, OPER_DEFCON_DENIED); } return EVENT_STOP; |
