summaryrefslogtreecommitdiff
path: root/src/modes
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-10 22:40:57 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-10 22:40:57 +0000
commitf9636a2eff46f6829bf9e01c711ab1ba45a7d50a (patch)
tree4fd9dc8529e9e0adbd5acb47b5fa0f960aef195c /src/modes
parent24b1fbeec8e61e9636daaf606778c324d3ae3042 (diff)
So much stuff changed in this one, i forgot most of it.
Oh yeah, main thing is ModeHandler and ModeWatcher classes now take an InspIRCd* to their constructor git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4858 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modes')
-rw-r--r--src/modes/cmode_b.cpp7
-rw-r--r--src/modes/cmode_h.cpp15
-rw-r--r--src/modes/cmode_i.cpp2
-rw-r--r--src/modes/cmode_k.cpp2
-rw-r--r--src/modes/cmode_l.cpp2
-rw-r--r--src/modes/cmode_m.cpp2
-rw-r--r--src/modes/cmode_n.cpp2
-rw-r--r--src/modes/cmode_o.cpp15
-rw-r--r--src/modes/cmode_p.cpp2
-rw-r--r--src/modes/cmode_s.cpp2
-rw-r--r--src/modes/cmode_t.cpp2
-rw-r--r--src/modes/cmode_v.cpp15
-rw-r--r--src/modes/umode_i.cpp2
-rw-r--r--src/modes/umode_n.cpp2
-rw-r--r--src/modes/umode_o.cpp2
-rw-r--r--src/modes/umode_s.cpp2
-rw-r--r--src/modes/umode_w.cpp2
17 files changed, 29 insertions, 49 deletions
diff --git a/src/modes/cmode_b.cpp b/src/modes/cmode_b.cpp
index 8c1c2cd63..f265c1094 100644
--- a/src/modes/cmode_b.cpp
+++ b/src/modes/cmode_b.cpp
@@ -13,14 +13,9 @@
#include "hashcomp.h"
#include "modes/cmode_b.h"
-extern InspIRCd* ServerInstance;
-extern InspIRCd* ServerInstance;
-extern std::vector<Module*> modules;
-extern std::vector<ircd_module*> factory;
-extern int MODCOUNT;
extern time_t TIME;
-ModeChannelBan::ModeChannelBan() : ModeHandler('b', 1, 1, true, MODETYPE_CHANNEL, false)
+ModeChannelBan::ModeChannelBan(InspIRCd* Instance) : ModeHandler(Instance, 'b', 1, 1, true, MODETYPE_CHANNEL, false)
{
}
diff --git a/src/modes/cmode_h.cpp b/src/modes/cmode_h.cpp
index 0fd4bfa07..493d4f776 100644
--- a/src/modes/cmode_h.cpp
+++ b/src/modes/cmode_h.cpp
@@ -14,14 +14,9 @@
#include "hashcomp.h"
#include "modes/cmode_h.h"
-extern InspIRCd* ServerInstance;
-
-extern std::vector<Module*> modules;
-extern std::vector<ircd_module*> factory;
-extern int MODCOUNT;
extern time_t TIME;
-ModeChannelHalfOp::ModeChannelHalfOp() : ModeHandler('h', 1, 1, true, MODETYPE_CHANNEL, false)
+ModeChannelHalfOp::ModeChannelHalfOp(InspIRCd* Instance) : ModeHandler(Instance, 'h', 1, 1, true, MODETYPE_CHANNEL, false)
{
}
@@ -74,7 +69,7 @@ ModeAction ModeChannelHalfOp::OnModeChange(userrec* source, userrec* dest, chanr
std::string ModeChannelHalfOp::AddHalfOp(userrec *user,const char* dest,chanrec *chan,int status)
{
- userrec *d = ModeParser::SanityChecks(user,dest,chan,status);
+ userrec *d = ServerInstance->ModeGrok->SanityChecks(user,dest,chan,status);
if (d)
{
@@ -95,14 +90,14 @@ std::string ModeChannelHalfOp::AddHalfOp(userrec *user,const char* dest,chanrec
}
}
- return ModeParser::Grant(d,chan,UCMODE_HOP);
+ return ServerInstance->ModeGrok->Grant(d,chan,UCMODE_HOP);
}
return "";
}
std::string ModeChannelHalfOp::DelHalfOp(userrec *user,const char *dest,chanrec *chan,int status)
{
- userrec *d = ModeParser::SanityChecks(user,dest,chan,status);
+ userrec *d = ServerInstance->ModeGrok->SanityChecks(user,dest,chan,status);
if (d)
{
@@ -123,7 +118,7 @@ std::string ModeChannelHalfOp::DelHalfOp(userrec *user,const char *dest,chanrec
}
}
- return ModeParser::Revoke(d,chan,UCMODE_HOP);
+ return ServerInstance->ModeGrok->Revoke(d,chan,UCMODE_HOP);
}
return "";
}
diff --git a/src/modes/cmode_i.cpp b/src/modes/cmode_i.cpp
index d74ac86e7..78115cb60 100644
--- a/src/modes/cmode_i.cpp
+++ b/src/modes/cmode_i.cpp
@@ -4,7 +4,7 @@
#include "users.h"
#include "modes/cmode_i.h"
-ModeChannelInviteOnly::ModeChannelInviteOnly() : ModeHandler('i', 0, 0, false, MODETYPE_CHANNEL, false)
+ModeChannelInviteOnly::ModeChannelInviteOnly(InspIRCd* Instance) : ModeHandler(Instance, 'i', 0, 0, false, MODETYPE_CHANNEL, false)
{
}
diff --git a/src/modes/cmode_k.cpp b/src/modes/cmode_k.cpp
index e509447f3..8e00f96f7 100644
--- a/src/modes/cmode_k.cpp
+++ b/src/modes/cmode_k.cpp
@@ -4,7 +4,7 @@
#include "users.h"
#include "modes/cmode_k.h"
-ModeChannelKey::ModeChannelKey() : ModeHandler('k', 1, 1, false, MODETYPE_CHANNEL, false)
+ModeChannelKey::ModeChannelKey(InspIRCd* Instance) : ModeHandler(Instance, 'k', 1, 1, false, MODETYPE_CHANNEL, false)
{
}
diff --git a/src/modes/cmode_l.cpp b/src/modes/cmode_l.cpp
index cdbf0f58f..3bdacd60e 100644
--- a/src/modes/cmode_l.cpp
+++ b/src/modes/cmode_l.cpp
@@ -4,7 +4,7 @@
#include "users.h"
#include "modes/cmode_l.h"
-ModeChannelLimit::ModeChannelLimit() : ModeHandler('l', 1, 0, false, MODETYPE_CHANNEL, false)
+ModeChannelLimit::ModeChannelLimit(InspIRCd* Instance) : ModeHandler(Instance, 'l', 1, 0, false, MODETYPE_CHANNEL, false)
{
}
diff --git a/src/modes/cmode_m.cpp b/src/modes/cmode_m.cpp
index b3c41df12..d3826d19f 100644
--- a/src/modes/cmode_m.cpp
+++ b/src/modes/cmode_m.cpp
@@ -4,7 +4,7 @@
#include "users.h"
#include "modes/cmode_m.h"
-ModeChannelModerated::ModeChannelModerated() : ModeHandler('m', 0, 0, false, MODETYPE_CHANNEL, false)
+ModeChannelModerated::ModeChannelModerated(InspIRCd* Instance) : ModeHandler(Instance, 'm', 0, 0, false, MODETYPE_CHANNEL, false)
{
}
diff --git a/src/modes/cmode_n.cpp b/src/modes/cmode_n.cpp
index 85b45626a..b7f3ff23d 100644
--- a/src/modes/cmode_n.cpp
+++ b/src/modes/cmode_n.cpp
@@ -4,7 +4,7 @@
#include "users.h"
#include "modes/cmode_n.h"
-ModeChannelNoExternal::ModeChannelNoExternal() : ModeHandler('n', 0, 0, false, MODETYPE_CHANNEL, false)
+ModeChannelNoExternal::ModeChannelNoExternal(InspIRCd* Instance) : ModeHandler(Instance, 'n', 0, 0, false, MODETYPE_CHANNEL, false)
{
}
diff --git a/src/modes/cmode_o.cpp b/src/modes/cmode_o.cpp
index 75e088635..528cd4ede 100644
--- a/src/modes/cmode_o.cpp
+++ b/src/modes/cmode_o.cpp
@@ -14,14 +14,9 @@
#include "hashcomp.h"
#include "modes/cmode_o.h"
-extern InspIRCd* ServerInstance;
-
-extern std::vector<Module*> modules;
-extern std::vector<ircd_module*> factory;
-extern int MODCOUNT;
extern time_t TIME;
-ModeChannelOp::ModeChannelOp() : ModeHandler('o', 1, 1, true, MODETYPE_CHANNEL, false)
+ModeChannelOp::ModeChannelOp(InspIRCd* Instance) : ModeHandler(Instance, 'o', 1, 1, true, MODETYPE_CHANNEL, false)
{
}
@@ -65,7 +60,7 @@ ModeAction ModeChannelOp::OnModeChange(userrec* source, userrec* dest, chanrec*
std::string ModeChannelOp::AddOp(userrec *user,const char* dest,chanrec *chan,int status)
{
- userrec *d = ModeParser::SanityChecks(user,dest,chan,status);
+ userrec *d = ServerInstance->ModeGrok->SanityChecks(user,dest,chan,status);
if (d)
{
@@ -86,14 +81,14 @@ std::string ModeChannelOp::AddOp(userrec *user,const char* dest,chanrec *chan,in
}
}
- return ModeParser::Grant(d,chan,UCMODE_OP);
+ return ServerInstance->ModeGrok->Grant(d,chan,UCMODE_OP);
}
return "";
}
std::string ModeChannelOp::DelOp(userrec *user,const char *dest,chanrec *chan,int status)
{
- userrec *d = ModeParser::SanityChecks(user,dest,chan,status);
+ userrec *d = ServerInstance->ModeGrok->SanityChecks(user,dest,chan,status);
if (d)
{
@@ -117,7 +112,7 @@ std::string ModeChannelOp::DelOp(userrec *user,const char *dest,chanrec *chan,in
}
}
- return ModeParser::Revoke(d,chan,UCMODE_OP);
+ return ServerInstance->ModeGrok->Revoke(d,chan,UCMODE_OP);
}
return "";
}
diff --git a/src/modes/cmode_p.cpp b/src/modes/cmode_p.cpp
index ef4892fc3..cff09895f 100644
--- a/src/modes/cmode_p.cpp
+++ b/src/modes/cmode_p.cpp
@@ -4,7 +4,7 @@
#include "users.h"
#include "modes/cmode_p.h"
-ModeChannelPrivate::ModeChannelPrivate() : ModeHandler('p', 0, 0, false, MODETYPE_CHANNEL, false)
+ModeChannelPrivate::ModeChannelPrivate(InspIRCd* Instance) : ModeHandler(Instance, 'p', 0, 0, false, MODETYPE_CHANNEL, false)
{
}
diff --git a/src/modes/cmode_s.cpp b/src/modes/cmode_s.cpp
index eec99b91d..800f9f6cb 100644
--- a/src/modes/cmode_s.cpp
+++ b/src/modes/cmode_s.cpp
@@ -4,7 +4,7 @@
#include "users.h"
#include "modes/cmode_s.h"
-ModeChannelSecret::ModeChannelSecret() : ModeHandler('s', 0, 0, false, MODETYPE_CHANNEL, false)
+ModeChannelSecret::ModeChannelSecret(InspIRCd* Instance) : ModeHandler(Instance, 's', 0, 0, false, MODETYPE_CHANNEL, false)
{
}
diff --git a/src/modes/cmode_t.cpp b/src/modes/cmode_t.cpp
index 836c86f34..b2484ff12 100644
--- a/src/modes/cmode_t.cpp
+++ b/src/modes/cmode_t.cpp
@@ -4,7 +4,7 @@
#include "users.h"
#include "modes/cmode_t.h"
-ModeChannelTopicOps::ModeChannelTopicOps() : ModeHandler('t', 0, 0, false, MODETYPE_CHANNEL, false)
+ModeChannelTopicOps::ModeChannelTopicOps(InspIRCd* Instance) : ModeHandler(Instance, 't', 0, 0, false, MODETYPE_CHANNEL, false)
{
}
diff --git a/src/modes/cmode_v.cpp b/src/modes/cmode_v.cpp
index 7888666ca..c834c47fd 100644
--- a/src/modes/cmode_v.cpp
+++ b/src/modes/cmode_v.cpp
@@ -14,14 +14,9 @@
#include "hashcomp.h"
#include "modes/cmode_v.h"
-extern InspIRCd* ServerInstance;
-
-extern std::vector<Module*> modules;
-extern std::vector<ircd_module*> factory;
-extern int MODCOUNT;
extern time_t TIME;
-ModeChannelVoice::ModeChannelVoice() : ModeHandler('v', 1, 1, true, MODETYPE_CHANNEL, false)
+ModeChannelVoice::ModeChannelVoice(InspIRCd* Instance) : ModeHandler(Instance, 'v', 1, 1, true, MODETYPE_CHANNEL, false)
{
}
@@ -65,7 +60,7 @@ ModeAction ModeChannelVoice::OnModeChange(userrec* source, userrec* dest, chanre
std::string ModeChannelVoice::AddVoice(userrec *user,const char* dest,chanrec *chan,int status)
{
- userrec *d = ModeParser::SanityChecks(user,dest,chan,status);
+ userrec *d = ServerInstance->ModeGrok->SanityChecks(user,dest,chan,status);
if (d)
{
@@ -86,14 +81,14 @@ std::string ModeChannelVoice::AddVoice(userrec *user,const char* dest,chanrec *c
}
}
- return ModeParser::Grant(d,chan,UCMODE_VOICE);
+ return ServerInstance->ModeGrok->Grant(d,chan,UCMODE_VOICE);
}
return "";
}
std::string ModeChannelVoice::DelVoice(userrec *user,const char *dest,chanrec *chan,int status)
{
- userrec *d = ModeParser::SanityChecks(user,dest,chan,status);
+ userrec *d = ServerInstance->ModeGrok->SanityChecks(user,dest,chan,status);
if (d)
{
@@ -114,7 +109,7 @@ std::string ModeChannelVoice::DelVoice(userrec *user,const char *dest,chanrec *c
}
}
- return ModeParser::Revoke(d,chan,UCMODE_VOICE);
+ return ServerInstance->ModeGrok->Revoke(d,chan,UCMODE_VOICE);
}
return "";
}
diff --git a/src/modes/umode_i.cpp b/src/modes/umode_i.cpp
index 584a12ff5..60ca4955f 100644
--- a/src/modes/umode_i.cpp
+++ b/src/modes/umode_i.cpp
@@ -4,7 +4,7 @@
#include "users.h"
#include "modes/umode_i.h"
-ModeUserInvisible::ModeUserInvisible() : ModeHandler('i', 0, 0, false, MODETYPE_USER, false)
+ModeUserInvisible::ModeUserInvisible(InspIRCd* Instance) : ModeHandler(Instance, 'i', 0, 0, false, MODETYPE_USER, false)
{
}
diff --git a/src/modes/umode_n.cpp b/src/modes/umode_n.cpp
index 6c1b380f3..e3370fa56 100644
--- a/src/modes/umode_n.cpp
+++ b/src/modes/umode_n.cpp
@@ -4,7 +4,7 @@
#include "users.h"
#include "modes/umode_n.h"
-ModeUserServerNoticeMask::ModeUserServerNoticeMask() : ModeHandler('n', 1, 0, false, MODETYPE_USER, true)
+ModeUserServerNoticeMask::ModeUserServerNoticeMask(InspIRCd* Instance) : ModeHandler(Instance, 'n', 1, 0, false, MODETYPE_USER, true)
{
}
diff --git a/src/modes/umode_o.cpp b/src/modes/umode_o.cpp
index 861fb62dc..356f68d4e 100644
--- a/src/modes/umode_o.cpp
+++ b/src/modes/umode_o.cpp
@@ -4,7 +4,7 @@
#include "users.h"
#include "modes/umode_o.h"
-ModeUserOperator::ModeUserOperator() : ModeHandler('o', 0, 0, false, MODETYPE_USER, true)
+ModeUserOperator::ModeUserOperator(InspIRCd* Instance) : ModeHandler(Instance, 'o', 0, 0, false, MODETYPE_USER, true)
{
}
diff --git a/src/modes/umode_s.cpp b/src/modes/umode_s.cpp
index 0c005f56a..4a5add907 100644
--- a/src/modes/umode_s.cpp
+++ b/src/modes/umode_s.cpp
@@ -4,7 +4,7 @@
#include "users.h"
#include "modes/umode_s.h"
-ModeUserServerNotice::ModeUserServerNotice() : ModeHandler('s', 0, 0, false, MODETYPE_USER, false)
+ModeUserServerNotice::ModeUserServerNotice(InspIRCd* Instance) : ModeHandler(Instance, 's', 0, 0, false, MODETYPE_USER, false)
{
}
diff --git a/src/modes/umode_w.cpp b/src/modes/umode_w.cpp
index 8cfbf8fd2..af00ac17e 100644
--- a/src/modes/umode_w.cpp
+++ b/src/modes/umode_w.cpp
@@ -4,7 +4,7 @@
#include "users.h"
#include "modes/umode_w.h"
-ModeUserWallops::ModeUserWallops() : ModeHandler('w', 0, 0, false, MODETYPE_USER, false)
+ModeUserWallops::ModeUserWallops(InspIRCd* Instance) : ModeHandler(Instance, 'w', 0, 0, false, MODETYPE_USER, false)
{
}