X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_rpctest.cpp;h=3c76d475119cbe922e58d3e3166c3e104efb3115;hb=f1712e6f0b58098250791ffc60815fa3fc462607;hp=9156b17a0c4c37d280a9a9875820f021f53a89a6;hpb=53afaa7cadcdf222dcf761441727305f79b4c557;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_rpctest.cpp b/src/modules/m_rpctest.cpp index 9156b17a0..3c76d4751 100644 --- a/src/modules/m_rpctest.cpp +++ b/src/modules/m_rpctest.cpp @@ -2,7 +2,7 @@ * | Inspire Internet Relay Chat Daemon | * +------------------------------------+ * - * InspIRCd: (C) 2002-2007 InspIRCd Development Team + * InspIRCd: (C) 2002-2008 InspIRCd Development Team * See: http://www.inspircd.org/wiki/index.php/Credits * * This program is free but copyrighted software; see @@ -12,9 +12,6 @@ */ #include "inspircd.h" -#include "users.h" -#include "channels.h" -#include "modules.h" #include "rpc.h" /* $ModDesc: A test of the RPC API */ @@ -23,30 +20,30 @@ class ModuleRPCTest : public Module { private: - + public: ModuleRPCTest(InspIRCd *Me) : Module(Me) { Implementation eventlist[] = { I_OnEvent }; ServerInstance->Modules->Attach(eventlist, this, 1); } - + virtual ~ModuleRPCTest() { } - + virtual Version GetVersion() { - return Version(1, 1, 0, 0, VF_VENDOR, API_VERSION); + return Version("$Id$", VF_VENDOR, API_VERSION); } - - + + virtual void OnEvent(Event *ev) { if (ev->GetEventID() == "RPCMethod") { RPCRequest *req = (RPCRequest*) ev->GetData(); - + if (req->method == "test.echo") { req->claimed = true; @@ -55,7 +52,7 @@ class ModuleRPCTest : public Module req->error = "Insufficient parameters"; return; } - + req->result->SetString(req->parameters->GetArray(0)->GetString()); } }