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 /src/botserv.c | |
| 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 'src/botserv.c')
| -rw-r--r-- | src/botserv.c | 45 |
1 files changed, 1 insertions, 44 deletions
diff --git a/src/botserv.c b/src/botserv.c index 19fff43e7..7fd029153 100644 --- a/src/botserv.c +++ b/src/botserv.c @@ -464,7 +464,7 @@ void load_bs_dbase(void) fatal("Invalid format in %s %d", BotDBName, c); SAFE(read_string(&s, f)); - bi = makebot(s); + bi = new BotInfo(s); free(s); SAFE(read_string(&bi->user, f)); SAFE(read_string(&bi->host, f)); @@ -585,32 +585,6 @@ void insert_bot(BotInfo * bi) } /*************************************************************************/ - -BotInfo *makebot(char *nick) -{ - BotInfo *bi; - - if (!nick) { - if (debug) { - alog("debug: makebot called with NULL values"); - } - return NULL; - } - - bi = (BotInfo *)scalloc(sizeof(BotInfo), 1); - bi->nick = sstrdup(nick); - bi->lastmsg = time(NULL); - insert_bot(bi); - nbots++; - return bi; -} - -/*************************************************************************/ - - -/*************************************************************************/ - - /*************************************************************************/ BotInfo *findbot(const char *nick) @@ -808,23 +782,6 @@ void bot_join(ChannelInfo * ci) /*************************************************************************/ -/* This makes the bot rejoin all channel he is on when he gets killed - * or changed. - */ - -void bot_rejoin_all(BotInfo * bi) -{ - int i; - ChannelInfo *ci; - - for (i = 0; i < 256; i++) - for (ci = chanlists[i]; ci; ci = ci->next) - if (ci->bi == bi && ci->c && (ci->c->usercount >= BSMinUsers)) - bot_join(ci); -} - -/*************************************************************************/ - /* This makes a ban if the user has to have one. In every cases it increments the kick count for the user. */ |
