summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/commands/bs_assign.cpp2
-rw-r--r--src/regchannel.cpp7
2 files changed, 6 insertions, 3 deletions
diff --git a/modules/commands/bs_assign.cpp b/modules/commands/bs_assign.cpp
index 82eee7914..fcaca4bac 100644
--- a/modules/commands/bs_assign.cpp
+++ b/modules/commands/bs_assign.cpp
@@ -91,7 +91,7 @@ class CommandBSUnassign : public Command
CommandBSUnassign(Module *creator) : Command(creator, "botserv/unassign", 1, 1)
{
this->SetDesc(_("Unassigns a bot from a channel"));
- this->SetSyntax(_("\037channel\037 \037nick\037"));
+ this->SetSyntax(_("\037channel\037"));
}
void Execute(CommandSource &source, const std::vector<Anope::string> &params)
diff --git a/src/regchannel.cpp b/src/regchannel.cpp
index ed25ce6bf..160b7102b 100644
--- a/src/regchannel.cpp
+++ b/src/regchannel.cpp
@@ -207,6 +207,11 @@ ChanAccess *ChannelInfo::GetAccess(unsigned index)
AccessGroup ChannelInfo::AccessFor(User *u)
{
+ AccessGroup group;
+
+ if (u == NULL)
+ return group;
+
NickCore *nc = u->Account();
if (nc == NULL && u->IsRecognized())
{
@@ -215,8 +220,6 @@ AccessGroup ChannelInfo::AccessFor(User *u)
nc = na->nc;
}
- AccessGroup group;
-
group.SuperAdmin = u->SuperAdmin;
group.Founder = IsFounder(u, this);
group.ci = this;