X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcommands%2Fcmd_squit.cpp;h=ada5655d1f4d80bb7082ee43ca076b8a16f836d6;hb=91df762e93212958db487d8517addba1a63a4ddd;hp=2fd5c701c26db173724b11ab5a515e103316641e;hpb=4b856bda135a08e800b96c970a10b0b6a34d433a;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/commands/cmd_squit.cpp b/src/commands/cmd_squit.cpp index 2fd5c701c..ada5655d1 100644 --- a/src/commands/cmd_squit.cpp +++ b/src/commands/cmd_squit.cpp @@ -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. @@ -12,20 +12,50 @@ */ #include "inspircd.h" -#include "commands/cmd_squit.h" + +#ifndef __CMD_SQUIT_H__ +#define __CMD_SQUIT_H__ + +// include the common header files + +#include +#include +#include "inspircd.h" +#include "users.h" +#include "channels.h" + +/** Handle /SQUIT. 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 + * may not. + */ +class CommandSquit : public Command +{ + public: + /** Constructor for squit. + */ + CommandSquit (InspIRCd* Instance, Module* parent) : Command(Instance,parent,"SQUIT","o",1) { syntax = " []"; } + /** Handle command. + * @param parameters The parameters to the comamnd + * @param pcnt The number of parameters passed to teh command + * @param user The user issuing the command + * @return A value from CmdResult to indicate command success or failure. + */ + CmdResult Handle(const std::vector& parameters, User *user); +}; + +#endif + /* * This is handled by the server linking module, if necessary. Do not remove this stub. */ -extern "C" DllExport Command* init_command(InspIRCd* Instance) -{ - return new CommandSquit(Instance); -} - CmdResult CommandSquit::Handle (const std::vector&, User *user) { user->WriteServ( "NOTICE %s :Look into loading a linking module (like m_spanningtree) if you want this to do anything useful.", user->nick.c_str()); return CMD_FAILURE; } + +COMMAND_INIT(CommandSquit)