From 914e0359e0225f84698990117b45f8218a788983 Mon Sep 17 00:00:00 2001 From: "Robin Burchell w00t@inspircd.org" Date: Tue, 30 Sep 2008 18:45:11 +0000 Subject: Move stuff to a bots class. git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1224 5417fbe8-f217-4b02-8779-1006273d7864 --- include/bots.h | 15 +++++++++++++++ include/extern.h | 2 -- 2 files changed, 15 insertions(+), 2 deletions(-) (limited to 'include') 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); -- cgit