summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-09 11:33:10 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-09 11:33:10 +0000
commit09afa5085614e0224a296abd082fce205003c3fe (patch)
tree444d54deea5f10e3045e0a8a016f9623499f513e /src/modules
parent6d4128715da39b1e097642a64ee0bd40586d9a38 (diff)
ServerConfig extern moved into class InspIRCd
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4808 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/extra/m_filter_pcre.cpp1
-rw-r--r--src/modules/extra/m_mysql.cpp1
-rw-r--r--src/modules/extra/m_sqloper.cpp1
-rw-r--r--src/modules/extra/m_ssl_gnutls.cpp13
-rw-r--r--src/modules/extra/m_ssl_openssl.cpp13
-rw-r--r--src/modules/m_alias.cpp1
-rw-r--r--src/modules/m_banexception.cpp1
-rw-r--r--src/modules/m_blockamsg.cpp1
-rw-r--r--src/modules/m_blockcaps.cpp1
-rw-r--r--src/modules/m_blockcolor.cpp1
-rw-r--r--src/modules/m_cban.cpp19
-rw-r--r--src/modules/m_censor.cpp1
-rw-r--r--src/modules/m_chanfilter.cpp1
-rw-r--r--src/modules/m_chanprotect.cpp1
-rw-r--r--src/modules/m_conn_waitpong.cpp1
-rw-r--r--src/modules/m_denychans.cpp1
-rw-r--r--src/modules/m_devoice.cpp1
-rw-r--r--src/modules/m_filter.cpp1
-rw-r--r--src/modules/m_helpop.cpp1
-rw-r--r--src/modules/m_httpd.cpp1
-rw-r--r--src/modules/m_httpd_stats.cpp5
-rw-r--r--src/modules/m_joinflood.cpp1
-rw-r--r--src/modules/m_knock.cpp1
-rw-r--r--src/modules/m_messageflood.cpp1
-rw-r--r--src/modules/m_noctcp.cpp1
-rw-r--r--src/modules/m_noinvite.cpp1
-rw-r--r--src/modules/m_nokicks.cpp1
-rw-r--r--src/modules/m_nonicks.cpp1
-rw-r--r--src/modules/m_nonotice.cpp1
-rw-r--r--src/modules/m_operchans.cpp1
-rw-r--r--src/modules/m_operjoin.cpp1
-rw-r--r--src/modules/m_operlevels.cpp1
-rw-r--r--src/modules/m_opermd5.cpp1
-rw-r--r--src/modules/m_opermotd.cpp1
-rw-r--r--src/modules/m_opersha256.cpp1
-rw-r--r--src/modules/m_override.cpp1
-rw-r--r--src/modules/m_park.cpp1
-rw-r--r--src/modules/m_randquote.cpp4
-rw-r--r--src/modules/m_redirect.cpp1
-rw-r--r--src/modules/m_restrictchans.cpp1
-rw-r--r--src/modules/m_restrictmsg.cpp1
-rw-r--r--src/modules/m_safelist.cpp3
-rw-r--r--src/modules/m_sajoin.cpp1
-rw-r--r--src/modules/m_samode.cpp1
-rw-r--r--src/modules/m_sanick.cpp1
-rw-r--r--src/modules/m_sapart.cpp1
-rw-r--r--src/modules/m_saquit.cpp1
-rw-r--r--src/modules/m_securelist.cpp3
-rw-r--r--src/modules/m_services.cpp1
-rw-r--r--src/modules/m_services_account.cpp1
-rw-r--r--src/modules/m_showwhois.cpp1
-rw-r--r--src/modules/m_silence.cpp1
-rw-r--r--src/modules/m_spanningtree.cpp8
-rw-r--r--src/modules/m_spy.cpp1
-rw-r--r--src/modules/m_sslmodes.cpp1
-rw-r--r--src/modules/m_stripcolor.cpp1
-rw-r--r--src/modules/m_swhois.cpp1
-rw-r--r--src/modules/m_timedbans.cpp1
58 files changed, 81 insertions, 37 deletions
diff --git a/src/modules/extra/m_filter_pcre.cpp b/src/modules/extra/m_filter_pcre.cpp
index 26d231b14..da7559914 100644
--- a/src/modules/extra/m_filter_pcre.cpp
+++ b/src/modules/extra/m_filter_pcre.cpp
@@ -27,6 +27,7 @@ using namespace std;
#include "channels.h"
#include "modules.h"
#include "helperfuncs.h"
+#include "inspircd.h"
class FilterPCREException : public ModuleException
{
diff --git a/src/modules/extra/m_mysql.cpp b/src/modules/extra/m_mysql.cpp
index 7f2b96227..79baf170c 100644
--- a/src/modules/extra/m_mysql.cpp
+++ b/src/modules/extra/m_mysql.cpp
@@ -24,6 +24,7 @@ using namespace std;
#include "channels.h"
#include "modules.h"
#include "helperfuncs.h"
+#include "inspircd.h"
#include "m_sqlv2.h"
/* VERSION 2 API: With nonblocking (threaded) requests */
diff --git a/src/modules/extra/m_sqloper.cpp b/src/modules/extra/m_sqloper.cpp
index a67ec46e2..89383ee47 100644
--- a/src/modules/extra/m_sqloper.cpp
+++ b/src/modules/extra/m_sqloper.cpp
@@ -30,7 +30,6 @@
/* Required for the FOREACH_MOD alias (OnOper event) */
extern int MODCOUNT;
-extern ServerConfig* Config;
extern std::vector<Module*> modules;
extern std::vector<ircd_module*> factory;
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp
index d9ee49bd0..30ece8f60 100644
--- a/src/modules/extra/m_ssl_gnutls.cpp
+++ b/src/modules/extra/m_ssl_gnutls.cpp
@@ -11,11 +11,14 @@
#include "helperfuncs.h"
#include "socket.h"
#include "hashcomp.h"
+#include "inspircd.h"
/* $ModDesc: Provides SSL support for clients */
/* $CompileFlags: `libgnutls-config --cflags` */
/* $LinkerFlags: `libgnutls-config --libs` `perl ../gnutls_rpath.pl` */
+extern InspIRCd* ServerInstance;
+
enum issl_status { ISSL_NONE, ISSL_HANDSHAKING_READ, ISSL_HANDSHAKING_WRITE, ISSL_HANDSHAKEN, ISSL_CLOSING, ISSL_CLOSED };
bool isin(int port, const std::vector<int> &portlist)
@@ -41,7 +44,6 @@ public:
class ModuleSSLGnuTLS : public Module
{
Server* Srv;
- ServerConfig* SrvConf;
ConfigReader* Conf;
char* dummy;
@@ -68,10 +70,9 @@ class ModuleSSLGnuTLS : public Module
: Module::Module(Me)
{
Srv = Me;
- SrvConf = Srv->GetConfig();
// Not rehashable...because I cba to reduce all the sizes of existing buffers.
- inbufsize = SrvConf->NetBufferSize;
+ inbufsize = ServerInstance->Config->NetBufferSize;
gnutls_global_init(); // This must be called once in the program
@@ -98,7 +99,7 @@ class ModuleSSLGnuTLS : public Module
for(unsigned int i = 0; i < listenports.size(); i++)
{
- SrvConf->DelIOHook(listenports[i]);
+ ServerInstance->Config->DelIOHook(listenports[i]);
}
listenports.clear();
@@ -110,7 +111,7 @@ class ModuleSSLGnuTLS : public Module
{
// Get the port we're meant to be listening on with SSL
unsigned int port = Conf->ReadInteger("bind", "port", i, true);
- if(SrvConf->AddIOHook(port, this))
+ if (ServerInstance->Config->AddIOHook(port, this))
{
// We keep a record of which ports we're listening on with SSL
listenports.push_back(port);
@@ -222,7 +223,7 @@ class ModuleSSLGnuTLS : public Module
log(DEBUG, "m_ssl_gnutls.so: Killed %d users for unload of GnuTLS SSL module", numusers);
for(unsigned int i = 0; i < listenports.size(); i++)
- SrvConf->DelIOHook(listenports[i]);
+ ServerInstance->Config->DelIOHook(listenports[i]);
}
}
diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp
index b2883c0f0..c0f02f322 100644
--- a/src/modules/extra/m_ssl_openssl.cpp
+++ b/src/modules/extra/m_ssl_openssl.cpp
@@ -12,11 +12,14 @@
#include "helperfuncs.h"
#include "socket.h"
#include "hashcomp.h"
+#include "inspircd.h"
/* $ModDesc: Provides SSL support for clients */
/* $CompileFlags: -I/usr/include -I/usr/local/include */
/* $LinkerFlags: -L/usr/local/lib -Wl,--rpath -Wl,/usr/local/lib -L/usr/lib -Wl,--rpath -Wl,/usr/lib -lssl */
+extern InspIRCd* ServerInstance;
+
enum issl_status { ISSL_NONE, ISSL_HANDSHAKING, ISSL_OPEN };
enum issl_io_status { ISSL_WRITE, ISSL_READ };
@@ -57,7 +60,6 @@ public:
class ModuleSSLOpenSSL : public Module
{
Server* Srv;
- ServerConfig* SrvConf;
ConfigReader* Conf;
CullList culllist;
@@ -83,10 +85,9 @@ class ModuleSSLOpenSSL : public Module
: Module::Module(Me)
{
Srv = Me;
- SrvConf = Srv->GetConfig();
// Not rehashable...because I cba to reduce all the sizes of existing buffers.
- inbufsize = SrvConf->NetBufferSize;
+ inbufsize = ServerInstance->Config->NetBufferSize;
/* Global SSL library initialization*/
SSL_library_init();
@@ -108,7 +109,7 @@ class ModuleSSLOpenSSL : public Module
for(unsigned int i = 0; i < listenports.size(); i++)
{
- SrvConf->DelIOHook(listenports[i]);
+ ServerInstance->Config->DelIOHook(listenports[i]);
}
listenports.clear();
@@ -120,7 +121,7 @@ class ModuleSSLOpenSSL : public Module
{
// Get the port we're meant to be listening on with SSL
unsigned int port = Conf->ReadInteger("bind", "port", i, true);
- if(SrvConf->AddIOHook(port, this))
+ if (ServerInstance->Config->AddIOHook(port, this))
{
// We keep a record of which ports we're listening on with SSL
listenports.push_back(port);
@@ -246,7 +247,7 @@ class ModuleSSLOpenSSL : public Module
log(DEBUG, "m_ssl_openssl.so: Killed %d users for unload of OpenSSL SSL module", numusers);
for(unsigned int i = 0; i < listenports.size(); i++)
- SrvConf->DelIOHook(listenports[i]);
+ ServerInstance->Config->DelIOHook(listenports[i]);
}
}
diff --git a/src/modules/m_alias.cpp b/src/modules/m_alias.cpp
index 6ee50ea07..2ec6085fc 100644
--- a/src/modules/m_alias.cpp
+++ b/src/modules/m_alias.cpp
@@ -20,6 +20,7 @@ using namespace std;
#include "channels.h"
#include "modules.h"
#include "helperfuncs.h"
+#include "inspircd.h"
#include <vector>
/* $ModDesc: Provides aliases of commands. */
diff --git a/src/modules/m_banexception.cpp b/src/modules/m_banexception.cpp
index ef8dc4d91..a530ea49b 100644
--- a/src/modules/m_banexception.cpp
+++ b/src/modules/m_banexception.cpp
@@ -6,6 +6,7 @@
#include "modules.h"
#include "mode.h"
#include "helperfuncs.h"
+#include "inspircd.h"
#include "u_listmode.h"
/* $ModDesc: Provides support for the +e channel mode */
diff --git a/src/modules/m_blockamsg.cpp b/src/modules/m_blockamsg.cpp
index 2d946fedb..97c255501 100644
--- a/src/modules/m_blockamsg.cpp
+++ b/src/modules/m_blockamsg.cpp
@@ -25,6 +25,7 @@
#include "modules.h"
#include "helperfuncs.h"
#include "hashcomp.h"
+#include "inspircd.h"
/* $ModDesc: Attempt to block /amsg, at least some of the irritating mIRC scripts. */
diff --git a/src/modules/m_blockcaps.cpp b/src/modules/m_blockcaps.cpp
index 93daeef61..0fea32288 100644
--- a/src/modules/m_blockcaps.cpp
+++ b/src/modules/m_blockcaps.cpp
@@ -19,6 +19,7 @@
#include "channels.h"
#include "modules.h"
#include "helperfuncs.h"
+#include "inspircd.h"
/* $ModDesc: Provides support for channel mode +P to block all-CAPS channel messages and notices */
diff --git a/src/modules/m_blockcolor.cpp b/src/modules/m_blockcolor.cpp
index 6c987611c..2b9006583 100644
--- a/src/modules/m_blockcolor.cpp
+++ b/src/modules/m_blockcolor.cpp
@@ -22,6 +22,7 @@ using namespace std;
#include "channels.h"
#include "modules.h"
#include "helperfuncs.h"
+#include "inspircd.h"
/* $ModDesc: Provides support for unreal-style channel mode +c */
diff --git a/src/modules/m_cban.cpp b/src/modules/m_cban.cpp
index 3313b47f5..eb971864b 100644
--- a/src/modules/m_cban.cpp
+++ b/src/modules/m_cban.cpp
@@ -1,16 +1,16 @@
-/* +------------------------------------+
- * | Inspire Internet Relay Chat Daemon |
- * +------------------------------------+
+/* +------------------------------------+
+ * | Inspire Internet Relay Chat Daemon |
+ * +------------------------------------+
*
- * InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev.
- * E-mail:
- *<brain@chatspike.net>
- * <Craig@chatspike.net>
- * <omster@gmail.com>
+ * InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev.
+ * E-mail:
+ * <brain@chatspike.net>
+ * <Craig@chatspike.net>
+ * <omster@gmail.com>
*
* Written by Craig Edwards, Craig McLure, and others.
* This program is free but copyrighted software; see
- *the file COPYING for details.
+ * the file COPYING for details.
*
* ---------------------------------------------------
*/
@@ -24,6 +24,7 @@
#include "modules.h"
#include "helperfuncs.h"
#include "hashcomp.h"
+#include "inspircd.h"
/* $ModDesc: Gives /cban, aka C:lines. Think Q:lines, for channels. */
diff --git a/src/modules/m_censor.cpp b/src/modules/m_censor.cpp
index 69db8bbe6..5d18f9de8 100644
--- a/src/modules/m_censor.cpp
+++ b/src/modules/m_censor.cpp
@@ -22,6 +22,7 @@ using namespace std;
#include "channels.h"
#include "modules.h"
#include "helperfuncs.h"
+#include "inspircd.h"
typedef std::map<irc::string,irc::string> censor_t;
diff --git a/src/modules/m_chanfilter.cpp b/src/modules/m_chanfilter.cpp
index 31a30de0e..a4f4d6068 100644
--- a/src/modules/m_chanfilter.cpp
+++ b/src/modules/m_chanfilter.cpp
@@ -25,6 +25,7 @@ using namespace std;
#include "helperfuncs.h"
#include "hashcomp.h"
#include "u_listmode.h"
+#include "inspircd.h"
/* $ModDesc: Provides channel-specific censor lists (like mode +G but varies from channel to channel) */
diff --git a/src/modules/m_chanprotect.cpp b/src/modules/m_chanprotect.cpp
index 4ad3796b9..3764b400e 100644
--- a/src/modules/m_chanprotect.cpp
+++ b/src/modules/m_chanprotect.cpp
@@ -18,6 +18,7 @@
#include "channels.h"
#include "modules.h"
#include "helperfuncs.h"
+#include "inspircd.h"
/* $ModDesc: Provides channel modes +a and +q */
diff --git a/src/modules/m_conn_waitpong.cpp b/src/modules/m_conn_waitpong.cpp
index ecda7cd0c..6021d7058 100644
--- a/src/modules/m_conn_waitpong.cpp
+++ b/src/modules/m_conn_waitpong.cpp
@@ -5,6 +5,7 @@
#include "channels.h"
#include "modules.h"
#include "helperfuncs.h"
+#include "inspircd.h"
/* $ModDesc: Forces connecting clients to send a PONG message back to the server before they can complete their connection */
diff --git a/src/modules/m_denychans.cpp b/src/modules/m_denychans.cpp
index 300d13b4a..254cfdcc1 100644
--- a/src/modules/m_denychans.cpp
+++ b/src/modules/m_denychans.cpp
@@ -19,6 +19,7 @@
#include "modules.h"
#include "hashcomp.h"
#include "helperfuncs.h"
+#include "inspircd.h"
/* $ModDesc: Implements config tags which allow blocking of joins to channels */
diff --git a/src/modules/m_devoice.cpp b/src/modules/m_devoice.cpp
index b4ba9f117..54a08ab98 100644
--- a/src/modules/m_devoice.cpp
+++ b/src/modules/m_devoice.cpp
@@ -26,7 +26,6 @@ using namespace std;
#include <stdio.h>
#include "users.h"
#include "channels.h"
-#include "helperfuncs.h"
#include "modules.h"
static Server *Srv;
diff --git a/src/modules/m_filter.cpp b/src/modules/m_filter.cpp
index 1f7f6358a..9b4a12e39 100644
--- a/src/modules/m_filter.cpp
+++ b/src/modules/m_filter.cpp
@@ -26,6 +26,7 @@ using namespace std;
#include "channels.h"
#include "modules.h"
#include "helperfuncs.h"
+#include "inspircd.h"
/* $ModDesc: An enhanced version of the unreal m_filter.so used by chatspike.net */
diff --git a/src/modules/m_helpop.cpp b/src/modules/m_helpop.cpp
index 5680a239b..69f61ab1a 100644
--- a/src/modules/m_helpop.cpp
+++ b/src/modules/m_helpop.cpp
@@ -20,6 +20,7 @@ using namespace std;
#include "channels.h"
#include "modules.h"
#include "helperfuncs.h"
+#include "inspircd.h"
// Global Vars
static ConfigReader *helpop;
diff --git a/src/modules/m_httpd.cpp b/src/modules/m_httpd.cpp
index 81f280cd3..0591ded9a 100644
--- a/src/modules/m_httpd.cpp
+++ b/src/modules/m_httpd.cpp
@@ -22,6 +22,7 @@ using namespace std;
#include "modules.h"
#include "inspsocket.h"
#include "helperfuncs.h"
+#include "inspircd.h"
#include "httpd.h"
/* $ModDesc: Provides HTTP serving facilities to modules */
diff --git a/src/modules/m_httpd_stats.cpp b/src/modules/m_httpd_stats.cpp
index 1feeb9d24..544cc1475 100644
--- a/src/modules/m_httpd_stats.cpp
+++ b/src/modules/m_httpd_stats.cpp
@@ -32,7 +32,6 @@ extern user_hash clientlist;
extern chan_hash chanlist;
extern std::vector<userrec*> all_opers;
extern InspIRCd* ServerInstance;
-extern ServerConfig* Config;
extern int MODCOUNT;
@@ -128,8 +127,8 @@ class ModuleHttpStats : public Module
data << "<table>";
for (int i = 0; i <= MODCOUNT; i++)
{
- if (Config->module_names[i] != "")
- data << "<tr><td>" << Config->module_names[i] << "</td></tr>";
+ if (ServerInstance->Config->module_names[i] != "")
+ data << "<tr><td>" << ServerInstance->Config->module_names[i] << "</td></tr>";
}
data << "</table>";
data << "</div>";
diff --git a/src/modules/m_joinflood.cpp b/src/modules/m_joinflood.cpp
index e739e3d92..3f3c44d98 100644
--- a/src/modules/m_joinflood.cpp
+++ b/src/modules/m_joinflood.cpp
@@ -22,6 +22,7 @@ using namespace std;
#include "channels.h"
#include "modules.h"
#include "helperfuncs.h"
+#include "inspircd.h"
/* $ModDesc: Provides channel mode +j (join flood protection) */
diff --git a/src/modules/m_knock.cpp b/src/modules/m_knock.cpp
index 8779804c5..8f040cd38 100644
--- a/src/modules/m_knock.cpp
+++ b/src/modules/m_knock.cpp
@@ -22,6 +22,7 @@ using namespace std;
#include "channels.h"
#include "modules.h"
#include "helperfuncs.h"
+#include "inspircd.h"
/* $ModDesc: Provides support for /KNOCK and mode +K */
diff --git a/src/modules/m_messageflood.cpp b/src/modules/m_messageflood.cpp
index dbb7cecf1..53c9500db 100644
--- a/src/modules/m_messageflood.cpp
+++ b/src/modules/m_messageflood.cpp
@@ -22,6 +22,7 @@ using namespace std;
#include "channels.h"
#include "modules.h"
#include "helperfuncs.h"
+#include "inspircd.h"
/* $ModDesc: Provides channel mode +f (message flood protection) */
diff --git a/src/modules/m_noctcp.cpp b/src/modules/m_noctcp.cpp
index a49e9f622..d75ded180 100644
--- a/src/modules/m_noctcp.cpp
+++ b/src/modules/m_noctcp.cpp
@@ -21,6 +21,7 @@ using namespace std;
#include "channels.h"
#include "modules.h"
#include "helperfuncs.h"
+#include "inspircd.h"
/* $ModDesc: Provides support for unreal-style channel mode +c */
diff --git a/src/modules/m_noinvite.cpp b/src/modules/m_noinvite.cpp
index 11a4e9493..2cf3954fe 100644
--- a/src/modules/m_noinvite.cpp
+++ b/src/modules/m_noinvite.cpp
@@ -21,6 +21,7 @@ using namespace std;
#include "channels.h"
#include "modules.h"
#include "helperfuncs.h"
+#include "inspircd.h"
/* $ModDesc: Provides support for unreal-style channel mode +V */
diff --git a/src/modules/m_nokicks.cpp b/src/modules/m_nokicks.cpp
index 5d406ed85..c1cc9670f 100644
--- a/src/modules/m_nokicks.cpp
+++ b/src/modules/m_nokicks.cpp
@@ -21,6 +21,7 @@ using namespace std;
#include "channels.h"
#include "modules.h"
#include "helperfuncs.h"
+#include "inspircd.h"
/* $ModDesc: Provides support for unreal-style channel mode +Q */
diff --git a/src/modules/m_nonicks.cpp b/src/modules/m_nonicks.cpp
index b96990cdf..2cf62dd61 100644
--- a/src/modules/m_nonicks.cpp
+++ b/src/modules/m_nonicks.cpp
@@ -23,6 +23,7 @@ using namespace std;
#include "modules.h"
#include "helperfuncs.h"
#include "hashcomp.h"
+#include "inspircd.h"
/* $ModDesc: Provides support for unreal-style GLOBOPS and umode +g */
diff --git a/src/modules/m_nonotice.cpp b/src/modules/m_nonotice.cpp
index b11bd9d4e..a92b327d7 100644
--- a/src/modules/m_nonotice.cpp
+++ b/src/modules/m_nonotice.cpp
@@ -21,6 +21,7 @@ using namespace std;
#include "channels.h"
#include "modules.h"
#include "helperfuncs.h"
+#include "inspircd.h"
/* $ModDesc: Provides support for unreal-style channel mode +T */
diff --git a/src/modules/m_operchans.cpp b/src/modules/m_operchans.cpp
index 16c988ce8..8d066b211 100644
--- a/src/modules/m_operchans.cpp
+++ b/src/modules/m_operchans.cpp
@@ -21,6 +21,7 @@ using namespace std;
#include "channels.h"
#include "modules.h"
#include "helperfuncs.h"
+#include "inspircd.h"
/* $ModDesc: Provides support for oper-only chans via the +O channel mode */
diff --git a/src/modules/m_operjoin.cpp b/src/modules/m_operjoin.cpp
index bf3088053..801e0ac10 100644
--- a/src/modules/m_operjoin.cpp
+++ b/src/modules/m_operjoin.cpp
@@ -6,6 +6,7 @@ using namespace std;
#include "channels.h"
#include "modules.h"
#include "helperfuncs.h"
+#include "inspircd.h"
/* $ModDesc: Forces opers to join the specified channel(s) on oper-up */
diff --git a/src/modules/m_operlevels.cpp b/src/modules/m_operlevels.cpp
index 6753daae9..cc248718f 100644
--- a/src/modules/m_operlevels.cpp
+++ b/src/modules/m_operlevels.cpp
@@ -5,6 +5,7 @@ using namespace std;
#include "modules.h"
#include <string>
#include "helperfuncs.h"
+#include "inspircd.h"
/* $ModDesc: Gives each oper type a 'level', cannot kill opers 'above' your level. */
diff --git a/src/modules/m_opermd5.cpp b/src/modules/m_opermd5.cpp
index e8fa613ff..d9519223d 100644
--- a/src/modules/m_opermd5.cpp
+++ b/src/modules/m_opermd5.cpp
@@ -27,6 +27,7 @@ using namespace std;
#include "channels.h"
#include "modules.h"
#include "helperfuncs.h"
+#include "inspircd.h"
/* The four core functions - F1 is optimized somewhat */
#define F1(x, y, z) (z ^ (x & (y ^ z)))
diff --git a/src/modules/m_opermotd.cpp b/src/modules/m_opermotd.cpp
index e38d0b827..6b964a8b2 100644
--- a/src/modules/m_opermotd.cpp
+++ b/src/modules/m_opermotd.cpp
@@ -7,6 +7,7 @@ using namespace std;
#include "channels.h"
#include "modules.h"
#include "helperfuncs.h"
+#include "inspircd.h"
/* $ModDesc: Shows a message to opers after oper-up, adds /opermotd */
diff --git a/src/modules/m_opersha256.cpp b/src/modules/m_opersha256.cpp
index 289ea6f7d..285d58d8b 100644
--- a/src/modules/m_opersha256.cpp
+++ b/src/modules/m_opersha256.cpp
@@ -45,6 +45,7 @@ using namespace std;
#include "channels.h"
#include "modules.h"
#include "helperfuncs.h"
+#include "inspircd.h"
static Server *Srv;
diff --git a/src/modules/m_override.cpp b/src/modules/m_override.cpp
index 116042ae6..9cb2e28ae 100644
--- a/src/modules/m_override.cpp
+++ b/src/modules/m_override.cpp
@@ -18,6 +18,7 @@
#include "channels.h"
#include "modules.h"
#include "helperfuncs.h"
+#include "inspircd.h"
/* $ModDesc: Provides support for unreal-style oper-override */
diff --git a/src/modules/m_park.cpp b/src/modules/m_park.cpp
index 7b7a0f1b3..e26af09f2 100644
--- a/src/modules/m_park.cpp
+++ b/src/modules/m_park.cpp
@@ -23,6 +23,7 @@ using namespace std;
#include "channels.h"
#include "helperfuncs.h"
#include "modules.h"
+#include "inspircd.h"
/* $ModDesc: Provides support for user parking/unparking */
diff --git a/src/modules/m_randquote.cpp b/src/modules/m_randquote.cpp
index 85e4e34b2..5f4fcc8f3 100644
--- a/src/modules/m_randquote.cpp
+++ b/src/modules/m_randquote.cpp
@@ -16,13 +16,11 @@
using namespace std;
-#include <stdio.h>
-#include <stdlib.h>
-#include <fstream>
#include "users.h"
#include "channels.h"
#include "modules.h"
#include "helperfuncs.h"
+#include "inspircd.h"
static Server *Srv;
static FileReader *quotes = NULL;
diff --git a/src/modules/m_redirect.cpp b/src/modules/m_redirect.cpp
index c5a7f8e9c..208e55de2 100644
--- a/src/modules/m_redirect.cpp
+++ b/src/modules/m_redirect.cpp
@@ -21,6 +21,7 @@ using namespace std;
#include "channels.h"
#include "modules.h"
#include "helperfuncs.h"
+#include "inspircd.h"
/* $ModDesc: Provides channel mode +L (limit redirection) */
diff --git a/src/modules/m_restrictchans.cpp b/src/modules/m_restrictchans.cpp
index bb804676b..d5a5baba1 100644
--- a/src/modules/m_restrictchans.cpp
+++ b/src/modules/m_restrictchans.cpp
@@ -22,6 +22,7 @@ using namespace std;
#include "channels.h"
#include "modules.h"
#include "helperfuncs.h"
+#include "inspircd.h"
/* $ModDesc: Only opers may create new channels if this module is loaded */
diff --git a/src/modules/m_restrictmsg.cpp b/src/modules/m_restrictmsg.cpp
index 50d87b353..75ffc46fd 100644
--- a/src/modules/m_restrictmsg.cpp
+++ b/src/modules/m_restrictmsg.cpp
@@ -23,6 +23,7 @@ using namespace std;
#include "channels.h"
#include "modules.h"
#include "helperfuncs.h"
+#include "inspircd.h"
/* $ModDesc: Forbids users from messaging each other. Users may still message opers and opers may message other opers. */
diff --git a/src/modules/m_safelist.cpp b/src/modules/m_safelist.cpp
index 16455fe11..38985dcb5 100644
--- a/src/modules/m_safelist.cpp
+++ b/src/modules/m_safelist.cpp
@@ -22,7 +22,8 @@ using namespace std;
#include "helperfuncs.h"
#include "message.h"
#include <vector>
-
+#include "inspircd.h"
+
extern time_t TIME;
class ListData : public classbase
diff --git a/src/modules/m_sajoin.cpp b/src/modules/m_sajoin.cpp
index b32ba58ab..54f9ad066 100644
--- a/src/modules/m_sajoin.cpp
+++ b/src/modules/m_sajoin.cpp
@@ -22,6 +22,7 @@ using namespace std;
#include "channels.h"
#include "modules.h"
#include "helperfuncs.h"
+#include "inspircd.h"
/* $ModDesc: Provides support for unreal-style SAJOIN command */
diff --git a/src/modules/m_samode.cpp b/src/modules/m_samode.cpp
index 2e7cd9fe1..3e6c256a0 100644
--- a/src/modules/m_samode.cpp
+++ b/src/modules/m_samode.cpp
@@ -35,6 +35,7 @@ using namespace std;
#include "users.h"
#include "channels.h"
#include "modules.h"
+#include "inspircd.h"
static Server *Srv;
diff --git a/src/modules/m_sanick.cpp b/src/modules/m_sanick.cpp
index 7a78a15ce..1299332fe 100644
--- a/src/modules/m_sanick.cpp
+++ b/src/modules/m_sanick.cpp
@@ -21,6 +21,7 @@ using namespace std;
#include "users.h"
#include "channels.h"
#include "modules.h"
+#include "inspircd.h"
/* $ModDesc: Provides support for SANICK command */
diff --git a/src/modules/m_sapart.cpp b/src/modules/m_sapart.cpp
index 6d1086bba..4493a178f 100644
--- a/src/modules/m_sapart.cpp
+++ b/src/modules/m_sapart.cpp
@@ -22,6 +22,7 @@ using namespace std;
#include "channels.h"
#include "modules.h"
#include "helperfuncs.h"
+#include "inspircd.h"
/* $ModDesc: Provides support for unreal-style SAPART command */
diff --git a/src/modules/m_saquit.cpp b/src/modules/m_saquit.cpp
index 7f622483c..3c9d95189 100644
--- a/src/modules/m_saquit.cpp
+++ b/src/modules/m_saquit.cpp
@@ -31,6 +31,7 @@ using namespace std;
#include "users.h"
#include "channels.h"
#include "modules.h"
+#include "inspircd.h"
/* $ModDesc: Provides support for an SAQUIT command, exits user with a reason */
diff --git a/src/modules/m_securelist.cpp b/src/modules/m_securelist.cpp
index c1c79f8da..232a083be 100644
--- a/src/modules/m_securelist.cpp
+++ b/src/modules/m_securelist.cpp
@@ -22,7 +22,8 @@ using namespace std;
#include "helperfuncs.h"
#include "message.h"
#include <vector>
-
+#include "inspircd.h"
+
extern time_t TIME;
/* $ModDesc: A module overriding /list, and making it safe - stop those sendq problems. */
diff --git a/src/modules/m_services.cpp b/src/modules/m_services.cpp
index 9f5e1bdb7..2a7656f2f 100644
--- a/src/modules/m_services.cpp
+++ b/src/modules/m_services.cpp
@@ -23,6 +23,7 @@ using namespace std;
#include <string>
#include "helperfuncs.h"
#include "hashcomp.h"
+#include "inspircd.h"
static bool kludgeme = false;
diff --git a/src/modules/m_services_account.cpp b/src/modules/m_services_account.cpp
index 5ffb48f98..c545e26b6 100644
--- a/src/modules/m_services_account.cpp
+++ b/src/modules/m_services_account.cpp
@@ -23,6 +23,7 @@ using namespace std;
#include <string>
#include "helperfuncs.h"
#include "hashcomp.h"
+#include "inspircd.h"
/* $ModDesc: Povides support for ircu-style services accounts, including chmode +R, etc. */
diff --git a/src/modules/m_showwhois.cpp b/src/modules/m_showwhois.cpp
index 9b51e6204..1343e665f 100644
--- a/src/modules/m_showwhois.cpp
+++ b/src/modules/m_showwhois.cpp
@@ -7,6 +7,7 @@ using namespace std;
#include "channels.h"
#include "modules.h"
#include "helperfuncs.h"
+#include "inspircd.h"
/* $ModDesc: Allows opers to set +W to see when a user uses WHOIS on them */
diff --git a/src/modules/m_silence.cpp b/src/modules/m_silence.cpp
index 855aca0e3..923c24981 100644
--- a/src/modules/m_silence.cpp
+++ b/src/modules/m_silence.cpp
@@ -24,6 +24,7 @@ using namespace std;
#include "modules.h"
#include "helperfuncs.h"
#include "hashcomp.h"
+#include "inspircd.h"
/* $ModDesc: Provides support for the /SILENCE command */
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp
index aeeaa2c52..7d011970e 100644
--- a/src/modules/m_spanningtree.cpp
+++ b/src/modules/m_spanningtree.cpp
@@ -68,7 +68,6 @@ using namespace std;
class ModuleSpanningTree;
static ModuleSpanningTree* TreeProtocolModule;
-extern ServerConfig* Config;
extern InspIRCd* ServerInstance;
extern std::vector<Module*> modules;
extern std::vector<ircd_module*> factory;
@@ -820,14 +819,13 @@ class TreeSocket : public InspSocket
std::string MyCapabilities()
{
- ServerConfig* Config = Srv->GetConfig();
std::vector<std::string> modlist;
std::string capabilities = "";
for (int i = 0; i <= MODCOUNT; i++)
{
if ((modules[i]->GetVersion().Flags & VF_STATIC) || (modules[i]->GetVersion().Flags & VF_COMMON))
- modlist.push_back(Config->module_names[i]);
+ modlist.push_back(ServerInstance->Config->module_names[i]);
}
sort(modlist.begin(),modlist.end());
for (unsigned int i = 0; i < modlist.size(); i++)
@@ -3822,7 +3820,7 @@ class ModuleSpanningTree : public Module
user->WriteServ("351 %s :%s",user->nick,Version.c_str());
if (found == TreeRoot)
{
- std::stringstream out(Config->data005);
+ std::stringstream out(ServerInstance->Config->data005);
std::string token = "";
std::string line5 = "";
int token_counter = 0;
@@ -3910,7 +3908,7 @@ class ModuleSpanningTree : public Module
results.push_back(Srv->GetServerName()+" 244 "+user->nick+" H * * "+LinkBlocks[i].Name.c_str());
}
results.push_back(Srv->GetServerName()+" 219 "+user->nick+" "+statschar+" :End of /STATS report");
- WriteOpers("*** Notice: %s '%c' requested by %s (%s@%s)",(!strcmp(user->server,Config->ServerName) ? "Stats" : "Remote stats"),statschar,user->nick,user->ident,user->host);
+ WriteOpers("*** Notice: %s '%c' requested by %s (%s@%s)",(!strcmp(user->server,ServerInstance->Config->ServerName) ? "Stats" : "Remote stats"),statschar,user->nick,user->ident,user->host);
return 1;
}
return 0;
diff --git a/src/modules/m_spy.cpp b/src/modules/m_spy.cpp
index b835e2c66..faf4e431a 100644
--- a/src/modules/m_spy.cpp
+++ b/src/modules/m_spy.cpp
@@ -48,7 +48,6 @@ using namespace std;
static Server *Srv;
-extern ServerConfig* Config;
extern InspIRCd* ServerInstance;
extern chan_hash chanlist;
diff --git a/src/modules/m_sslmodes.cpp b/src/modules/m_sslmodes.cpp
index 0d4b0e515..d2b26cbe0 100644
--- a/src/modules/m_sslmodes.cpp
+++ b/src/modules/m_sslmodes.cpp
@@ -2,6 +2,7 @@
#include "channels.h"
#include "modules.h"
#include "helperfuncs.h"
+#include "inspircd.h"
/* $ModDesc: Provides support for unreal-style channel mode +z */
diff --git a/src/modules/m_stripcolor.cpp b/src/modules/m_stripcolor.cpp
index 3550d9301..98c5945a7 100644
--- a/src/modules/m_stripcolor.cpp
+++ b/src/modules/m_stripcolor.cpp
@@ -22,6 +22,7 @@ using namespace std;
#include "channels.h"
#include "modules.h"
#include "helperfuncs.h"
+#include "inspircd.h"
/* $ModDesc: Provides channel +S mode (strip ansi colour) */
diff --git a/src/modules/m_swhois.cpp b/src/modules/m_swhois.cpp
index 88856c1f0..cb400a0bf 100644
--- a/src/modules/m_swhois.cpp
+++ b/src/modules/m_swhois.cpp
@@ -18,6 +18,7 @@
#include "channels.h"
#include "modules.h"
#include "helperfuncs.h"
+#include "inspircd.h"
/* $ModDesc: Provides the SWHOIS command which allows setting of arbitary WHOIS lines */
diff --git a/src/modules/m_timedbans.cpp b/src/modules/m_timedbans.cpp
index b3ecfec06..fad2409dc 100644
--- a/src/modules/m_timedbans.cpp
+++ b/src/modules/m_timedbans.cpp
@@ -25,6 +25,7 @@ using namespace std;
#include "modules.h"
#include "helperfuncs.h"
#include "hashcomp.h"
+#include "inspircd.h"
static Server *Srv;