]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/commands/cmd_join.cpp
Replace IS_AWAY() and IS_OPER() macros with User::IsAway() and User::IsOper()
[user/henk/code/inspircd.git] / src / commands / cmd_join.cpp
index 1dc1d7f9214b47f0562322f7601f29c52c3b5058..9babdb6855f665aafd0273ca1f2e812ea5ad7856 100644 (file)
 
 #include "inspircd.h"
 
-#ifndef CMD_JOIN_H
-#define CMD_JOIN_H
-
-// include the common header files
-
-#include "users.h"
-#include "channels.h"
-
 /** Handle /JOIN. These command handlers can be reloaded by the core,
  * and handle basic RFC1459 commands. Commands within modules work
  * the same way, however, they can be fully unloaded, where these
@@ -48,9 +40,6 @@ class CommandJoin : public Command
        CmdResult Handle(const std::vector<std::string>& parameters, User *user);
 };
 
-#endif
-
-
 /** Handle /JOIN
  */
 CmdResult CommandJoin::Handle (const std::vector<std::string>& parameters, User *user)
@@ -62,7 +51,7 @@ CmdResult CommandJoin::Handle (const std::vector<std::string>& parameters, User
 
                if (ServerInstance->IsChannel(parameters[0].c_str(), ServerInstance->Config->Limits.ChanMax))
                {
-                       Channel::JoinUser(user, parameters[0].c_str(), false, parameters[1].c_str(), false);
+                       Channel::JoinUser(user, parameters[0], false, parameters[1].c_str(), false);
                        return CMD_SUCCESS;
                }
        }
@@ -73,7 +62,7 @@ CmdResult CommandJoin::Handle (const std::vector<std::string>& parameters, User
 
                if (ServerInstance->IsChannel(parameters[0].c_str(), ServerInstance->Config->Limits.ChanMax))
                {
-                       Channel::JoinUser(user, parameters[0].c_str(), false, "", false);
+                       Channel::JoinUser(user, parameters[0], false, "", false);
                        return CMD_SUCCESS;
                }
        }