diff options
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/extra/m_pgsql.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_blockamsg.cpp | 3 | ||||
-rw-r--r-- | src/modules/m_cban.cpp | 18 | ||||
-rw-r--r-- | src/modules/m_connflood.cpp | 3 | ||||
-rw-r--r-- | src/modules/m_httpd.cpp | 1 | ||||
-rw-r--r-- | src/modules/m_safelist.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_securelist.cpp | 4 |
7 files changed, 5 insertions, 30 deletions
diff --git a/src/modules/extra/m_pgsql.cpp b/src/modules/extra/m_pgsql.cpp index d30e826e5..0389ddcd5 100644 --- a/src/modules/extra/m_pgsql.cpp +++ b/src/modules/extra/m_pgsql.cpp @@ -44,8 +44,6 @@ * I can access the socket engine :\ */ -extern time_t TIME; - /* Forward declare, so we can have the typedef neatly at the top */ class SQLConn; /* Also needs forward declaration, as it's used inside SQLconn */ diff --git a/src/modules/m_blockamsg.cpp b/src/modules/m_blockamsg.cpp index 38fed16d6..8c0aab795 100644 --- a/src/modules/m_blockamsg.cpp +++ b/src/modules/m_blockamsg.cpp @@ -29,9 +29,6 @@ /* $ModDesc: Attempt to block /amsg, at least some of the irritating mIRC scripts. */ -extern time_t TIME; - - enum BlockAction { IBLOCK_KILL, IBLOCK_KILLOPERS, IBLOCK_NOTICE, IBLOCK_NOTICEOPERS, IBLOCK_SILENT }; class BlockedMessage : public classbase diff --git a/src/modules/m_cban.cpp b/src/modules/m_cban.cpp index eba40ee0c..50fac3041 100644 --- a/src/modules/m_cban.cpp +++ b/src/modules/m_cban.cpp @@ -30,8 +30,6 @@ /* $ModDesc: Gives /cban, aka C:lines. Think Q:lines, for channels. */ - - class CBan : public classbase { public: @@ -50,12 +48,8 @@ public: } }; -std::string EncodeCBan(const CBan &ban); -CBan DecodeCBan(const std::string &data); bool CBanComp(const CBan &ban1, const CBan &ban2); -void ExpireBans(); -extern time_t TIME; typedef std::vector<CBan> cbanlist; /* cbans is declared here, as our type is right above. Don't try move it. */ @@ -75,8 +69,6 @@ class cmd_cban : public command_t { /* syntax: CBAN #channel time :reason goes here */ /* 'time' is a human-readable timestring, like 2d3h2s. */ - - ExpireBans(); if(pcnt == 1) { @@ -85,7 +77,7 @@ class cmd_cban : public command_t { if (parameters[0] == iter->chname) { - unsigned long remaining = (iter->set_on + iter->length) - TIME; + unsigned long remaining = (iter->set_on + iter->length) - ServerInstance->Time(); user->WriteServ( "386 %s %s :Removed CBAN with %lu seconds left before expiry (%s)", user->nick, iter->chname.c_str(), remaining, iter->reason.c_str()); cbans.erase(iter); break; @@ -103,7 +95,7 @@ class cmd_cban : public command_t long length = duration(parameters[1]); std::string reason = (pcnt > 2) ? parameters[2] : "No reason supplied"; - cbans.push_back(CBan(parameters[0], user->nick, TIME, length, reason)); + cbans.push_back(CBan(parameters[0], user->nick, ServerInstance->Time(), length, reason)); std::sort(cbans.begin(), cbans.end(), CBanComp); @@ -157,7 +149,7 @@ class ModuleCBan : public Module { for(cbanlist::iterator iter = cbans.begin(); iter != cbans.end(); iter++) { - unsigned long remaining = (iter->set_on + iter->length) - TIME; + unsigned long remaining = (iter->set_on + iter->length) - ServerInstance->Time(); results.push_back(std::string(ServerInstance->Config->ServerName)+" 210 "+user->nick+" "+iter->chname.c_str()+" "+iter->set_by+" "+ConvToStr(iter->set_on)+" "+ConvToStr(iter->length)+" "+ConvToStr(remaining)+" :"+iter->reason); } } @@ -242,10 +234,10 @@ class ModuleCBan : public Module /* 0 == permanent, don't mess with them! -- w00t */ if (iter->length != 0) { - if (iter->set_on + iter->length <= TIME) + if (iter->set_on + iter->length <= ServerInstance->Time()) { log(DEBUG, "m_cban.so: Ban on %s expired, removing...", iter->chname.c_str()); - ServerInstance->WriteOpers("*** %li second CBAN on %s (%s) set %u seconds ago expired", iter->length, iter->chname.c_str(), iter->reason.c_str(), TIME - iter->set_on); + ServerInstance->WriteOpers("*** %li second CBAN on %s (%s) set %u seconds ago expired", iter->length, iter->chname.c_str(), iter->reason.c_str(), ServerInstance->Time() - iter->set_on); cbans.erase(iter); go_again = true; } diff --git a/src/modules/m_connflood.cpp b/src/modules/m_connflood.cpp index bf05c272a..291074c98 100644 --- a/src/modules/m_connflood.cpp +++ b/src/modules/m_connflood.cpp @@ -26,9 +26,6 @@ using namespace std; /* $ModDesc: Connection throttle */ int conns = 0, throttled = 0; -extern time_t TIME; - - class ModuleConnFlood : public Module { diff --git a/src/modules/m_httpd.cpp b/src/modules/m_httpd.cpp index 1afa3bd09..c433553be 100644 --- a/src/modules/m_httpd.cpp +++ b/src/modules/m_httpd.cpp @@ -32,7 +32,6 @@ class ModuleHttp; static ModuleHttp* HttpModule; -extern time_t TIME; static bool claimed; enum HttpState diff --git a/src/modules/m_safelist.cpp b/src/modules/m_safelist.cpp index bc0b8bf3d..ef8065637 100644 --- a/src/modules/m_safelist.cpp +++ b/src/modules/m_safelist.cpp @@ -24,10 +24,6 @@ using namespace std; #include "configreader.h" #include "inspircd.h" -extern time_t TIME; - - - class ListData : public classbase { public: diff --git a/src/modules/m_securelist.cpp b/src/modules/m_securelist.cpp index dad59b6e3..1e65fcce0 100644 --- a/src/modules/m_securelist.cpp +++ b/src/modules/m_securelist.cpp @@ -23,12 +23,8 @@ using namespace std; #include <vector> #include "inspircd.h" -extern time_t TIME; - /* $ModDesc: A module overriding /list, and making it safe - stop those sendq problems. */ - - class ModuleSecureList : public Module { private: |