summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2006-02-15 02:58:20 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2006-02-15 02:58:20 +0000
commitfebd2b04e58346f76b6a0c7c028b6915b27d95fb (patch)
treef6176df235d40fd92e3bd4979db2813ac73be104 /src/modules
parentd01f309b27f3cafa2454689898856e347f5b12c4 (diff)
- Check for +K before bothing to assemble knock message
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3208 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_knock.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/modules/m_knock.cpp b/src/modules/m_knock.cpp
index bd6049718..fa4ee68bb 100644
--- a/src/modules/m_knock.cpp
+++ b/src/modules/m_knock.cpp
@@ -40,17 +40,18 @@ class cmd_knock : public command_t
chanrec* c = Srv->FindChannel(parameters[0]);
std::string line = "";
+ if (c->IsCustomModeSet('K'))
+ {
+ WriteServ(user->fd,"480 %s :Can't KNOCK on %s, +K is set.",user->nick, c->name);
+ return;
+ }
+
for (int i = 1; i < pcnt - 1; i++)
{
line = line + std::string(parameters[i]) + " ";
}
line = line + std::string(parameters[pcnt-1]);
- if (c->IsCustomModeSet('K'))
- {
- WriteServ(user->fd,"480 %s :Can't KNOCK on %s, +K is set.",user->nick, c->name);
- return;
- }
if (c->binarymodes & CM_INVITEONLY)
{
WriteChannelWithServ((char*)Srv->GetServerName().c_str(),c,"NOTICE %s :User %s is KNOCKing on %s (%s)",c->name,user->nick,c->name,line.c_str());