diff options
| author | Robin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-09-30 18:45:11 +0000 |
|---|---|---|
| committer | Robin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-09-30 18:45:11 +0000 |
| commit | 914e0359e0225f84698990117b45f8218a788983 (patch) | |
| tree | f907f0d74ea7e74f7966c97f5b2e8a1716cd991e /include | |
| parent | 56084dce3308e25b5e48d6b7a3fd7eeb45f694e8 (diff) | |
Move stuff to a bots class.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1224 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'include')
| -rw-r--r-- | include/bots.h | 15 | ||||
| -rw-r--r-- | include/extern.h | 2 |
2 files changed, 15 insertions, 2 deletions
diff --git a/include/bots.h b/include/bots.h index 3e9b97b48..50fb844e2 100644 --- a/include/bots.h +++ b/include/bots.h @@ -29,5 +29,20 @@ class BotInfo int16 chancount; /* Number of channels that use the bot. */ /* Dynamic data */ time_t lastmsg; /* Last time we said something */ + + /** Create a new bot. + * @param nick The nickname to assign to the bot. + */ + BotInfo(const char *nick); + + /** Change the nickname set on a bot. + * @param newnick The nick to change to + */ + void ChangeNick(const char *newnick); + + /** Rejoins all channels that this bot is assigned to. + * Used on /kill, rename, etc. + */ + void RejoinAll(); }; diff --git a/include/extern.h b/include/extern.h index 0beb97523..afcc65c18 100644 --- a/include/extern.h +++ b/include/extern.h @@ -71,10 +71,8 @@ E void botchanmsgs(User *u, ChannelInfo *ci, char *buf); E void load_bs_dbase(void); E void save_bs_dbase(void); E void save_bs_rdb_dbase(void); -E BotInfo *makebot(char *nick); E BotInfo *findbot(const char *nick); E void bot_join(ChannelInfo *ci); -E void bot_rejoin_all(BotInfo *bi); E char *normalizeBuffer(const char *); E void unassign(User * u, ChannelInfo * ci); E void insert_bot(BotInfo * bi); |
