summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-08-05 15:05:38 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-08-05 15:05:38 +0000
commit27cef863f7286b626e01f1287f31005478a66fea (patch)
tree13362954c67871a1a2785fde4c150a1166d472e2 /src/modules
parentf2408e7cc91708c33ceaec1e187e94b86580fd49 (diff)
Missed another
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10096 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_operchans.cpp14
-rw-r--r--src/modules/m_services_account.cpp2
2 files changed, 5 insertions, 11 deletions
diff --git a/src/modules/m_operchans.cpp b/src/modules/m_operchans.cpp
index 7bc132515..118349b06 100644
--- a/src/modules/m_operchans.cpp
+++ b/src/modules/m_operchans.cpp
@@ -63,15 +63,14 @@ class ModuleOperChans : public Module
virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs, const std::string &keygiven)
{
- bool banned = false;
-
if (!IS_OPER(user))
{
if (chan)
{
if (chan->IsModeSet('O'))
{
- banned = true;
+ user->WriteNumeric(ERR_CANTJOINOPERSONLY, "%s %s :Only IRC operators may join the channel %s (+O is set)",user->nick.c_str(), chan->name.c_str(), chan->name.c_str());
+ return 1;
}
}
}
@@ -79,16 +78,11 @@ class ModuleOperChans : public Module
{
if (chan && chan->IsExtBanned(user->oper, 'O'))
{
- banned = true;
+ user->WriteNumeric(ERR_BANNEDFROMCHAN, "%s %s :Cannot join channel (You're banned)", user->nick.c_str(), c->name.c_str());
+ return 1;
}
}
- if (banned)
- {
- user->WriteNumeric(ERR_CANTJOINOPERSONLY, "%s %s :Only IRC operators may join the channel %s (+O is set)",user->nick.c_str(), chan->name.c_str(), chan->name.c_str());
- return 1;
- }
-
return 0;
}
diff --git a/src/modules/m_services_account.cpp b/src/modules/m_services_account.cpp
index 0b842ce7c..76712df61 100644
--- a/src/modules/m_services_account.cpp
+++ b/src/modules/m_services_account.cpp
@@ -164,7 +164,7 @@ class ModuleServicesAccount : public Module
if (chan->IsExtBanned(*account, 'R'))
{
// may not join
- user->WriteNumeric(ERR_BANNEDFROMCHAN, "%s %s :Cannot join channel (You're banned)", user->nick.c_str(), c->name.c_str());
+ user->WriteNumeric(ERR_BANNEDFROMCHAN, "%s %s :Cannot join channel (You're banned)", user->nick.c_str(), chan->name.c_str());
return 1;
}
}