mirror of
https://github.com/anope/anope.git
synced 2026-06-29 13:36:38 +02:00
Fixes to Insp1.2:
- Send a SID prefix for ENDBURST - If we can't find the source of a modechange, hack it into sender (for server mode changes) - If the target doesn't exist, abort the modechange to avoid NULL ptr deref (can happen if the user got killed off) git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1708 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
@@ -685,7 +685,7 @@ class InspIRCdProto : public IRCDProto
|
||||
|
||||
void SendEOB()
|
||||
{
|
||||
send_cmd(NULL, "ENDBURST");
|
||||
send_cmd(TS6SID, "ENDBURST");
|
||||
}
|
||||
|
||||
int IsFloodModeParamValid(const char *value)
|
||||
@@ -729,6 +729,15 @@ int anope_event_mode(const char *source, int ac, const char **av)
|
||||
User *u = find_byuid(source);
|
||||
User *u2 = find_byuid(av[0]);
|
||||
|
||||
// This can happen with server-origin modes.
|
||||
if (u == NULL)
|
||||
u = u2;
|
||||
|
||||
// drop it like fire.
|
||||
// most likely situation was
|
||||
if (u == NULL || u2 == NULL)
|
||||
return MOD_CONT;
|
||||
|
||||
av[0] = u2->nick;
|
||||
do_umode(u->nick, ac, av);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user