summaryrefslogtreecommitdiff
path: root/src/protocol/ratbox.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/protocol/ratbox.c')
-rw-r--r--src/protocol/ratbox.c24
1 files changed, 3 insertions, 21 deletions
diff --git a/src/protocol/ratbox.c b/src/protocol/ratbox.c
index f10c86206..f10a4abcd 100644
--- a/src/protocol/ratbox.c
+++ b/src/protocol/ratbox.c
@@ -323,20 +323,15 @@ class RatboxProto : public IRCDTS6Proto
void SetAutoIdentificationToken(User *u)
{
- char svidbuf[15], *c;
+ char svidbuf[15];
if (!u->nc)
return;
snprintf(svidbuf, sizeof(svidbuf), "%ld", static_cast<long>(u->timestamp));
- 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>(svidbuf));
}
} ircd_proto;
@@ -852,8 +847,6 @@ class ProtoRatbox : public Module
pmodule_ircd_proto(&ircd_proto);
moduleAddIRCDMsgs();
-
- ModuleManager::Attach(I_OnDelCore, this);
}
~ProtoRatbox()
@@ -861,17 +854,6 @@ class ProtoRatbox : public Module
delete [] TS6SID;
}
- void OnDelCore(NickCore *nc)
- {
- char *c;
-
- if (nc->GetExt("authenticationtoken", c))
- {
- delete [] c;
- nc->Shrink("authenticationtoken");
- }
- }
-
};
MODULE_INIT(ProtoRatbox)