summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2011-08-12 03:13:56 -0400
committerAdam <Adam@anope.org>2011-08-12 03:13:56 -0400
commitfeee50e6959171123773417caab73ecad3af824b (patch)
treedb23ef04c56f0552e1876e9d9a75d1b3142bca3b /include
parent54710a782b49f01a868987227e9b8748d28834cb (diff)
Allow bot usermodes to be configurable
Diffstat (limited to 'include')
-rw-r--r--include/bots.h3
-rw-r--r--include/services.h2
-rw-r--r--include/users.h5
3 files changed, 8 insertions, 2 deletions
diff --git a/include/bots.h b/include/bots.h
index 446287abf..477380c2c 100644
--- a/include/bots.h
+++ b/include/bots.h
@@ -40,6 +40,7 @@ class CoreExport BotInfo : public User, public Flags<BotFlag, BI_END>
time_t lastmsg; /* Last time we said something */
typedef Anope::insensitive_map<CommandInfo> command_map;
command_map commands; /* Commands, actual name to service name */
+ Anope::string botmodes; /* Modes the bot should have as configured in service:modes */
/** Create a new bot.
* @param nick The nickname to assign to the bot.
@@ -47,7 +48,7 @@ class CoreExport BotInfo : public User, public Flags<BotFlag, BI_END>
* @param host The hostname to give the bot.
* @param real The realname to give the bot.
*/
- BotInfo(const Anope::string &nick, const Anope::string &user = "", const Anope::string &host = "", const Anope::string &real = "");
+ BotInfo(const Anope::string &nick, const Anope::string &user = "", const Anope::string &host = "", const Anope::string &real = "", const Anope::string &modes = "");
/** Destroy a bot, clearing up appropriately.
*/
diff --git a/include/services.h b/include/services.h
index 6e7243c10..388eff5d8 100644
--- a/include/services.h
+++ b/include/services.h
@@ -800,7 +800,7 @@ class CoreExport IRCDProto
virtual void SendSVSKill(const BotInfo *source, const User *user, const char *fmt, ...);
virtual void SendMode(const BotInfo *bi, const Channel *dest, const char *fmt, ...);
virtual void SendMode(const BotInfo *bi, const User *u, const char *fmt, ...);
- virtual void SendClientIntroduction(const User *u, const Anope::string &) = 0;
+ virtual void SendClientIntroduction(const User *u) = 0;
virtual void SendKick(const BotInfo *bi, const Channel *chan, const User *user, const char *fmt, ...);
virtual void SendNoticeChanops(const BotInfo *bi, const Channel *dest, const char *fmt, ...);
virtual void SendMessage(const BotInfo *bi, const Anope::string &dest, const char *fmt, ...);
diff --git a/include/users.h b/include/users.h
index b02705bda..6d7d8635e 100644
--- a/include/users.h
+++ b/include/users.h
@@ -271,6 +271,11 @@ class CoreExport User : public Extensible
*/
void SetModesInternal(const char *umodes, ...);
+ /** Get modes set for this user.
+ * @return A string of modes set on the user
+ */
+ Anope::string GetModes() const;
+
/** Find the channel container for Channel c that the user is on
* This is preferred over using FindUser in Channel, as there are usually more users in a channel
* than channels a user is in