From e04e8aaf9b1a8c75dc70e2137230d11db27137ed Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 27 Aug 2007 18:30:50 +0000 Subject: NOTICE, PRIVMSG, WHOIS; dont allow local users to /msg etc. This prevents a primative possible type of 'stalking' of users. We still need to use full FindNick for remote use. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7908 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/cmd_privmsg.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/cmd_privmsg.cpp') diff --git a/src/cmd_privmsg.cpp b/src/cmd_privmsg.cpp index 00a7f1366..5c3020b5b 100644 --- a/src/cmd_privmsg.cpp +++ b/src/cmd_privmsg.cpp @@ -118,7 +118,11 @@ CmdResult cmd_privmsg::Handle (const char** parameters, int pcnt, userrec *user) return CMD_SUCCESS; } - dest = ServerInstance->FindNick(parameters[0]); + if (IS_LOCAL(user)) + dest = ServerInstance->FindNickOnly(parameters[0]); + else + dest = ServerInstance->FindNick(parameters[0]); + if (dest) { if (!*parameters[1]) -- cgit v1.3.1-10-gc9f91