mirror of
https://github.com/anope/anope.git
synced 2026-07-09 03:03:14 +02:00
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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user