X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcmd_ping.cpp;h=afb708d7097f4937dbe55359496086fd5e10371e;hb=72948525ec3ef03fe46553349c1892cafa5ac18c;hp=f0a937e3910390e092578df7369b628e1e175ab9;hpb=1383dba43e463f292aea094d01f62f355946049d;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/cmd_ping.cpp b/src/cmd_ping.cpp index f0a937e39..afb708d70 100644 --- a/src/cmd_ping.cpp +++ b/src/cmd_ping.cpp @@ -2,69 +2,27 @@ * | 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. * * --------------------------------------------------- */ -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 "configreader.h" #include "users.h" -#include "ctables.h" -#include "globals.h" -#include "modules.h" -#include "dynamic.h" -#include "wildcard.h" -#include "message.h" -#include "commands.h" -#include "mode.h" -#include "xline.h" -#include "inspstring.h" -#include "dnsqueue.h" -#include "helperfuncs.h" -#include "hashcomp.h" -#include "socketengine.h" -#include "typedefs.h" -#include "command_parse.h" -#include "cmd_ping.h" - -extern ServerConfig* Config; -extern InspIRCd* ServerInstance; -extern int MODCOUNT; -extern std::vector modules; -extern std::vector factory; -extern time_t TIME; -extern user_hash clientlist; -extern chan_hash chanlist; -extern whowas_hash whowas; -extern std::vector all_opers; -extern std::vector local_users; -extern userrec* fd_ref_table[MAX_DESCRIPTORS]; +#include "commands/cmd_ping.h" -void cmd_ping::Handle (char **parameters, int pcnt, userrec *user) +extern "C" DllExport command_t* init_command(InspIRCd* Instance) { - WriteServ(user->fd,"PONG %s :%s",Config->ServerName,parameters[0]); + return new cmd_ping(Instance); } - +CmdResult cmd_ping::Handle (const char** parameters, int pcnt, userrec *user) +{ + user->WriteServ("PONG %s :%s",ServerInstance->Config->ServerName,parameters[0]); + return CMD_SUCCESS; +}