1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-06-28 10:56:38 +02:00

- protoctl: parse SID= token

This commit is contained in:
William Pitcock
2013-05-21 00:58:46 +00:00
parent ef0b09e1f9
commit 3c38cd42e3
+15
View File
@@ -290,6 +290,21 @@ CMD_FUNC(m_protoctl)
/* return exit_client(cptr, cptr, &me, "Nick charset mismatch"); */
}
}
else if (strncmp(s, "SID=", 4) == 0)
{
aClient *acptr;
char *sid = s + 4;
strlcpy(sptr->id, sid, IDLEN);
if ((acptr = hash_find_id(sptr->id, NULL)) != NULL)
{
sendto_one(sptr, "ERROR :SID %s already exists from %s", acptr->id, acptr->name);
sendto_snomask(SNO_SNOTICE, "Link %s rejected - SID %s already exists from %s",
get_client_name(cptr, FALSE), acptr->id, acptr->name);
return exit_client(cptr, sptr, &me, "SID collision");
}
}
else if ((strncmp(s, "EAUTH=", 6) == 0) && NEW_LINKING_PROTOCOL)
{
/* Early authorization: EAUTH=servername[,options] */