diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-25 22:23:06 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-25 22:23:06 +0000 |
commit | 1afe959c7574b479e4a49a62885d2ac2757025ab (patch) | |
tree | ceaff5ca1994000cd2c28374dfd0100eeb8d6c95 | |
parent | 8a7ee30ce6f5cc762619556b042182b7e7b57ba2 (diff) |
Remove On005Numeric event from a ton of modules which no longer need it (as CHANMODES= part of 005 is now automatically done)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5024 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/modules/m_blockcaps.cpp | 7 | ||||
-rw-r--r-- | src/modules/m_blockcolor.cpp | 7 | ||||
-rw-r--r-- | src/modules/m_censor.cpp | 8 | ||||
-rw-r--r-- | src/modules/m_chanfilter.cpp | 7 | ||||
-rw-r--r-- | src/modules/m_chanprotect.cpp | 7 | ||||
-rw-r--r-- | src/modules/m_joinflood.cpp | 7 | ||||
-rw-r--r-- | src/modules/m_kicknorejoin.cpp | 7 | ||||
-rw-r--r-- | src/modules/m_knock.cpp | 6 | ||||
-rw-r--r-- | src/modules/m_messageflood.cpp | 7 | ||||
-rw-r--r-- | src/modules/m_noctcp.cpp | 8 | ||||
-rw-r--r-- | src/modules/m_noinvite.cpp | 89 | ||||
-rw-r--r-- | src/modules/m_nokicks.cpp | 7 | ||||
-rw-r--r-- | src/modules/m_nonicks.cpp | 13 | ||||
-rw-r--r-- | src/modules/m_nonotice.cpp | 10 | ||||
-rw-r--r-- | src/modules/m_operchans.cpp | 12 | ||||
-rw-r--r-- | src/modules/m_operlog.cpp | 1 | ||||
-rw-r--r-- | src/modules/m_redirect.cpp | 10 | ||||
-rw-r--r-- | src/modules/m_services.cpp | 11 | ||||
-rw-r--r-- | src/modules/m_services_account.cpp | 11 | ||||
-rw-r--r-- | src/modules/m_sslmodes.cpp | 25 | ||||
-rw-r--r-- | src/modules/m_stripcolor.cpp | 11 |
21 files changed, 73 insertions, 198 deletions
diff --git a/src/modules/m_blockcaps.cpp b/src/modules/m_blockcaps.cpp index a5a2ae5ff..ee57efafe 100644 --- a/src/modules/m_blockcaps.cpp +++ b/src/modules/m_blockcaps.cpp @@ -18,7 +18,6 @@ #include "users.h" #include "channels.h" #include "modules.h" - #include "inspircd.h" #include "mode.h" @@ -69,11 +68,7 @@ public: void Implements(char* List) { - List[I_On005Numeric] = List[I_OnUserPreMessage] = List[I_OnUserPreNotice] = 1; - } - - virtual void On005Numeric(std::string &output) - { + List[I_OnUserPreMessage] = List[I_OnUserPreNotice] = 1; } virtual int OnUserPreMessage(userrec* user,void* dest,int target_type, std::string &text, char status) diff --git a/src/modules/m_blockcolor.cpp b/src/modules/m_blockcolor.cpp index 2c73da3fc..d424a74ef 100644 --- a/src/modules/m_blockcolor.cpp +++ b/src/modules/m_blockcolor.cpp @@ -21,7 +21,6 @@ using namespace std; #include "users.h" #include "channels.h" #include "modules.h" - #include "inspircd.h" /* $ModDesc: Provides support for unreal-style channel mode +c */ @@ -71,13 +70,9 @@ class ModuleBlockColour : public Module void Implements(char* List) { - List[I_On005Numeric] = List[I_OnUserPreMessage] = List[I_OnUserPreNotice] = 1; + List[I_OnUserPreMessage] = List[I_OnUserPreNotice] = 1; } - virtual void On005Numeric(std::string &output) - { - } - virtual int OnUserPreMessage(userrec* user,void* dest,int target_type, std::string &text, char status) { if (target_type == TYPE_CHANNEL) diff --git a/src/modules/m_censor.cpp b/src/modules/m_censor.cpp index bbf148657..acc93fa6c 100644 --- a/src/modules/m_censor.cpp +++ b/src/modules/m_censor.cpp @@ -21,7 +21,6 @@ using namespace std; #include "users.h" #include "channels.h" #include "modules.h" - #include "inspircd.h" typedef std::map<irc::string,irc::string> censor_t; @@ -133,14 +132,9 @@ class ModuleCensor : public Module void Implements(char* List) { - List[I_OnRehash] = List[I_On005Numeric] = List[I_OnUserPreMessage] = List[I_OnUserPreNotice] = 1; + List[I_OnRehash] = List[I_OnUserPreMessage] = List[I_OnUserPreNotice] = 1; } - - virtual void On005Numeric(std::string &output) - { - } - virtual ~ModuleCensor() { DELETE(cu); diff --git a/src/modules/m_chanfilter.cpp b/src/modules/m_chanfilter.cpp index 52ba5c0a0..ed231df9c 100644 --- a/src/modules/m_chanfilter.cpp +++ b/src/modules/m_chanfilter.cpp @@ -22,7 +22,6 @@ using namespace std; #include "users.h" #include "channels.h" #include "modules.h" - #include "hashcomp.h" #include "u_listmode.h" #include "inspircd.h" @@ -81,11 +80,7 @@ class ModuleChanFilter : public Module void Implements(char* List) { cf->DoImplements(List); - List[I_OnCleanup] = List[I_On005Numeric] = List[I_OnChannelDelete] = List[I_OnRehash] = List[I_OnUserPreMessage] = List[I_OnUserPreNotice] = List[I_OnSyncChannel] = 1; - } - - virtual void On005Numeric(std::string &output) - { + List[I_OnCleanup] = List[I_OnChannelDelete] = List[I_OnRehash] = List[I_OnUserPreMessage] = List[I_OnUserPreNotice] = List[I_OnSyncChannel] = 1; } virtual void OnChannelDelete(chanrec* chan) diff --git a/src/modules/m_chanprotect.cpp b/src/modules/m_chanprotect.cpp index e5df3e1ca..55519c965 100644 --- a/src/modules/m_chanprotect.cpp +++ b/src/modules/m_chanprotect.cpp @@ -17,7 +17,6 @@ #include "users.h" #include "channels.h" #include "modules.h" - #include "inspircd.h" #include "commands.h" @@ -282,11 +281,7 @@ class ModuleChanProtect : public Module void Implements(char* List) { - List[I_On005Numeric] = List[I_OnUserKick] = List[I_OnUserPart] = List[I_OnRehash] = List[I_OnUserJoin] = List[I_OnAccessCheck] = List[I_OnSyncChannel] = 1; - } - - virtual void On005Numeric(std::string &output) - { + List[I_OnUserKick] = List[I_OnUserPart] = List[I_OnRehash] = List[I_OnUserJoin] = List[I_OnAccessCheck] = List[I_OnSyncChannel] = 1; } virtual void OnUserKick(userrec* source, userrec* user, chanrec* chan, const std::string &reason) diff --git a/src/modules/m_joinflood.cpp b/src/modules/m_joinflood.cpp index 7fc978e4c..83feb2e59 100644 --- a/src/modules/m_joinflood.cpp +++ b/src/modules/m_joinflood.cpp @@ -21,7 +21,6 @@ using namespace std; #include "users.h" #include "channels.h" #include "modules.h" - #include "configreader.h" #include "inspircd.h" @@ -240,11 +239,7 @@ class ModuleJoinFlood : public Module void Implements(char* List) { - List[I_On005Numeric] = List[I_OnChannelDelete] = List[I_OnUserPreJoin] = List[I_OnUserJoin] = 1; - } - - virtual void On005Numeric(std::string &output) - { + List[I_OnChannelDelete] = List[I_OnUserPreJoin] = List[I_OnUserJoin] = 1; } virtual ~ModuleJoinFlood() diff --git a/src/modules/m_kicknorejoin.cpp b/src/modules/m_kicknorejoin.cpp index 353d62ead..d64c60d56 100644 --- a/src/modules/m_kicknorejoin.cpp +++ b/src/modules/m_kicknorejoin.cpp @@ -5,7 +5,6 @@ #include "users.h" #include "channels.h" #include "modules.h" - #include "inspircd.h" /* $ModDesc: Provides channel mode +J (delay rejoin after kick) */ @@ -163,11 +162,7 @@ public: virtual void Implements(char* List) { - List[I_OnCleanup] = List[I_On005Numeric] = List[I_OnChannelDelete] = List[I_OnUserPreJoin] = List[I_OnUserKick] = 1; - } - - virtual void On005Numeric(std::string &output) - { + List[I_OnCleanup] = List[I_OnChannelDelete] = List[I_OnUserPreJoin] = List[I_OnUserKick] = 1; } virtual ~ModuleKickNoRejoin() diff --git a/src/modules/m_knock.cpp b/src/modules/m_knock.cpp index de9010f89..035594345 100644 --- a/src/modules/m_knock.cpp +++ b/src/modules/m_knock.cpp @@ -21,7 +21,6 @@ using namespace std; #include "users.h" #include "channels.h" #include "modules.h" - #include "configreader.h" #include "inspircd.h" @@ -120,11 +119,6 @@ class ModuleKnock : public Module void Implements(char* List) { - List[I_On005Numeric] = 1; - } - - virtual void On005Numeric(std::string &output) - { } virtual ~ModuleKnock() diff --git a/src/modules/m_messageflood.cpp b/src/modules/m_messageflood.cpp index dc2513f3d..3eccb868d 100644 --- a/src/modules/m_messageflood.cpp +++ b/src/modules/m_messageflood.cpp @@ -21,7 +21,6 @@ using namespace std; #include "users.h" #include "channels.h" #include "modules.h" - #include "inspircd.h" /* $ModDesc: Provides channel mode +f (message flood protection) */ @@ -260,11 +259,7 @@ class ModuleMsgFlood : public Module void Implements(char* List) { - List[I_On005Numeric] = List[I_OnChannelDelete] = List[I_OnUserNotice] = List[I_OnUserMessage] = 1; - } - - virtual void On005Numeric(std::string &output) - { + List[I_OnChannelDelete] = List[I_OnUserNotice] = List[I_OnUserMessage] = 1; } virtual ~ModuleMsgFlood() diff --git a/src/modules/m_noctcp.cpp b/src/modules/m_noctcp.cpp index 008fdae5e..2891abd5e 100644 --- a/src/modules/m_noctcp.cpp +++ b/src/modules/m_noctcp.cpp @@ -16,11 +16,9 @@ using namespace std; -#include <stdio.h> #include "users.h" #include "channels.h" #include "modules.h" - #include "inspircd.h" /* $ModDesc: Provides support for unreal-style channel mode +c */ @@ -72,13 +70,9 @@ class ModuleNoCTCP : public Module void Implements(char* List) { - List[I_On005Numeric] = List[I_OnUserPreMessage] = List[I_OnUserPreNotice] = 1; + List[I_OnUserPreMessage] = List[I_OnUserPreNotice] = 1; } - virtual void On005Numeric(std::string &output) - { - } - virtual int OnUserPreMessage(userrec* user,void* dest,int target_type, std::string &text, char status) { return OnUserPreNotice(user,dest,target_type,text,status); diff --git a/src/modules/m_noinvite.cpp b/src/modules/m_noinvite.cpp index 158dec8b2..34df272bf 100644 --- a/src/modules/m_noinvite.cpp +++ b/src/modules/m_noinvite.cpp @@ -16,17 +16,13 @@ using namespace std; -#include <stdio.h> #include "users.h" #include "channels.h" #include "modules.h" - #include "inspircd.h" /* $ModDesc: Provides support for unreal-style channel mode +V */ - - class NoInvite : public ModeHandler { public: @@ -57,66 +53,57 @@ class NoInvite : public ModeHandler class ModuleNoInvite : public Module { - NoInvite *ni; - - public: - - ModuleNoInvite(InspIRCd* Me) : Module::Module(Me) - { - - ni = new NoInvite(ServerInstance); - ServerInstance->AddMode(ni, 'V'); - } - - void Implements(char* List) - { - List[I_On005Numeric] = List[I_OnUserPreInvite] = 1; - } + public: - virtual void On005Numeric(std::string &output) - { - } + ModuleNoInvite(InspIRCd* Me) : Module::Module(Me) + { + ni = new NoInvite(ServerInstance); + ServerInstance->AddMode(ni, 'V'); + } + void Implements(char* List) + { + List[I_OnUserPreInvite] = 1; + } - virtual int OnUserPreInvite(userrec* user,userrec* dest,chanrec* channel) + virtual int OnUserPreInvite(userrec* user,userrec* dest,chanrec* channel) + { + if (channel->IsModeSet('V')) { - if (channel->IsModeSet('V')) - { - user->WriteServ("492 %s %s :Can't invite %s to channel (+V set)",user->nick, channel->name, dest->nick); - return 1; - } - return 0; + user->WriteServ("492 %s %s :Can't invite %s to channel (+V set)",user->nick, channel->name, dest->nick); + return 1; } + return 0; + } - virtual ~ModuleNoInvite() - { - DELETE(ni); - } + virtual ~ModuleNoInvite() + { + DELETE(ni); + } - virtual Version GetVersion() - { - return Version(1,0,0,0,VF_STATIC|VF_VENDOR); - } + virtual Version GetVersion() + { + return Version(1,0,0,0,VF_STATIC|VF_VENDOR); + } }; class ModuleNoInviteFactory : public ModuleFactory { - public: - ModuleNoInviteFactory() - { - } - - ~ModuleNoInviteFactory() - { - } - - virtual Module * CreateModule(InspIRCd* Me) - { - return new ModuleNoInvite(Me); - } - + public: + ModuleNoInviteFactory() + { + } + + ~ModuleNoInviteFactory() + { + } + + virtual Module * CreateModule(InspIRCd* Me) + { + return new ModuleNoInvite(Me); + } }; diff --git a/src/modules/m_nokicks.cpp b/src/modules/m_nokicks.cpp index 5936d4ccd..bc7a61550 100644 --- a/src/modules/m_nokicks.cpp +++ b/src/modules/m_nokicks.cpp @@ -20,7 +20,6 @@ using namespace std; #include "users.h" #include "channels.h" #include "modules.h" - #include "inspircd.h" /* $ModDesc: Provides support for unreal-style channel mode +Q */ @@ -72,11 +71,7 @@ class ModuleNoKicks : public Module void Implements(char* List) { - List[I_On005Numeric] = List[I_OnAccessCheck] = 1; - } - - virtual void On005Numeric(std::string &output) - { + List[I_OnAccessCheck] = 1; } virtual int OnAccessCheck(userrec* source,userrec* dest,chanrec* channel,int access_type) diff --git a/src/modules/m_nonicks.cpp b/src/modules/m_nonicks.cpp index c3caf576a..b77e0ff09 100644 --- a/src/modules/m_nonicks.cpp +++ b/src/modules/m_nonicks.cpp @@ -16,20 +16,15 @@ using namespace std; -#include <stdio.h> -#include <string> #include "users.h" #include "channels.h" #include "modules.h" - #include "hashcomp.h" #include "configreader.h" #include "inspircd.h" /* $ModDesc: Provides support for unreal-style GLOBOPS and umode +g */ - - class NoNicks : public ModeHandler { public: @@ -60,9 +55,7 @@ class NoNicks : public ModeHandler class ModuleNoNickChange : public Module { - NoNicks* nn; - public: ModuleNoNickChange(InspIRCd* Me) : Module::Module(Me) @@ -84,13 +77,9 @@ class ModuleNoNickChange : public Module void Implements(char* List) { - List[I_On005Numeric] = List[I_OnUserPreNick] = 1; + List[I_OnUserPreNick] = 1; } - virtual void On005Numeric(std::string &output) - { - } - virtual int OnUserPreNick(userrec* user, const std::string &newnick) { irc::string server = user->server; diff --git a/src/modules/m_nonotice.cpp b/src/modules/m_nonotice.cpp index 978353229..792c0a094 100644 --- a/src/modules/m_nonotice.cpp +++ b/src/modules/m_nonotice.cpp @@ -16,17 +16,13 @@ using namespace std; -#include <stdio.h> #include "users.h" #include "channels.h" #include "modules.h" - #include "inspircd.h" /* $ModDesc: Provides support for unreal-style channel mode +T */ - - class NoNotice : public ModeHandler { public: @@ -71,7 +67,7 @@ class ModuleNoNotice : public Module void Implements(char* List) { - List[I_OnUserPreNotice] = List[I_On005Numeric] = 1; + List[I_OnUserPreNotice] = 1; } virtual int OnUserPreNotice(userrec* user,void* dest,int target_type, std::string &text, char status) @@ -96,10 +92,6 @@ class ModuleNoNotice : public Module return 0; } - virtual void On005Numeric(std::string &output) - { - } - virtual ~ModuleNoNotice() { DELETE(nt); diff --git a/src/modules/m_operchans.cpp b/src/modules/m_operchans.cpp index c4c95bcdc..7f3b989aa 100644 --- a/src/modules/m_operchans.cpp +++ b/src/modules/m_operchans.cpp @@ -16,17 +16,13 @@ using namespace std; -#include <stdio.h> #include "users.h" #include "channels.h" #include "modules.h" - #include "inspircd.h" /* $ModDesc: Provides support for oper-only chans via the +O channel mode */ - - class OperChans : public ModeHandler { public: @@ -71,13 +67,9 @@ class ModuleOperChans : public Module void Implements(char* List) { - List[I_On005Numeric] = List[I_OnUserPreJoin] = 1; - } - - virtual void On005Numeric(std::string &output) - { + List[I_OnUserPreJoin] = 1; } - + virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname) { if (!*user->oper) diff --git a/src/modules/m_operlog.cpp b/src/modules/m_operlog.cpp index cf5b80a38..062e81979 100644 --- a/src/modules/m_operlog.cpp +++ b/src/modules/m_operlog.cpp @@ -19,7 +19,6 @@ using namespace std; #include "users.h" #include "channels.h" #include "modules.h" - #include "inspircd.h" #include <vector> diff --git a/src/modules/m_redirect.cpp b/src/modules/m_redirect.cpp index 34961e013..dbf6f1127 100644 --- a/src/modules/m_redirect.cpp +++ b/src/modules/m_redirect.cpp @@ -16,17 +16,13 @@ using namespace std; -#include <stdio.h> #include "users.h" #include "channels.h" #include "modules.h" - #include "inspircd.h" /* $ModDesc: Provides channel mode +L (limit redirection) */ - - class Redirect : public ModeHandler { public: @@ -120,13 +116,9 @@ class ModuleRedirect : public Module void Implements(char* List) { - List[I_On005Numeric] = List[I_OnUserPreJoin] = 1; + List[I_OnUserPreJoin] = 1; } - virtual void On005Numeric(std::string &output) - { - } - virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname) { if (chan) diff --git a/src/modules/m_services.cpp b/src/modules/m_services.cpp index aad54ffa2..dc33cb9ed 100644 --- a/src/modules/m_services.cpp +++ b/src/modules/m_services.cpp @@ -16,12 +16,9 @@ using namespace std; -#include <stdio.h> #include "users.h" #include "channels.h" #include "modules.h" -#include <string> - #include "commands.h" #include "hashcomp.h" #include "inspircd.h" @@ -30,8 +27,6 @@ static bool kludgeme = false; /* $ModDesc: Povides support for services +r user/chan modes and more */ - - class Channel_r : public ModeHandler { @@ -189,10 +184,6 @@ class ModuleServices : public Module kludgeme = false; } - virtual void On005Numeric(std::string &output) - { - } - /* <- :stitch.chatspike.net 307 w00t w00t :is a registered nick */ virtual void OnWhois(userrec* source, userrec* dest) { @@ -205,7 +196,7 @@ class ModuleServices : public Module void Implements(char* List) { - List[I_OnWhois] = List[I_OnUserPostNick] = List[I_OnUserPreMessage] = List[I_On005Numeric] = List[I_OnUserPreNotice] = List[I_OnUserPreJoin] = 1; + List[I_OnWhois] = List[I_OnUserPostNick] = List[I_OnUserPreMessage] = List[I_OnUserPreNotice] = List[I_OnUserPreJoin] = 1; } virtual void OnUserPostNick(userrec* user, const std::string &oldnick) diff --git a/src/modules/m_services_account.cpp b/src/modules/m_services_account.cpp index aff73dde5..97233a7d3 100644 --- a/src/modules/m_services_account.cpp +++ b/src/modules/m_services_account.cpp @@ -16,19 +16,14 @@ using namespace std; -#include <stdio.h> #include "users.h" #include "channels.h" #include "modules.h" -#include <string> - #include "hashcomp.h" #include "inspircd.h" /* $ModDesc: Povides support for ircu-style services accounts, including chmode +R, etc. */ - - class AChannel_R : public ModeHandler { public: @@ -131,10 +126,6 @@ class ModuleServicesAccount : public Module ServerInstance->AddMode(m3, 'R'); } - virtual void On005Numeric(std::string &output) - { - } - /* <- :twisted.oscnet.org 330 w00t2 w00t2 w00t :is logged in as */ virtual void OnWhois(userrec* source, userrec* dest) { @@ -149,7 +140,7 @@ class ModuleServicesAccount : public Module void Implements(char* List) { - List[I_OnWhois] = List[I_OnUserPreMessage] = List[I_On005Numeric] = List[I_OnUserPreNotice] = List[I_OnUserPreJoin] = 1; + List[I_OnWhois] = List[I_OnUserPreMessage] = List[I_OnUserPreNotice] = List[I_OnUserPreJoin] = 1; List[I_OnSyncUserMetaData] = List[I_OnUserQuit] = List[I_OnCleanup] = List[I_OnDecodeMetaData] = 1; } diff --git a/src/modules/m_sslmodes.cpp b/src/modules/m_sslmodes.cpp index 7e26de8c2..bf132b0f4 100644 --- a/src/modules/m_sslmodes.cpp +++ b/src/modules/m_sslmodes.cpp @@ -1,15 +1,28 @@ +/* +------------------------------------+ + * | Inspire Internet Relay Chat Daemon | + * +------------------------------------+ + * + * InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev. + * E-mail: + * <brain@chatspike.net> + * <Craig@chatspike.net> + * + * Written by Craig Edwards, Craig McLure, and others. + * This program is free but copyrighted software; see + * the file COPYING for details. + * + * --------------------------------------------------- + */ + #include "users.h" #include "channels.h" #include "modules.h" - #include "inspircd.h" /* $ModDesc: Provides support for unreal-style channel mode +z */ static char* dummy; - - class SSLMode : public ModeHandler { public: @@ -71,13 +84,9 @@ class ModuleSSLModes : public Module void Implements(char* List) { - List[I_On005Numeric] = List[I_OnUserPreJoin] = 1; + List[I_OnUserPreJoin] = 1; } - virtual void On005Numeric(std::string &output) - { - } - virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname) { if(chan && chan->IsModeSet('z')) diff --git a/src/modules/m_stripcolor.cpp b/src/modules/m_stripcolor.cpp index d3372d848..dd5e3caf0 100644 --- a/src/modules/m_stripcolor.cpp +++ b/src/modules/m_stripcolor.cpp @@ -16,18 +16,13 @@ using namespace std; -#include <stdio.h> -#include <string> #include "users.h" #include "channels.h" #include "modules.h" - #include "inspircd.h" /* $ModDesc: Provides channel +S mode (strip ansi colour) */ - - class ChannelStripColor : public ModeHandler { public: @@ -115,13 +110,9 @@ class ModuleStripColor : public Module void Implements(char* List) { - List[I_On005Numeric] = List[I_OnUserPreMessage] = List[I_OnUserPreNotice] = 1; + List[I_OnUserPreMessage] = List[I_OnUserPreNotice] = 1; } - virtual void On005Numeric(std::string &output) - { - } - virtual ~ModuleStripColor() { DELETE(usc); |