]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/commands/cmd_join.cpp
Patch to not increment nickchange counter for nick changes that would be blocked...
[user/henk/code/inspircd.git] / src / commands / cmd_join.cpp
index b270075075745aa7ea7c532b31d1a286855d6a21..c8d731ef5cebd57b0588c1df73dea6e51c889ad5 100644 (file)
@@ -2,8 +2,8 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2008 InspIRCd Development Team
- * See: http://www.inspircd.org/wiki/index.php/Credits
+ *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
+ * See: http://wiki.inspircd.org/Credits
  *
  * This program is free but copyrighted software; see
  *            the file COPYING for details.
@@ -28,7 +28,7 @@ CmdResult CommandJoin::Handle (const std::vector<std::string>& parameters, User
                if (ServerInstance->Parser->LoopCall(user, this, parameters, 0, 1))
                        return CMD_SUCCESS;
 
-               if (ServerInstance->IsChannel(parameters[0].c_str()))
+               if (ServerInstance->IsChannel(parameters[0].c_str(), ServerInstance->Config->Limits.ChanMax))
                {
                        Channel::JoinUser(ServerInstance, user, parameters[0].c_str(), false, parameters[1].c_str(), false);
                        return CMD_SUCCESS;
@@ -39,13 +39,13 @@ CmdResult CommandJoin::Handle (const std::vector<std::string>& parameters, User
                if (ServerInstance->Parser->LoopCall(user, this, parameters, 0))
                        return CMD_SUCCESS;
 
-               if (ServerInstance->IsChannel(parameters[0].c_str()))
+               if (ServerInstance->IsChannel(parameters[0].c_str(), ServerInstance->Config->Limits.ChanMax))
                {
                        Channel::JoinUser(ServerInstance, user, parameters[0].c_str(), false, "", false);
                        return CMD_SUCCESS;
                }
        }
 
-       user->WriteNumeric(403, "%s %s :Invalid channel name",user->nick.c_str(), parameters[0].c_str());
+       user->WriteNumeric(ERR_NOSUCHCHANNEL, "%s %s :Invalid channel name",user->nick.c_str(), parameters[0].c_str());
        return CMD_FAILURE;
 }