diff options
Diffstat (limited to 'src/protocol/bahamut.c')
-rw-r--r-- | src/protocol/bahamut.c | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/src/protocol/bahamut.c b/src/protocol/bahamut.c index 6ec072b87..aee8b6f22 100644 --- a/src/protocol/bahamut.c +++ b/src/protocol/bahamut.c @@ -325,7 +325,7 @@ class BahamutIRCdProto : public IRCDProto void SetAutoIdentificationToken(User *u) { - char svidbuf[15], *c; + char svidbuf[15]; if (!u->nc) return; @@ -333,13 +333,8 @@ class BahamutIRCdProto : public IRCDProto srand(time(NULL)); snprintf(svidbuf, sizeof(svidbuf), "%d", rand()); - if (u->nc->GetExt("authenticationtoken", c)) - { - delete [] c; - u->nc->Shrink("authenticationtoken"); - } - - u->nc->Extend("authenticationtoken", sstrdup(svidbuf)); + u->nc->Shrink("authenticationtoken"); + u->nc->Extend("authenticationtoken", new ExtensibleItemPointerArray<char>(sstrdup(svidbuf))); BotInfo *bi = findbot(Config.s_NickServ); u->SetMode(bi, UMODE_REGISTERED); @@ -712,20 +707,6 @@ class ProtoBahamut : public Module moduleAddModes(); pmodule_ircd_proto(&ircd_proto); - moduleAddIRCDMsgs(); - - ModuleManager::Attach(I_OnDelCore, this); - } - - void OnDelCore(NickCore *nc) - { - char *c; - - if (nc->GetExt("authenticationtoken", c)) - { - delete [] c; - nc->Shrink("authenticationtoken"); - } } }; |