summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-08 21:02:53 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-08 21:02:53 +0000
commitf74b9b3debdf67e4f35483b3617515e43b686ccf (patch)
tree7228b08699c2d55a86a5bb8da0de1c9ded64c5b0 /src/modules
parent793d2364d907a73918eef1166b60f964ed0d384b (diff)
Convert to new API
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4190 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_inviteexception.cpp40
1 files changed, 36 insertions, 4 deletions
diff --git a/src/modules/m_inviteexception.cpp b/src/modules/m_inviteexception.cpp
index 0b80934f7..7a54d4d24 100644
--- a/src/modules/m_inviteexception.cpp
+++ b/src/modules/m_inviteexception.cpp
@@ -4,6 +4,7 @@
#include "users.h"
#include "channels.h"
#include "modules.h"
+#include "mode.h"
#include "helperfuncs.h"
#include "u_listmode.h"
@@ -18,16 +19,27 @@
* ignoring if +i is set on the channel
*/
-class ModuleInviteException : public ListModeBaseModule
+class InviteException : public ListModeBase
{
+ public:
+ InviteException(Server* serv) : ListModeBase(serv, 'I', "End of Channel Invite Exception List", "346", "347") { }
+};
+
+class ModuleInviteException : public Module
+{
+ InviteException* ie;
+ Server* Srv;
+
public:
- ModuleInviteException(Server* serv) : ListModeBaseModule::ListModeBaseModule(serv, 'I', "End of Channel Invite Exception List", "346", "347")
+ ModuleInviteException(Server* serv) : Module(serv)
{
+ ie = new BanException(serv);
+ Srv = serv;
}
virtual void Implements(char* List)
{
- this->DoImplements(List);
+ ie->DoImplements(List);
List[I_On005Numeric] = List[I_OnCheckInvite] = 1;
}
@@ -41,7 +53,7 @@ public:
{
if(chan != NULL)
{
- modelist* list = (modelist*)chan->GetExt(infokey);
+ modelist* list = (modelist*)chan->GetExt(ie->GetInfoKey());
Srv->Log(DEBUG, std::string(user->nick)+" is trying to join "+std::string(chan->name)+", checking for invite exceptions");
if (list)
{
@@ -59,6 +71,26 @@ public:
return 0;
}
+
+ virtual void OnCleanup(int target_type, void* item)
+ {
+ ie->DoCleanup(target_type, item);
+ }
+
+ virtual void OnSyncChannel(chanrec* chan, Module* proto, void* opaque)
+ {
+ ie->DoSyncChannel(chan, proto, opaque);
+ }
+
+ virtual void OnChannelDelete(chanrec* chan)
+ {
+ ie->DoChannelDelete(chan);
+ }
+
+ virtual void OnRehash(const std::string &param)
+ {
+ ie->DoRehash();
+ }
virtual Version GetVersion()
{