From 7e843c22e16c81054bad18073d24fe1a07026431 Mon Sep 17 00:00:00 2001 From: danieldg Date: Thu, 8 Oct 2009 23:29:21 +0000 Subject: Update Event and Request APIs git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11808 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_override.cpp | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) (limited to 'src/modules/m_override.cpp') diff --git a/src/modules/m_override.cpp b/src/modules/m_override.cpp index 8162d45e3..c737be286 100644 --- a/src/modules/m_override.cpp +++ b/src/modules/m_override.cpp @@ -12,7 +12,6 @@ */ #include "inspircd.h" -#include "m_override.h" /* $ModDesc: Provides support for unreal-style oper-override */ @@ -31,12 +30,8 @@ class ModuleOverride : public Module // read our config options (main config file) OnRehash(NULL); ServerInstance->SNO->EnableSnomask('G', "GODMODE"); - if (!ServerInstance->Modules->PublishFeature("Override", this)) - { - throw ModuleException("m_override: Unable to publish feature 'Override'"); - } - Implementation eventlist[] = { I_OnRehash, I_OnPreMode, I_On005Numeric, I_OnUserPreJoin, I_OnUserPreKick, I_OnPreTopicChange, I_OnRequest }; - ServerInstance->Modules->Attach(eventlist, this, 7); + Implementation eventlist[] = { I_OnRehash, I_OnPreMode, I_On005Numeric, I_OnUserPreJoin, I_OnUserPreKick, I_OnPreTopicChange }; + ServerInstance->Modules->Attach(eventlist, this, 6); } void OnRehash(User* user) @@ -205,19 +200,8 @@ class ModuleOverride : public Module return MOD_RES_PASSTHRU; } - const char* OnRequest(Request* request) - { - if(strcmp(OVRREQID, request->GetId()) == 0) - { - OVRrequest* req = static_cast(request); - return this->CanOverride(req->requser,req->reqtoken.c_str()) ? "yes":""; - } - return NULL; - } - ~ModuleOverride() { - ServerInstance->Modules->UnpublishFeature("Override"); ServerInstance->SNO->DisableSnomask('G'); } -- cgit v1.2.3