summaryrefslogtreecommitdiff
path: root/include/bots.h
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2010-06-19 11:54:08 -0400
committerAdam <Adam@anope.org>2010-06-19 11:54:08 -0400
commit52058fe87b4b0475b1775198c725af14e540d355 (patch)
treec3597d6411a006ffbb670d2ce761101b9640e9b6 /include/bots.h
parent43e951aed54f838ba55a4c1552214773aee2fb2f (diff)
parentdf9d291bcba9788e51d11424ebaf6f05c26cc80f (diff)
Merge remote branch 'origin/1.9.3' into 1.9
Diffstat (limited to 'include/bots.h')
-rw-r--r--include/bots.h27
1 files changed, 10 insertions, 17 deletions
diff --git a/include/bots.h b/include/bots.h
index 3b4987bb7..8952005e7 100644
--- a/include/bots.h
+++ b/include/bots.h
@@ -8,6 +8,15 @@
*
*/
+#include "commands.h"
+
+class BotInfo;
+
+typedef unordered_map_namespace::unordered_map<ci::string, BotInfo *, hash_compare_ci_string> botinfo_map;
+typedef unordered_map_namespace::unordered_map<std::string, BotInfo *, hash_compare_std_string> botinfo_uid_map;
+extern CoreExport botinfo_map BotListByNick;
+extern CoreExport botinfo_uid_map BotListByUID;
+
/** Flags settable on a bot
*/
enum BotFlag
@@ -16,29 +25,13 @@ enum BotFlag
/* This bot can only be assigned by IRCops */
BI_PRIVATE,
- /* The following flags are used to determin what bot really is what.
- * Since you *could* have ChanServ really named BotServ or something stupid,
- * this keeps track of them and allows them to be renamed in the config
- * at any time, even if they already exist in the database
- */
- BI_CHANSERV,
- BI_BOTSERV,
- BI_HOSTSERV,
- BI_OPERSERV,
- BI_MEMOSERV,
- BI_NICKSERV,
- BI_GLOBAL,
BI_END
};
-struct CommandHash;
-
class CoreExport BotInfo : public Extensible, public Flags<BotFlag>
{
public:
- BotInfo *next, *prev;
-
std::string uid; /* required for UID supporting servers, as opposed to the shitty struct Uid. */
std::string nick; /* Nickname of the bot */
std::string user; /* Its user name */
@@ -48,7 +41,7 @@ class CoreExport BotInfo : public Extensible, public Flags<BotFlag>
int16 chancount; /* Number of channels that use the bot. */
/* Dynamic data */
time_t lastmsg; /* Last time we said something */
- CommandHash **cmdTable;
+ CommandMap Commands;
/** Create a new bot.
* @param nick The nickname to assign to the bot.