summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-09-08 16:20:58 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-09-08 16:20:58 +0000
commit5dd1410631a3b70ac6f5de99156b4e3d86936ae5 (patch)
treedb5e9a1d55ad6202eeea5d989b85c7cb0c2df331 /src
parent0fc82592a7e60b210a51f3e96da5dc2d9db51e24 (diff)
Move spynames attempt notice into success area
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5170 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_spy.cpp9
1 files changed, 4 insertions, 5 deletions
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);
}