mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-04 23:03:11 +02:00
Some SVSNICK collision fixes.
This commit is contained in:
@@ -1359,3 +1359,5 @@
|
||||
Ron2K (#0002942).
|
||||
- Fixed bug in MODE #channel showing extended channel mode parameters when not in #channel.
|
||||
- Made 'MODE #channel b' and friends show bans to ircops even when not in channel.
|
||||
- Fixes to SVSNICK: case-change no longer causes a collision, don't return the value from
|
||||
exit_client (which would be FLUSH_BUFFER), fix QUIT not being sent back on collision.
|
||||
|
||||
@@ -91,6 +91,7 @@ DLLFUNC int MOD_UNLOAD(m_svsnick)(int module_unload)
|
||||
int m_svsnick(aClient *cptr, aClient *sptr, int parc, char *parv[])
|
||||
{
|
||||
aClient *acptr;
|
||||
aClient *ocptr; /* Other client */
|
||||
|
||||
if (!IsULine(sptr) || parc < 4 || (strlen(parv[2]) > NICKLEN))
|
||||
return -1; /* This looks like an error anyway -Studded */
|
||||
@@ -104,10 +105,13 @@ aClient *acptr;
|
||||
if (!(acptr = find_person(parv[1], NULL)))
|
||||
return 0; /* User not found, bail out */
|
||||
|
||||
if (find_client(parv[2], NULL)) /* Collision */
|
||||
return exit_client(cptr, acptr, sptr,
|
||||
if ((ocptr = find_client(parv[2], NULL)) && ocptr != acptr) /* Collision */
|
||||
{
|
||||
exit_client(acptr, acptr, sptr,
|
||||
"Nickname collision due to Services enforced "
|
||||
"nickname change, your nick was overruled");
|
||||
return 0;
|
||||
}
|
||||
|
||||
acptr->umodes &= ~UMODE_REGNICK;
|
||||
acptr->lastnick = TS2ts(parv[3]);
|
||||
|
||||
Reference in New Issue
Block a user