summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/extra/m_mysql.cpp15
-rw-r--r--src/modules/extra/m_pgsql.cpp13
-rw-r--r--src/modules/extra/m_sqlauth.cpp13
-rw-r--r--src/modules/extra/m_sqllog.cpp13
-rw-r--r--src/modules/extra/m_sqloper.cpp19
-rw-r--r--src/modules/extra/m_sqlutils.cpp5
-rw-r--r--src/modules/extra/m_ssl_gnutls.cpp3
-rw-r--r--src/modules/extra/m_ssl_openssl.cpp3
-rw-r--r--src/modules/extra/m_testclient.cpp3
-rw-r--r--src/modules/m_auditorium.cpp2
-rw-r--r--src/modules/m_banexception.cpp4
-rw-r--r--src/modules/m_banredirect.cpp6
-rw-r--r--src/modules/m_cloaking.cpp6
-rw-r--r--src/modules/m_globalload.cpp16
-rw-r--r--src/modules/m_hostchange.cpp2
-rw-r--r--src/modules/m_httpd_stats.cpp4
-rw-r--r--src/modules/m_invisible.cpp2
-rw-r--r--src/modules/m_inviteexception.cpp4
-rw-r--r--src/modules/m_md5.cpp4
-rw-r--r--src/modules/m_oper_hash.cpp6
-rw-r--r--src/modules/m_remove.cpp2
-rw-r--r--src/modules/m_rpc_json.cpp4
-rw-r--r--src/modules/m_securelist.cpp2
-rw-r--r--src/modules/m_sha256.cpp5
-rw-r--r--src/modules/m_spanningtree/main.cpp5
-rw-r--r--src/modules/m_spanningtree/treesocket1.cpp11
-rw-r--r--src/modules/m_spanningtree/treesocket2.cpp6
-rw-r--r--src/modules/m_spanningtree/utils.cpp3
-rw-r--r--src/modules/m_uhnames.cpp3
29 files changed, 85 insertions, 99 deletions
diff --git a/src/modules/extra/m_mysql.cpp b/src/modules/extra/m_mysql.cpp
index 5d8eeef7d..a78e8c61b 100644
--- a/src/modules/extra/m_mysql.cpp
+++ b/src/modules/extra/m_mysql.cpp
@@ -713,7 +713,7 @@ class ModuleSQL : public Module
ModuleSQL(InspIRCd* Me)
: Module::Module(Me), rehashing(false)
{
- ServerInstance->UseInterface("SQLutils");
+ ServerInstance->Modules->UseInterface("SQLutils");
Conf = new ConfigReader(ServerInstance);
PublicServerInstance = ServerInstance;
@@ -730,24 +730,24 @@ class ModuleSQL : public Module
throw ModuleException("m_mysql: Failed to create dispatcher thread: " + std::string(strerror(errno)));
}
- if (!ServerInstance->PublishFeature("SQL", this))
+ if (!ServerInstance->Modules->PublishFeature("SQL", this))
{
/* Tell worker thread to exit NOW */
giveup = true;
throw ModuleException("m_mysql: Unable to publish feature 'SQL'");
}
- ServerInstance->PublishInterface("SQL", this);
+ ServerInstance->Modules->PublishInterface("SQL", this);
}
virtual ~ModuleSQL()
{
giveup = true;
ClearAllConnections();
- DELETE(Conf);
- ServerInstance->UnpublishInterface("SQL", this);
- ServerInstance->UnpublishFeature("SQL");
- ServerInstance->DoneWithInterface("SQLutils");
+ delete Conf;
+ ServerInstance->Modules->UnpublishInterface("SQL", this);
+ ServerInstance->Modules->UnpublishFeature("SQL");
+ ServerInstance->Modules->DoneWithInterface("SQLutils");
}
@@ -886,4 +886,3 @@ void* DispatcherThread(void* arg)
}
MODULE_INIT(ModuleSQL);
-
diff --git a/src/modules/extra/m_pgsql.cpp b/src/modules/extra/m_pgsql.cpp
index 393cbd1d7..0bc7dfd1c 100644
--- a/src/modules/extra/m_pgsql.cpp
+++ b/src/modules/extra/m_pgsql.cpp
@@ -723,20 +723,20 @@ class ModulePgSQL : public Module
ModulePgSQL(InspIRCd* Me)
: Module::Module(Me), currid(0)
{
- ServerInstance->UseInterface("SQLutils");
+ ServerInstance->Modules->UseInterface("SQLutils");
sqlsuccess = new char[strlen(SQLSUCCESS)+1];
strlcpy(sqlsuccess, SQLSUCCESS, strlen(SQLSUCCESS));
- if (!ServerInstance->PublishFeature("SQL", this))
+ if (!ServerInstance->Modules->PublishFeature("SQL", this))
{
throw ModuleException("BUG: PgSQL Unable to publish feature 'SQL'");
}
ReadConf();
- ServerInstance->PublishInterface("SQL", this);
+ ServerInstance->Modules->PublishInterface("SQL", this);
}
virtual ~ModulePgSQL()
@@ -745,9 +745,9 @@ class ModulePgSQL : public Module
ServerInstance->Timers->DelTimer(retimer);
ClearAllConnections();
delete[] sqlsuccess;
- ServerInstance->UnpublishInterface("SQL", this);
- ServerInstance->UnpublishFeature("SQL");
- ServerInstance->DoneWithInterface("SQLutils");
+ ServerInstance->Modules->UnpublishInterface("SQL", this);
+ ServerInstance->Modules->UnpublishFeature("SQL");
+ ServerInstance->Modules->DoneWithInterface("SQLutils");
}
void Implements(char* List)
@@ -984,4 +984,3 @@ void SQLConn::DelayReconnect()
}
MODULE_INIT(ModulePgSQL);
-
diff --git a/src/modules/extra/m_sqlauth.cpp b/src/modules/extra/m_sqlauth.cpp
index 6b05ee521..01d5733af 100644
--- a/src/modules/extra/m_sqlauth.cpp
+++ b/src/modules/extra/m_sqlauth.cpp
@@ -40,14 +40,14 @@ public:
ModuleSQLAuth(InspIRCd* Me)
: Module::Module(Me)
{
- ServerInstance->UseInterface("SQLutils");
- ServerInstance->UseInterface("SQL");
+ ServerInstance->Modules->UseInterface("SQLutils");
+ ServerInstance->Modules->UseInterface("SQL");
- SQLutils = ServerInstance->FindModule("m_sqlutils.so");
+ SQLutils = ServerInstance->Modules->Find("m_sqlutils.so");
if (!SQLutils)
throw ModuleException("Can't find m_sqlutils.so. Please load m_sqlutils.so before m_sqlauth.so.");
- SQLprovider = ServerInstance->FindFeature("SQL");
+ SQLprovider = ServerInstance->Modules->FindFeature("SQL");
if (!SQLprovider)
throw ModuleException("Can't find an SQL provider module. Please load one before attempting to load m_sqlauth.");
@@ -56,8 +56,8 @@ public:
virtual ~ModuleSQLAuth()
{
- ServerInstance->DoneWithInterface("SQL");
- ServerInstance->DoneWithInterface("SQLutils");
+ ServerInstance->Modules->DoneWithInterface("SQL");
+ ServerInstance->Modules->DoneWithInterface("SQLutils");
}
void Implements(char* List)
@@ -191,4 +191,3 @@ public:
};
MODULE_INIT(ModuleSQLAuth);
-
diff --git a/src/modules/extra/m_sqllog.cpp b/src/modules/extra/m_sqllog.cpp
index 188f33447..fc929b94f 100644
--- a/src/modules/extra/m_sqllog.cpp
+++ b/src/modules/extra/m_sqllog.cpp
@@ -187,14 +187,14 @@ class ModuleSQLLog : public Module
ModuleSQLLog(InspIRCd* Me)
: Module::Module(Me)
{
- ServerInstance->UseInterface("SQLutils");
- ServerInstance->UseInterface("SQL");
+ ServerInstance->Modules->UseInterface("SQLutils");
+ ServerInstance->Modules->UseInterface("SQL");
- Module* SQLutils = ServerInstance->FindModule("m_sqlutils.so");
+ Module* SQLutils = ServerInstance->Modules->Find("m_sqlutils.so");
if (!SQLutils)
throw ModuleException("Can't find m_sqlutils.so. Please load m_sqlutils.so before m_sqlauth.so.");
- SQLModule = ServerInstance->FindFeature("SQL");
+ SQLModule = ServerInstance->Modules->FindFeature("SQL");
OnRehash(NULL,"");
MyMod = this;
@@ -203,8 +203,8 @@ class ModuleSQLLog : public Module
virtual ~ModuleSQLLog()
{
- ServerInstance->DoneWithInterface("SQL");
- ServerInstance->DoneWithInterface("SQLutils");
+ ServerInstance->Modules->DoneWithInterface("SQL");
+ ServerInstance->Modules->DoneWithInterface("SQLutils");
}
void Implements(char* List)
@@ -311,4 +311,3 @@ class ModuleSQLLog : public Module
};
MODULE_INIT(ModuleSQLLog);
-
diff --git a/src/modules/extra/m_sqloper.cpp b/src/modules/extra/m_sqloper.cpp
index 520869e21..bb312ce8a 100644
--- a/src/modules/extra/m_sqloper.cpp
+++ b/src/modules/extra/m_sqloper.cpp
@@ -35,16 +35,16 @@ public:
ModuleSQLOper(InspIRCd* Me)
: Module::Module(Me)
{
- ServerInstance->UseInterface("SQLutils");
- ServerInstance->UseInterface("SQL");
- ServerInstance->UseInterface("HashRequest");
+ ServerInstance->Modules->UseInterface("SQLutils");
+ ServerInstance->Modules->UseInterface("SQL");
+ ServerInstance->Modules->UseInterface("HashRequest");
/* Attempt to locate the md5 service provider, bail if we can't find it */
- HashModule = ServerInstance->FindModule("m_md5.so");
+ HashModule = ServerInstance->Modules->Find("m_md5.so");
if (!HashModule)
throw ModuleException("Can't find m_md5.so. Please load m_md5.so before m_sqloper.so.");
- SQLutils = ServerInstance->FindModule("m_sqlutils.so");
+ SQLutils = ServerInstance->Modules->Find("m_sqlutils.so");
if (!SQLutils)
throw ModuleException("Can't find m_sqlutils.so. Please load m_sqlutils.so before m_sqloper.so.");
@@ -53,9 +53,9 @@ public:
virtual ~ModuleSQLOper()
{
- ServerInstance->DoneWithInterface("SQL");
- ServerInstance->DoneWithInterface("SQLutils");
- ServerInstance->DoneWithInterface("HashRequest");
+ ServerInstance->Modules->DoneWithInterface("SQL");
+ ServerInstance->Modules->DoneWithInterface("SQLutils");
+ ServerInstance->Modules->DoneWithInterface("HashRequest");
}
void Implements(char* List)
@@ -91,7 +91,7 @@ public:
{
Module* target;
- target = ServerInstance->FindFeature("SQL");
+ target = ServerInstance->Modules->FindFeature("SQL");
if (target)
{
@@ -280,4 +280,3 @@ public:
};
MODULE_INIT(ModuleSQLOper);
-
diff --git a/src/modules/extra/m_sqlutils.cpp b/src/modules/extra/m_sqlutils.cpp
index b470f99af..2edf28263 100644
--- a/src/modules/extra/m_sqlutils.cpp
+++ b/src/modules/extra/m_sqlutils.cpp
@@ -37,12 +37,12 @@ public:
ModuleSQLutils(InspIRCd* Me)
: Module::Module(Me)
{
- ServerInstance->PublishInterface("SQLutils", this);
+ ServerInstance->Modules->PublishInterface("SQLutils", this);
}
virtual ~ModuleSQLutils()
{
- ServerInstance->UnpublishInterface("SQLutils", this);
+ ServerInstance->Modules->UnpublishInterface("SQLutils", this);
}
void Implements(char* List)
@@ -235,4 +235,3 @@ public:
};
MODULE_INIT(ModuleSQLutils);
-
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp
index 26f166996..de1f6d55f 100644
--- a/src/modules/extra/m_ssl_gnutls.cpp
+++ b/src/modules/extra/m_ssl_gnutls.cpp
@@ -90,7 +90,7 @@ class ModuleSSLGnuTLS : public Module
ModuleSSLGnuTLS(InspIRCd* Me)
: Module(Me)
{
- ServerInstance->PublishInterface("InspSocketHook", this);
+ ServerInstance->Modules->PublishInterface("InspSocketHook", this);
// Not rehashable...because I cba to reduce all the sizes of existing buffers.
inbufsize = ServerInstance->Config->NetBufferSize;
@@ -854,4 +854,3 @@ class ModuleSSLGnuTLS : public Module
};
MODULE_INIT(ModuleSSLGnuTLS);
-
diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp
index 00c4c5fa3..f7beaede5 100644
--- a/src/modules/extra/m_ssl_openssl.cpp
+++ b/src/modules/extra/m_ssl_openssl.cpp
@@ -133,7 +133,7 @@ class ModuleSSLOpenSSL : public Module
ModuleSSLOpenSSL(InspIRCd* Me)
: Module(Me), PublicInstance(Me)
{
- ServerInstance->PublishInterface("InspSocketHook", this);
+ ServerInstance->Modules->PublishInterface("InspSocketHook", this);
// Not rehashable...because I cba to reduce all the sizes of existing buffers.
inbufsize = ServerInstance->Config->NetBufferSize;
@@ -891,4 +891,3 @@ static int error_callback(const char *str, size_t len, void *u)
}
MODULE_INIT(ModuleSSLOpenSSL);
-
diff --git a/src/modules/extra/m_testclient.cpp b/src/modules/extra/m_testclient.cpp
index f4e58b7b5..da0d36df8 100644
--- a/src/modules/extra/m_testclient.cpp
+++ b/src/modules/extra/m_testclient.cpp
@@ -41,7 +41,7 @@ public:
virtual void OnBackgroundTimer(time_t foo)
{
- Module* target = ServerInstance->FindFeature("SQL");
+ Module* target = ServerInstance->Modules->FindFeature("SQL");
if(target)
{
@@ -107,4 +107,3 @@ public:
};
MODULE_INIT(ModuleTestClient);
-
diff --git a/src/modules/m_auditorium.cpp b/src/modules/m_auditorium.cpp
index 974f1e1d4..a054a00ef 100644
--- a/src/modules/m_auditorium.cpp
+++ b/src/modules/m_auditorium.cpp
@@ -74,7 +74,7 @@ class ModuleAuditorium : public Module
Priority Prioritize()
{
/* To ensure that we get priority over namesx for names list generation on +u channels */
- return (Priority)ServerInstance->PriorityBefore("m_namesx.so");
+ return (Priority)ServerInstance->Modules->PriorityBefore("m_namesx.so");
}
virtual Version GetVersion()
diff --git a/src/modules/m_banexception.cpp b/src/modules/m_banexception.cpp
index 66991425b..4f36fb8c9 100644
--- a/src/modules/m_banexception.cpp
+++ b/src/modules/m_banexception.cpp
@@ -48,7 +48,7 @@ public:
be = new BanException(ServerInstance);
if (!ServerInstance->AddMode(be, 'e'))
throw ModuleException("Could not add new modes!");
- ServerInstance->PublishInterface("ChannelBanList", this);
+ ServerInstance->Modules->PublishInterface("ChannelBanList", this);
}
virtual void Implements(char* List)
@@ -142,7 +142,7 @@ public:
{
ServerInstance->Modes->DelMode(be);
delete be;
- ServerInstance->UnpublishInterface("ChannelBanList", this);
+ ServerInstance->Modules->UnpublishInterface("ChannelBanList", this);
}
};
diff --git a/src/modules/m_banredirect.cpp b/src/modules/m_banredirect.cpp
index 78cd24233..9ac440d5e 100644
--- a/src/modules/m_banredirect.cpp
+++ b/src/modules/m_banredirect.cpp
@@ -253,7 +253,7 @@ class ModuleBanRedirect : public Module
virtual void OnRehash(userrec* user, const std::string &param)
{
- ExceptionModule = ServerInstance->FindModule("m_banexception.so");
+ ExceptionModule = ServerInstance->Modules->Find("m_banexception.so");
}
virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname, std::string &privs)
@@ -295,7 +295,7 @@ class ModuleBanRedirect : public Module
/* tell them they're banned and are being transferred */
chanrec* destchan = ServerInstance->FindChan(redir->targetchan);
- if(destchan && ServerInstance->FindModule("m_redirect.so") && destchan->IsModeSet('L') && destchan->limit && (destchan->GetUserCounter() >= destchan->limit))
+ if(destchan && ServerInstance->Modules->Find("m_redirect.so") && destchan->IsModeSet('L') && destchan->limit && (destchan->GetUserCounter() >= destchan->limit))
{
user->WriteServ("474 %s %s :Cannot join channel (You are banned)", user->nick, chan->name);
return 1;
@@ -329,7 +329,7 @@ class ModuleBanRedirect : public Module
Priority Prioritize()
{
- return (Priority)ServerInstance->PriorityBefore("m_banexception.so");
+ return (Priority)ServerInstance->Modules->PriorityBefore("m_banexception.so");
}
};
diff --git a/src/modules/m_cloaking.cpp b/src/modules/m_cloaking.cpp
index d4c4c4529..8e80ad89a 100644
--- a/src/modules/m_cloaking.cpp
+++ b/src/modules/m_cloaking.cpp
@@ -311,10 +311,10 @@ class ModuleCloaking : public Module
ModuleCloaking(InspIRCd* Me)
: Module(Me)
{
- ServerInstance->UseInterface("HashRequest");
+ ServerInstance->Modules->UseInterface("HashRequest");
/* Attempt to locate the md5 service provider, bail if we can't find it */
- HashModule = ServerInstance->FindModule("m_md5.so");
+ HashModule = ServerInstance->Modules->Find("m_md5.so");
if (!HashModule)
throw ModuleException("Can't find m_md5.so. Please load m_md5.so before m_cloaking.so.");
@@ -332,7 +332,7 @@ class ModuleCloaking : public Module
{
ServerInstance->Modes->DelMode(cu);
DELETE(cu);
- ServerInstance->DoneWithInterface("HashRequest");
+ ServerInstance->Modules->DoneWithInterface("HashRequest");
}
virtual Version GetVersion()
diff --git a/src/modules/m_globalload.cpp b/src/modules/m_globalload.cpp
index d0ace07df..faf35d572 100644
--- a/src/modules/m_globalload.cpp
+++ b/src/modules/m_globalload.cpp
@@ -33,14 +33,14 @@ class cmd_gloadmodule : public command_t
if (ServerInstance->MatchText(ServerInstance->Config->ServerName, servername))
{
- if (ServerInstance->LoadModule(parameters[0]))
+ if (ServerInstance->Modules->Load(parameters[0]))
{
ServerInstance->WriteOpers("*** NEW MODULE '%s' GLOBALLY LOADED BY '%s'",parameters[0],user->nick);
user->WriteServ("975 %s %s :Module successfully loaded.",user->nick, parameters[0]);
}
else
{
- user->WriteServ("974 %s %s :Failed to load module: %s",user->nick, parameters[0],ServerInstance->ModuleError());
+ user->WriteServ("974 %s %s :Failed to load module: %s",user->nick, parameters[0],ServerInstance->Modules->LastError());
}
}
else
@@ -67,14 +67,14 @@ class cmd_gunloadmodule : public command_t
if (ServerInstance->MatchText(ServerInstance->Config->ServerName, servername))
{
- if (ServerInstance->UnloadModule(parameters[0]))
+ if (ServerInstance->Modules->Unload(parameters[0]))
{
ServerInstance->WriteOpers("*** MODULE '%s' GLOBALLY UNLOADED BY '%s'",parameters[0],user->nick);
user->WriteServ("973 %s %s :Module successfully unloaded.",user->nick, parameters[0]);
}
else
{
- user->WriteServ("972 %s %s :Failed to unload module: %s",user->nick, parameters[0],ServerInstance->ModuleError());
+ user->WriteServ("972 %s %s :Failed to unload module: %s",user->nick, parameters[0],ServerInstance->Modules->LastError());
}
}
else
@@ -101,13 +101,13 @@ class cmd_greloadmodule : public command_t
if (ServerInstance->MatchText(ServerInstance->Config->ServerName, servername))
{
- if (!ServerInstance->UnloadModule(parameters[0]))
+ if (!ServerInstance->Modules->Unload(parameters[0]))
{
- user->WriteServ("972 %s %s :Failed to unload module: %s",user->nick, parameters[0],ServerInstance->ModuleError());
+ user->WriteServ("972 %s %s :Failed to unload module: %s",user->nick, parameters[0],ServerInstance->Modules->LastError());
}
- if (!ServerInstance->LoadModule(parameters[0]))
+ if (!ServerInstance->Modules->Load(parameters[0]))
{
- user->WriteServ("974 %s %s :Failed to load module: %s",user->nick, parameters[0],ServerInstance->ModuleError());
+ user->WriteServ("974 %s %s :Failed to load module: %s",user->nick, parameters[0],ServerInstance->Modules->LastError());
}
ServerInstance->WriteOpers("*** MODULE '%s' GLOBALLY RELOADED BY '%s'",parameters[0],user->nick);
user->WriteServ("975 %s %s :Module successfully loaded.",user->nick, parameters[0]);
diff --git a/src/modules/m_hostchange.cpp b/src/modules/m_hostchange.cpp
index cf85a3900..327732651 100644
--- a/src/modules/m_hostchange.cpp
+++ b/src/modules/m_hostchange.cpp
@@ -54,7 +54,7 @@ class ModuleHostChange : public Module
Priority Prioritize()
{
- return (Priority)ServerInstance->PriorityAfter("m_cloaking.so");
+ return (Priority)ServerInstance->Modules->PriorityAfter("m_cloaking.so");
}
void Implements(char* List)
diff --git a/src/modules/m_httpd_stats.cpp b/src/modules/m_httpd_stats.cpp
index 9e89bd149..445af1826 100644
--- a/src/modules/m_httpd_stats.cpp
+++ b/src/modules/m_httpd_stats.cpp
@@ -117,11 +117,11 @@ class ModuleHttpStats : public Module
data << "</general>";
data << "<modulelist>";
- for (int i = 0; i <= ServerInstance->GetModuleCount(); i++)
+ for (int i = 0; i <= ServerInstance->Modules->GetCount(); i++)
{
if (!ServerInstance->Config->module_names[i].empty())
{
- Version v = ServerInstance->modules[i]->GetVersion();
+ Version v = ServerInstance->Modules->modules[i]->GetVersion();
data << "<module><name>" << ServerInstance->Config->module_names[i] << "</name><version>" <<
v.Major << "." << v.Minor << "." << v.Revision << "." << v.Build << "</version></module>";
}
diff --git a/src/modules/m_invisible.cpp b/src/modules/m_invisible.cpp
index e8d9127b2..a0a2388f0 100644
--- a/src/modules/m_invisible.cpp
+++ b/src/modules/m_invisible.cpp
@@ -81,7 +81,7 @@ class InvisibleMode : public ModeHandler
dest->SetMode('Q', adding);
/* Fix for bug #379 reported by stealth. On +/-Q make m_watch think the user has signed on/off */
- Module* m = ServerInstance->FindModule("m_watch.so");
+ Module* m = ServerInstance->Modules->Find("m_watch.so");
/* This must come before setting/unsetting the handler */
if (m && adding)
diff --git a/src/modules/m_inviteexception.cpp b/src/modules/m_inviteexception.cpp
index 1810f8297..c689af320 100644
--- a/src/modules/m_inviteexception.cpp
+++ b/src/modules/m_inviteexception.cpp
@@ -46,7 +46,7 @@ public:
ie = new InviteException(ServerInstance);
if (!ServerInstance->AddMode(ie, 'I'))
throw ModuleException("Could not add new modes!");
- ServerInstance->PublishInterface("ChannelBanList", this);
+ ServerInstance->Modules->PublishInterface("ChannelBanList", this);
}
virtual void Implements(char* List)
@@ -139,7 +139,7 @@ public:
{
ServerInstance->Modes->DelMode(ie);
DELETE(ie);
- ServerInstance->UnpublishInterface("ChannelBanList", this);
+ ServerInstance->Modules->UnpublishInterface("ChannelBanList", this);
}
};
diff --git a/src/modules/m_md5.cpp b/src/modules/m_md5.cpp
index 2fe1daf61..0c8d531e0 100644
--- a/src/modules/m_md5.cpp
+++ b/src/modules/m_md5.cpp
@@ -267,12 +267,12 @@ class ModuleMD5 : public Module
ModuleMD5(InspIRCd* Me)
: Module(Me), key(NULL), chars(NULL)
{
- ServerInstance->PublishInterface("HashRequest", this);
+ ServerInstance->Modules->PublishInterface("HashRequest", this);
}
virtual ~ModuleMD5()
{
- ServerInstance->UnpublishInterface("HashRequest", this);
+ ServerInstance->Modules->UnpublishInterface("HashRequest", this);
}
void Implements(char* List)
diff --git a/src/modules/m_oper_hash.cpp b/src/modules/m_oper_hash.cpp
index 79530e349..887b2d6a7 100644
--- a/src/modules/m_oper_hash.cpp
+++ b/src/modules/m_oper_hash.cpp
@@ -81,10 +81,10 @@ class ModuleOperHash : public Module
Conf = NULL;
OnRehash(NULL,"");
- ServerInstance->UseInterface("HashRequest");
+ ServerInstance->Modules->UseInterface("HashRequest");
/* Find all modules which implement the interface 'HashRequest' */
- modulelist* ml = ServerInstance->FindInterface("HashRequest");
+ modulelist* ml = ServerInstance->Modules->FindInterface("HashRequest");
/* Did we find any modules? */
if (ml)
@@ -112,7 +112,7 @@ class ModuleOperHash : public Module
virtual ~ModuleOperHash()
{
- ServerInstance->DoneWithInterface("HashRequest");
+ ServerInstance->Modules->DoneWithInterface("HashRequest");
}
void Implements(char* List)
diff --git a/src/modules/m_remove.cpp b/src/modules/m_remove.cpp
index feb2afa85..c8d661890 100644
--- a/src/modules/m_remove.cpp
+++ b/src/modules/m_remove.cpp
@@ -149,7 +149,7 @@ class RemoveBase
tlevel = chartolevel(channel->GetPrefixChar(target));
}
- hasnokicks = (ServerInstance->FindModule("m_nokicks.so") && channel->IsModeSet('Q'));
+ hasnokicks = (ServerInstance->Modules->Find("m_nokicks.so") && channel->IsModeSet('Q'));
/* We support the +Q channel mode via. the m_nokicks module, if the module is loaded and the mode is set then disallow the /remove */
if ((!IS_LOCAL(user)) || (!supportnokicks || !hasnokicks || (ulevel == ULINE)))
diff --git a/src/modules/m_rpc_json.cpp b/src/modules/m_rpc_json.cpp
index 35557fa14..8de1b8a29 100644
--- a/src/modules/m_rpc_json.cpp
+++ b/src/modules/m_rpc_json.cpp
@@ -51,7 +51,7 @@ class ModuleRpcJson : public Module
public:
ModuleRpcJson(InspIRCd* Me) : Module(Me)
{
- ServerInstance->PublishInterface("JSON-RPC", this);
+ ServerInstance->Modules->PublishInterface("JSON-RPC", this);
json::rpc::add_method ("system.listMethods", (Module *)this, (void (Module::*)(HTTPRequest*, json::Value&, json::Value&))&ModuleRpcJson::system_list_methods);
json::rpc::add_method ("ircd.moduleVersion", (Module *)this, (void (Module::*)(HTTPRequest*, json::Value&, json::Value&))&ModuleRpcJson::MthModuleVersion);
}
@@ -95,7 +95,7 @@ class ModuleRpcJson : public Module
virtual ~ModuleRpcJson()
{
- ServerInstance->UnpublishInterface("JSON-RPC", this);
+ ServerInstance->Modules->UnpublishInterface("JSON-RPC", this);
}
virtual Version GetVersion()
diff --git a/src/modules/m_securelist.cpp b/src/modules/m_securelist.cpp
index 797088d1c..e4fc76478 100644
--- a/src/modules/m_securelist.cpp
+++ b/src/modules/m_securelist.cpp
@@ -88,7 +88,7 @@ class ModuleSecureList : public Module
virtual Priority Prioritize()
{
- return (Priority)ServerInstance->PriorityBefore("m_safelist.so");
+ return (Priority)ServerInstance->Modules->PriorityBefore("m_safelist.so");
}
};
diff --git a/src/modules/m_sha256.cpp b/src/modules/m_sha256.cpp
index 6875a5f94..1be4551c8 100644
--- a/src/modules/m_sha256.cpp
+++ b/src/modules/m_sha256.cpp
@@ -241,12 +241,12 @@ class ModuleSHA256 : public Module
ModuleSHA256(InspIRCd* Me) : Module(Me), key(NULL), chars(NULL)
{
- ServerInstance->PublishInterface("HashRequest", this);
+ ServerInstance->Modules->PublishInterface("HashRequest", this);
}
virtual ~ModuleSHA256()
{
- ServerInstance->UnpublishInterface("HashRequest", this);
+ ServerInstance->Modules->UnpublishInterface("HashRequest", this);
}
void Implements(char *List)
@@ -290,4 +290,3 @@ class ModuleSHA256 : public Module
};
MODULE_INIT(ModuleSHA256)
-
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp
index 9d7b7db79..f0ba16cbb 100644
--- a/src/modules/m_spanningtree/main.cpp
+++ b/src/modules/m_spanningtree/main.cpp
@@ -36,7 +36,7 @@
ModuleSpanningTree::ModuleSpanningTree(InspIRCd* Me)
: Module(Me), max_local(0), max_global(0)
{
- ServerInstance->UseInterface("InspSocketHook");
+ ServerInstance->Modules->UseInterface("InspSocketHook");
Utils = new SpanningTreeUtilities(Me, this);
command_rconnect = new cmd_rconnect(ServerInstance, this, Utils);
ServerInstance->AddCommand(command_rconnect);
@@ -1449,7 +1449,7 @@ ModuleSpanningTree::~ModuleSpanningTree()
ServerInstance->Timers->DelTimer(RefreshTimer);
- ServerInstance->DoneWithInterface("InspSocketHook");
+ ServerInstance->Modules->DoneWithInterface("InspSocketHook");
}
Version ModuleSpanningTree::GetVersion()
@@ -1481,4 +1481,3 @@ Priority ModuleSpanningTree::Prioritize()
}
MODULE_INIT(ModuleSpanningTree)
-
diff --git a/src/modules/m_spanningtree/treesocket1.cpp b/src/modules/m_spanningtree/treesocket1.cpp
index fcfb21f68..8a413ab8d 100644
--- a/src/modules/m_spanningtree/treesocket1.cpp
+++ b/src/modules/m_spanningtree/treesocket1.cpp
@@ -125,7 +125,7 @@ std::string TreeSocket::MakePass(const std::string &password, const std::string
* Note: If m_sha256.so is not loaded, we MUST fall back to plaintext with no
* HMAC challenge/response.
*/
- Module* sha256 = Instance->FindModule("m_sha256.so");
+ Module* sha256 = Instance->Modules->Find("m_sha256.so");
if (Utils->ChallengeResponse && sha256 && !challenge.empty())
{
/* XXX: This is how HMAC is supposed to be done:
@@ -279,9 +279,9 @@ std::string TreeSocket::MyCapabilities()
{
std::vector<std::string> modlist;
std::string capabilities;
- for (int i = 0; i <= this->Instance->GetModuleCount(); i++)
+ for (int i = 0; i <= this->Instance->Modules->GetCount(); i++)
{
- if (this->Instance->modules[i]->GetVersion().Flags & VF_COMMON)
+ if (this->Instance->Modules->modules[i]->GetVersion().Flags & VF_COMMON)
modlist.push_back(this->Instance->Config->module_names[i]);
}
sort(modlist.begin(),modlist.end());
@@ -365,7 +365,7 @@ void TreeSocket::SendCapabilities()
#endif
std::string extra;
/* Do we have sha256 available? If so, we send a challenge */
- if (Utils->ChallengeResponse && (Instance->FindModule("m_sha256.so")))
+ if (Utils->ChallengeResponse && (Instance->Modules->Find("m_sha256.so")))
{
this->SetOurChallenge(RandString(20));
extra = " CHALLENGE=" + this->GetOurChallenge();
@@ -495,7 +495,7 @@ bool TreeSocket::Capab(const std::deque<std::string> &params)
/* Challenge response, store their challenge for our password */
std::map<std::string,std::string>::iterator n = this->CapKeys.find("CHALLENGE");
- if (Utils->ChallengeResponse && (n != this->CapKeys.end()) && (Instance->FindModule("m_sha256.so")))
+ if (Utils->ChallengeResponse && (n != this->CapKeys.end()) && (Instance->Modules->Find("m_sha256.so")))
{
/* Challenge-response is on now */
this->SetTheirChallenge(n->second);
@@ -1400,4 +1400,3 @@ bool TreeSocket::OnDataReady()
*/
return (data && !*data);
}
-
diff --git a/src/modules/m_spanningtree/treesocket2.cpp b/src/modules/m_spanningtree/treesocket2.cpp
index 7172656ee..dedf76786 100644
--- a/src/modules/m_spanningtree/treesocket2.cpp
+++ b/src/modules/m_spanningtree/treesocket2.cpp
@@ -73,7 +73,7 @@ bool TreeSocket::Modules(const std::string &prefix, std::deque<std::string> &par
for (unsigned int i = 0; i < Instance->Config->module_names.size(); i++)
{
- Version V = Instance->modules[i]->GetVersion();
+ Version V = Instance->Modules->modules[i]->GetVersion();
char modulename[MAXBUF];
char flagstate[MAXBUF];
*flagstate = 0;
@@ -90,7 +90,7 @@ bool TreeSocket::Modules(const std::string &prefix, std::deque<std::string> &par
strlcpy(modulename,Instance->Config->module_names[i].c_str(),256);
if (*source->oper)
{
- snprintf(strbuf, MAXBUF, "::%s 900 %s :0x%08lx %d.%d.%d.%d %s (%s)",Instance->Config->ServerName,source->nick,(long unsigned int)Instance->modules[i],V.Major,V.Minor,V.Revision,V.Build,ServerConfig::CleanFilename(modulename),flagstate+2);
+ snprintf(strbuf, MAXBUF, "::%s 900 %s :0x%08lx %d.%d.%d.%d %s (%s)",Instance->Config->ServerName,source->nick,(long unsigned int)Instance->Modules->modules[i],V.Major,V.Minor,V.Revision,V.Build,ServerConfig::CleanFilename(modulename),flagstate+2);
}
else
{
@@ -849,7 +849,7 @@ bool TreeSocket::ComparePass(const std::string &ours, const std::string &theirs)
/* One or both of us specified hmac sha256, but we don't have sha256 module loaded!
* We can't allow this password as valid.
*/
- if (!Instance->FindModule("m_sha256.so") || !Utils->ChallengeResponse)
+ if (!Instance->Modules->Find("m_sha256.so") || !Utils->ChallengeResponse)
return false;
else
/* Straight string compare of hashes */
diff --git a/src/modules/m_spanningtree/utils.cpp b/src/modules/m_spanningtree/utils.cpp
index dcce230ac..705566d44 100644
--- a/src/modules/m_spanningtree/utils.cpp
+++ b/src/modules/m_spanningtree/utils.cpp
@@ -179,7 +179,7 @@ SpanningTreeUtilities::SpanningTreeUtilities(InspIRCd* Instance, ModuleSpanningT
this->TreeRoot = new TreeServer(this, ServerInstance, ServerInstance->Config->ServerName, ServerInstance->Config->ServerDesc, ServerInstance->Config->GetSID());
- modulelist* ml = ServerInstance->FindInterface("InspSocketHook");
+ modulelist* ml = ServerInstance->Modules->FindInterface("InspSocketHook");
/* Did we find any modules? */
if (ml)
@@ -664,4 +664,3 @@ Link* SpanningTreeUtilities::FindLink(const std::string& name)
}
return NULL;
}
-
diff --git a/src/modules/m_uhnames.cpp b/src/modules/m_uhnames.cpp
index 190c84878..41534eca4 100644
--- a/src/modules/m_uhnames.cpp
+++ b/src/modules/m_uhnames.cpp
@@ -54,7 +54,7 @@ class ModuleUHNames : public Module
Priority Prioritize()
{
- return (Priority)ServerInstance->PriorityBefore("m_namesx.so");
+ return (Priority)ServerInstance->Modules->PriorityBefore("m_namesx.so");
}
virtual int OnPreCommand(const std::string &command, const char** parameters, int pcnt, userrec *user, bool validated, const std::string &original_line)
@@ -92,4 +92,3 @@ class ModuleUHNames : public Module
};
MODULE_INIT(ModuleUHNames)
-