X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcmd_join.cpp;h=17b14fdff4aa42056d9374564c388ef1cc6c867f;hb=6dfc98470938a932ddee0100f515658dffe94438;hp=b1478392d7f285b8c7e1dab24d591d7a51825c03;hpb=cf32c306898ee24d19536fe6682ce461afa739cb;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/cmd_join.cpp b/src/cmd_join.cpp index b1478392d..17b14fdff 100644 --- a/src/cmd_join.cpp +++ b/src/cmd_join.cpp @@ -14,51 +14,25 @@ * --------------------------------------------------- */ -using namespace std; - -#include "inspircd_config.h" #include "inspircd.h" -#include "inspircd_io.h" -#include -#include -#ifdef GCC3 -#include -#else -#include -#endif -#include -#include -#include -#include #include "users.h" -#include "ctables.h" -#include "globals.h" -#include "message.h" #include "commands.h" -#include "inspstring.h" #include "helperfuncs.h" -#include "hashcomp.h" -#include "typedefs.h" -#include "command_parse.h" -#include "cmd_join.h" +#include "commands/cmd_join.h" extern InspIRCd* ServerInstance; void cmd_join::Handle (char **parameters, int pcnt, userrec *user) { - chanrec* Ptr; - - if (ServerInstance->Parser->LoopCall(this,parameters,pcnt,user,0,0,1)) + if (ServerInstance->Parser->LoopCall(this, parameters, pcnt, user, 0, 0, 1)) return; - if (parameters[0][0] == '#') + + if (IsValidChannelName(parameters[0])) { - Ptr = add_channel(user,parameters[0],parameters[1],false); + add_channel(user, parameters[0], parameters[1], false); } else { WriteServ(user->fd,"403 %s %s :Invalid channel name",user->nick, parameters[0]); } } - - -