1
0
mirror of https://github.com/anope/anope.git synced 2026-07-03 11:33:12 +02:00

Fix issues with 'Me' related to previous commit

This commit is contained in:
Adam
2013-07-26 08:45:44 -04:00
parent 2450a64bf4
commit 3dc64bac4d
10 changed files with 53 additions and 52 deletions
+13 -1
View File
@@ -106,13 +106,25 @@ Serializable* BotInfo::Unserialize(Serializable *obj, Serialize::Data &data)
return bi;
}
void BotInfo::GenerateUID()
void BotInfo::Up()
{
if (!this->uid.empty())
throw CoreException("Bot already has a uid?");
this->uid = Servers::TS6_UID_Retrieve();
(*BotListByUID)[this->uid] = this;
UserListByUID[this->uid] = this;
this->server = Me;
++this->server->users;
}
void BotInfo::Down()
{
BotListByUID->erase(this->uid);
UserListByUID.erase(this->uid);
--this->server->users;
this->server = NULL;
this->uid = "";
}
void BotInfo::SetNewNick(const Anope::string &newnick)