diff options
author | rburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-12-17 23:17:49 +0000 |
---|---|---|
committer | rburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-12-17 23:17:49 +0000 |
commit | a5c031382e4d9dafdf263ba9650af1f513d46980 (patch) | |
tree | f8f3d3377f8d1faf64cb7c6176ccb4e50acf9026 | |
parent | ca4db9f23572fa4ee6de03d8f4f7237c56ebccc9 (diff) |
Don't crash on server-sent private messages.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1843 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r-- | src/protocol/inspircd12.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/protocol/inspircd12.cpp b/src/protocol/inspircd12.cpp index e02ece0f3..d39e95091 100644 --- a/src/protocol/inspircd12.cpp +++ b/src/protocol/inspircd12.cpp @@ -1167,6 +1167,10 @@ int anope_event_privmsg(const char *source, int ac, const char **av) { User *u = find_byuid(source); BotInfo *bi = findbot(av[0]); + + if (!u) + return; // likely a message from a server, which can happen. + m_privmsg(u->nick, bi ? bi->nick: av[0], av[1]); return MOD_CONT; } |