diff --git a/Changes b/Changes index bcbe8b28e..07a4f01a8 100644 --- a/Changes +++ b/Changes @@ -1422,3 +1422,4 @@ changing nicks (was still trying to match on the old nick), reported by vonitsanet (#0003143). ** 3.2.6-rc2 release ** +- Fixed possible crash with using quarantine, reported by Sephiroth (#0003151). diff --git a/src/modules/m_nick.c b/src/modules/m_nick.c index 86f300e11..f31573543 100644 --- a/src/modules/m_nick.c +++ b/src/modules/m_nick.c @@ -181,6 +181,20 @@ DLLFUNC CMD_FUNC(m_nick) return 0; } + /* Kill quarantined opers early... */ + if (IsServer(cptr) && (sptr->from->flags & FLAGS_QUARANTINE) && + (parc >= 11) && strchr(parv[8], 'o')) + { + ircstp->is_kill++; + /* Send kill to uplink only, hasn't been broadcasted to the rest, anyway */ + sendto_one(cptr, ":%s KILL %s :%s (Quarantined: no global oper privileges allowed)", + me.name, parv[1], me.name); + sendto_realops("QUARANTINE: Oper %s on server %s killed, due to quarantine", + parv[1], sptr->name); + /* (nothing to exit_client or to free, since user was never added) */ + return 0; + } + /* ** Protocol 4 doesn't send the server as prefix, so it is possible ** the server doesn't exist (a lagged net.burst), in which case