summaryrefslogtreecommitdiff
path: root/modules/commands/cs_updown.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/commands/cs_updown.cpp')
-rw-r--r--modules/commands/cs_updown.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/modules/commands/cs_updown.cpp b/modules/commands/cs_updown.cpp
index 6d46c873e..7504c3601 100644
--- a/modules/commands/cs_updown.cpp
+++ b/modules/commands/cs_updown.cpp
@@ -18,6 +18,7 @@ class CommandCSUp : public Command
public:
CommandCSUp(Module *creator) : Command(creator, "chanserv/up", 0, 1)
{
+ this->SetFlag(CFLAG_REQUIRE_USER);
this->SetDesc(_("Updates your status on a channel"));
this->SetSyntax(_("[\037channel\037]"));
}
@@ -25,8 +26,6 @@ class CommandCSUp : public Command
void Execute(CommandSource &source, const std::vector<Anope::string> &params) anope_override
{
User *u = source.GetUser();
- if (!u)
- return;
if (params.empty())
for (UChannelList::iterator it = u->chans.begin(); it != u->chans.end(); ++it)
@@ -75,6 +74,7 @@ class CommandCSDown : public Command
public:
CommandCSDown(Module *creator) : Command(creator, "chanserv/down", 0, 1)
{
+ this->SetFlag(CFLAG_REQUIRE_USER);
this->SetDesc(_("Removes your status from a channel"));
this->SetSyntax(_("[\037channel\037]"));
}
@@ -82,8 +82,6 @@ class CommandCSDown : public Command
void Execute(CommandSource &source, const std::vector<Anope::string> &params) anope_override
{
User *u = source.GetUser();
- if (!u)
- return;
if (params.empty())
for (UChannelList::iterator it = u->chans.begin(); it != u->chans.end(); ++it)