summaryrefslogtreecommitdiff
path: root/modules/commands/cs_updown.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-05-26 17:13:11 -0400
committerAdam <Adam@anope.org>2013-05-26 17:13:11 -0400
commit22658d63bdb1e52a66f4514af45fa55ca5891345 (patch)
tree673304ab19f7e077b489354248247867518331f8 /modules/commands/cs_updown.cpp
parentf2dee1e1d642b07947f59f91dfba9af34ef84685 (diff)
Get rid of the remaining references in the core to specific services. Move more stuff out of the core to the proper modules.
Diffstat (limited to 'modules/commands/cs_updown.cpp')
-rw-r--r--modules/commands/cs_updown.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/modules/commands/cs_updown.cpp b/modules/commands/cs_updown.cpp
index 8a8f3f336..ab00d5d5d 100644
--- a/modules/commands/cs_updown.cpp
+++ b/modules/commands/cs_updown.cpp
@@ -9,8 +9,6 @@
* Based on the original code of Services by Andy Church.
*/
-/*************************************************************************/
-
#include "module.h"
class CommandCSUp : public Command
@@ -31,7 +29,7 @@ class CommandCSUp : public Command
for (User::ChanUserList::iterator it = source.GetUser()->chans.begin(); it != source.GetUser()->chans.end(); ++it)
{
Channel *c = it->second->chan;
- c->SetCorrectModes(source.GetUser(), true, false);
+ c->SetCorrectModes(source.GetUser(), true);
}
}
else
@@ -58,6 +56,11 @@ class CommandCSUp : public Command
source.Reply(NICK_X_NOT_IN_USE, nick.c_str());
return;
}
+ else if (!u->FindChannel(c))
+ {
+ source.Reply(NICK_X_NOT_ON_CHAN, nick.c_str(), channel.c_str());
+ return;
+ }
else if (source.GetUser() && u != source.GetUser() && c->ci->HasExt("PEACE"))
{
if (c->ci->AccessFor(u) > c->ci->AccessFor(source.GetUser()))
@@ -67,7 +70,7 @@ class CommandCSUp : public Command
}
}
- c->SetCorrectModes(u, true, false);
+ c->SetCorrectModes(u, true);
}
}
@@ -136,6 +139,11 @@ class CommandCSDown : public Command
source.Reply(NICK_X_NOT_IN_USE, nick.c_str());
return;
}
+ else if (!u->FindChannel(c))
+ {
+ source.Reply(NICK_X_NOT_ON_CHAN, nick.c_str(), channel.c_str());
+ return;
+ }
else if (source.GetUser() && u != source.GetUser() && c->ci->HasExt("PEACE"))
{
if (c->ci->AccessFor(u) > c->ci->AccessFor(source.GetUser()))