From feee50e6959171123773417caab73ecad3af824b Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 12 Aug 2011 03:13:56 -0400 Subject: Allow bot usermodes to be configurable --- include/bots.h | 3 ++- include/services.h | 2 +- include/users.h | 5 +++++ 3 files changed, 8 insertions(+), 2 deletions(-) (limited to 'include') 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 time_t lastmsg; /* Last time we said something */ typedef Anope::insensitive_map 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 * @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 -- cgit