X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcmd_ping.cpp;h=1f6e2bdfa9762cea728da944b95dd6e69a3fe608;hb=6bc3d71946b339a5a10ca621b029fe8a5b180d68;hp=01d0e021b46e8596a270c58854a860a1f1517724;hpb=8e1381822d9be8a2d319fad42f095948b71f7ca1;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/cmd_ping.cpp b/src/cmd_ping.cpp index 01d0e021b..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 (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; }