summaryrefslogtreecommitdiff
path: root/modules/commands/cs_register.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/commands/cs_register.cpp')
-rw-r--r--modules/commands/cs_register.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/commands/cs_register.cpp b/modules/commands/cs_register.cpp
index 33b271ce5..eb2832074 100644
--- a/modules/commands/cs_register.cpp
+++ b/modules/commands/cs_register.cpp
@@ -72,7 +72,7 @@ class CommandCSRegister : public Command
return;
}
- if (c && !c->HasUserStatus(u, "OP"))
+ if (c && u && !c->HasUserStatus(u, "OP"))
{
source.Reply(_("You must be a channel operator to register the channel."));
return;
@@ -113,9 +113,9 @@ class CommandCSRegister : public Command
c->CheckModes();
if (u)
c->SetCorrectModes(u, true);
- }
- Event::OnChanRegistered(&Event::ChanRegistered::OnChanRegistered, ci);
+ Event::OnChanRegistered(&Event::ChanRegistered::OnChanRegistered, ci);
+ }
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand) override