From 5dd1410631a3b70ac6f5de99156b4e3d86936ae5 Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 8 Sep 2006 16:20:58 +0000 Subject: Move spynames attempt notice into success area git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5170 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spy.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/modules/m_spy.cpp b/src/modules/m_spy.cpp index 8d69fffd6..6e1897aa2 100644 --- a/src/modules/m_spy.cpp +++ b/src/modules/m_spy.cpp @@ -30,11 +30,11 @@ using namespace std; #include "inspircd.h" #include "wildcard.h" -void spy_userlist(userrec *user,chanrec *c) +void spy_userlist(userrec *user, chanrec *c) { static char list[MAXBUF]; - if ((!c) || (!user)) + if (!c || !user) return; snprintf(list,MAXBUF,"353 %s = %s :", user->nick, c->name); @@ -99,7 +99,7 @@ class cmd_spynames : public command_t CmdResult Handle (const char** parameters, int pcnt, userrec *user) { - chanrec* c; + chanrec* c = NULL; if (!pcnt) { @@ -110,11 +110,10 @@ class cmd_spynames : public command_t if (ServerInstance->Parser->LoopCall(user, this, parameters, pcnt, 1)) return CMD_FAILURE; - ServerInstance->WriteOpers("*** Oper %s used SPYNAMES to view the users on %s",user->nick,parameters[0]); - c = ServerInstance->FindChan(parameters[0]); if (c) { + ServerInstance->WriteOpers("*** Oper %s used SPYNAMES to view the users on %s", user->nick, parameters[0]); spy_userlist(user,c); user->WriteServ("366 %s %s :End of /NAMES list.", user->nick, c->name); } -- cgit v1.2.3