X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcmd_ping.cpp;h=1f6e2bdfa9762cea728da944b95dd6e69a3fe608;hb=6bc3d71946b339a5a10ca621b029fe8a5b180d68;hp=b30a9d0faddacf42a26082873f0459bb78b57af1;hpb=0757a4a495daabf661ac3b7ab79f0a5ee423abe8;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/cmd_ping.cpp b/src/cmd_ping.cpp index b30a9d0fa..1f6e2bdfa 100644 --- a/src/cmd_ping.cpp +++ b/src/cmd_ping.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. * @@ -16,14 +13,17 @@ #include "configreader.h" #include "users.h" -#include "commands.h" -#include "helperfuncs.h" #include "commands/cmd_ping.h" -extern ServerConfig* Config; -void cmd_ping::Handle (const char** parameters, int pcnt, userrec *user) +extern "C" 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; }