diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-08-05 15:05:38 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-08-05 15:05:38 +0000 |
commit | 27cef863f7286b626e01f1287f31005478a66fea (patch) | |
tree | 13362954c67871a1a2785fde4c150a1166d472e2 /src/modules/m_operchans.cpp | |
parent | f2408e7cc91708c33ceaec1e187e94b86580fd49 (diff) |
Missed another
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10096 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_operchans.cpp')
-rw-r--r-- | src/modules/m_operchans.cpp | 14 |
1 files changed, 4 insertions, 10 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; } |