summaryrefslogtreecommitdiff
path: root/include/bots.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/bots.h')
-rw-r--r--include/bots.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/include/bots.h b/include/bots.h
index 7316f074e..7508e4091 100644
--- a/include/bots.h
+++ b/include/bots.h
@@ -8,12 +8,12 @@
#ifndef BOTS_H
#define BOTS_H
-#include "commands.h"
-
class BotInfo;
extern CoreExport Anope::insensitive_map<BotInfo *> BotListByNick;
extern CoreExport Anope::map<BotInfo *> BotListByUID;
+typedef Anope::insensitive_map<BotInfo *> botinfo_map;
+typedef Anope::insensitive_map<Anope::string> command_map;
/** Flags settable on a bot
*/
@@ -25,11 +25,13 @@ enum BotFlag
BI_CORE,
/* This bot can only be assigned by IRCops */
BI_PRIVATE,
+ /* This bot is defined in the config */
+ BI_CONF,
BI_END
};
-static const Anope::string BotFlagString[] = { "BEGIN", "CORE", "PRIVATE", "" };
+static const Anope::string BotFlagString[] = { "BEGIN", "CORE", "PRIVATE", "CONF", "" };
class CoreExport BotInfo : public User, public Flags<BotFlag, BI_END>
{
@@ -37,7 +39,7 @@ class CoreExport BotInfo : public User, public Flags<BotFlag, BI_END>
uint32 chancount;
time_t created; /* Birth date ;) */
time_t lastmsg; /* Last time we said something */
- CommandMap Commands; /* Commands on this bot */
+ command_map commands; /* Commands, actual name to service name */
/** Create a new bot.
* @param nick The nickname to assign to the bot.
@@ -51,6 +53,8 @@ class CoreExport BotInfo : public User, public Flags<BotFlag, BI_END>
*/
virtual ~BotInfo();
+ void GenerateUID();
+
/** Change the nickname for the bot.
* @param newnick The nick to change to
*/