summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864>2008-11-15 18:24:47 +0000
committerrburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864>2008-11-15 18:24:47 +0000
commitba15bdc174971c7f5b8e3652d03d31291efa440e (patch)
treea3c35eabbdd62cde9cd61692587fbd41e86f5b83 /src
parent22f356846ef6ad4a8d88648120743ec95f0230d5 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/protocol/inspircd12.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/protocol/inspircd12.cpp b/src/protocol/inspircd12.cpp
index e726b01d0..975c52bf5 100644
--- a/src/protocol/inspircd12.cpp
+++ b/src/protocol/inspircd12.cpp
@@ -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);
}