summaryrefslogtreecommitdiff
path: root/src/modules/m_watch.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-09-06 17:58:59 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-09-06 17:58:59 +0000
commit71ad308979d9c9129507fdf85d4305fd12e18bea (patch)
tree6aaebc6d1fb6e4c49a2adf474bf4592e2d89a5e8 /src/modules/m_watch.cpp
parent4cf0ae1308fe98757de42ffbe391e61844ac9e0a (diff)
All commands now return results CMD_FAILURE or CMD_SUCCESS
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5150 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_watch.cpp')
-rw-r--r--src/modules/m_watch.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/modules/m_watch.cpp b/src/modules/m_watch.cpp
index a8b50d025..09dc8d384 100644
--- a/src/modules/m_watch.cpp
+++ b/src/modules/m_watch.cpp
@@ -44,13 +44,13 @@ watchlist watches;
class cmd_watch : public command_t
{
public:
- cmd_watch (InspIRCd* Instance) : command_t(Instance,"WATCH",0,0)
+ cmd_watch (InspIRCd* Instance) : command_t(Instance,"WATCH",0,0)
{
this->source = "m_watch.so";
syntax = "[C|L|S]|[+|-<nick>]";
}
- void Handle (const char** parameters, int pcnt, userrec *user)
+ CmdResult Handle (const char** parameters, int pcnt, userrec *user)
{
if (!pcnt)
{
@@ -133,7 +133,7 @@ class cmd_watch : public command_t
if (!ServerInstance->IsNick(nick))
{
user->WriteServ("942 %s %s :Invalid nickname",user->nick,nick);
- return;
+ return CMD_FAILURE;
}
irc::string n1 = nick;
for (watchlist::iterator q = watches.begin(); q != watches.end(); q++)
@@ -166,7 +166,7 @@ class cmd_watch : public command_t
if (!ServerInstance->IsNick(nick))
{
user->WriteServ("942 %s %s :Invalid nickname",user->nick,nick);
- return;
+ return CMD_FAILURE;
}
irc::string n1 = nick;
bool exists = false;
@@ -203,7 +203,8 @@ class cmd_watch : public command_t
}
}
}
- return;
+ /* So that spanningtree doesnt pass the WATCH commands to the network! */
+ return CMD_FAILURE;
}
};