1
0
mirror of https://github.com/anope/anope.git synced 2026-07-01 01:46:39 +02:00

Store UID for services pseudoclients inside BotInfo. This will be used instead of struct Uid in the future. Remove seperate introduction of Service, make a BotInfo for all of them. XXX: no idea at all if this will work.

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1270 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
Robin Burchell w00t@inspircd.org
2008-09-30 18:45:13 +00:00
parent 82dcf8a398
commit 0aad26dd76
3 changed files with 52 additions and 53 deletions
+16
View File
@@ -15,10 +15,26 @@ BotInfo::BotInfo(const char *nnick)
{
this->nick = sstrdup(nnick);
this->lastmsg = time(NULL);
this->uid = ts6_uid_retrieve(); // XXX is this safe? has ts6 been setup yet?
new_uid(nnick, (char *)this->uid.c_str()); // XXX: this is required because we still pass nick prefix to protocol modules, DO AWAY WITH IT.
insert_bot(this); // XXX, this is ugly, but it needs to stay until hashing of bots is redone in STL.
nbots++;
}
BotInfo::BotInfo(const char *nnick, const char *nuser, const char *nhost, const char *nreal)
{
this->nick = sstrdup(nnick);
this->user = sstrdup(nuser);
this->host = sstrdup(nhost);
this->real = sstrdup(nreal);
this->lastmsg = time(NULL);
this->uid = ts6_uid_retrieve(); // XXX is this safe? has ts6 been setup yet?
new_uid(nnick, (char *)this->uid.c_str()); // XXX: this is required because we still pass nick prefix to protocol modules, DO AWAY WITH IT.
insert_bot(this); // XXX, this is ugly, but it needs to stay until hashing of bots is redone in STL.
nbots++;
}
void BotInfo::ChangeNick(const char *newnick)
{
if (this->next)