X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcmd_join.cpp;h=aa2f537a5da9e23a3393d943bbfe7f4948226979;hb=fa923bb5549eba6807ebd1274d0b5cbfa503667a;hp=ee2131482923b9164934255a4a0493e2722d22e9;hpb=1b7c615062a7b203c7fc3ce4c56e16eb671f7c15;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/cmd_join.cpp b/src/cmd_join.cpp index ee2131482..aa2f537a5 100644 --- a/src/cmd_join.cpp +++ b/src/cmd_join.cpp @@ -2,12 +2,9 @@ * | Inspire Internet Relay Chat Daemon | * +------------------------------------+ * - * InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev. - * E-mail: - * - * + * InspIRCd: (C) 2002-2007 InspIRCd Development Team + * See: http://www.inspircd.org/wiki/index.php/Credits * - * Written by Craig Edwards, Craig McLure, and others. * This program is free but copyrighted software; see * the file COPYING for details. * @@ -18,37 +15,38 @@ #include "users.h" #include "commands/cmd_join.h" - - extern "C" command_t* init_command(InspIRCd* Instance) { return new cmd_join(Instance); } -void cmd_join::Handle (const char** parameters, int pcnt, userrec *user) +/** Handle /JOIN + */ +CmdResult cmd_join::Handle (const char** parameters, int pcnt, userrec *user) { if (pcnt > 1) { if (ServerInstance->Parser->LoopCall(user, this, parameters, pcnt, 0, 1)) - return; + return CMD_SUCCESS; if (ServerInstance->IsChannel(parameters[0])) { chanrec::JoinUser(ServerInstance, user, parameters[0], false, parameters[1]); - return; + return CMD_SUCCESS; } } else { if (ServerInstance->Parser->LoopCall(user, this, parameters, pcnt, 0)) - return; + return CMD_SUCCESS; if (ServerInstance->IsChannel(parameters[0])) { chanrec::JoinUser(ServerInstance, user, parameters[0], false); - return; + return CMD_SUCCESS; } } user->WriteServ("403 %s %s :Invalid channel name",user->nick, parameters[0]); + return CMD_FAILURE; }