summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/inspircd.h18
-rw-r--r--src/modules.cpp19
-rw-r--r--src/modules/m_auditorium.cpp2
-rw-r--r--src/modules/m_banexception.cpp2
-rw-r--r--src/modules/m_banredirect.cpp2
-rw-r--r--src/modules/m_blockcaps.cpp2
-rw-r--r--src/modules/m_blockcolor.cpp2
-rw-r--r--src/modules/m_botmode.cpp2
-rw-r--r--src/modules/m_censor.cpp2
-rw-r--r--src/modules/m_chanfilter.cpp2
-rw-r--r--src/modules/m_chanprotect.cpp6
-rw-r--r--src/modules/m_cloaking.cpp2
-rw-r--r--src/modules/m_commonchans.cpp2
-rw-r--r--src/modules/m_deaf.cpp2
-rw-r--r--src/modules/m_delayjoin.cpp2
-rw-r--r--src/modules/m_helpop.cpp2
-rw-r--r--src/modules/m_hidechans.cpp2
-rw-r--r--src/modules/m_hideoper.cpp2
-rw-r--r--src/modules/m_invisible.cpp4
-rw-r--r--src/modules/m_inviteexception.cpp2
-rw-r--r--src/modules/m_joinflood.cpp2
-rw-r--r--src/modules/m_kicknorejoin.cpp2
-rw-r--r--src/modules/m_knock.cpp2
-rw-r--r--src/modules/m_messageflood.cpp2
-rw-r--r--src/modules/m_nickflood.cpp2
-rw-r--r--src/modules/m_noctcp.cpp2
-rw-r--r--src/modules/m_noinvite.cpp2
-rw-r--r--src/modules/m_nokicks.cpp2
-rw-r--r--src/modules/m_nonicks.cpp2
-rw-r--r--src/modules/m_nonotice.cpp2
-rw-r--r--src/modules/m_operchans.cpp2
-rw-r--r--src/modules/m_permchannels.cpp2
-rw-r--r--src/modules/m_redirect.cpp2
-rw-r--r--src/modules/m_services.cpp4
-rw-r--r--src/modules/m_services_account.cpp2
-rw-r--r--src/modules/m_servprotect.cpp2
-rw-r--r--src/modules/m_showwhois.cpp2
-rw-r--r--src/modules/m_sslmodes.cpp2
-rw-r--r--src/modules/m_stripcolor.cpp2
39 files changed, 41 insertions, 78 deletions
diff --git a/include/inspircd.h b/include/inspircd.h
index 4a013fbc6..325b4c8fe 100644
--- a/include/inspircd.h
+++ b/include/inspircd.h
@@ -669,24 +669,6 @@ class CoreExport InspIRCd : public classbase
*/
caller1<User*, int> FindDescriptor;
- /** Add a new mode to this server's mode parser
- * @param mh The modehandler to add
- * @return True if the mode handler was added
- */
- bool AddMode(ModeHandler* mh);
-
- /** Add a new mode watcher to this server's mode parser
- * @param mw The modewatcher to add
- * @return True if the modewatcher was added
- */
- bool AddModeWatcher(ModeWatcher* mw);
-
- /** Delete a mode watcher from this server's mode parser
- * @param mw The modewatcher to delete
- * @return True if the modewatcher was deleted
- */
- bool DelModeWatcher(ModeWatcher* mw);
-
/** Add a dns Resolver class to this server's active set
* @param r The resolver to add
* @param cached If this value is true, then the cache will
diff --git a/src/modules.cpp b/src/modules.cpp
index 734d5c2b2..2aae2a00d 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -752,21 +752,6 @@ User* FindDescriptorHandler::Call(int socket)
return reinterpret_cast<User*>(Server->SE->GetRef(socket));
}
-bool InspIRCd::AddMode(ModeHandler* mh)
-{
- return this->Modes->AddMode(mh);
-}
-
-bool InspIRCd::AddModeWatcher(ModeWatcher* mw)
-{
- return this->Modes->AddModeWatcher(mw);
-}
-
-bool InspIRCd::DelModeWatcher(ModeWatcher* mw)
-{
- return this->Modes->DelModeWatcher(mw);
-}
-
bool InspIRCd::AddResolver(Resolver* r, bool cached)
{
if (!cached)
@@ -800,10 +785,6 @@ const std::vector<std::string> ModuleManager::GetAllModuleNames(int filter)
ConfigReader::ConfigReader(InspIRCd* Instance) : ServerInstance(Instance)
{
- /* Is there any reason to load the entire config file again here?
- * it's needed if they specify another config file, but using the
- * default one we can just use the global config data - pre-parsed!
- */
this->errorlog = new std::ostringstream(std::stringstream::in | std::stringstream::out);
this->error = CONF_NO_ERROR;
this->data = &ServerInstance->Config->config_data;
diff --git a/src/modules/m_auditorium.cpp b/src/modules/m_auditorium.cpp
index 441f3c6a1..31533aaa1 100644
--- a/src/modules/m_auditorium.cpp
+++ b/src/modules/m_auditorium.cpp
@@ -54,7 +54,7 @@ class ModuleAuditorium : public Module
: Module(Me)
{
aum = new AuditoriumMode(ServerInstance);
- if (!ServerInstance->AddMode(aum))
+ if (!ServerInstance->Modes->AddMode(aum))
{
delete aum;
throw ModuleException("Could not add new modes!");
diff --git a/src/modules/m_banexception.cpp b/src/modules/m_banexception.cpp
index ed307863f..36cb4a711 100644
--- a/src/modules/m_banexception.cpp
+++ b/src/modules/m_banexception.cpp
@@ -45,7 +45,7 @@ public:
ModuleBanException(InspIRCd* Me) : Module(Me)
{
be = new BanException(ServerInstance);
- if (!ServerInstance->AddMode(be))
+ if (!ServerInstance->Modes->AddMode(be))
throw ModuleException("Could not add new modes!");
ServerInstance->Modules->PublishInterface("ChannelBanList", this);
diff --git a/src/modules/m_banredirect.cpp b/src/modules/m_banredirect.cpp
index 99aa7b155..6517da0a2 100644
--- a/src/modules/m_banredirect.cpp
+++ b/src/modules/m_banredirect.cpp
@@ -193,7 +193,7 @@ class ModuleBanRedirect : public Module
re = new BanRedirect(Me);
nofollow = false;
- if(!ServerInstance->AddModeWatcher(re))
+ if(!ServerInstance->Modes->AddModeWatcher(re))
{
delete re;
throw ModuleException("Could not add mode watcher");
diff --git a/src/modules/m_blockcaps.cpp b/src/modules/m_blockcaps.cpp
index 878ff30d3..56f908dcc 100644
--- a/src/modules/m_blockcaps.cpp
+++ b/src/modules/m_blockcaps.cpp
@@ -58,7 +58,7 @@ public:
{
OnRehash(NULL,"");
bc = new BlockCaps(ServerInstance);
- if (!ServerInstance->AddMode(bc))
+ if (!ServerInstance->Modes->AddMode(bc))
{
delete bc;
throw ModuleException("Could not add new modes!");
diff --git a/src/modules/m_blockcolor.cpp b/src/modules/m_blockcolor.cpp
index 53297483e..0cbb3e8d8 100644
--- a/src/modules/m_blockcolor.cpp
+++ b/src/modules/m_blockcolor.cpp
@@ -54,7 +54,7 @@ class ModuleBlockColour : public Module
ModuleBlockColour(InspIRCd* Me) : Module(Me)
{
bc = new BlockColor(ServerInstance);
- if (!ServerInstance->AddMode(bc))
+ if (!ServerInstance->Modes->AddMode(bc))
throw ModuleException("Could not add new modes!");
Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice };
ServerInstance->Modules->Attach(eventlist, this, 2);
diff --git a/src/modules/m_botmode.cpp b/src/modules/m_botmode.cpp
index 1ff7ff2ca..ab16b3309 100644
--- a/src/modules/m_botmode.cpp
+++ b/src/modules/m_botmode.cpp
@@ -55,7 +55,7 @@ class ModuleBotMode : public Module
{
bm = new BotMode(ServerInstance);
- if (!ServerInstance->AddMode(bm))
+ if (!ServerInstance->Modes->AddMode(bm))
throw ModuleException("Could not add new modes!");
Implementation eventlist[] = { I_OnWhois };
ServerInstance->Modules->Attach(eventlist, this, 1);
diff --git a/src/modules/m_censor.cpp b/src/modules/m_censor.cpp
index 1c7a9999c..a9b679d1b 100644
--- a/src/modules/m_censor.cpp
+++ b/src/modules/m_censor.cpp
@@ -97,7 +97,7 @@ class ModuleCensor : public Module
OnRehash(NULL,"");
cu = new CensorUser(ServerInstance);
cc = new CensorChannel(ServerInstance);
- if (!ServerInstance->AddMode(cu) || !ServerInstance->AddMode(cc))
+ if (!ServerInstance->Modes->AddMode(cu) || !ServerInstance->Modes->AddMode(cc))
{
delete cu;
delete cc;
diff --git a/src/modules/m_chanfilter.cpp b/src/modules/m_chanfilter.cpp
index 5fe3f7d4b..3a6b8e26f 100644
--- a/src/modules/m_chanfilter.cpp
+++ b/src/modules/m_chanfilter.cpp
@@ -66,7 +66,7 @@ class ModuleChanFilter : public Module
: Module(Me)
{
cf = new ChanFilter(ServerInstance);
- if (!ServerInstance->AddMode(cf))
+ if (!ServerInstance->Modes->AddMode(cf))
throw ModuleException("Could not add new modes!");
cf->DoImplements(this);
diff --git a/src/modules/m_chanprotect.cpp b/src/modules/m_chanprotect.cpp
index 95a9efe19..5401d20f5 100644
--- a/src/modules/m_chanprotect.cpp
+++ b/src/modules/m_chanprotect.cpp
@@ -308,7 +308,7 @@ class ModuleChanProtect : public Module
cp = new ChanProtect(ServerInstance,QAPrefixes,DeprivSelf,DeprivOthers);
cf = new ChanFounder(ServerInstance,QAPrefixes,DeprivSelf,DeprivOthers);
- if (!ServerInstance->AddMode(cp) || !ServerInstance->AddMode(cf))
+ if (!ServerInstance->Modes->AddMode(cp) || !ServerInstance->Modes->AddMode(cf))
{
delete cp;
delete cf;
@@ -362,8 +362,8 @@ class ModuleChanProtect : public Module
cp = new ChanProtect(ServerInstance,QAPrefixes,DeprivSelf,DeprivOthers);
cf = new ChanFounder(ServerInstance,QAPrefixes,DeprivSelf,DeprivOthers);
/* These wont fail, we already owned the mode characters before */
- ServerInstance->AddMode(cp);
- ServerInstance->AddMode(cf);
+ ServerInstance->Modes->AddMode(cp);
+ ServerInstance->Modes->AddMode(cf);
ServerInstance->SNO->WriteToSnoMask('A', "WARNING: +qa prefixes were enabled or disabled via a REHASH. Clients will probably need to reconnect to pick up this change.");
}
}
diff --git a/src/modules/m_cloaking.cpp b/src/modules/m_cloaking.cpp
index d9f5be302..8422abd43 100644
--- a/src/modules/m_cloaking.cpp
+++ b/src/modules/m_cloaking.cpp
@@ -337,7 +337,7 @@ class ModuleCloaking : public Module
}
/* Register it with the core */
- if (!ServerInstance->AddMode(cu))
+ if (!ServerInstance->Modes->AddMode(cu))
{
delete cu;
throw ModuleException("Could not add new modes!");
diff --git a/src/modules/m_commonchans.cpp b/src/modules/m_commonchans.cpp
index c584fa1ac..52a010717 100644
--- a/src/modules/m_commonchans.cpp
+++ b/src/modules/m_commonchans.cpp
@@ -52,7 +52,7 @@ class ModulePrivacyMode : public Module
ModulePrivacyMode(InspIRCd* Me) : Module(Me)
{
pm = new PrivacyMode(ServerInstance);
- if (!ServerInstance->AddMode(pm))
+ if (!ServerInstance->Modes->AddMode(pm))
throw ModuleException("Could not add new modes!");
Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice };
ServerInstance->Modules->Attach(eventlist, this, 2);
diff --git a/src/modules/m_deaf.cpp b/src/modules/m_deaf.cpp
index b4db374ad..5d648cff9 100644
--- a/src/modules/m_deaf.cpp
+++ b/src/modules/m_deaf.cpp
@@ -60,7 +60,7 @@ class ModuleDeaf : public Module
: Module(Me)
{
m1 = new User_d(ServerInstance);
- if (!ServerInstance->AddMode(m1))
+ if (!ServerInstance->Modes->AddMode(m1))
throw ModuleException("Could not add new modes!");
OnRehash(NULL, "");
diff --git a/src/modules/m_delayjoin.cpp b/src/modules/m_delayjoin.cpp
index d5af7fdfb..1077e65a7 100644
--- a/src/modules/m_delayjoin.cpp
+++ b/src/modules/m_delayjoin.cpp
@@ -65,7 +65,7 @@ class ModuleDelayJoin : public Module
: Module(Me)
{
djm = new DelayJoinMode(ServerInstance, this);
- if (!ServerInstance->AddMode(djm))
+ if (!ServerInstance->Modes->AddMode(djm))
throw ModuleException("Could not add new modes!");
Implementation eventlist[] = { I_OnUserJoin, I_OnUserPart, I_OnUserKick, I_OnUserQuit, I_OnUserList, I_OnText };
ServerInstance->Modules->Attach(eventlist, this, 6);
diff --git a/src/modules/m_helpop.cpp b/src/modules/m_helpop.cpp
index 3a5934a67..81eb02e8d 100644
--- a/src/modules/m_helpop.cpp
+++ b/src/modules/m_helpop.cpp
@@ -115,7 +115,7 @@ class ModuleHelpop : public Module
{
ReadConfig();
ho = new Helpop(ServerInstance);
- if (!ServerInstance->AddMode(ho))
+ if (!ServerInstance->Modes->AddMode(ho))
throw ModuleException("Could not add new modes!");
mycommand = new CommandHelpop(ServerInstance);
ServerInstance->AddCommand(mycommand);
diff --git a/src/modules/m_hidechans.cpp b/src/modules/m_hidechans.cpp
index 2adf30d85..9548e1ec3 100644
--- a/src/modules/m_hidechans.cpp
+++ b/src/modules/m_hidechans.cpp
@@ -59,7 +59,7 @@ class ModuleHideChans : public Module
{
hm = new HideChans(ServerInstance);
- if (!ServerInstance->AddMode(hm))
+ if (!ServerInstance->Modes->AddMode(hm))
throw ModuleException("Could not add new modes!");
Implementation eventlist[] = { I_OnWhoisLine };
ServerInstance->Modules->Attach(eventlist, this, 1);
diff --git a/src/modules/m_hideoper.cpp b/src/modules/m_hideoper.cpp
index a2ef1fe42..024af2221 100644
--- a/src/modules/m_hideoper.cpp
+++ b/src/modules/m_hideoper.cpp
@@ -58,7 +58,7 @@ class ModuleHideOper : public Module
{
hm = new HideOper(ServerInstance);
- if (!ServerInstance->AddMode(hm))
+ if (!ServerInstance->Modes->AddMode(hm))
throw ModuleException("Could not add new modes!");
Implementation eventlist[] = { I_OnWhoisLine };
ServerInstance->Modules->Attach(eventlist, this, 1);
diff --git a/src/modules/m_invisible.cpp b/src/modules/m_invisible.cpp
index 03fdee091..30935c1dd 100644
--- a/src/modules/m_invisible.cpp
+++ b/src/modules/m_invisible.cpp
@@ -159,10 +159,10 @@ class ModuleInvisible : public Module
{
conf = new ConfigReader(ServerInstance);
qm = new InvisibleMode(ServerInstance);
- if (!ServerInstance->AddMode(qm))
+ if (!ServerInstance->Modes->AddMode(qm))
throw ModuleException("Could not add new modes!");
ido = new InvisibleDeOper(ServerInstance);
- if (!ServerInstance->AddModeWatcher(ido))
+ if (!ServerInstance->Modes->AddModeWatcher(ido))
throw ModuleException("Could not add new mode watcher on usermode +o!");
/* Yeah i know people can take this out. I'm not about to obfuscate code just to be a pain in the ass. */
diff --git a/src/modules/m_inviteexception.cpp b/src/modules/m_inviteexception.cpp
index 1eb10e9c7..a592f6cdd 100644
--- a/src/modules/m_inviteexception.cpp
+++ b/src/modules/m_inviteexception.cpp
@@ -44,7 +44,7 @@ public:
ModuleInviteException(InspIRCd* Me) : Module(Me)
{
ie = new InviteException(ServerInstance);
- if (!ServerInstance->AddMode(ie))
+ if (!ServerInstance->Modes->AddMode(ie))
throw ModuleException("Could not add new modes!");
ServerInstance->Modules->PublishInterface("ChannelBanList", this);
diff --git a/src/modules/m_joinflood.cpp b/src/modules/m_joinflood.cpp
index ee38cf007..7c161f653 100644
--- a/src/modules/m_joinflood.cpp
+++ b/src/modules/m_joinflood.cpp
@@ -216,7 +216,7 @@ class ModuleJoinFlood : public Module
{
jf = new JoinFlood(ServerInstance);
- if (!ServerInstance->AddMode(jf))
+ if (!ServerInstance->Modes->AddMode(jf))
throw ModuleException("Could not add new modes!");
Implementation eventlist[] = { I_OnChannelDelete, I_OnUserPreJoin, I_OnUserJoin };
ServerInstance->Modules->Attach(eventlist, this, 3);
diff --git a/src/modules/m_kicknorejoin.cpp b/src/modules/m_kicknorejoin.cpp
index 1949c8c96..795d4a7b2 100644
--- a/src/modules/m_kicknorejoin.cpp
+++ b/src/modules/m_kicknorejoin.cpp
@@ -124,7 +124,7 @@ public:
{
kr = new KickRejoin(ServerInstance);
- if (!ServerInstance->AddMode(kr))
+ if (!ServerInstance->Modes->AddMode(kr))
throw ModuleException("Could not add new modes!");
Implementation eventlist[] = { I_OnCleanup, I_OnChannelDelete, I_OnUserPreJoin, I_OnUserKick };
ServerInstance->Modules->Attach(eventlist, this, 4);
diff --git a/src/modules/m_knock.cpp b/src/modules/m_knock.cpp
index 972457ba2..876c4f121 100644
--- a/src/modules/m_knock.cpp
+++ b/src/modules/m_knock.cpp
@@ -102,7 +102,7 @@ class ModuleKnock : public Module
{
kn = new Knock(ServerInstance);
- if (!ServerInstance->AddMode(kn))
+ if (!ServerInstance->Modes->AddMode(kn))
throw ModuleException("Could not add new modes!");
mycommand = new CommandKnock(ServerInstance);
diff --git a/src/modules/m_messageflood.cpp b/src/modules/m_messageflood.cpp
index ff80528fa..d3090a7bd 100644
--- a/src/modules/m_messageflood.cpp
+++ b/src/modules/m_messageflood.cpp
@@ -209,7 +209,7 @@ class ModuleMsgFlood : public Module
{
mf = new MsgFlood(ServerInstance);
- if (!ServerInstance->AddMode(mf))
+ if (!ServerInstance->Modes->AddMode(mf))
throw ModuleException("Could not add new modes!");
Implementation eventlist[] = { I_OnChannelDelete, I_OnUserPreNotice, I_OnUserPreMessage };
ServerInstance->Modules->Attach(eventlist, this, 3);
diff --git a/src/modules/m_nickflood.cpp b/src/modules/m_nickflood.cpp
index d560774fc..483cf2db1 100644
--- a/src/modules/m_nickflood.cpp
+++ b/src/modules/m_nickflood.cpp
@@ -215,7 +215,7 @@ class ModuleNickFlood : public Module
{
jf = new NickFlood(ServerInstance);
- if (!ServerInstance->AddMode(jf))
+ if (!ServerInstance->Modes->AddMode(jf))
throw ModuleException("Could not add new modes!");
Implementation eventlist[] = { I_OnChannelDelete, I_OnUserPreNick };
ServerInstance->Modules->Attach(eventlist, this, 2);
diff --git a/src/modules/m_noctcp.cpp b/src/modules/m_noctcp.cpp
index 9124ffa63..2ae9505e1 100644
--- a/src/modules/m_noctcp.cpp
+++ b/src/modules/m_noctcp.cpp
@@ -55,7 +55,7 @@ class ModuleNoCTCP : public Module
{
nc = new NoCTCP(ServerInstance);
- if (!ServerInstance->AddMode(nc))
+ if (!ServerInstance->Modes->AddMode(nc))
throw ModuleException("Could not add new modes!");
Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice };
ServerInstance->Modules->Attach(eventlist, this, 2);
diff --git a/src/modules/m_noinvite.cpp b/src/modules/m_noinvite.cpp
index e174d2446..d29942bc8 100644
--- a/src/modules/m_noinvite.cpp
+++ b/src/modules/m_noinvite.cpp
@@ -51,7 +51,7 @@ class ModuleNoInvite : public Module
ModuleNoInvite(InspIRCd* Me) : Module(Me)
{
ni = new NoInvite(ServerInstance);
- if (!ServerInstance->AddMode(ni))
+ if (!ServerInstance->Modes->AddMode(ni))
throw ModuleException("Could not add new modes!");
Implementation eventlist[] = { I_OnUserPreInvite };
ServerInstance->Modules->Attach(eventlist, this, 1);
diff --git a/src/modules/m_nokicks.cpp b/src/modules/m_nokicks.cpp
index 521ce7aea..6a67303bf 100644
--- a/src/modules/m_nokicks.cpp
+++ b/src/modules/m_nokicks.cpp
@@ -55,7 +55,7 @@ class ModuleNoKicks : public Module
{
nk = new NoKicks(ServerInstance);
- if (!ServerInstance->AddMode(nk))
+ if (!ServerInstance->Modes->AddMode(nk))
throw ModuleException("Could not add new modes!");
Implementation eventlist[] = { I_OnAccessCheck };
ServerInstance->Modules->Attach(eventlist, this, 1);
diff --git a/src/modules/m_nonicks.cpp b/src/modules/m_nonicks.cpp
index 121e0825e..48108fa01 100644
--- a/src/modules/m_nonicks.cpp
+++ b/src/modules/m_nonicks.cpp
@@ -52,7 +52,7 @@ class ModuleNoNickChange : public Module
{
nn = new NoNicks(ServerInstance);
- ServerInstance->AddMode(nn);
+ ServerInstance->Modes->AddMode(nn);
Implementation eventlist[] = { I_OnUserPreNick };
ServerInstance->Modules->Attach(eventlist, this, 1);
}
diff --git a/src/modules/m_nonotice.cpp b/src/modules/m_nonotice.cpp
index 803c3a4f9..11b57e09b 100644
--- a/src/modules/m_nonotice.cpp
+++ b/src/modules/m_nonotice.cpp
@@ -54,7 +54,7 @@ class ModuleNoNotice : public Module
{
nt = new NoNotice(ServerInstance);
- if (!ServerInstance->AddMode(nt))
+ if (!ServerInstance->Modes->AddMode(nt))
throw ModuleException("Could not add new modes!");
Implementation eventlist[] = { I_OnUserPreNotice };
ServerInstance->Modules->Attach(eventlist, this, 1);
diff --git a/src/modules/m_operchans.cpp b/src/modules/m_operchans.cpp
index 98656b8bb..6e3ac1ead 100644
--- a/src/modules/m_operchans.cpp
+++ b/src/modules/m_operchans.cpp
@@ -54,7 +54,7 @@ class ModuleOperChans : public Module
{
oc = new OperChans(ServerInstance);
- if (!ServerInstance->AddMode(oc))
+ if (!ServerInstance->Modes->AddMode(oc))
throw ModuleException("Could not add new modes!");
Implementation eventlist[] = { I_OnUserPreJoin };
ServerInstance->Modules->Attach(eventlist, this, 1);
diff --git a/src/modules/m_permchannels.cpp b/src/modules/m_permchannels.cpp
index 361e28411..357db554f 100644
--- a/src/modules/m_permchannels.cpp
+++ b/src/modules/m_permchannels.cpp
@@ -54,7 +54,7 @@ public:
ModulePermanentChannels(InspIRCd* Me) : Module(Me)
{
p = new PermChannel(ServerInstance);
- if (!ServerInstance->AddMode(p))
+ if (!ServerInstance->Modes->AddMode(p))
{
delete p;
throw ModuleException("Could not add new modes!");
diff --git a/src/modules/m_redirect.cpp b/src/modules/m_redirect.cpp
index 564f86219..43aad748f 100644
--- a/src/modules/m_redirect.cpp
+++ b/src/modules/m_redirect.cpp
@@ -105,7 +105,7 @@ class ModuleRedirect : public Module
{
re = new Redirect(ServerInstance);
- if (!ServerInstance->AddMode(re))
+ if (!ServerInstance->Modes->AddMode(re))
throw ModuleException("Could not add new modes!");
Implementation eventlist[] = { I_OnUserPreJoin };
ServerInstance->Modules->Attach(eventlist, this, 1);
diff --git a/src/modules/m_services.cpp b/src/modules/m_services.cpp
index 5ce9f3e4e..0c700da8f 100644
--- a/src/modules/m_services.cpp
+++ b/src/modules/m_services.cpp
@@ -179,8 +179,8 @@ class ModuleServices : public Module
m4 = new User_r(ServerInstance);
m5 = new User_R(ServerInstance);
- if (!ServerInstance->AddMode(m1) || !ServerInstance->AddMode(m2) || !ServerInstance->AddMode(m3)
- || !ServerInstance->AddMode(m4) || !ServerInstance->AddMode(m5))
+ if (!ServerInstance->Modes->AddMode(m1) || !ServerInstance->Modes->AddMode(m2) || !ServerInstance->Modes->AddMode(m3)
+ || !ServerInstance->Modes->AddMode(m4) || !ServerInstance->Modes->AddMode(m5))
{
throw ModuleException("Could not add user and channel modes!");
}
diff --git a/src/modules/m_services_account.cpp b/src/modules/m_services_account.cpp
index 3541a5f5b..7f9c2e77c 100644
--- a/src/modules/m_services_account.cpp
+++ b/src/modules/m_services_account.cpp
@@ -118,7 +118,7 @@ class ModuleServicesAccount : public Module
m1 = new AChannel_R(ServerInstance);
m2 = new AChannel_M(ServerInstance);
m3 = new AUser_R(ServerInstance);
- if (!ServerInstance->AddMode(m1) || !ServerInstance->AddMode(m2) || !ServerInstance->AddMode(m3))
+ if (!ServerInstance->Modes->AddMode(m1) || !ServerInstance->Modes->AddMode(m2) || !ServerInstance->Modes->AddMode(m3))
throw ModuleException("Could not add new modes!");
Implementation eventlist[] = { I_OnWhois, I_OnUserPreMessage, I_OnUserPreNotice, I_OnUserPreJoin,
diff --git a/src/modules/m_servprotect.cpp b/src/modules/m_servprotect.cpp
index aa464f4e3..076acd3ff 100644
--- a/src/modules/m_servprotect.cpp
+++ b/src/modules/m_servprotect.cpp
@@ -46,7 +46,7 @@ class ModuleServProtectMode : public Module
{
bm = new ServProtectMode(ServerInstance);
- if (!ServerInstance->AddMode(bm))
+ if (!ServerInstance->Modes->AddMode(bm))
throw ModuleException("Could not add new modes!");
Implementation eventlist[] = { I_OnWhois, I_OnKill, I_OnWhoisLine };
ServerInstance->Modules->Attach(eventlist, this, 3);
diff --git a/src/modules/m_showwhois.cpp b/src/modules/m_showwhois.cpp
index 99887952c..813b35205 100644
--- a/src/modules/m_showwhois.cpp
+++ b/src/modules/m_showwhois.cpp
@@ -60,7 +60,7 @@ class ModuleShowwhois : public Module
{
sw = new SeeWhois(ServerInstance);
- if (!ServerInstance->AddMode(sw))
+ if (!ServerInstance->Modes->AddMode(sw))
throw ModuleException("Could not add new modes!");
Implementation eventlist[] = { I_OnWhois };
ServerInstance->Modules->Attach(eventlist, this, 1);
diff --git a/src/modules/m_sslmodes.cpp b/src/modules/m_sslmodes.cpp
index e9e102198..28853b4c6 100644
--- a/src/modules/m_sslmodes.cpp
+++ b/src/modules/m_sslmodes.cpp
@@ -75,7 +75,7 @@ class ModuleSSLModes : public Module
sslm = new SSLMode(ServerInstance);
- if (!ServerInstance->AddMode(sslm))
+ if (!ServerInstance->Modes->AddMode(sslm))
throw ModuleException("Could not add new modes!");
Implementation eventlist[] = { I_OnUserPreJoin };
ServerInstance->Modules->Attach(eventlist, this, 1);
diff --git a/src/modules/m_stripcolor.cpp b/src/modules/m_stripcolor.cpp
index fb5aa86fe..ad109b29f 100644
--- a/src/modules/m_stripcolor.cpp
+++ b/src/modules/m_stripcolor.cpp
@@ -92,7 +92,7 @@ class ModuleStripColor : public Module
usc = new UserStripColor(ServerInstance);
csc = new ChannelStripColor(ServerInstance);
- if (!ServerInstance->AddMode(usc) || !ServerInstance->AddMode(csc))
+ if (!ServerInstance->Modes->AddMode(usc) || !ServerInstance->Modes->AddMode(csc))
throw ModuleException("Could not add new modes!");
Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice };
ServerInstance->Modules->Attach(eventlist, this, 2);