]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
fixed some indentation and spacing in modules
authorpippijn <pippijn@e03df62e-2008-0410-955e-edbf42e46eb7>
Wed, 11 Jun 2008 11:35:23 +0000 (11:35 +0000)
committerpippijn <pippijn@e03df62e-2008-0410-955e-edbf42e46eb7>
Wed, 11 Jun 2008 11:35:23 +0000 (11:35 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9888 e03df62e-2008-0410-955e-edbf42e46eb7

165 files changed:
src/modules/extra/m_filter_pcre.cpp
src/modules/extra/m_ldapauth.cpp
src/modules/extra/m_ldapoper.cpp
src/modules/extra/m_mssql.cpp
src/modules/extra/m_mysql.cpp
src/modules/extra/m_pgsql.cpp
src/modules/extra/m_rline.cpp
src/modules/extra/m_sqlauth.cpp
src/modules/extra/m_sqlite3.cpp
src/modules/extra/m_sqllog.cpp
src/modules/extra/m_sqloper.cpp
src/modules/extra/m_sqlutils.cpp
src/modules/extra/m_ssl_gnutls.cpp
src/modules/extra/m_ssl_openssl.cpp
src/modules/extra/m_ssl_oper_cert.cpp
src/modules/extra/m_sslinfo.cpp
src/modules/extra/m_testclient.cpp
src/modules/extra/m_ziplink.cpp
src/modules/httpd.h
src/modules/m_abbreviation.cpp
src/modules/m_alias.cpp
src/modules/m_alltime.cpp
src/modules/m_antibear.cpp
src/modules/m_antibottler.cpp
src/modules/m_auditorium.cpp
src/modules/m_banexception.cpp
src/modules/m_banredirect.cpp
src/modules/m_blockamsg.cpp
src/modules/m_blockcaps.cpp
src/modules/m_blockcolor.cpp
src/modules/m_botmode.cpp
src/modules/m_callerid.cpp
src/modules/m_cap.cpp
src/modules/m_cban.cpp
src/modules/m_censor.cpp
src/modules/m_cgiirc.cpp
src/modules/m_chancreate.cpp
src/modules/m_chanfilter.cpp
src/modules/m_chanprotect.cpp
src/modules/m_check.cpp
src/modules/m_chghost.cpp
src/modules/m_chgident.cpp
src/modules/m_chgname.cpp
src/modules/m_cloaking.cpp
src/modules/m_clones.cpp
src/modules/m_close.cpp
src/modules/m_commonchans.cpp
src/modules/m_conn_join.cpp
src/modules/m_conn_umodes.cpp
src/modules/m_conn_waitpong.cpp
src/modules/m_connectban.cpp
src/modules/m_connflood.cpp
src/modules/m_customtitle.cpp
src/modules/m_cycle.cpp
src/modules/m_dccallow.cpp
src/modules/m_delayjoin.cpp
src/modules/m_denychans.cpp
src/modules/m_dnsbl.cpp
src/modules/m_filter.cpp
src/modules/m_foobar.cpp
src/modules/m_globalload.cpp
src/modules/m_globops.cpp
src/modules/m_helpop.cpp
src/modules/m_hidechans.cpp
src/modules/m_hideoper.cpp
src/modules/m_hostchange.cpp
src/modules/m_httpd.cpp
src/modules/m_httpd_acl.cpp
src/modules/m_httpd_config.cpp
src/modules/m_httpd_stats.cpp
src/modules/m_ident.cpp
src/modules/m_invisible.cpp
src/modules/m_inviteexception.cpp
src/modules/m_joinflood.cpp
src/modules/m_jumpserver.cpp
src/modules/m_kicknorejoin.cpp
src/modules/m_knock.cpp
src/modules/m_md5.cpp
src/modules/m_messageflood.cpp
src/modules/m_namesx.cpp
src/modules/m_nickban.cpp
src/modules/m_nickflood.cpp
src/modules/m_nicklock.cpp
src/modules/m_noctcp.cpp
src/modules/m_noinvite.cpp
src/modules/m_nokicks.cpp
src/modules/m_nonicks.cpp
src/modules/m_nonotice.cpp
src/modules/m_operchans.cpp
src/modules/m_operjoin.cpp
src/modules/m_operlog.cpp
src/modules/m_opermodes.cpp
src/modules/m_opermotd.cpp
src/modules/m_override.cpp
src/modules/m_password_hash.cpp
src/modules/m_permchannels.cpp
src/modules/m_proxyscan.cpp
src/modules/m_quietban.cpp
src/modules/m_randquote.cpp
src/modules/m_redirect.cpp
src/modules/m_regonlycreate.cpp
src/modules/m_remove.cpp
src/modules/m_restrictbanned.cpp
src/modules/m_restrictchans.cpp
src/modules/m_restrictmsg.cpp
src/modules/m_ripemd160.cpp
src/modules/m_rpc_json.cpp
src/modules/m_rpctest.cpp
src/modules/m_safelist.cpp
src/modules/m_sajoin.cpp
src/modules/m_samode.cpp
src/modules/m_sanick.cpp
src/modules/m_sapart.cpp
src/modules/m_saquit.cpp
src/modules/m_sasl.cpp
src/modules/m_securelist.cpp
src/modules/m_services.cpp
src/modules/m_services_account.cpp
src/modules/m_servprotect.cpp
src/modules/m_sethost.cpp
src/modules/m_setident.cpp
src/modules/m_setidle.cpp
src/modules/m_setname.cpp
src/modules/m_sha256.cpp
src/modules/m_showwhois.cpp
src/modules/m_shun.cpp
src/modules/m_silence.cpp
src/modules/m_spanningtree/addline.cpp
src/modules/m_spanningtree/capab.cpp
src/modules/m_spanningtree/delline.cpp
src/modules/m_spanningtree/fjoin.cpp
src/modules/m_spanningtree/hmac.cpp
src/modules/m_spanningtree/kill.cpp
src/modules/m_spanningtree/main.cpp
src/modules/m_spanningtree/netburst.cpp
src/modules/m_spanningtree/nickcollide.cpp
src/modules/m_spanningtree/override_admin.cpp
src/modules/m_spanningtree/override_map.cpp
src/modules/m_spanningtree/override_modules.cpp
src/modules/m_spanningtree/override_motd.cpp
src/modules/m_spanningtree/override_squit.cpp
src/modules/m_spanningtree/override_stats.cpp
src/modules/m_spanningtree/override_time.cpp
src/modules/m_spanningtree/override_whois.cpp
src/modules/m_spanningtree/postcommand.cpp
src/modules/m_spanningtree/precommand.cpp
src/modules/m_spanningtree/privmsg.cpp
src/modules/m_spanningtree/treesocket2.cpp
src/modules/m_spanningtree/uid.cpp
src/modules/m_spy.cpp
src/modules/m_ssl_dummy.cpp
src/modules/m_sslmodes.cpp
src/modules/m_stripcolor.cpp
src/modules/m_svshold.cpp
src/modules/m_swhois.cpp
src/modules/m_taxonomy.cpp
src/modules/m_timedbans.cpp
src/modules/m_tline.cpp
src/modules/m_uhnames.cpp
src/modules/m_uninvite.cpp
src/modules/m_userip.cpp
src/modules/m_vhost.cpp
src/modules/m_watch.cpp
src/modules/m_xline_db.cpp
src/modules/m_xmlsocket.cpp

index f751a846dff0b97e34986d6455fea7a0c7a483dd..4710d7a33b5836d67ff69274f94c8c0363be0cf9 100644 (file)
@@ -133,7 +133,7 @@ class ModuleFilterPCRE : public FilterBase
        }
 
        virtual void OnRehash(User* user, const std::string &parameter)
-       {               
+       {
                ConfigReader MyConf(ServerInstance);
 
                for (int index = 0; index < MyConf.Enumerate("keyword"); index++)
index 93ca34ff2dc0794f07ba54866ccf58f36f68a0f6..ab56de6d7f6e786fc2582a98fcfb055989118792 100644 (file)
@@ -13,7 +13,7 @@
  * Taken from the UnrealIRCd 4.0 SVN version, based on
  * InspIRCd 1.1.x.
  *
- * UnrealIRCd 4.0 (C) 2007 Carsten Valdemar Munk 
+ * UnrealIRCd 4.0 (C) 2007 Carsten Valdemar Munk
  * This program is free but copyrighted software; see
  *         the file COPYING for details.
  *
@@ -44,7 +44,7 @@ class ModuleLDAPAuth : public Module
        bool verbose;
        bool useusername;
        LDAP *conn;
-       
+
 public:
        ModuleLDAPAuth(InspIRCd* Me)
        : Module::Module(Me)
@@ -64,9 +64,9 @@ public:
        virtual void OnRehash(User* user, const std::string &parameter)
        {
                ConfigReader Conf(ServerInstance);
-               
+
                base                    = Conf.ReadValue("ldapauth", "baserdn", 0);
-               attribute               = Conf.ReadValue("ldapauth", "attribute", 0); 
+               attribute               = Conf.ReadValue("ldapauth", "attribute", 0);
                ldapserver              = Conf.ReadValue("ldapauth", "server", 0);
                allowpattern            = Conf.ReadValue("ldapauth", "allowpattern", 0);
                killreason              = Conf.ReadValue("ldapauth", "killreason", 0);
@@ -75,13 +75,13 @@ public:
                password                = Conf.ReadValue("ldapauth", "bindauth", 0);
                verbose                 = Conf.ReadFlag("ldapauth", "verbose", 0);              /* Set to true if failed connects should be reported to operators */
                useusername             = Conf.ReadFlag("ldapauth", "userfield", 0);
-               
+
                if (scope == "base")
                        searchscope = LDAP_SCOPE_BASE;
                else if (scope == "onelevel")
                        searchscope = LDAP_SCOPE_ONELEVEL;
                else searchscope = LDAP_SCOPE_SUBTREE;
-               
+
                Connect();
        }
 
@@ -96,9 +96,9 @@ public:
                        if (verbose)
                                ServerInstance->SNO->WriteToSnoMask('A', "LDAP connection failed: %s", ldap_err2string(res));
                        conn = NULL;
-                       return false;                   
+                       return false;
                }
-               
+
                res = ldap_set_option(conn, LDAP_OPT_PROTOCOL_VERSION, (void *)&v);
                if (res != LDAP_SUCCESS)
                {
@@ -188,16 +188,16 @@ public:
                        ldap_msgfree(msg);
                        user->Extend("ldapauth_failed");
                        return false;
-               } 
+               }
        }
-       
-       
+
+
        virtual void OnUserDisconnect(User* user)
        {
                user->Shrink("ldapauthed");
-               user->Shrink("ldapauth_failed");                
+               user->Shrink("ldapauth_failed");
        }
-       
+
        virtual bool OnCheckReady(User* user)
        {
                return user->GetExt("ldapauthed");
@@ -207,7 +207,7 @@ public:
        {
                return Version(1,2,0,0,VF_VENDOR,API_VERSION);
        }
-       
+
 };
 
 MODULE_INIT(ModuleLDAPAuth)
index 61e518dcf9ad8dd4de21be0cda27d8299a8d0b84..9a2a5b131afb2f20003abba2ee0c53a3a4c6d616 100644 (file)
@@ -13,7 +13,7 @@
  * Taken from the UnrealIRCd 4.0 SVN version, based on
  * InspIRCd 1.1.x.
  *
- * UnrealIRCd 4.0 (C) 2007 Carsten Valdemar Munk 
+ * UnrealIRCd 4.0 (C) 2007 Carsten Valdemar Munk
  * This program is free but copyrighted software; see
  *         the file COPYING for details.
  *
@@ -39,7 +39,7 @@ class ModuleLDAPAuth : public Module
        std::string password;
        int searchscope;
        LDAP *conn;
-       
+
 public:
        ModuleLDAPAuth(InspIRCd* Me)
        : Module::Module(Me)
@@ -59,19 +59,19 @@ public:
        virtual void OnRehash(User* user, const std::string &parameter)
        {
                ConfigReader Conf(ServerInstance);
-               
+
                base                    = Conf.ReadValue("ldapoper", "baserdn", 0);
                ldapserver              = Conf.ReadValue("ldapoper", "server", 0);
                std::string scope       = Conf.ReadValue("ldapoper", "searchscope", 0);
                username                = Conf.ReadValue("ldapoper", "binddn", 0);
                password                = Conf.ReadValue("ldapoper", "bindauth", 0);
-               
+
                if (scope == "base")
                        searchscope = LDAP_SCOPE_BASE;
                else if (scope == "onelevel")
                        searchscope = LDAP_SCOPE_ONELEVEL;
                else searchscope = LDAP_SCOPE_SUBTREE;
-               
+
                Connect();
        }
 
@@ -84,9 +84,9 @@ public:
                if (res != LDAP_SUCCESS)
                {
                        conn = NULL;
-                       return false;                   
+                       return false;
                }
-               
+
                res = ldap_set_option(conn, LDAP_OPT_PROTOCOL_VERSION, (void *)&v);
                if (res != LDAP_SUCCESS)
                {
@@ -97,20 +97,20 @@ public:
                return true;
        }
 
-        virtual int OnPassCompare(Extensible* ex, const std::string &data, const std::string &input, const std::string &hashtype)
-        {
+       virtual int OnPassCompare(Extensible* ex, const std::string &data, const std::string &input, const std::string &hashtype)
+       {
                User* user = dynamic_cast<User*>(ex);
-                if (hashtype == "ldap")
+               if (hashtype == "ldap")
                {
-                        if (LookupOper(user, data, input))
-                        {
+                       if (LookupOper(user, data, input))
+                       {
                                /* This is an ldap oper and has been found, claim the OPER command */
-                                return 1;
-                        }
-                }
+                               return 1;
+                       }
+               }
                /* We don't know this oper! */
-                return 0;
-        }
+               return 0;
+       }
 
        bool LookupOper(User* user, const std::string &what, const std::string &opassword)
        {
@@ -163,14 +163,14 @@ public:
                        free(authpass);
                        ldap_msgfree(msg);
                        return false;
-               } 
+               }
        }
 
        virtual Version GetVersion()
        {
                return Version(1,2,0,0,VF_VENDOR,API_VERSION);
        }
-       
+
 };
 
 MODULE_INIT(ModuleLDAPAuth)
index 97213039663fa1dc7f9426c9d1b69acfcc61cf54..782b5bfac5b0267dfef9c49351b0b34f16b56a07 100644 (file)
@@ -94,7 +94,7 @@ class ResultNotifier : public BufferedSocket
 
 class MsSQLResult : public SQLresult
 {
 private:
+ private:
        int currentrow;
        int rows;
        int cols;
@@ -106,7 +106,7 @@ class MsSQLResult : public SQLresult
        SQLfieldList* fieldlist;
        SQLfieldMap* fieldmap;
 
 public:
+ public:
        MsSQLResult(Module* self, Module* to, unsigned int rid)
        : SQLresult(self, to, rid), currentrow(0), rows(0), cols(0), fieldlist(NULL), fieldmap(NULL)
        {
@@ -262,16 +262,16 @@ class MsSQLResult : public SQLresult
 
 class SQLConn : public classbase
 {
 private:
+ private:
        ResultQueue results;
-       InspIRCd* Instance;
+       InspIRCd* Instance;
        Module* mod;
        SQLhost host;
        TDSLOGIN* login;
        TDSSOCKET* sock;
        TDSCONTEXT* context;
 
 public:
+ public:
        SQLConn(InspIRCd* SI, Module* m, const SQLhost& hi)
        : Instance(SI), mod(m), host(hi), login(NULL), sock(NULL), context(NULL)
        {
@@ -308,7 +308,7 @@ class SQLConn : public classbase
        {
                if (!sock)
                        return SQLerror(BAD_CONN, "Socket was NULL, check if SQL server is running.");
-                       
+
                /* Pointer to the buffer we screw around with substitution in */
                char* query;
 
@@ -357,7 +357,7 @@ class SQLConn : public classbase
                                                escend++;
                                        }
                                        *escend = 0;
-                                       
+
                                        for (char* n = escaped; *n; n++)
                                        {
                                                *queryend = *n;
@@ -395,7 +395,7 @@ class SQLConn : public classbase
                }
                delete[] query;
                free(msquery);
-               
+
                int tds_res;
                while (tds_process_tokens(sock, &tds_res, NULL, TDS_TOKEN_RESULTS) == TDS_SUCCEED)
                {
@@ -450,7 +450,7 @@ class SQLConn : public classbase
 
                                default:
                                        break;
-                       }       
+                       }
                }
                results.push_back(res);
                SendNotify();
@@ -610,11 +610,11 @@ class SQLConn : public classbase
 
 class ModuleMsSQL : public Module
 {
 private:
+ private:
        ConnMap connections;
        unsigned long currid;
 
 public:
+ public:
        ModuleMsSQL(InspIRCd* Me)
        : Module::Module(Me), currid(0)
        {
@@ -705,7 +705,7 @@ class ModuleMsSQL : public Module
                }
                return false;
        }
-    
+
        void ReadConf()
        {
                ClearOldConnections();
index be6f4bc4c89e957c7314bc9e285afda795526e20..e49c3ced42012c0335f86d5069c35aa158c82aee 100644 (file)
@@ -30,7 +30,7 @@
 /* $ModDep: m_sqlv2.h */
 
 /* THE NONBLOCKING MYSQL API!
- * 
+ *
  * MySQL provides no nonblocking (asyncronous) API of its own, and its developers recommend
  * that instead, you should thread your program. This is what i've done here to allow for
  * asyncronous SQL requests via mysql. The way this works is as follows:
@@ -137,7 +137,7 @@ class MySQLresult : public SQLresult
                                                std::string b = (row[field_count] ? row[field_count] : "");
                                                SQLfield sqlf(b, !row[field_count]);
                                                colnames.push_back(a);
-                                               fieldlists[n].push_back(sqlf); 
+                                               fieldlists[n].push_back(sqlf);
                                                field_count++;
                                        }
                                        n++;
@@ -247,7 +247,7 @@ class MySQLresult : public SQLresult
        virtual SQLfieldMap* GetRowMapPtr()
        {
                fieldmap = new SQLfieldMap();
-               
+
                if (currentrow < rows)
                {
                        for (int i = 0; i < Cols(); i++)
@@ -632,7 +632,7 @@ class Notifier : public BufferedSocket
 {
        insp_sockaddr sock_us;
        socklen_t uslen;
-       
+
 
  public:
 
@@ -707,7 +707,7 @@ class Notifier : public BufferedSocket
 class ModuleSQL : public Module
 {
  public:
-       
+
        ConfigReader *Conf;
        InspIRCd* PublicServerInstance;
        pthread_t Dispatcher;
@@ -725,7 +725,7 @@ class ModuleSQL : public Module
                SQLModule = this;
 
                MessagePipe = new Notifier(ServerInstance);
-               
+
                pthread_attr_t attribs;
                pthread_attr_init(&attribs);
                pthread_attr_setdetachstate(&attribs, PTHREAD_CREATE_JOINABLE);
@@ -817,12 +817,12 @@ class ModuleSQL : public Module
        {
                rehashing = true;
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1,2,0,0,VF_VENDOR|VF_SERVICEPROVIDER,API_VERSION);
        }
-       
+
 };
 
 void* DispatcherThread(void* arg)
index fb282fb98a5e35e3ae6d66d2e7e2fa5223c4a2a8..67b3594c78212ea9ccee1641d7b44092bdf2b76d 100644 (file)
@@ -83,9 +83,9 @@ std::string SQLhost::GetDSN()
 
 class ReconnectTimer : public Timer
 {
 private:
+ private:
        Module* mod;
 public:
+ public:
        ReconnectTimer(InspIRCd* SI, Module* m)
        : Timer(5, SI->Time(), false), mod(m)
        {
@@ -314,8 +314,8 @@ public:
  */
 class SQLConn : public EventHandler
 {
 private:
-       InspIRCd*               Instance;
+ private:
+       InspIRCd*               Instance;
        SQLhost                 confhost;       /* The <database> entry */
        Module*                 us;                     /* Pointer to the SQL provider itself */
        PGconn*                 sql;            /* PgSQL database connection handle */
@@ -324,7 +324,7 @@ class SQLConn : public EventHandler
        QueryQueue              queue;          /* Queue of queries waiting to be executed on this connection */
        time_t                  idle;           /* Time we last heard from the database */
 
 public:
+ public:
        SQLConn(InspIRCd* SI, Module* self, const SQLhost& hi)
        : EventHandler(), Instance(SI), confhost(hi), us(self), sql(NULL), status(CWRITE), qinprog(false)
        {
@@ -713,13 +713,13 @@ class SQLConn : public EventHandler
 
 class ModulePgSQL : public Module
 {
 private:
+ private:
        ConnMap connections;
        unsigned long currid;
        char* sqlsuccess;
        ReconnectTimer* retimer;
 
 public:
+ public:
        ModulePgSQL(InspIRCd* Me)
        : Module::Module(Me), currid(0)
        {
index 0a26ea63d03a46e3993ed1c2e56c55f178b9abd4..2a4124c94f625b0cd2683038e67b1b3de259d82b 100644 (file)
@@ -25,7 +25,7 @@
 
 class CoreExport RLine : public XLine
 {
 public:
+ public:
 
        /** Create a R-Line.
         * @param s_time The set time
index 18859d1333d62ffab2d40501d666c62868aa10d8..dcc314af99064249f8404fa1b49e446f6b2dfaa0 100644 (file)
@@ -31,9 +31,9 @@ class ModuleSQLAuth : public Module
        std::string killreason;
        std::string allowpattern;
        std::string databaseid;
-       
+
        bool verbose;
-       
+
 public:
        ModuleSQLAuth(InspIRCd* Me)
        : Module::Module(Me)
@@ -79,7 +79,7 @@ public:
                        user->Extend("sqlauthed");
                        return 0;
                }
-               
+
                if (!CheckCredentials(user))
                {
                        ServerInstance->Users->QuitUser(user, killreason);
@@ -104,7 +104,7 @@ public:
        {
                std::string thisquery = freeformquery;
                std::string safepass = user->password;
-               
+
                /* Search and replace the escaped nick and escaped pass into the query */
 
                SearchAndReplace(safepass, "\"", "");
@@ -132,7 +132,7 @@ public:
 
                /* Build the query */
                SQLrequest req = SQLrequest(this, SQLprovider, databaseid, SQLquery(thisquery));
-                       
+
                if(req.Send())
                {
                        /* When we get the query response from the service provider we will be given an ID to play with,
@@ -143,7 +143,7 @@ public:
                         * us to discard the query.
                         */
                        AssociateUser(this, SQLutils, req.id, user).Send();
-                               
+
                        return true;
                }
                else
@@ -153,7 +153,7 @@ public:
                        return false;
                }
        }
-       
+
        virtual const char* OnRequest(Request* request)
        {
                if(strcmp(SQLRESID, request->GetId()) == 0)
@@ -162,7 +162,7 @@ public:
 
                        User* user = GetAssocUser(this, SQLutils, res->id).S().user;
                        UnAssociate(this, SQLutils, res->id).S();
-                       
+
                        if(user)
                        {
                                if(res->error.Id() == NO_ERROR)
@@ -195,16 +195,16 @@ public:
                                ServerInstance->Users->QuitUser(user, killreason);
                        }
                        return SQLSUCCESS;
-               }               
+               }
                return NULL;
        }
-       
+
        virtual void OnUserDisconnect(User* user)
        {
                user->Shrink("sqlauthed");
-               user->Shrink("sqlauth_failed");         
+               user->Shrink("sqlauth_failed");
        }
-       
+
        virtual bool OnCheckReady(User* user)
        {
                return user->GetExt("sqlauthed");
@@ -214,7 +214,7 @@ public:
        {
                return Version(1,2,1,0,VF_VENDOR,API_VERSION);
        }
-       
+
 };
 
 MODULE_INIT(ModuleSQLAuth)
index 8c191381a7e1717e416eb5549613bd651dbe83a9..0aa5ad92a73ab4809c454c6170203fb5654c0693 100644 (file)
@@ -94,7 +94,7 @@ class ResultNotifier : public BufferedSocket
 
 class SQLite3Result : public SQLresult
 {
 private:
+ private:
        int currentrow;
        int rows;
        int cols;
@@ -106,7 +106,7 @@ class SQLite3Result : public SQLresult
        SQLfieldList* fieldlist;
        SQLfieldMap* fieldmap;
 
 public:
+ public:
        SQLite3Result(Module* self, Module* to, unsigned int rid)
        : SQLresult(self, to, rid), currentrow(0), rows(0), cols(0), fieldlist(NULL), fieldmap(NULL)
        {
@@ -262,14 +262,14 @@ class SQLite3Result : public SQLresult
 
 class SQLConn : public classbase
 {
 private:
+ private:
        ResultQueue results;
-       InspIRCd* Instance;
+       InspIRCd* Instance;
        Module* mod;
        SQLhost host;
        sqlite3* conn;
 
 public:
+ public:
        SQLConn(InspIRCd* SI, Module* m, const SQLhost& hi)
        : Instance(SI), mod(m), host(hi)
        {
@@ -475,11 +475,11 @@ class SQLConn : public classbase
 
 class ModuleSQLite3 : public Module
 {
 private:
+ private:
        ConnMap connections;
        unsigned long currid;
 
 public:
+ public:
        ModuleSQLite3(InspIRCd* Me)
        : Module::Module(Me), currid(0)
        {
@@ -507,20 +507,20 @@ class ModuleSQLite3 : public Module
                ServerInstance->SE->DelFd(resultnotify);
                resultnotify->Close();
                ServerInstance->BufferedSocketCull();
-               
+
                if (QueueFD >= 0)
                {
                        shutdown(QueueFD, 2);
                        close(QueueFD);
                }
-               
+
                if (resultdispatch)
                {
                        ServerInstance->SE->DelFd(resultdispatch);
                        resultdispatch->Close();
                        ServerInstance->BufferedSocketCull();
                }
-               
+
                ServerInstance->Modules->UnpublishInterface("SQL", this);
                ServerInstance->Modules->UnpublishFeature("SQL");
                ServerInstance->Modules->DoneWithInterface("SQLutils");
index fb49f828c98592f346f9b79f17851f5ff46290fb..ecd931dd60eed5922260f20f22423759d5129b18 100644 (file)
@@ -304,7 +304,7 @@ class ModuleSQLLog : public Module
        {
                return Version(1,2,0,1,VF_VENDOR,API_VERSION);
        }
-       
+
 };
 
 MODULE_INIT(ModuleSQLLog)
index b848345580747db17d92d6824caf2e3a68af9b5a..60207548dc0ecf678b2a0fb4a0a34af0c4c9825c 100644 (file)
@@ -106,7 +106,7 @@ public:
        virtual void OnRehash(User* user, const std::string &parameter)
        {
                ConfigReader Conf(ServerInstance);
-               
+
                databaseid = Conf.ReadValue("sqloper", "dbid", 0); /* Database ID of a database configured for the service provider module */
                hashtype = assign(Conf.ReadValue("sqloper", "hash", 0));
        }
@@ -116,7 +116,7 @@ public:
                if ((validated) && (command == "OPER"))
                {
                        if (LookupOper(user, parameters[0], parameters[1]))
-                       {       
+                       {
                                /* Returning true here just means the query is in progress, or on it's way to being
                                 * in progress. Nothing about the /oper actually being successful..
                                 * If the oper lookup fails later, we pass the command to the original handler
@@ -131,7 +131,7 @@ public:
        bool LookupOper(User* user, const std::string &username, const std::string &password)
        {
                Module* target;
-               
+
                target = ServerInstance->Modules->FindFeature("SQL");
 
                if (target)
@@ -150,7 +150,7 @@ public:
                         */
                        SQLrequest req = SQLrequest(this, target, databaseid,
                                        SQLquery("SELECT username, password, hostname, type FROM ircd_opers WHERE username = '?' AND password='?'") % username % md5_pass_hash);
-                       
+
                        if (req.Send())
                        {
                                /* When we get the query response from the service provider we will be given an ID to play with,
@@ -164,7 +164,7 @@ public:
 
                                user->Extend("oper_user", strdup(username.c_str()));
                                user->Extend("oper_pass", strdup(password.c_str()));
-                                       
+
                                return true;
                        }
                        else
@@ -178,7 +178,7 @@ public:
                        return false;
                }
        }
-       
+
        virtual const char* OnRequest(Request* request)
        {
                if (strcmp(SQLRESID, request->GetId()) == 0)
@@ -193,7 +193,7 @@ public:
 
                        user->GetExt("oper_user", tried_user);
                        user->GetExt("oper_pass", tried_pass);
-                       
+
                        if (user)
                        {
                                if (res->error.Id() == NO_ERROR)
@@ -203,18 +203,18 @@ public:
                                                /* We got a row in the result, this means there was a record for the oper..
                                                 * now we just need to check if their host matches, and if it does then
                                                 * oper them up.
-                                                * 
+                                                *
                                                 * We now (previous versions of the module didn't) support multiple SQL
                                                 * rows per-oper in the same way the config file does, all rows will be tried
                                                 * until one is found which matches. This is useful to define several different
                                                 * hosts for a single oper.
-                                                * 
+                                                *
                                                 * The for() loop works as SQLresult::GetRowMap() returns an empty map when there
                                                 * are no more rows to return.
                                                 */
-                                               
+
                                                for (SQLfieldMap& row = res->GetRowMap(); row.size(); row = res->GetRowMap())
-                                               {                                                       
+                                               {
                                                        if (OperUser(user, row["username"].d, row["password"].d, row["hostname"].d, row["type"].d))
                                                        {
                                                                /* If/when one of the rows matches, stop checking and return */
@@ -263,7 +263,7 @@ public:
 
                                }
                        }
-               
+
                        return SQLSUCCESS;
                }
 
@@ -290,14 +290,14 @@ public:
        bool OperUser(User* user, const std::string &username, const std::string &password, const std::string &pattern, const std::string &type)
        {
                ConfigReader Conf(ServerInstance);
-               
+
                for (int j = 0; j < Conf.Enumerate("type"); j++)
                {
                        std::string tname = Conf.ReadValue("type","name",j);
                        std::string hostname(user->ident);
 
                        hostname.append("@").append(user->host);
-                                                       
+
                        if ((tname == type) && OneOfMatches(hostname.c_str(), user->GetIPString(), pattern.c_str()))
                        {
                                /* Opertype and host match, looks like this is it. */
@@ -315,7 +315,7 @@ public:
                                return true;
                        }
                }
-               
+
                return false;
        }
 
@@ -323,7 +323,7 @@ public:
        {
                return Version(1,2,1,0,VF_VENDOR,API_VERSION);
        }
-       
+
 };
 
 MODULE_INIT(ModuleSQLOper)
index eea748db46780cdb0199769f19f7f656661049bb..7a8a2810a0c25b3e19465b4da2566b0a35ead333 100644 (file)
@@ -45,7 +45,7 @@ public:
        virtual ~ModuleSQLutils()
        {
                ServerInstance->Modules->UnpublishInterface("SQLutils", this);
-       }       
+       }
 
 
        virtual const char* OnRequest(Request* request)
@@ -53,36 +53,36 @@ public:
                if(strcmp(SQLUTILAU, request->GetId()) == 0)
                {
                        AssociateUser* req = (AssociateUser*)request;
-                       
+
                        iduser.insert(std::make_pair(req->id, req->user));
-                       
+
                        AttachList(req->user, req->id);
                }
                else if(strcmp(SQLUTILAC, request->GetId()) == 0)
                {
                        AssociateChan* req = (AssociateChan*)request;
-                       
-                       idchan.insert(std::make_pair(req->id, req->chan));                      
-                       
+
+                       idchan.insert(std::make_pair(req->id, req->chan));
+
                        AttachList(req->chan, req->id);
                }
                else if(strcmp(SQLUTILUA, request->GetId()) == 0)
                {
                        UnAssociate* req = (UnAssociate*)request;
-                       
+
                        /* Unassociate a given query ID with all users and channels
                         * it is associated with.
                         */
-                       
+
                        DoUnAssociate(iduser, req->id);
                        DoUnAssociate(idchan, req->id);
                }
                else if(strcmp(SQLUTILGU, request->GetId()) == 0)
                {
                        GetAssocUser* req = (GetAssocUser*)request;
-                       
+
                        IdUserMap::iterator iter = iduser.find(req->id);
-                       
+
                        if(iter != iduser.end())
                        {
                                req->user = iter->second;
@@ -90,19 +90,19 @@ public:
                }
                else if(strcmp(SQLUTILGC, request->GetId()) == 0)
                {
-                       GetAssocChan* req = (GetAssocChan*)request;                     
-                       
+                       GetAssocChan* req = (GetAssocChan*)request;
+
                        IdChanMap::iterator iter = idchan.find(req->id);
-                       
+
                        if(iter != idchan.end())
                        {
                                req->chan = iter->second;
                        }
                }
-               
+
                return SQLUTILSUCCESS;
        }
-       
+
        virtual void OnUserDisconnect(User* user)
        {
                /* A user is disconnecting, first we need to check if they have a list of queries associated with them.
@@ -110,15 +110,15 @@ public:
                 * associated them asks to look them up then it gets a NULL result and knows to discard the query.
                 */
                AssocIdList* il;
-               
+
                if(user->GetExt("sqlutils_queryids", il))
                {
                        for(AssocIdList::iterator listiter = il->begin(); listiter != il->end(); listiter++)
                        {
                                IdUserMap::iterator iter;
-                       
+
                                iter = iduser.find(*listiter);
-                       
+
                                if(iter != iduser.end())
                                {
                                        if(iter->second != user)
@@ -133,36 +133,36 @@ public:
                                        ServerInstance->Logs->Log("m_sqlutils",DEBUG, "BUG: user %s was extended with sqlutils_queryids but there was nothing matching in the map", user->nick.c_str());
                                }
                        }
-                       
+
                        user->Shrink("sqlutils_queryids");
                        delete il;
                }
        }
-       
+
        void AttachList(Extensible* obj, unsigned long id)
        {
                AssocIdList* il;
-               
+
                if(!obj->GetExt("sqlutils_queryids", il))
                {
                        /* Doesn't already exist, create a new list and attach it. */
                        il = new AssocIdList;
                        obj->Extend("sqlutils_queryids", il);
                }
-               
+
                /* Now either way we have a valid list in il, attached. */
                il->push_back(id);
        }
-       
+
        void RemoveFromList(Extensible* obj, unsigned long id)
        {
                AssocIdList* il;
-               
+
                if(obj->GetExt("sqlutils_queryids", il))
                {
                        /* Only do anything if the list exists... (which it ought to) */
                        il->remove(id);
-                       
+
                        if(il->empty())
                        {
                                /* If we just emptied it.. */
@@ -171,7 +171,7 @@ public:
                        }
                }
        }
-       
+
        template <class T> void DoUnAssociate(T &map, unsigned long id)
        {
                /* For each occurence of 'id' (well, only one..it's not a multimap) in 'map'
@@ -179,7 +179,7 @@ public:
                 * 'id' from the list of query IDs attached to it.
                 */
                typename T::iterator iter = map.find(id);
-               
+
                if(iter != map.end())
                {
                        /* Found a value indexed by 'id', call RemoveFromList()
@@ -189,7 +189,7 @@ public:
                        RemoveFromList(iter->second, id);
                }
        }
-       
+
        virtual void OnChannelDelete(Channel* chan)
        {
                /* A channel is being destroyed, first we need to check if it has a list of queries associated with it.
@@ -197,39 +197,39 @@ public:
                 * associated them asks to look them up then it gets a NULL result and knows to discard the query.
                 */
                AssocIdList* il;
-               
+
                if(chan->GetExt("sqlutils_queryids", il))
                {
                        for(AssocIdList::iterator listiter = il->begin(); listiter != il->end(); listiter++)
                        {
                                IdChanMap::iterator iter;
-                       
+
                                iter = idchan.find(*listiter);
-                       
+
                                if(iter != idchan.end())
                                {
                                        if(iter->second != chan)
                                        {
                                                ServerInstance->Logs->Log("m_sqlutils",DEBUG, "BUG: ID associated with channel %s doesn't have the same Channel* associated with it in the map (erasing anyway)", chan->name.c_str());
                                        }
-                                       idchan.erase(iter);                                     
+                                       idchan.erase(iter);
                                }
                                else
                                {
                                        ServerInstance->Logs->Log("m_sqlutils",DEBUG, "BUG: channel %s was extended with sqlutils_queryids but there was nothing matching in the map", chan->name.c_str());
                                }
                        }
-                       
+
                        chan->Shrink("sqlutils_queryids");
                        delete il;
                }
        }
-                       
+
        virtual Version GetVersion()
        {
                return Version(1, 2, 0, 0, VF_VENDOR|VF_SERVICEPROVIDER, API_VERSION);
        }
-       
+
 };
 
 MODULE_INIT(ModuleSQLutils)
index ac385ceb553f286b470f431ddb84973c686c9e87..53c242c637e83d5718585d98a84aee3f9a300342 100644 (file)
@@ -913,7 +913,7 @@ class ModuleSSLGnuTLS : public Module
                GenericCapHandler(ev, "tls", "tls");
        }
 
-        void Prioritize()
+       void Prioritize()
        {
                Module* server = ServerInstance->Modules->Find("m_spanningtree.so");
                ServerInstance->Modules->SetPriority(this, I_OnPostConnect, PRIO_AFTER, &server);
index 9a51f0eb371c415bc503fed85547e5f2010b9284..70da472a3dfddce9b051832f344550e5c3465272 100644 (file)
@@ -162,7 +162,7 @@ class ModuleSSLOpenSSL : public Module
                ServerInstance->Modules->Attach(eventlist, this, 16);
        }
 
-        virtual void OnHookUserIO(User* user, const std::string &targetip)
+       virtual void OnHookUserIO(User* user, const std::string &targetip)
        {
                if (!user->io && isin(targetip,user->GetPort(), listenports))
                {
@@ -175,43 +175,43 @@ class ModuleSSLOpenSSL : public Module
        {
                ConfigReader Conf(ServerInstance);
 
-                listenports.clear();
-                clientactive = 0;
-                sslports.clear();
-
-                for(int index = 0; index < Conf.Enumerate("bind"); index++)
-                {
-                        // For each <bind> tag
-                        std::string x = Conf.ReadValue("bind", "type", index);
-                        if(((x.empty()) || (x == "clients")) && (Conf.ReadValue("bind", "ssl", index) == "openssl"))
-                        {
-                                // Get the port we're meant to be listening on with SSL
-                                std::string port = Conf.ReadValue("bind", "port", index);
-                                std::string addr = Conf.ReadValue("bind", "address", index);
-
-                                irc::portparser portrange(port, false);
-                                long portno = -1;
-                                while ((portno = portrange.GetToken()))
-                                {
-                                        clientactive++;
-                                        try
-                                        {
-                                                listenports.push_back(addr + ":" + ConvToStr(portno));
-
-                                                for (size_t i = 0; i < ServerInstance->Config->ports.size(); i++)
-                                                        if ((ServerInstance->Config->ports[i]->GetPort() == portno) && (ServerInstance->Config->ports[i]->GetIP() == addr))
-                                                                ServerInstance->Config->ports[i]->SetDescription("ssl");
-                                                ServerInstance->Logs->Log("m_ssl_openssl",DEFAULT, "m_ssl_gnutls.so: Enabling SSL for port %ld", portno);
-
-                                                sslports.append((addr.empty() ? "*" : addr)).append(":").append(ConvToStr(portno)).append(";");
-                                        }
-                                        catch (ModuleException &e)
-                                        {
-                                                ServerInstance->Logs->Log("m_ssl_openssl",DEFAULT, "m_ssl_gnutls.so: FAILED to enable SSL on port %ld: %s. Maybe it's already hooked by the same port on a different IP, or you have an other SSL or similar module loaded?", portno, e.GetReason());
-                                        }
-                                }
-                        }
-                }
+               listenports.clear();
+               clientactive = 0;
+               sslports.clear();
+
+               for(int index = 0; index < Conf.Enumerate("bind"); index++)
+               {
+                       // For each <bind> tag
+                       std::string x = Conf.ReadValue("bind", "type", index);
+                       if(((x.empty()) || (x == "clients")) && (Conf.ReadValue("bind", "ssl", index) == "openssl"))
+                       {
+                               // Get the port we're meant to be listening on with SSL
+                               std::string port = Conf.ReadValue("bind", "port", index);
+                               std::string addr = Conf.ReadValue("bind", "address", index);
+
+                               irc::portparser portrange(port, false);
+                               long portno = -1;
+                               while ((portno = portrange.GetToken()))
+                               {
+                                       clientactive++;
+                                       try
+                                       {
+                                               listenports.push_back(addr + ":" + ConvToStr(portno));
+
+                                               for (size_t i = 0; i < ServerInstance->Config->ports.size(); i++)
+                                                       if ((ServerInstance->Config->ports[i]->GetPort() == portno) && (ServerInstance->Config->ports[i]->GetIP() == addr))
+                                                               ServerInstance->Config->ports[i]->SetDescription("ssl");
+                                               ServerInstance->Logs->Log("m_ssl_openssl",DEFAULT, "m_ssl_gnutls.so: Enabling SSL for port %ld", portno);
+
+                                               sslports.append((addr.empty() ? "*" : addr)).append(":").append(ConvToStr(portno)).append(";");
+                                       }
+                                       catch (ModuleException &e)
+                                       {
+                                               ServerInstance->Logs->Log("m_ssl_openssl",DEFAULT, "m_ssl_gnutls.so: FAILED to enable SSL on port %ld: %s. Maybe it's already hooked by the same port on a different IP, or you have an other SSL or similar module loaded?", portno, e.GetReason());
+                                       }
+                               }
+                       }
+               }
 
                if (!sslports.empty())
                        sslports.erase(sslports.end() - 1);
@@ -430,7 +430,7 @@ class ModuleSSLOpenSSL : public Module
 
        virtual void OnRawSocketConnect(int fd)
        {
-                /* Are there any possibilities of an out of range fd? Hope not, but lets be paranoid */
+               /* Are there any possibilities of an out of range fd? Hope not, but lets be paranoid */
                if ((fd < 0) || (fd > ServerInstance->SE->GetMaxFds() -1))
                        return;
 
@@ -636,7 +636,7 @@ class ModuleSSLOpenSSL : public Module
        {
                // Is this right? Not sure if the unencrypted data is garaunteed to be the same length.
                // Read into the inbuffer, offset from the beginning by the amount of data we have that insp hasn't taken yet.
-               
+
                int ret = SSL_read(session->sess, session->inbuf + session->inbufoffset, inbufsize - session->inbufoffset);
 
                if (ret == 0)
index ed4ba9c003d48a365f0266064c420d8a8c55c9b3..817854fa82f841e016e6dc8749af23976edea3fd 100644 (file)
@@ -31,8 +31,8 @@ class cmd_fingerprint : public Command
        {
                this->source = "m_ssl_oper_cert.so";
                syntax = "<nickname>";
-       }       
-                 
+       }
+
        CmdResult Handle (const std::vector<std::string> &parameters, User *user)
        {
                User* target = ServerInstance->FindNick(parameters[0]);
@@ -115,7 +115,7 @@ class ModuleOperSSLCert : public Module
        virtual int OnPreCommand(std::string &command, std::vector<std::string> &parameters, User *user, bool validated, const std::string &original_line)
        {
                irc::string cmd = command.c_str();
-               
+
                if ((cmd == "OPER") && (validated))
                {
                        char TheHost[MAXBUF];
index 6c74b15d442af9df894321c6c6fb137712731664..6d0c7893742fbb6958246c065422b5eaf8149849 100644 (file)
@@ -71,7 +71,7 @@ class ModuleSSLInfo : public Module
        ModuleSSLInfo(InspIRCd* Me)
                : Module(Me)
        {
-               
+
                newcommand = new cmd_sslinfo(ServerInstance);
                ServerInstance->AddCommand(newcommand);
 
@@ -81,7 +81,7 @@ class ModuleSSLInfo : public Module
        virtual ~ModuleSSLInfo()
        {
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1, 2, 0, 0, VF_VENDOR, API_VERSION);
index 0bad0466e3663ddafc37a02c0004de1ace512306..f0492ed786a5a9342a8ce6bd8c7cd371dc5e5967 100644 (file)
@@ -21,7 +21,7 @@
 class ModuleTestClient : public Module
 {
 private:
-       
+
 
 public:
        ModuleTestClient(InspIRCd* Me)
@@ -31,21 +31,21 @@ public:
                ServerInstance->Modules->Attach(eventlist, this, 2);
        }
 
-               
+
        virtual Version GetVersion()
        {
                return Version(1, 2, 0, 0, VF_VENDOR, API_VERSION);
        }
-       
+
        virtual void OnBackgroundTimer(time_t)
        {
                Module* target = ServerInstance->Modules->FindFeature("SQL");
-               
+
                if(target)
                {
                        SQLrequest foo = SQLrequest(this, target, "foo",
                                        SQLquery("UPDATE rawr SET foo = '?' WHERE bar = 42") % time(NULL));
-                       
+
                        if(foo.Send())
                        {
                                ServerInstance->Logs->Log("m_testclient.so", DEBUG, "Sent query, got given ID %lu", foo.id);
@@ -56,13 +56,13 @@ public:
                        }
                }
        }
-       
+
        virtual const char* OnRequest(Request* request)
        {
                if(strcmp(SQLRESID, request->GetId()) == 0)
                {
                        ServerInstance->Logs->Log("m_testclient.so", DEBUG, "Got SQL result (%s)", request->GetId());
-               
+
                        SQLresult* res = (SQLresult*)request;
 
                        if (res->error.Id() == NO_ERROR)
@@ -74,7 +74,7 @@ public:
                                        for (int r = 0; r < res->Rows(); r++)
                                        {
                                                ServerInstance->Logs->Log("m_testclient.so", DEBUG, "Row %d:", r);
-                                               
+
                                                for(int i = 0; i < res->Cols(); i++)
                                                {
                                                        ServerInstance->Logs->Log("m_testclient.so", DEBUG, "\t[%s]: %s", res->ColName(i).c_str(), res->GetValue(r, i).d.c_str());
@@ -89,20 +89,20 @@ public:
                        else
                        {
                                ServerInstance->Logs->Log("m_testclient.so", DEBUG, "SQLrequest failed: %s", res->error.Str());
-                               
+
                        }
-               
+
                        return SQLSUCCESS;
                }
-               
+
                ServerInstance->Logs->Log("m_testclient.so", DEBUG, "Got unsupported API version string: %s", request->GetId());
-               
+
                return NULL;
        }
-       
+
        virtual ~ModuleTestClient()
        {
-       }       
+       }
 };
 
 MODULE_INIT(ModuleTestClient)
index 7b1cb281c2c53651f559b02bedf9f7fb982c3566..be57eea97e22d6ac35f453e90680ba61a8fa043c 100644 (file)
@@ -144,9 +144,9 @@ class ModuleZLib : public Module
        float total_in_compressed;
        float total_out_uncompressed;
        float total_in_uncompressed;
-       
+
  public:
-       
+
        ModuleZLib(InspIRCd* Me)
                : Module::Module(Me)
        {
@@ -261,7 +261,7 @@ class ModuleZLib : public Module
        virtual void OnRawSocketAccept(int fd, const std::string &ip, int localport)
        {
                izip_session* session = &sessions[fd];
-       
+
                /* allocate state and buffers */
                session->fd = fd;
                session->status = IZIP_OPEN;
@@ -308,7 +308,7 @@ class ModuleZLib : public Module
                        /* Add it to the frame queue */
                        session->inbuf->AddData(compr, readresult);
                        total_in_compressed += readresult;
-       
+
                        /* Parse all completed frames */
                        int size = 0;
                        while ((size = session->inbuf->GetFrame(compr, CHUNK)) != 0)
@@ -320,14 +320,14 @@ class ModuleZLib : public Module
                                /* If we cant call this, well, we're boned. */
                                if (inflateInit(&session->d_stream) != Z_OK)
                                        return 0;
-       
+
                                while ((session->d_stream.total_out < count) && (session->d_stream.total_in < (unsigned int)size))
                                {
                                        session->d_stream.avail_in = session->d_stream.avail_out = 1;
                                        if (inflate(&session->d_stream, Z_NO_FLUSH) == Z_STREAM_END)
                                                break;
                                }
-       
+
                                /* Stick a fork in me, i'm done */
                                inflateEnd(&session->d_stream);
 
@@ -435,7 +435,7 @@ class ModuleZLib : public Module
                 */
                return ocount;
        }
-       
+
        void CloseSession(izip_session* session)
        {
                if (session->status == IZIP_OPEN)
index 0fa5c09d55f551b7355b8605362e2503802a31f6..2d8da2cbdb81b4f1f3d0264942d5835eff5189ba 100644 (file)
@@ -27,7 +27,7 @@ class HTTPHeaders : public classbase
  protected:
        std::map<std::string,std::string> headers;
  public:
-       
+
        /** Set the value of a header
         * Sets the value of the named header. If the header is already present, it will be replaced
         */
@@ -35,7 +35,7 @@ class HTTPHeaders : public classbase
        {
                headers[name] = data;
        }
-       
+
        /** Set the value of a header, only if it doesn't exist already
         * Sets the value of the named header. If the header is already present, it will NOT be updated
         */
@@ -44,21 +44,21 @@ class HTTPHeaders : public classbase
                if (!IsSet(name))
                        SetHeader(name, data);
        }
-       
+
        /** Remove the named header
         */
        void RemoveHeader(const std::string &name)
        {
                headers.erase(name);
        }
-       
+
        /** Remove all headers
         */
        void Clear()
        {
                headers.clear();
        }
-       
+
        /** Get the value of a header
         * @return The value of the header, or an empty string
         */
@@ -67,10 +67,10 @@ class HTTPHeaders : public classbase
                std::map<std::string,std::string>::iterator it = headers.find(name);
                if (it == headers.end())
                        return std::string();
-               
+
                return it->second;
        }
-       
+
        /** Check if the given header is specified
         * @return true if the header is specified
         */
@@ -79,17 +79,17 @@ class HTTPHeaders : public classbase
                std::map<std::string,std::string>::iterator it = headers.find(name);
                return (it != headers.end());
        }
-       
+
        /** Get all headers, formatted by the HTTP protocol
         * @return Returns all headers, formatted according to the HTTP protocol. There is no request terminator at the end
         */
        std::string GetFormattedHeaders()
        {
                std::string re;
-               
+
                for (std::map<std::string,std::string>::iterator i = headers.begin(); i != headers.end(); i++)
                        re += i->first + ": " + i->second + "\r\n";
-               
+
                return re;
        }
 };
@@ -105,7 +105,7 @@ class HTTPRequest : public classbase
        std::string document;
        std::string ipaddr;
        std::string postdata;
-       
+
  public:
 
        HTTPHeaders *headers;
@@ -181,7 +181,7 @@ class HTTPDocument : public classbase
  public:
 
        HTTPHeaders headers;
-       
+
        /** The socket pointer from an earlier HTTPRequest
         */
        void* sock;
index 0b59613ca16e532879442196dd89edb78ec4cc1f..dc298d726f85be3a2cb0d94b781f6162e41b21c8 100644 (file)
@@ -19,7 +19,7 @@ class ModuleAbbreviation : public Module
 {
 
  public:
-       
+
        ModuleAbbreviation(InspIRCd* Me)
                : Module(Me)
        {
index 762ba6e29fd4665794a186e3fe7ddb93ea88f12e..28190cec994b45a7077a85bd4973562f9f0e2955 100644 (file)
@@ -69,7 +69,7 @@ class ModuleAlias : public Module
        }
 
  public:
-       
+
        ModuleAlias(InspIRCd* Me)
                : Module(Me)
        {
@@ -177,7 +177,7 @@ class ModuleAlias : public Module
                                {
                                        if (!ServerInstance->ULine(u->server))
                                        {
-                                               ServerInstance->SNO->WriteToSnoMask('A', "NOTICE -- Service "+Aliases[i].requires+" required by alias "+std::string(Aliases[i].text.c_str())+" is not on a u-lined server, possibly underhanded antics detected!"); 
+                                               ServerInstance->SNO->WriteToSnoMask('A', "NOTICE -- Service "+Aliases[i].requires+" required by alias "+std::string(Aliases[i].text.c_str())+" is not on a u-lined server, possibly underhanded antics detected!");
                                                user->WriteNumeric(401, ""+std::string(user->nick)+" "+Aliases[i].requires+" :is an imposter! Please inform an IRC operator as soon as possible.");
                                                return 1;
                                        }
@@ -255,7 +255,7 @@ class ModuleAlias : public Module
                }
                ServerInstance->Parser->CallHandler(command, pars, user);
        }
+
        virtual void OnRehash(User* user, const std::string &parameter)
        {
                ReadAliases();
index 04a3f4a4f4057df677f5d6244d4bc202aa7d0ed4..b0ccd2886cb9faf85ab70c8be0e11120e0cc2a0b 100644 (file)
@@ -33,7 +33,7 @@ class CommandAlltime : public Command
 
                std::string msg = ":" + std::string(ServerInstance->Config->ServerName) + " NOTICE " + user->nick + " :System time for " +
                        ServerInstance->Config->ServerName + " is: " + fmtdate;
-               
+
                if (IS_LOCAL(user))
                {
                        user->Write(msg);
@@ -60,16 +60,16 @@ class Modulealltime : public Module
                ServerInstance->AddCommand(mycommand);
 
        }
-       
+
        virtual ~Modulealltime()
        {
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1, 2, 0, 0, VF_COMMON | VF_VENDOR, API_VERSION);
        }
-       
+
 };
 
 MODULE_INIT(Modulealltime)
index 925ec23149278eb1eae245bfb1329c33879242cd..77b817b542af1c89d8669b7613801d168015fd15 100644 (file)
@@ -23,15 +23,15 @@ class ModuleAntiBear : public Module
  public:
        ModuleAntiBear(InspIRCd* Me) : Module(Me)
        {
-               
+
                Implementation eventlist[] = { I_OnUserRegister, I_OnPreCommand };
                ServerInstance->Modules->Attach(eventlist, this, 2);
        }
-       
+
        virtual ~ModuleAntiBear()
        {
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1,2,0,0,VF_VENDOR,API_VERSION);
@@ -54,12 +54,12 @@ class ModuleAntiBear : public Module
 
                                return 1;
                        }
-                       
+
                        user->Shrink("antibear_timewait");
                        // Block the command, so the user doesn't receive a no such nick notice
                        return 1;
                }
-               
+
                return 0;
        }
 
index 37f5f953ec9c819aa3918dd5a0052370ddb701d1..cd177fd8ef2965336532d1a9c537a20a2b418b00 100644 (file)
@@ -21,17 +21,17 @@ class ModuleAntiBottler : public Module
        ModuleAntiBottler(InspIRCd* Me)
                : Module(Me)
        {
-               
+
                Implementation eventlist[] = { I_OnPreCommand };
                ServerInstance->Modules->Attach(eventlist, this, 1);
        }
 
 
-       
+
        virtual ~ModuleAntiBottler()
        {
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1,2,0,1,VF_VENDOR,API_VERSION);
@@ -48,7 +48,7 @@ class ModuleAntiBottler : public Module
                        {
                                if (*j == ':')
                                        break;
-                                       
+
                                if (*j == '"')
                                {
                                        not_bottler = true;
index 28e5a54acb7c5ed893667a81eb2506d88cd32094..cba99d4716e5938af3d0d3b54e7396583ae74fcd 100644 (file)
@@ -67,7 +67,7 @@ class ModuleAuditorium : public Module
                Me->Modules->Attach(eventlist, this, 6);
 
        }
-       
+
        virtual ~ModuleAuditorium()
        {
                ServerInstance->Modes->DelMode(aum);
@@ -86,7 +86,7 @@ class ModuleAuditorium : public Module
                return Version(1, 2, 0, 0, VF_COMMON | VF_VENDOR, API_VERSION);
        }
 
-        virtual void OnNamesListItem(User* issuer, User* user, Channel* channel, std::string &prefixes, std::string &nick)
+       virtual void OnNamesListItem(User* issuer, User* user, Channel* channel, std::string &prefixes, std::string &nick)
        {
                if (!channel->IsModeSet('u'))
                        return;
@@ -113,7 +113,7 @@ class ModuleAuditorium : public Module
                        return;
                }
        }
-       
+
        virtual void OnUserJoin(User* user, Channel* channel, bool sync, bool &silent)
        {
                if (channel->IsModeSet('u'))
index d90cbff2959eb90782d90784c9f05f3494409514..2a0bafc25ec4eab4db4b430c06bb102dcaf7d759 100644 (file)
@@ -39,7 +39,7 @@ class BanException : public ListModeBase
 class ModuleBanException : public Module
 {
        BanException* be;
-       
+
 
 public:
        ModuleBanException(InspIRCd* Me) : Module(Me)
@@ -54,7 +54,7 @@ public:
                Me->Modules->Attach(list, this, 4);
 
        }
-       
+
        virtual void On005Numeric(std::string &output)
        {
                output.append(" EXCEPTS=e");
@@ -66,7 +66,7 @@ public:
                {
                        modelist* list;
                        chan->GetExt(be->GetInfoKey(), list);
-                       
+
                        if (!list)
                        {
                                // No list, proceed normally
@@ -83,7 +83,7 @@ public:
                                }
                        }
                }
-               return 0;       
+               return 0;
        }
 
        virtual void OnCleanup(int target_type, void* item)
@@ -134,7 +134,7 @@ public:
        {
                return Version(1, 2, 0, 3, VF_COMMON | VF_VENDOR, API_VERSION);
        }
-       
+
        virtual ~ModuleBanException()
        {
                ServerInstance->Modes->DelMode(be);
index 6714dde1ed23e8cfdcf20f92afba5d4100f60104..5965811c446669e6fdeaf666c201561f4a0f390a 100644 (file)
@@ -52,22 +52,22 @@ class BanRedirect : public ModeWatcher
                 * nick!ident#chan -> nick!ident@*#chan
                 * nick#chan -> nick!*@*#chan
                 */
-               
+
                if(channel && (type == MODETYPE_CHANNEL) && param.length())
                {
                        BanRedirectList* redirects;
-                       
+
                        std::string mask[4];
                        enum { NICK, IDENT, HOST, CHAN } current = NICK;
                        std::string::iterator start_pos = param.begin();
                        long maxbans = channel->GetMaxBans();
-               
+
                        if(adding && (channel->bans.size() > static_cast<unsigned>(maxbans)))
                        {
                                source->WriteNumeric(478, "%s %s :Channel ban list for %s is full (maximum entries for this channel is %ld)", source->nick.c_str(), channel->name.c_str(), channel->name.c_str(), maxbans);
                                return false;
                        }
-                       
+
                        for(std::string::iterator curr = start_pos; curr != param.end(); curr++)
                        {
                                switch(*curr)
@@ -89,19 +89,19 @@ class BanRedirect : public ModeWatcher
                                                break;
                                }
                        }
-                               
+
                        if(mask[current].empty())
                        {
-                               mask[current].assign(start_pos, param.end());   
+                               mask[current].assign(start_pos, param.end());
                        }
-                       
+
                        /* nick@host wants to be changed to *!nick@host rather than nick!*@host... */
                        if(mask[NICK].length() && mask[HOST].length() && mask[IDENT].empty())
                        {
                                /* std::string::swap() is fast - it runs in constant time */
                                mask[NICK].swap(mask[IDENT]);
                        }
-                               
+
                        for(int i = 0; i < 3; i++)
                        {
                                if(mask[i].empty())
@@ -109,9 +109,9 @@ class BanRedirect : public ModeWatcher
                                        mask[i].assign("*");
                                }
                        }
-                               
+
                        param.assign(mask[NICK]).append(1, '!').append(mask[IDENT]).append(1, '@').append(mask[HOST]);
-       
+
                        if(mask[CHAN].length())
                        {
                                if(!IS_LOCAL(source) || Srv->IsChannel(mask[CHAN].c_str(), ServerInstance->Config->Limits.ChanMax))
@@ -131,10 +131,10 @@ class BanRedirect : public ModeWatcher
                                                                redirects = new BanRedirectList;
                                                                channel->Extend("banredirects", redirects);
                                                        }
-                               
+
                                                        /* Here 'param' doesn't have the channel on it yet */
                                                        redirects->push_back(BanRedirectEntry(mask[CHAN].c_str(), param.c_str()));
-                                                       
+
                                                        /* Now it does */
                                                        param.append(mask[CHAN]);
                                                }
@@ -144,25 +144,25 @@ class BanRedirect : public ModeWatcher
                                                        if(channel->GetExt("banredirects", redirects))
                                                        {
                                                                /* But there were, so we need to remove the matching one if there is one */
-                                       
+
                                                                for(BanRedirectList::iterator redir = redirects->begin(); redir != redirects->end(); redir++)
                                                                {
                                                                        /* Ugly as fuck */
                                                                        if((irc::string(redir->targetchan.c_str()) == irc::string(mask[CHAN].c_str())) && (irc::string(redir->banmask.c_str()) == irc::string(param.c_str())))
                                                                        {
                                                                                redirects->erase(redir);
-                                                                               
+
                                                                                if(redirects->empty())
                                                                                {
                                                                                        delete redirects;
                                                                                        channel->Shrink("banredirects");
                                                                                }
-                                                                               
+
                                                                                break;
                                                                        }
                                                                }
                                                        }
-                                                       
+
                                                        /* Append the channel so the default +b handler can remove the entry too */
                                                        param.append(mask[CHAN]);
                                                }
@@ -175,7 +175,7 @@ class BanRedirect : public ModeWatcher
                                }
                        }
                }
-               
+
                return true;
        }
 };
@@ -192,7 +192,7 @@ class ModuleBanRedirect : public Module
        {
                re = new BanRedirect(Me);
                nofollow = false;
-               
+
                if(!ServerInstance->Modes->AddModeWatcher(re))
                {
                        delete re;
@@ -205,47 +205,47 @@ class ModuleBanRedirect : public Module
                Me->Modules->Attach(list, this, 4);
 
        }
-       
+
        virtual void OnChannelDelete(Channel* chan)
        {
                OnCleanup(TYPE_CHANNEL, chan);
        }
-       
+
        virtual void OnCleanup(int target_type, void* item)
        {
                if(target_type == TYPE_CHANNEL)
                {
                        Channel* chan = static_cast<Channel*>(item);
                        BanRedirectList* redirects;
-                       
+
                        if(chan->GetExt("banredirects", redirects))
                        {
                                irc::modestacker modestack(ServerInstance, false);
                                StringDeque stackresult;
                                std::vector<std::string> mode_junk;
                                mode_junk.push_back(chan->name);
-                               
+
                                for(BanRedirectList::iterator i = redirects->begin(); i != redirects->end(); i++)
                                {
                                        modestack.Push('b', i->targetchan.insert(0, i->banmask));
                                }
-                               
+
                                for(BanRedirectList::iterator i = redirects->begin(); i != redirects->end(); i++)
                                {
                                        modestack.PushPlus();
                                        modestack.Push('b', i->banmask);
                                }
-                               
+
                                while(modestack.GetStackedLine(stackresult))
                                {
                                        for(StringDeque::size_type i = 0; i < stackresult.size(); i++)
                                        {
                                                mode_junk.push_back(stackresult[i]);
                                        }
-                                       
+
                                        ServerInstance->SendMode(mode_junk, ServerInstance->FakeClient);
                                }
-                               
+
                                delete redirects;
                                chan->Shrink("banredirects");
                        }
@@ -269,11 +269,11 @@ class ModuleBanRedirect : public Module
                if (chan)
                {
                        BanRedirectList* redirects;
-                       
+
                        if(chan->GetExt("banredirects", redirects))
                        {
                                /* We actually had some ban redirects to check */
-                               
+
                                /* This was replaced with user->MakeHostIP() when I had a snprintf(), but MakeHostIP() doesn't seem to add the nick.
                                 * Maybe we should have a GetFullIPHost() or something to match GetFullHost() and GetFullRealHost?
                                 */
@@ -288,14 +288,14 @@ class ModuleBanRedirect : public Module
 
                                std::string ipmask(user->nick);
                                ipmask.append(1, '!').append(user->MakeHostIP());
-                               
+
                                for(BanRedirectList::iterator redir = redirects->begin(); redir != redirects->end(); redir++)
                                {
                                        if(ServerInstance->MatchText(user->GetFullRealHost(), redir->banmask) || ServerInstance->MatchText(user->GetFullHost(), redir->banmask) || ServerInstance->MatchText(ipmask, redir->banmask))
                                        {
                                                /* tell them they're banned and are being transferred */
                                                Channel* destchan = ServerInstance->FindChan(redir->targetchan);
-                                               
+
                                                if(destchan && ServerInstance->Modules->Find("m_redirect.so") && destchan->IsModeSet('L') && destchan->limit && (destchan->GetUserCounter() >= destchan->limit))
                                                {
                                                        user->WriteNumeric(474, "%s %s :Cannot join channel (You are banned)", user->nick.c_str(), chan->name.c_str());
@@ -322,12 +322,12 @@ class ModuleBanRedirect : public Module
                ServerInstance->Modes->DelModeWatcher(re);
                delete re;
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1, 0, 0, 0, VF_COMMON | VF_VENDOR, API_VERSION);
        }
-       
+
        void Prioritize()
        {
                Module* banex = ServerInstance->Modules->Find("m_banexception.so");
index cf390f1653b733631bdf7fdfd64aa9863e957dc1..9d42571e2b2f586d5ba40aaef0c651fe25880334 100644 (file)
@@ -42,7 +42,7 @@ class ModuleBlockAmsg : public Module
 {
        int ForgetDelay;
        BlockAction action;
-       
+
  public:
        ModuleBlockAmsg(InspIRCd* Me) : Module(Me)
        {
@@ -51,27 +51,27 @@ class ModuleBlockAmsg : public Module
                ServerInstance->Modules->Attach(eventlist, this, 3);
        }
 
-       
+
        virtual ~ModuleBlockAmsg()
        {
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1,2,0,0,VF_VENDOR,API_VERSION);
        }
-       
+
        virtual void OnRehash(User* user, const std::string &parameter)
        {
                ConfigReader Conf(ServerInstance);
-               
+
                ForgetDelay = Conf.ReadInteger("blockamsg", "delay", 0, false);
-               
+
                if(Conf.GetError() == CONF_VALUE_NOT_FOUND)
                        ForgetDelay = -1;
-                       
+
                std::string act = Conf.ReadValue("blockamsg", "action", 0);
-               
+
                if(act == "notice")
                        action = IBLOCK_NOTICE;
                else if(act == "noticeopers")
@@ -89,30 +89,30 @@ class ModuleBlockAmsg : public Module
                // Don't do anything with unregistered users, or remote ones.
                if(!user || (user->registered != REG_ALL) || !IS_LOCAL(user))
                        return 0;
-                       
+
                // We want case insensitive command comparison.
                // Add std::string contructor for irc::string :x
                irc::string cmd = command.c_str();
-               
+
                if(validated && (cmd == "PRIVMSG" || cmd == "NOTICE") && (parameters.size() >= 2))
                {
                        // parameters[0] should have the target(s) in it.
                        // I think it will be faster to first check if there are any commas, and if there are then try and parse it out.
                        // Most messages have a single target so...
-                       
+
                        int targets = 1;
                        int userchans = 0;
-               
+
                        if(*parameters[0].c_str() != '#')
                        {
                                // Decrement if the first target wasn't a channel.
                                targets--;
                        }
-                       
+
                        for(const char* c = parameters[0].c_str(); *c; c++)
                                if((*c == ',') && *(c+1) && (*(c+1) == '#'))
                                        targets++;
-                               
+
                        /* targets should now contain the number of channel targets the msg/notice was pointed at.
                         * If the msg/notice was a PM there should be no channel targets and 'targets' should = 0.
                         * We don't want to block PMs so...
@@ -121,13 +121,13 @@ class ModuleBlockAmsg : public Module
                        {
                                return 0;
                        }
-                                       
+
                        userchans = user->chans.size();
 
                        // Check that this message wasn't already sent within a few seconds.
                        BlockedMessage* m;
                        user->GetExt("amsgblock", m);
-                       
+
                        // If the message is identical and within the time.
                        // We check the target is *not* identical, that'd straying into the realms of flood control. Which isn't what we're doing...
                        // OR
@@ -143,10 +143,10 @@ class ModuleBlockAmsg : public Module
                                        ServerInstance->Users->QuitUser(user, "Global message (/amsg or /ame) detected");
                                else if(action == IBLOCK_NOTICE || action == IBLOCK_NOTICEOPERS)
                                        user->WriteServ( "NOTICE %s :Global message (/amsg or /ame) detected", user->nick.c_str());
-                                                                       
+
                                return 1;
                        }
-                       
+
                        if(m)
                        {
                                // If there's already a BlockedMessage allocated, use it.
@@ -159,10 +159,10 @@ class ModuleBlockAmsg : public Module
                                m = new BlockedMessage(parameters[1], parameters[0].c_str(), ServerInstance->Time());
                                user->Extend("amsgblock", (char*)m);
                        }
-               }                                       
+               }
                return 0;
        }
-       
+
        void OnCleanup(int target_type, void* item)
        {
                if(target_type == TYPE_USER)
index 29e481c1e85777718a4e20fcae07b74effd76d4e..0b47f88211d917be454bcd28a137e4c5b9b232aa 100644 (file)
@@ -31,7 +31,7 @@ class ModuleBlockCAPS : public Module
        unsigned int minlen;
        char capsmap[256];
 public:
-       
+
        ModuleBlockCAPS(InspIRCd* Me) : Module(Me)
        {
                OnRehash(NULL,"");
index 72f41801e00d38ba0e519fc893b8f669cc8293f1..3943e436d4cf7892589d4281e92cded065f4f6da 100644 (file)
@@ -25,10 +25,10 @@ class BlockColor : public SimpleChannelModeHandler
 
 class ModuleBlockColour : public Module
 {
-       bool AllowChanOps;      
+       bool AllowChanOps;
        BlockColor *bc;
  public:
+
        ModuleBlockColour(InspIRCd* Me) : Module(Me)
        {
                bc = new BlockColor(ServerInstance);
@@ -50,7 +50,7 @@ class ModuleBlockColour : public Module
                        {
                                return 0;
                        }
-                       
+
                        if(c->IsModeSet('c'))
                        {
                                for (std::string::iterator i = text.begin(); i != text.end(); i++)
@@ -72,7 +72,7 @@ class ModuleBlockColour : public Module
                }
                return 0;
        }
-       
+
        virtual int OnUserPreNotice(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
        {
                return OnUserPreMessage(user,dest,target_type,text,status,exempt_list);
@@ -83,7 +83,7 @@ class ModuleBlockColour : public Module
                ServerInstance->Modes->DelMode(bc);
                delete bc;
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1,2,0,0,VF_COMMON|VF_VENDOR,API_VERSION);
index 7cc0504038630ad9d22d94e1ae6e9932ecad152a..2aa4256434e943c2c241f033ccf15a15d768588e 100644 (file)
@@ -25,13 +25,13 @@ class BotMode : public SimpleUserModeHandler
 
 class ModuleBotMode : public Module
 {
-       
+
        BotMode* bm;
  public:
        ModuleBotMode(InspIRCd* Me)
                : Module(Me)
        {
-               
+
                bm = new BotMode(ServerInstance);
                if (!ServerInstance->Modes->AddMode(bm))
                        throw ModuleException("Could not add new modes!");
@@ -39,13 +39,13 @@ class ModuleBotMode : public Module
                ServerInstance->Modules->Attach(eventlist, this, 1);
        }
 
-       
+
        virtual ~ModuleBotMode()
        {
                ServerInstance->Modes->DelMode(bm);
                delete bm;
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1,2,0,0,VF_COMMON|VF_VENDOR,API_VERSION);
index d41fcd5d0f5b01fbf429b32e968c74bdbe14ddb5..1d53a30f74159727415b96528839aba110151b84 100644 (file)
@@ -51,7 +51,7 @@ void RemoveFromAllAccepts(InspIRCd* ServerInstance, User* who)
        for (user_hash::iterator i = ServerInstance->Users->clientlist->begin(); i != ServerInstance->Users->clientlist->end(); ++i)
        {
                callerid_data* dat = GetData(i->second, false);
-               
+
                if (!dat)
                        continue;
 
index 2849444b408a98302349cfa1b81e2667f8340942..4f66008a5c6b69310b59f3796e8bc68184ce3bc0 100644 (file)
 CAP LS
 :alfred.staticbox.net CAP * LS :multi-prefix sasl
 CAP REQ :multi-prefix
-:alfred.staticbox.net CAP * ACK :multi-prefix 
+:alfred.staticbox.net CAP * ACK :multi-prefix
 CAP CLEAR
 :alfred.staticbox.net CAP * ACK :-multi-prefix
 CAP REQ :multi-prefix
-:alfred.staticbox.net CAP * ACK :multi-prefix 
+:alfred.staticbox.net CAP * ACK :multi-prefix
 CAP LIST
 :alfred.staticbox.net CAP * LIST :multi-prefix
 CAP END
index 50260920a5921a25ed5da98f5cb853425c927cb6..8c4460d76e66af751449903831edc502d2df9793 100644 (file)
@@ -171,7 +171,7 @@ class ModuleCBan : public Module
        {
                ServerInstance->XLines->UnregisterFactory(f);
        }
-       
+
        virtual int OnStats(char symbol, User* user, string_list &results)
        {
                return 0;
index 4ade3e347cd27ec3c3d398d32fbf4f0158a05c26..46e4daa48770baa9d0033c168f11c46e755e7c0d 100644 (file)
@@ -39,11 +39,11 @@ class CensorChannel : public SimpleChannelModeHandler
 class ModuleCensor : public Module
 {
 
-       
+
        censor_t censors;
        CensorUser *cu;
        CensorChannel *cc;
+
  public:
        ModuleCensor(InspIRCd* Me)
                : Module(Me)
@@ -110,7 +110,7 @@ class ModuleCensor : public Module
 
                irc::string text2 = text.c_str();
                for (censor_t::iterator index = censors.begin(); index != censors.end(); index++)
-               { 
+               {
                        if (text2.find(index->first) != irc::string::npos)
                        {
                                if (index->second.empty())
@@ -118,19 +118,19 @@ class ModuleCensor : public Module
                                        user->WriteNumeric(936, "%s %s %s :Your message contained a censored word, and was blocked", user->nick.c_str(), ((Channel*)dest)->name.c_str(), index->first.c_str());
                                        return 1;
                                }
-                               
+
                                this->ReplaceLine(text2,index->first,index->second);
                        }
                }
                text = text2.c_str();
                return 0;
        }
-       
+
        virtual int OnUserPreNotice(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
        {
                return OnUserPreMessage(user,dest,target_type,text,status,exempt_list);
        }
-       
+
        virtual void OnRehash(User* user, const std::string &parameter)
        {
                /*
@@ -149,12 +149,12 @@ class ModuleCensor : public Module
 
                delete MyConf;
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1,2,0,0,VF_COMMON|VF_VENDOR,API_VERSION);
        }
-       
+
 };
 
 MODULE_INIT(ModuleCensor)
index 318c1b3b465a99efdd72b3c58f6af63c138285db..a9abb4b15d69a7a0885a48c7cab2806dbfa4875c 100644 (file)
@@ -65,7 +65,7 @@ class CommandWebirc : public Command
                {
                        if(user->registered == REG_ALL)
                                return CMD_FAILURE;
-                       
+
                        for(CGIHostlist::iterator iter = Hosts.begin(); iter != Hosts.end(); iter++)
                        {
                                if(ServerInstance->MatchText(user->host, iter->hostmask) || ServerInstance->MatchText(user->GetIPString(), iter->hostmask))
@@ -140,7 +140,7 @@ class ModuleCgiIRC : public Module
 public:
        ModuleCgiIRC(InspIRCd* Me) : Module(Me)
        {
-               
+
                OnRehash(NULL,"");
                mycommand = new CommandWebirc(Me, Hosts, NotifyOpers);
                ServerInstance->AddCommand(mycommand);
@@ -149,7 +149,7 @@ public:
                ServerInstance->Modules->Attach(eventlist, this, 7);
        }
 
-       
+
        virtual void Prioritize()
        {
                ServerInstance->Modules->SetPriority(this, I_OnUserConnect, PRIO_FIRST);
@@ -159,18 +159,18 @@ public:
        {
                ConfigReader Conf(ServerInstance);
                Hosts.clear();
-               
+
                NotifyOpers = Conf.ReadFlag("cgiirc", "opernotice", 0); // If we send an oper notice when a CGI:IRC has their host changed.
-               
+
                if(Conf.GetError() == CONF_VALUE_NOT_FOUND)
                        NotifyOpers = true;
-               
+
                for(int i = 0; i < Conf.Enumerate("cgihost"); i++)
                {
                        std::string hostmask = Conf.ReadValue("cgihost", "mask", i); // An allowed CGI:IRC host
                        std::string type = Conf.ReadValue("cgihost", "type", i); // What type of user-munging we do on this host.
                        std::string password = Conf.ReadValue("cgihost", "password", i);
-                       
+
                        if(hostmask.length())
                        {
                                if (type == "webirc" && !password.length()) {
@@ -211,13 +211,13 @@ public:
                        User* user = (User*)item;
                        std::string* realhost;
                        std::string* realip;
-                       
+
                        if(user->GetExt("cgiirc_realhost", realhost))
                        {
                                delete realhost;
                                user->Shrink("cgiirc_realhost");
                        }
-                       
+
                        if(user->GetExt("cgiirc_realip", realip))
                        {
                                delete realip;
@@ -225,13 +225,13 @@ public:
                        }
                }
        }
-       
+
        virtual void OnSyncUserMetaData(User* user, Module* proto, void* opaque, const std::string &extname, bool displayable)
        {
                if((extname == "cgiirc_realhost") || (extname == "cgiirc_realip"))
                {
                        std::string* data;
-                       
+
                        if(user->GetExt(extname, data))
                        {
                                proto->ProtoSendMetaData(opaque, TYPE_USER, user, extname, *data);
@@ -256,12 +256,12 @@ public:
        {
                OnCleanup(TYPE_USER, user);
        }
-       
+
 
        virtual int OnUserRegister(User* user)
-       {       
+       {
                for(CGIHostlist::iterator iter = Hosts.begin(); iter != Hosts.end(); iter++)
-               {                       
+               {
                        if(ServerInstance->MatchText(user->host, iter->hostmask) || ServerInstance->MatchText(user->GetIPString(), iter->hostmask))
                        {
                                // Deal with it...
@@ -313,7 +313,7 @@ public:
                        bool valid=false;
                        ServerInstance->Users->RemoveCloneCounts(user);
 #ifdef IPV6
-                       valid = (inet_pton(AF_INET6, webirc_ip->c_str(), &((sockaddr_in6*)user->ip)->sin6_addr) > 0); 
+                       valid = (inet_pton(AF_INET6, webirc_ip->c_str(), &((sockaddr_in6*)user->ip)->sin6_addr) > 0);
 
                        if(!valid)
                                valid = (inet_aton(webirc_ip->c_str(), &((sockaddr_in*)user->ip)->sin_addr));
@@ -379,34 +379,34 @@ public:
                                                ServerInstance->SNO->WriteToSnoMask('A', "Connecting user %s detected as using CGI:IRC (%s), but I could not resolve their hostname!", user->nick.c_str(), user->host.c_str());
                                }
                        }
-                       
+
                        user->password.clear();
                        return true;
                }
-               
+
                return false;
        }
-       
+
        bool CheckIdent(User* user)
        {
                int ip[4];
                const char* ident;
                char newip[16];
                int len = user->ident.length();
-               
+
                if(len == 8)
                        ident = user->ident.c_str();
                else if(len == 9 && user->ident[0] == '~')
                        ident = user->ident.c_str() + 1;
                else
                        return false;
-       
+
                for(int i = 0; i < 4; i++)
                        if(!HexToInt(ip[i], ident + i*2))
                                return false;
 
                snprintf(newip, 16, "%d.%d.%d.%d", ip[0], ip[1], ip[2], ip[3]);
-                       
+
                user->Extend("cgiirc_realhost", new std::string(user->host));
                user->Extend("cgiirc_realip", new std::string(user->GetIPString()));
                ServerInstance->Users->RemoveCloneCounts(user);
@@ -442,12 +442,12 @@ public:
 
                return true;
        }
-       
+
        bool IsValidHost(const std::string &host)
        {
                if(!host.size())
                        return false;
-       
+
                for(unsigned int i = 0; i < host.size(); i++)
                {
                        if(     ((host[i] >= '0') && (host[i] <= '9')) ||
@@ -455,12 +455,12 @@ public:
                                        ((host[i] >= 'a') && (host[i] <= 'z')) ||
                                        ((host[i] == '-') && (i > 0) && (i+1 < host.size()) && (host[i-1] != '.') && (host[i+1] != '.')) ||
                                        ((host[i] == '.') && (i > 0) && (i+1 < host.size())) )
-                                       
+
                                continue;
                        else
                                return false;
                }
-               
+
                return true;
        }
 
@@ -468,10 +468,10 @@ public:
        {
                if(ip.size() < 7 || ip.size() > 15)
                        return false;
-       
+
                short sincedot = 0;
                short dots = 0;
-       
+
                for(unsigned int i = 0; i < ip.size(); i++)
                {
                        if((dots <= 3) && (sincedot <= 3))
@@ -489,16 +489,16 @@ public:
                        else
                        {
                                return false;
-                       
+
                        }
                }
-               
+
                if(dots != 3)
                        return false;
-               
+
                return true;
        }
-       
+
        bool HexToInt(int &out, const char* in)
        {
                char ip[3];
@@ -506,22 +506,22 @@ public:
                ip[1] = in[1];
                ip[2] = 0;
                out = strtol(ip, NULL, 16);
-               
+
                if(out > 255 || out < 0)
                        return false;
 
                return true;
        }
-       
+
        virtual ~ModuleCgiIRC()
        {
        }
-        
+
        virtual Version GetVersion()
        {
                return Version(1,2,0,0,VF_VENDOR,API_VERSION);
        }
-       
+
 };
 
 MODULE_INIT(ModuleCgiIRC)
index 8633ddc059f5869e337422fee48530751c75e373..1b6ca61924381541401f34ac480398548f3fba80 100644 (file)
@@ -26,18 +26,18 @@ class ModuleChanCreate : public Module
                Implementation eventlist[] = { I_OnUserJoin };
                ServerInstance->Modules->Attach(eventlist, this, 1);
        }
-       
+
        virtual ~ModuleChanCreate()
        {
                ServerInstance->SNO->DisableSnomask('j');
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1,2,0,0,VF_VENDOR,API_VERSION);
        }
 
-       
+
        virtual void OnUserJoin(User* user, Channel* channel, bool sync, bool &silent)
        {
                if (channel->GetUserCounter() == 1)
index e8d1d1452bbb4c9aac9c02bcd69eba8ee94b053d..4a5dcb2b3616fb31f344cd037b24c5ed2e6f1359 100644 (file)
@@ -26,7 +26,7 @@ class ChanFilter : public ListModeBase
 {
  public:
        ChanFilter(InspIRCd* Instance) : ListModeBase(Instance, 'g', "End of channel spamfilter list", 941, 940, false, "chanfilter") { }
-       
+
        virtual bool ValidateParam(User* user, Channel* chan, std::string &word)
        {
                if ((word.length() > 35) || (word.empty()))
@@ -34,21 +34,21 @@ class ChanFilter : public ListModeBase
                        user->WriteNumeric(935, "%s %s %s :word is too %s for censor list",user->nick.c_str(), chan->name.c_str(), word.c_str(), (word.empty() ? "short" : "long"));
                        return false;
                }
-               
+
                return true;
        }
-       
+
        virtual bool TellListTooLong(User* user, Channel* chan, std::string &word)
        {
                user->WriteNumeric(939, "%s %s %s :Channel spamfilter list is full", user->nick.c_str(), chan->name.c_str(), word.c_str());
                return true;
        }
-       
+
        virtual void TellAlreadyOnList(User* user, Channel* chan, std::string &word)
        {
                user->WriteNumeric(937, "%s %s :The word %s is already on the spamfilter list",user->nick.c_str(), chan->name.c_str(), word.c_str());
        }
-       
+
        virtual void TellNotSet(User* user, Channel* chan, std::string &word)
        {
                user->WriteNumeric(938, "%s %s :No such spamfilter word is set",user->nick.c_str(), chan->name.c_str());
@@ -57,11 +57,11 @@ class ChanFilter : public ListModeBase
 
 class ModuleChanFilter : public Module
 {
-       
+
        ChanFilter* cf;
-       
+
  public:
+
        ModuleChanFilter(InspIRCd* Me)
                : Module(Me)
        {
@@ -123,12 +123,12 @@ class ModuleChanFilter : public Module
        {
                cf->DoCleanup(target_type, item);
        }
-       
+
        virtual int OnUserPreNotice(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
        {
                return OnUserPreMessage(user,dest,target_type,text,status,exempt_list);
        }
-       
+
        virtual void OnSyncChannel(Channel* chan, Module* proto, void* opaque)
        {
                cf->DoSyncChannel(chan, proto, opaque);
@@ -138,7 +138,7 @@ class ModuleChanFilter : public Module
        {
                return Version(1, 2, 0, 0, VF_COMMON | VF_VENDOR, API_VERSION);
        }
-       
+
        virtual ~ModuleChanFilter()
        {
                ServerInstance->Modes->DelMode(cf);
index 94fa164b35dab8a540d2333f240b22a5f99602bf..cd84d9c5f2629cc5cb497a58ef8dc03a2fbbc809 100644 (file)
@@ -69,7 +69,7 @@ class FounderProtectBase
                std::vector<std::string> mode_junk;
                mode_junk.push_back(channel->name);
                irc::modestacker modestack(MyInstance, false);
-               std::deque<std::string> stackresult;                            
+               std::deque<std::string> stackresult;
 
                for (CUList::iterator i = cl->begin(); i != cl->end(); i++)
                {
@@ -261,7 +261,7 @@ class ChanProtect : public ModeHandler, public FounderProtectBase
                }
                // source has +q, is a server, or ulined, we'll let them +-a the user.
                if (source == ServerInstance->FakeClient ||
-                       ((source == theuser) && (!adding) && (FounderProtectBase::remove_own_privs)) || 
+                       ((source == theuser) && (!adding) && (FounderProtectBase::remove_own_privs)) ||
                        (ServerInstance->ULine(source->nick.c_str())) ||
                        (ServerInstance->ULine(source->server)) ||
                        (!*source->server) ||
@@ -287,7 +287,7 @@ class ChanProtect : public ModeHandler, public FounderProtectBase
 
 class ModuleChanProtect : public Module
 {
-       
+
        bool FirstInGetsFounder;
        char QPrefix;
        char APrefix;
@@ -296,9 +296,9 @@ class ModuleChanProtect : public Module
        bool booting;
        ChanProtect* cp;
        ChanFounder* cf;
-       
+
  public:
+
        ModuleChanProtect(InspIRCd* Me)
                : Module(Me), FirstInGetsFounder(false), QPrefix(0), APrefix(0), DeprivSelf(false), DeprivOthers(false), booting(true), cp(NULL), cf(NULL)
        {
@@ -365,7 +365,7 @@ class ModuleChanProtect : public Module
                DeprivSelf = Conf.ReadFlag("options","deprotectself",0);
                DeprivOthers = Conf.ReadFlag("options","deprotectothers",0);
        }
-       
+
        virtual int OnUserPreJoin(User *user, Channel *chan, const char *cname, std::string &privs, const std::string &keygiven)
        {
                // if the user is the first user into the channel, mark them as the founder, but only if
@@ -373,15 +373,15 @@ class ModuleChanProtect : public Module
 
                if (FirstInGetsFounder && !chan)
                        privs = QPrefix + "@";
-               
+
                return 0;
        }
-       
+
        virtual void OnPostJoin(User *user, Channel *channel)
        {
                // This *must* be in PostJoin, not UserJoin - the former will make it appear to happen
                // before the client is in the channel
-               
+
                // This notice was here originally because it was all done prior to the creation of
                // privs in OnUserPreJoin. I've left it because it might still be wanted, but i'm
                // not sure it really should be here - ops don't get shown, obviously, and the prefix
@@ -390,7 +390,7 @@ class ModuleChanProtect : public Module
                if (FirstInGetsFounder && channel->GetUserCounter() == 1)
                        user->WriteServ("MODE %s +q %s", channel->name.c_str(), user->nick.c_str());
        }
-       
+
        virtual int OnAccessCheck(User* source,User* dest,Channel* channel,int access_type)
        {
                // here we perform access checks, this is the important bit that actually stops kicking/deopping
@@ -401,8 +401,8 @@ class ModuleChanProtect : public Module
                // (B) Theyre protected, and you're not
                // always allow the action if:
                // (A) The source is ulined
-               
-               
+
+
                // firstly, if a ulined nick, or a server, is setting the mode, then allow them to set the mode
                // without any access checks, we're not worthy :p
                if ((ServerInstance->ULine(source->nick.c_str())) || (ServerInstance->ULine(source->server)) || (!*source->server))
@@ -469,11 +469,11 @@ class ModuleChanProtect : public Module
                                }
                        break;
                }
-               
+
                // we dont know what this access check is, or dont care. just carry on, nothing to see here.
                return ACR_DEFAULT;
        }
-       
+
        virtual ~ModuleChanProtect()
        {
                ServerInstance->Modes->DelMode(cp);
@@ -481,7 +481,7 @@ class ModuleChanProtect : public Module
                delete cp;
                delete cf;
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1, 2, 0, 0, VF_COMMON | VF_VENDOR, API_VERSION);
index 81354609f2c751a7a952d202c753a5e94dc6b27c..ac9e8f2ac100a44dcb1522b9e0430e59998baaf4 100644 (file)
@@ -107,7 +107,7 @@ class CommandCheck : public Command
 
                        user->WriteServ(checkstr + " modes " + targchan->ChanModes(true));
                        user->WriteServ(checkstr + " membercount " + ConvToStr(targchan->GetUserCounter()));
-                       
+
                        /* now the ugly bit, spool current members of a channel. :| */
 
                        CUList *ulist= targchan->GetUsers();
@@ -161,22 +161,22 @@ class ModuleCheck : public Module
  public:
        ModuleCheck(InspIRCd* Me) : Module(Me)
        {
-               
+
                mycommand = new CommandCheck(ServerInstance);
                ServerInstance->AddCommand(mycommand);
 
        }
-       
+
        virtual ~ModuleCheck()
        {
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1, 2, 0, 0, VF_VENDOR, API_VERSION);
        }
 
-       
+
 };
 
 MODULE_INIT(ModuleCheck)
index e927ca69ae0da8be7fa28292b45fbd994e54bc74..67b39cb665fb3c72c79e4d56b0d40fd66dd62b7c 100644 (file)
@@ -28,7 +28,7 @@ class CommandChghost : public Command
                syntax = "<nick> <newhost>";
                TRANSLATE3(TR_NICK, TR_TEXT, TR_END);
        }
+
        CmdResult Handle(const std::vector<std::string> &parameters, User *user)
        {
                const char * x = parameters[1].c_str();
@@ -46,7 +46,7 @@ class CommandChghost : public Command
                        user->WriteServ("NOTICE %s :*** CHGHOST: Host must be specified", user->nick.c_str());
                        return CMD_FAILURE;
                }
-               
+
                if ((parameters[1].c_str() - x) > 63)
                {
                        user->WriteServ("NOTICE %s :*** CHGHOST: Host too long", user->nick.c_str());
@@ -94,7 +94,7 @@ class ModuleChgHost : public Module
                ServerInstance->Modules->Attach(eventlist, this, 1);
        }
 
-       
+
        void OnRehash(User* user, const std::string &parameter)
        {
                ConfigReader Conf(ServerInstance);
@@ -111,12 +111,12 @@ class ModuleChgHost : public Module
        ~ModuleChgHost()
        {
        }
-       
+
        Version GetVersion()
        {
                return Version(1, 2, 0, 0, VF_COMMON | VF_VENDOR, API_VERSION);
        }
-       
+
 };
 
 MODULE_INIT(ModuleChgHost)
index 3ab558b5741ea1bdd3f4092088ea1dd9ce9da452..4c8b256e4aff520c60fd9fa01e14fdaa840f244c 100644 (file)
@@ -26,7 +26,7 @@ class CommandChgident : public Command
                syntax = "<nick> <newident>";
                TRANSLATE3(TR_NICK, TR_TEXT, TR_END);
        }
-       
+
        CmdResult Handle(const std::vector<std::string> &parameters, User *user)
        {
                User* dest = ServerInstance->FindNick(parameters[0]);
@@ -42,13 +42,13 @@ class CommandChgident : public Command
                        user->WriteServ("NOTICE %s :*** CHGIDENT: Ident must be specified", user->nick.c_str());
                        return CMD_FAILURE;
                }
-               
+
                if (parameters[1].length() > ServerInstance->Config->Limits.IdentMax)
                {
                        user->WriteServ("NOTICE %s :*** CHGIDENT: Ident is too long", user->nick.c_str());
                        return CMD_FAILURE;
                }
-               
+
                if (!ServerInstance->IsIdent(parameters[1].c_str()))
                {
                        user->WriteServ("NOTICE %s :*** CHGIDENT: Invalid characters in ident", user->nick.c_str());
@@ -69,8 +69,8 @@ class CommandChgident : public Command
 class ModuleChgIdent : public Module
 {
        CommandChgident* mycommand;
-       
-       
+
+
 public:
        ModuleChgIdent(InspIRCd* Me) : Module(Me)
        {
@@ -78,16 +78,16 @@ public:
                ServerInstance->AddCommand(mycommand);
 
        }
-       
+
        virtual ~ModuleChgIdent()
        {
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1, 2, 0, 0, VF_COMMON | VF_VENDOR, API_VERSION);
        }
-       
+
 };
 
 MODULE_INIT(ModuleChgIdent)
index 936cd72ac00c87f48ff5e74be5d7771addaa7695..787980d801ea6979dc35d653cac09ae86b5948ef 100644 (file)
@@ -26,7 +26,7 @@ class CommandChgname : public Command
                syntax = "<nick> <newname>";
                TRANSLATE3(TR_NICK, TR_TEXT, TR_END);
        }
-       
+
        CmdResult Handle(const std::vector<std::string> &parameters, User *user)
        {
                User* dest = ServerInstance->FindNick(parameters[0]);
@@ -36,19 +36,19 @@ class CommandChgname : public Command
                        user->WriteNumeric(401, "%s %s :No such nick/channel", user->nick.c_str(), parameters[0].c_str());
                        return CMD_FAILURE;
                }
-               
+
                if (parameters[1].empty())
                {
                        user->WriteServ("NOTICE %s :*** GECOS must be specified", user->nick.c_str());
                        return CMD_FAILURE;
                }
-               
+
                if (parameters[1].length() > ServerInstance->Config->Limits.MaxGecos)
                {
                        user->WriteServ("NOTICE %s :*** GECOS too long", user->nick.c_str());
                        return CMD_FAILURE;
                }
-               
+
                if (IS_LOCAL(dest))
                {
                        dest->ChangeName(parameters[1].c_str());
@@ -65,8 +65,8 @@ class CommandChgname : public Command
 class ModuleChgName : public Module
 {
        CommandChgname* mycommand;
-       
-       
+
+
 public:
        ModuleChgName(InspIRCd* Me) : Module(Me)
        {
@@ -74,16 +74,16 @@ public:
                ServerInstance->AddCommand(mycommand);
 
        }
-       
+
        virtual ~ModuleChgName()
        {
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1, 2, 0, 0, VF_COMMON | VF_VENDOR, API_VERSION);
        }
-       
+
 };
 
 MODULE_INIT(ModuleChgName)
index e0ca026bb36a1ff9a3862f176a635293606d7f95..64ba71d95ffc26a9621458a95b22bbe1bb194eea 100644 (file)
@@ -39,7 +39,7 @@ class CloakUser : public ModeHandler
         * For example, if it is passed "svn.inspircd.org" it will return ".inspircd.org".
         * If it is passed "brainbox.winbot.co.uk" it will return ".co.uk",
         * and if it is passed "localhost.localdomain" it will return ".localdomain".
-        * 
+        *
         * This is used to ensure a significant part of the host is always cloaked (see Bug #216)
         */
        std::string LastTwoDomainParts(const std::string &host)
@@ -111,11 +111,11 @@ class CloakUser : public ModeHandler
                        }
                }
                else
-               {
+               {
                        if (dest->IsModeSet('x'))
                        {
-                               /* User is removing the mode, so just restore their real host
-                                * and make it match the displayed one.
+                               /* User is removing the mode, so just restore their real host
+                                * and make it match the displayed one.
                                 */
                                dest->ChangeDisplayedHost(dest->host.c_str());
                                dest->SetMode('x',false);
@@ -196,13 +196,13 @@ class CloakUser : public ModeHandler
                /* Stick them all together */
                return irc::stringjoiner(":", hashies, 0, hashies.size() - 1).GetJoined();
        }
-       
+
        void DoRehash()
        {
                ConfigReader Conf(ServerInstance);
                bool lowercase;
-               
-               /* These are *not* using the need_positive parameter of ReadInteger - 
+
+               /* These are *not* using the need_positive parameter of ReadInteger -
                 * that will limit the valid values to only the positive values in a
                 * signed int. Instead, accept any value that fits into an int and
                 * cast it to an unsigned int. That will, a bit oddly, give us the full
@@ -215,7 +215,7 @@ class CloakUser : public ModeHandler
                prefix = Conf.ReadValue("cloak","prefix",0);
                ipalways = Conf.ReadFlag("cloak", "ipalways", 0);
                lowercase = Conf.ReadFlag("cloak", "lowercase", 0);
-               
+
                if (!lowercase)
                {
                        xtab[0] = "F92E45D871BCA630";
@@ -255,7 +255,7 @@ class CloakUser : public ModeHandler
 class ModuleCloaking : public Module
 {
  private:
-       
+
        CloakUser* cu;
        Module* HashModule;
 
@@ -339,14 +339,14 @@ class ModuleCloaking : public Module
                if (target_type == TYPE_USER)
                        OnUserDisconnect((User*)item);
        }
-       
+
        virtual ~ModuleCloaking()
        {
                ServerInstance->Modes->DelMode(cu);
                delete cu;
                ServerInstance->Modules->DoneWithInterface("HashRequest");
        }
-       
+
        virtual Version GetVersion()
        {
                // returns the version number of the module to be
@@ -387,7 +387,7 @@ class ModuleCloaking : public Module
                                std::string hostcloak = cu->prefix + "-" + std::string(HashSumRequest(this, cu->HashProvider, dest->host.c_str()).Send()).substr(0,8) + a;
 
                                /* Fix by brain - if the cloaked host is > the max length of a host (64 bytes
-                                * according to the DNS RFC) then tough titty, they get cloaked as an IP. 
+                                * according to the DNS RFC) then tough titty, they get cloaked as an IP.
                                 * Their ISP shouldnt go to town on subdomains, or they shouldnt have a kiddie
                                 * vhost.
                                 */
index 02f0f3faece8587d1b39019852838c37e7db6e76..43d0bb1c71d8fb545b35ca35048e763f44248e1d 100644 (file)
@@ -65,22 +65,22 @@ class ModuleClones : public Module
  public:
        ModuleClones(InspIRCd* Me) : Module(Me)
        {
-               
+
                mycommand = new CommandClones(ServerInstance);
                ServerInstance->AddCommand(mycommand);
 
        }
-       
+
        virtual ~ModuleClones()
        {
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1, 2, 0, 0, VF_VENDOR, API_VERSION);
        }
 
-       
+
 };
 
 MODULE_INIT(ModuleClones)
index a99036049982f0b513d292bfb6c28bf6cd2b1441..b9ad875877c96aa82a4b7fcc9b7966c9b6df9179 100644 (file)
@@ -12,7 +12,7 @@
  *
  * Based on the UnrealIRCd 4.0 (1.1.x fork) module
  *
- * UnrealIRCd 4.0 (C) 2007 Carsten Valdemar Munk 
+ * UnrealIRCd 4.0 (C) 2007 Carsten Valdemar Munk
  * This program is free but copyrighted software; see
  *            the file COPYING for details.
  *
@@ -58,7 +58,7 @@ class CommandClose : public Command
                        user->WriteServ("NOTICE %s :*** %i unknown connection%s closed",user->nick.c_str(),total,(total>1)?"s":"");
                else
                        user->WriteServ("NOTICE %s :*** No unknown connections found",user->nick.c_str());
-                       
+
                return CMD_LOCALONLY;
        }
 };
index 9e31d428e6ad3fc1b392baa75bdde5302d62bddb..e0552f0d727e40277e97a25b4bc05b6cce959997 100644 (file)
@@ -40,7 +40,7 @@ class PrivacyMode : public ModeHandler
                                return MODEACTION_ALLOW;
                        }
                }
-               
+
                return MODEACTION_DENY;
        }
 };
@@ -58,13 +58,13 @@ class ModulePrivacyMode : public Module
                ServerInstance->Modules->Attach(eventlist, this, 2);
        }
 
-       
+
        virtual ~ModulePrivacyMode()
        {
                ServerInstance->Modes->DelMode(pm);
                delete pm;
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1,2,0,0, VF_COMMON|VF_VENDOR, API_VERSION);
index 606794d10818c687c96c19863f05ef841ff591d6..21c03922eb10f3d3742413601a89ac0e6691f705 100644 (file)
@@ -20,7 +20,7 @@ class ModuleConnJoin : public Module
        private:
                std::string JoinChan;
                std::vector<std::string> Joinchans;
-               
+
 
                int tokenize(const std::string &str, std::vector<std::string> &tokens)
                {
index ab017b15724e52e9ad573f82cb2280c184770fc5..e7ff2c584c706a5b2b600c2283f3df011c434ebc 100644 (file)
@@ -26,7 +26,7 @@ class ModuleModesOnConnect : public Module
        ModuleModesOnConnect(InspIRCd* Me)
                : Module(Me)
        {
-               
+
                Conf = new ConfigReader(ServerInstance);
                Implementation eventlist[] = { I_OnPostConnect, I_OnRehash };
                ServerInstance->Modules->Attach(eventlist, this, 2);
@@ -38,17 +38,17 @@ class ModuleModesOnConnect : public Module
                delete Conf;
                Conf = new ConfigReader(ServerInstance);
        }
-       
+
        virtual ~ModuleModesOnConnect()
        {
                delete Conf;
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1,2,0,1,VF_VENDOR,API_VERSION);
        }
-       
+
        virtual void OnPostConnect(User* user)
        {
                if (!IS_LOCAL(user))
index 8d631b4f08b8400794fbc49ff47f6ce4ee857c21..c27ee0c812c98630163d31b4b40ca43c170c9e2f 100644 (file)
@@ -29,16 +29,16 @@ class ModuleWaitPong : public Module
                Implementation eventlist[] = { I_OnUserRegister, I_OnCheckReady, I_OnPreCommand, I_OnRehash, I_OnUserDisconnect, I_OnCleanup };
                ServerInstance->Modules->Attach(eventlist, this, 6);
        }
-       
+
        virtual void OnRehash(User* user, const std::string &param)
        {
                ConfigReader Conf(ServerInstance);
-               
+
                sendsnotice = Conf.ReadFlag("waitpong", "sendsnotice", 0);
-               
+
                if(Conf.GetError() == CONF_VALUE_NOT_FOUND)
                        sendsnotice = true;
-               
+
                killonbadreply = Conf.ReadFlag("waitpong", "killonbadreply", 0);
 
                if(Conf.GetError() == CONF_VALUE_NOT_FOUND)
@@ -52,30 +52,30 @@ class ModuleWaitPong : public Module
                for(unsigned int i = 0; i < length; i++)
                        out[i] = ((rand() % 26) + 65);
                out[length] = '\0';
-       
+
                return (char*)out;
        }
-       
+
        virtual int OnUserRegister(User* user)
        {
                char* pingrpl = RandString(10);
-               
+
                user->Write("PING :%s", pingrpl);
-               
+
                if(sendsnotice)
                        user->WriteServ("NOTICE %s :*** If you are having problems connecting due to ping timeouts, please type /quote PONG %s or /raw PONG %s now.", user->nick.c_str(), pingrpl, pingrpl);
-                       
+
                user->Extend(extenstr, pingrpl);
                return 0;
        }
-       
+
        virtual int OnPreCommand(std::string &command, std::vector<std::string> &parameters, User* user, bool validated, const std::string &original_line)
        {
                if (command == "PONG")
                {
                        char* pingrpl;
                        user->GetExt(extenstr, pingrpl);
-                       
+
                        if (pingrpl)
                        {
                                if (strcmp(pingrpl, parameters[0].c_str()) == 0)
@@ -100,7 +100,7 @@ class ModuleWaitPong : public Module
                char* pingrpl;
                return (!user->GetExt(extenstr, pingrpl));
        }
-       
+
        virtual void OnUserDisconnect(User* user)
        {
                char* pingrpl;
@@ -112,7 +112,7 @@ class ModuleWaitPong : public Module
                        user->Shrink(extenstr);
                }
        }
-       
+
        virtual void OnCleanup(int target_type, void* item)
        {
                if (target_type == TYPE_USER)
@@ -120,24 +120,24 @@ class ModuleWaitPong : public Module
                        User* user = (User*)item;
                        char* pingrpl;
                        user->GetExt(extenstr, pingrpl);
-                       
+
                        if (pingrpl)
                        {
                                delete[] pingrpl;
                                user->Shrink(extenstr);
-                       } 
+                       }
                }
        }
-       
+
        virtual ~ModuleWaitPong()
        {
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1, 2, 0, 1, VF_VENDOR, API_VERSION);
        }
-       
+
 };
 
 MODULE_INIT(ModuleWaitPong)
index a1ff0816c2baa6ab45c4cc208b2d6f1843914904..8c39ae8ba0a2fab6bb519db29f6ab1361053016b 100644 (file)
@@ -29,11 +29,11 @@ class ModuleQuitBan : public Module
                ServerInstance->Modules->Attach(eventlist, this, 3);
                OnRehash(NULL, "");
        }
-       
+
        virtual ~ModuleQuitBan()
        {
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1,2,0,0,VF_VENDOR,API_VERSION);
index 412a0965e28fef20f6b43815c133568b57cbe5ab..d25b6abfcba58e2bbb02491d9ef9be63aedc7f96 100644 (file)
@@ -25,12 +25,12 @@ private:
        std::string quitmsg;
 
        ConfigReader* conf;
-       
+
 
 public:
        ModuleConnFlood(InspIRCd* Me) : Module(Me)
        {
-               
+
                InitConf();
                Implementation eventlist[] = { I_OnRehash, I_OnUserRegister };
                ServerInstance->Modules->Attach(eventlist, this, 2);
@@ -45,7 +45,6 @@ public:
                return Version(1,2,0,0,VF_VENDOR,API_VERSION);
        }
 
-   
        void InitConf()
        {
                /* read configuration variables */
@@ -61,14 +60,14 @@ public:
 
                first = ServerInstance->Time();
        }
+
        virtual int OnUserRegister(User* user)
        {
                time_t next = ServerInstance->Time();
-               
+
                if ((ServerInstance->startup_time + boot_wait) > next)
                        return 0;
-               
+
                /* time difference between first and latest connection */
                time_t tdiff = next - first;
 
index b7e67b5073da25ad3f1011ce3f5e63a599ae7300..b15b308d080d7e6e9859672af1bc343cb91ae322 100644 (file)
@@ -20,7 +20,6 @@
  */
 class CommandTitle : public Command
 {
-       
  public:
        CommandTitle (InspIRCd* Instance) : Command(Instance,"TITLE",0,2)
        {
@@ -29,25 +28,25 @@ class CommandTitle : public Command
                TRANSLATE3(TR_NICK, TR_TEXT, TR_END);
        }
 
-bool OneOfMatches(const char* host, const char* ip, const char* hostlist)
-{
-    std::stringstream hl(hostlist);
-    std::string xhost;
-    while (hl >> xhost)
-    {
-        if (match(host, xhost) || match(ip,xhost, true))
-        {
-            return true;
-        }
-    }
-    return false;
-}
+       bool OneOfMatches(const char* host, const char* ip, const char* hostlist)
+       {
+               std::stringstream hl(hostlist);
+               std::string xhost;
+               while (hl >> xhost)
+               {
+                       if (match(host, xhost) || match(ip,xhost, true))
+                       {
+                               return true;
+                       }
+               }
+               return false;
+       }
 
        CmdResult Handle(const std::vector<std::string> &parameters, User* user)
        {
                if (!IS_LOCAL(user))
                        return CMD_LOCALONLY;
-       
+
                char TheHost[MAXBUF];
                char TheIP[MAXBUF];
 
@@ -79,7 +78,7 @@ bool OneOfMatches(const char* host, const char* ip, const char* hostlist)
                                user->Extend("ctitle", text);
 
                                ServerInstance->PI->SendMetaData(user, TYPE_USER, "ctitle", *text);
-                                                                                       
+
                                if (!vhost.empty())
                                        user->ChangeDisplayedHost(vhost.c_str());
 
@@ -106,11 +105,11 @@ bool OneOfMatches(const char* host, const char* ip, const char* hostlist)
 class ModuleCustomTitle : public Module
 {
        CommandTitle* mycommand;
-       
+
  public:
        ModuleCustomTitle(InspIRCd* Me) : Module(Me)
        {
-               
+
                mycommand = new CommandTitle(ServerInstance);
                ServerInstance->AddCommand(mycommand);
                Implementation eventlist[] = { I_OnDecodeMetaData, I_OnWhoisLine, I_OnSyncUserMetaData, I_OnUserQuit, I_OnCleanup };
@@ -208,11 +207,11 @@ class ModuleCustomTitle : public Module
                        }
                }
        }
-       
+
        virtual ~ModuleCustomTitle()
        {
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1, 2, 0, 0, VF_COMMON | VF_VENDOR, API_VERSION);
index be57f8af1a9b1b30275128109be6ab2c45a6bc6c..037e570f61fd6be13930bc89a109b1d82888cbf1 100644 (file)
@@ -31,19 +31,19 @@ class CommandCycle : public Command
        {
                Channel* channel = ServerInstance->FindChan(parameters[0]);
                std::string reason = ConvToStr("Cycling");
-                       
+
                if (parameters.size() > 1)
                {
                        /* reason provided, use it */
                        reason = reason + ": " + parameters[1];
                }
-               
+
                if (!channel)
                {
                        user->WriteNumeric(403, "%s %s :No such channel", user->nick.c_str(), parameters[0].c_str());
                        return CMD_FAILURE;
                }
-               
+
                if (channel->HasUser(user))
                {
                        /*
@@ -57,11 +57,11 @@ class CommandCycle : public Command
                                        user->WriteServ("NOTICE "+std::string(user->nick)+" :*** You may not cycle, as you are banned on channel " + channel->name);
                                        return CMD_FAILURE;
                                }
-                               
+
                                /* XXX in the future, this may move to a static Channel method (the delete.) -- w00t */
                                if (!channel->PartUser(user, reason.c_str()))
                                        delete channel;
-                               
+
                                Channel::JoinUser(ServerInstance, user, parameters[0].c_str(), true, "", false, ServerInstance->Time());
                        }
 
@@ -84,21 +84,21 @@ class ModuleCycle : public Module
        ModuleCycle(InspIRCd* Me)
                : Module(Me)
        {
-               
+
                mycommand = new CommandCycle(ServerInstance);
                ServerInstance->AddCommand(mycommand);
 
        }
-       
+
        virtual ~ModuleCycle()
        {
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1, 2, 0, 1, VF_COMMON | VF_VENDOR, API_VERSION);
        }
-       
+
 };
 
 MODULE_INIT(ModuleCycle)
index a18979878ff6738a32c25713b05f8f800825d8c3..76658f454291650d561599bcd0080e0c060c8d47 100644 (file)
@@ -66,7 +66,7 @@ class CommandDccallow : public Command
                else if (parameters.size() > 0)
                {
                        char action = *parameters[0].c_str();
-               
+
                        // if they didn't specify an action, this is probably a command
                        if (action != '+' && action != '-')
                        {
@@ -75,7 +75,7 @@ class CommandDccallow : public Command
                                        // list current DCCALLOW list
                                        DisplayDCCAllowList(user);
                                        return CMD_FAILURE;
-                               } 
+                               }
                                else if (!strcasecmp(parameters[0].c_str(), "HELP"))
                                {
                                        // display help
@@ -83,13 +83,13 @@ class CommandDccallow : public Command
                                        return CMD_FAILURE;
                                }
                        }
-                       
+
                        std::string nick = parameters[0].substr(1);
                        User *target = ServerInstance->FindNick(nick);
-       
+
                        if (target)
                        {
-                               
+
                                if (action == '-')
                                {
                                        // check if it contains any entries
@@ -110,7 +110,7 @@ class CommandDccallow : public Command
                                        {
                                                delete  dl;
                                                user->Shrink("dccallow_list");
-                               
+
                                                // remove from userlist
                                                for (userlist::iterator j = ul.begin(); j != ul.end(); ++j)
                                                {
@@ -145,15 +145,15 @@ class CommandDccallow : public Command
                                                        return CMD_FAILURE;
                                                }
                                        }
-                               
+
                                        std::string mask = std::string(target->nick)+"!"+std::string(target->ident)+"@"+std::string(target->dhost);
                                        std::string default_length = Conf->ReadValue("dccallow", "length", 0);
-               
+
                                        long length;
                                        if (parameters.size() < 2)
                                        {
                                                length = ServerInstance->Duration(default_length);
-                                       } 
+                                       }
                                        else if (!atoi(parameters[1].c_str()))
                                        {
                                                length = 0;
@@ -162,14 +162,14 @@ class CommandDccallow : public Command
                                        {
                                                length = ServerInstance->Duration(parameters[1]);
                                        }
-       
+
                                        if (!ServerInstance->IsValidMask(mask.c_str()))
                                        {
                                                return CMD_FAILURE;
                                        }
-                       
+
                                        dl->push_back(DCCAllow(target->nick, mask, ServerInstance->Time(), length));
-                       
+
                                        if (length > 0)
                                        {
                                                user->WriteNumeric(993, "%s %s :Added %s to DCCALLOW list for %ld seconds", user->nick.c_str(), user->nick.c_str(), target->nick.c_str(), length);
@@ -216,12 +216,12 @@ class CommandDccallow : public Command
                user->WriteNumeric(998, "%s :  your DCCALLOW list will be deleted when you leave IRC.", user->nick.c_str());
                user->WriteNumeric(999, "%s :End of DCCALLOW HELP", user->nick.c_str());
        }
-       
+
        void DisplayDCCAllowList(User* user)
        {
                 // display current DCCALLOW list
                user->WriteNumeric(990, "%s :Users on your DCCALLOW list:", user->nick.c_str());
-       
+
                if (user->GetExt("dccallow_list", dl))
                {
                        for (dccallowlist::const_iterator c = dl->begin(); c != dl->end(); ++c)
@@ -229,12 +229,12 @@ class CommandDccallow : public Command
                                user->WriteNumeric(991, "%s %s :%s (%s)", user->nick.c_str(), user->nick.c_str(), c->nickname.c_str(), c->hostmask.c_str());
                        }
                }
-               
+
                user->WriteNumeric(992, "%s :End of DCCALLOW list", user->nick.c_str());
-       }                       
+       }
 
 };
-       
+
 class ModuleDCCAllow : public Module
 {
        CommandDccallow* mycommand;
@@ -261,7 +261,7 @@ class ModuleDCCAllow : public Module
        virtual void OnUserQuit(User* user, const std::string &reason, const std::string &oper_message)
        {
                dccallowlist* udl;
-       
+
                // remove their DCCALLOW list if they have one
                if (user->GetExt("dccallow_list", udl))
                {
@@ -269,7 +269,7 @@ class ModuleDCCAllow : public Module
                        user->Shrink("dccallow_list");
                        RemoveFromUserlist(user);
                }
-               
+
                // remove them from any DCCALLOW lists
                // they are currently on
                RemoveNick(user);
@@ -299,43 +299,43 @@ class ModuleDCCAllow : public Module
                        /* Always allow a user to dcc themselves (although... why?) */
                        if (user == u)
                                return 0;
-               
+
                        if ((text.length()) && (text[0] == '\1'))
                        {
                                Expire();
 
                                // :jamie!jamie@test-D4457903BA652E0F.silverdream.org PRIVMSG eimaj :DCC SEND m_dnsbl.cpp 3232235786 52650 9676
                                // :jamie!jamie@test-D4457903BA652E0F.silverdream.org PRIVMSG eimaj :VERSION
-                                       
+
                                if (strncmp(text.c_str(), "\1DCC ", 5) == 0)
-                               {       
+                               {
                                        if (u->GetExt("dccallow_list", dl) && dl->size())
                                        {
                                                for (dccallowlist::const_iterator iter = dl->begin(); iter != dl->end(); ++iter)
                                                        if (ServerInstance->MatchText(user->GetFullHost(), iter->hostmask))
                                                                return 0;
                                        }
-               
+
                                        // tokenize
                                        std::stringstream ss(text);
                                        std::string buf;
                                        std::vector<std::string> tokens;
-               
+
                                        while (ss >> buf)
                                                tokens.push_back(buf);
-               
+
                                        irc::string type = tokens[1].c_str();
-               
+
                                        bool blockchat = Conf->ReadFlag("dccallow", "blockchat", 0);
-               
+
                                        if (type == "SEND")
                                        {
                                                std::string defaultaction = Conf->ReadValue("dccallow", "action", 0);
                                                std::string filename = tokens[2];
-                                       
-                                               if (defaultaction == "allow") 
+
+                                               if (defaultaction == "allow")
                                                        return 0;
-                               
+
                                                for (unsigned int i = 0; i < bfl.size(); i++)
                                                {
                                                        if (ServerInstance->MatchText(filename, bfl[i].filemask))
@@ -366,7 +366,7 @@ class ModuleDCCAllow : public Module
                }
                return 0;
        }
-       
+
        void Expire()
        {
                for (userlist::iterator iter = ul.begin(); iter != ul.end(); ++iter)
@@ -397,7 +397,7 @@ class ModuleDCCAllow : public Module
                        }
                }
        }
-       
+
        void RemoveNick(User* user)
        {
                /* Iterate through all DCCALLOW lists and remove user */
@@ -412,7 +412,7 @@ class ModuleDCCAllow : public Module
                                        {
                                                if (i->nickname == user->nick)
                                                {
-                                       
+
                                                        u->WriteServ("NOTICE %s :%s left the network or changed their nickname and has been removed from your DCCALLOW list", u->nick.c_str(), i->nickname.c_str());
                                                        u->WriteNumeric(995, "%s %s :Removed %s from your DCCALLOW list", u->nick.c_str(), u->nick.c_str(), i->nickname.c_str());
                                                        dl->erase(i);
@@ -454,7 +454,7 @@ class ModuleDCCAllow : public Module
                        bf.action = action;
                        bfl.push_back(bf);
                }
-       
+
        }
 
        virtual ~ModuleDCCAllow()
index 20255abf63f405360a4595761b39c56001379a61..f8a1d0e9f5ca2d7ea199449b092976e4d889cdb3 100644 (file)
@@ -70,7 +70,7 @@ class ModuleDelayJoin : public Module
                Implementation eventlist[] = { I_OnUserJoin, I_OnUserPart, I_OnUserKick, I_OnUserQuit, I_OnNamesListItem, I_OnText };
                ServerInstance->Modules->Attach(eventlist, this, 6);
        }
-       
+
        virtual ~ModuleDelayJoin()
        {
                ServerInstance->Modes->DelMode(djm);
@@ -183,7 +183,7 @@ class ModuleDelayJoin : public Module
                user->Shrink("delayjoin_"+channel->name);
 
                /* Check if the user is left on any other +D channels, if so don't take away the
-                * metadata that says theyre on one or more channels 
+                * metadata that says theyre on one or more channels
                 */
                for (UCListIter f = user->chans.begin(); f != user->chans.end(); f++)
                        if (f->first->IsModeSet('D'))
index e847f8c7cc5ed2ea536879ae23f4adadec422b7d..2717d873a90ca4e56adef6b9dd58521794e21185 100644 (file)
@@ -20,18 +20,18 @@ class ModuleDenyChannels : public Module
 {
  private:
 
-       
+
        ConfigReader *Conf;
 
  public:
        ModuleDenyChannels(InspIRCd* Me) : Module(Me)
        {
-               
+
                Conf = new ConfigReader(ServerInstance);
                Implementation eventlist[] = { I_OnUserPreJoin, I_OnRehash };
                ServerInstance->Modules->Attach(eventlist, this, 2);
        }
-       
+
        virtual void OnRehash(User* user, const std::string &param)
        {
                delete Conf;
@@ -41,17 +41,17 @@ class ModuleDenyChannels : public Module
                {
                        std::string name = Conf->ReadValue("badchan","name",i);
                        std::string redirect = Conf->ReadValue("badchan","redirect",i);
-                       
+
                        if (!redirect.empty())
                        {
-                       
+
                                if (!ServerInstance->IsChannel(redirect.c_str(), ServerInstance->Config->Limits.ChanMax))
                                {
                                        if (user)
                                                user->WriteServ("Notice %s :Invalid badchan redirect '%s'", user->nick.c_str(), redirect.c_str());
                                        throw ModuleException("Invalid badchan redirect, not a channel");
                                }
-       
+
                                for (int j =0; j < Conf->Enumerate("badchan"); j++)
                                {
                                        if (match(redirect, Conf->ReadValue("badchan","name",j)))
@@ -62,7 +62,7 @@ class ModuleDenyChannels : public Module
                                                        if (match(redirect, Conf->ReadValue("goodchan","name",k)))
                                                                goodchan = true;
                                                }
-       
+
                                                if (!goodchan)
                                                {
                                                        /* <badchan:redirect> is a badchan */
@@ -80,7 +80,7 @@ class ModuleDenyChannels : public Module
        {
                delete Conf;
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1,2,0,1,VF_VENDOR,API_VERSION);
@@ -109,7 +109,7 @@ class ModuleDenyChannels : public Module
                                                        return 0;
                                                }
                                        }
-                                       
+
                                        if (ServerInstance->IsChannel(redirect.c_str(), ServerInstance->Config->Limits.ChanMax))
                                        {
                                                /* simple way to avoid potential loops: don't redirect to +L channels */
index 9fd8ba5e58683c83d87bb4fbac66dc0432e41040..3b68e1c94356fae6602be1d385bdc2a250219b7f 100644 (file)
@@ -143,7 +143,7 @@ class DNSBLResolver : public Resolver
                                                        {
                                                                ServerInstance->XLines->ApplyLines();
                                                        }
-                                                       else 
+                                                       else
                                                                delete zl;
                                                        break;
                                                }
@@ -257,7 +257,7 @@ class ModuleDNSBL : public Module
 
                        e->banaction = str2banaction(MyConf->ReadValue("dnsbl", "action", i));
                        e->duration = ServerInstance->Duration(MyConf->ReadValue("dnsbl", "duration", i));
-                       
+
                        /* Use portparser for record replies */
 
                        /* yeah, logic here is a little messy */
@@ -360,26 +360,26 @@ class ModuleDNSBL : public Module
                /* don't do anything with this hot potato */
                return 0;
        }
-       
+
        virtual int OnStats(char symbol, User* user, string_list &results)
        {
                if (symbol != 'd')
                        return 0;
-               
+
                unsigned long total_hits = 0, total_misses = 0;
 
                for (std::vector<DNSBLConfEntry*>::iterator i = DNSBLConfEntries.begin(); i != DNSBLConfEntries.end(); i++)
                {
                        total_hits += (*i)->stats_hits;
                        total_misses += (*i)->stats_misses;
-                       
+
                        results.push_back(std::string(ServerInstance->Config->ServerName) + " 304 " + user->nick + " :DNSBLSTATS DNSbl \"" + (*i)->name + "\" had " +
                                        ConvToStr((*i)->stats_hits) + " hits and " + ConvToStr((*i)->stats_misses) + " misses");
                }
-               
+
                results.push_back(std::string(ServerInstance->Config->ServerName) + " 304 " + user->nick + " :DNSBLSTATS Total hits: " + ConvToStr(total_hits));
                results.push_back(std::string(ServerInstance->Config->ServerName) + " 304 " + user->nick + " :DNSBLSTATS Total misses: " + ConvToStr(total_misses));
-               
+
                return 0;
        }
 };
index 2be2cfeca39a912d8d3d5366a6cf50d7ba1e3458..3609d0d1019352e3925992533c060cc4cb827c9d 100644 (file)
@@ -21,7 +21,7 @@ typedef std::map<std::string,FilterResult*> filter_t;
 
 class ModuleFilter : public FilterBase
 {
+
  filter_t filters;
 
  public:
@@ -31,7 +31,7 @@ class ModuleFilter : public FilterBase
                OnRehash(NULL,"");
 
        }
-       
+
        virtual ~ModuleFilter()
        {
        }
index 667a739a5bfdd51f4603ae3f17f35863cc669ebc..7a8ac8e3234e6774fe557e5ac7435aabe72b3843 100644 (file)
 class ModuleFoobar : public Module
 {
  private:
-        
+
         // It is recommended that your class makes use of one or more Server
         // objects. A server object is a class which contains methods which
         // encapsulate the exports from the core of the ircd.
         // such methods include Debug, SendChannel, etc.
-        
+
+
  public:
        ModuleFoobar(InspIRCd* Me)
                : Module(Me)
        {
                // The constructor just makes a copy of the server class
-       
-               
+
+
                Implementation eventlist[] = { I_OnUserConnect, I_OnUserQuit, I_OnUserJoin, I_OnUserPart, I_OnUserPreJoin };
                ServerInstance->Modules->Attach(eventlist, this, 5);
        }
-       
+
        virtual ~ModuleFoobar()
        {
        }
-       
+
        virtual Version GetVersion()
        {
                // this method instantiates a class of type Version, and returns
                // the modules version information using it.
-       
+
                return Version(1,2,0,1,VF_VENDOR,API_VERSION);
        }
 
-       
+
        virtual void OnUserConnect(User* user)
        {
                // method called when a user connects
-       
+
                std::string b = user->nick;
                ServerInstance->Logs->Log("m_foobar",DEBUG,"Foobar: User connecting: "+b);
        }
@@ -63,11 +63,11 @@ class ModuleFoobar : public Module
        virtual void OnUserQuit(User* user, const std::string &reason, const std::string &oper_message)
        {
                // method called when a user disconnects
-       
+
                std::string b = user->nick;
                ServerInstance->Logs->Log("m_foobar",DEBUG,"Foobar: User quitting: "+b);
        }
-       
+
        virtual void OnUserJoin(User* user, Channel* channel, bool sync, bool &silent)
        {
                // method called when a user joins a channel
@@ -80,7 +80,7 @@ class ModuleFoobar : public Module
        virtual void OnUserPart(User* user, Channel* channel, const std::string &partreason, bool &silent)
        {
                // method called when a user parts a channel
-       
+
                std::string c = channel->name;
                std::string b = user->nick;
                ServerInstance->Logs->Log("m_foobar",DEBUG,"Foobar: User "+b+" parted "+c);
index 2f39a66e6000d6e05caf8e50c3157a12827ffe81..d24f23aa9d549ff9913ca28ba7006f2f77aaa020 100644 (file)
@@ -124,11 +124,11 @@ class ModuleGlobalLoad : public Module
        CommandGloadmodule *mycommand;
        CommandGunloadmodule *mycommand2;
        CommandGreloadmodule *mycommand3;
-       
+
  public:
        ModuleGlobalLoad(InspIRCd* Me) : Module(Me)
        {
-               
+
                mycommand = new CommandGloadmodule(ServerInstance);
                mycommand2 = new CommandGunloadmodule(ServerInstance);
                mycommand3 = new CommandGreloadmodule(ServerInstance);
@@ -137,11 +137,11 @@ class ModuleGlobalLoad : public Module
                ServerInstance->AddCommand(mycommand3);
 
        }
-       
+
        virtual ~ModuleGlobalLoad()
        {
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1, 2, 0, 0, VF_COMMON | VF_VENDOR, API_VERSION);
index 81aef9f5745f27c723d03acf47fa65b817f7e04e..fafc3df2cc5e4e8d8b85fbc4413fb1a448eb7c83 100644 (file)
@@ -55,12 +55,12 @@ class ModuleGlobops : public Module
                ServerInstance->SNO->EnableSnomask('g',"GLOBOPS");
 
        }
-       
+
        virtual ~ModuleGlobops()
        {
                ServerInstance->SNO->DisableSnomask('g');
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1, 2, 0, 1, VF_COMMON | VF_VENDOR, API_VERSION);
index a7f9e400710a1a7740293e9a9607277755c4c703..1a1867e073d9e6db61479eebf59469ead4d7e0d3 100644 (file)
@@ -48,7 +48,7 @@ class CommandHelpop : public Command
                        user->WriteServ("NOTICE %s :HELPOP topic index", user->nick.c_str());
                        for (std::map<irc::string, std::string>::iterator iter = helpop_map.begin(); iter != helpop_map.end(); iter++)
                        {
-                               user->WriteServ("NOTICE %s :    %s", user->nick.c_str(), iter->first.c_str());                          
+                               user->WriteServ("NOTICE %s :    %s", user->nick.c_str(), iter->first.c_str());
                        }
                        user->WriteServ("NOTICE %s :*** End of HELPOP topic index", user->nick.c_str());
                }
@@ -152,7 +152,7 @@ class ModuleHelpop : public Module
                        ServerInstance->Modes->DelMode(ho);
                        delete ho;
                }
-       
+
                virtual Version GetVersion()
                {
                        return Version(1,2,0,1,VF_COMMON|VF_VENDOR,API_VERSION);
index 0788a1eaf234f97c47a5767908094bb3eefd8c91..c111e323d77c8438148b08d207e631b406c2f956 100644 (file)
@@ -40,20 +40,20 @@ class HideChans : public ModeHandler
                                return MODEACTION_ALLOW;
                        }
                }
-               
+
                return MODEACTION_DENY;
        }
 };
 
 class ModuleHideChans : public Module
 {
-       
+
        HideChans* hm;
  public:
        ModuleHideChans(InspIRCd* Me)
                : Module(Me)
        {
-               
+
                hm = new HideChans(ServerInstance);
                if (!ServerInstance->Modes->AddMode(hm))
                        throw ModuleException("Could not add new modes!");
@@ -61,13 +61,13 @@ class ModuleHideChans : public Module
                ServerInstance->Modules->Attach(eventlist, this, 1);
        }
 
-       
+
        virtual ~ModuleHideChans()
        {
                ServerInstance->Modes->DelMode(hm);
                delete hm;
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1,2,0,0,VF_COMMON|VF_VENDOR,API_VERSION);
index 72290436094700cf6fedaa3e60962003d2e8ba32..97cb53c763b6294c390fc910c9fbfd82db80286d 100644 (file)
@@ -40,20 +40,20 @@ class HideOper : public ModeHandler
                                return MODEACTION_ALLOW;
                        }
                }
-               
+
                return MODEACTION_DENY;
        }
 };
 
 class ModuleHideOper : public Module
 {
-       
+
        HideOper* hm;
  public:
        ModuleHideOper(InspIRCd* Me)
                : Module(Me)
        {
-               
+
                hm = new HideOper(ServerInstance);
                if (!ServerInstance->Modes->AddMode(hm))
                        throw ModuleException("Could not add new modes!");
@@ -61,13 +61,13 @@ class ModuleHideOper : public Module
                ServerInstance->Modules->Attach(eventlist, this, 1);
        }
 
-       
+
        virtual ~ModuleHideOper()
        {
                ServerInstance->Modes->DelMode(hm);
                delete hm;
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1,2,0,0,VF_COMMON|VF_VENDOR,API_VERSION);
index 7861823f1c83b60e721a1e68acbd675d8c5b138b..95c40d65e27037ebe1da5c71adddaa1b7673788f 100644 (file)
@@ -35,7 +35,7 @@ class ModuleHostChange : public Module
        std::string MySuffix;
        std::string MyPrefix;
        std::string MySeparator;
-        
+
  public:
        ModuleHostChange(InspIRCd* Me)
                : Module(Me)
@@ -44,7 +44,7 @@ class ModuleHostChange : public Module
                Implementation eventlist[] = { I_OnRehash, I_OnUserConnect };
                ServerInstance->Modules->Attach(eventlist, this, 2);
        }
-       
+
        virtual ~ModuleHostChange()
        {
                for (hostchanges_t::iterator i = hostchanges.begin(); i != hostchanges.end(); i++)
@@ -85,14 +85,14 @@ class ModuleHostChange : public Module
                        hostchanges[mask] = x;
                }
        }
-       
+
        virtual Version GetVersion()
        {
                // returns the version number of the module to be
                // listed in /MODULES
                return Version(1,2,0,1,VF_VENDOR,API_VERSION);
        }
-       
+
        virtual void OnUserConnect(User* user)
        {
                for (hostchanges_t::iterator i = hostchanges.begin(); i != hostchanges.end(); i++)
@@ -142,7 +142,7 @@ class ModuleHostChange : public Module
                                        }
                                        if (complete.empty())
                                                complete = "i-have-a-lame-nick";
-                                               
+
                                        if (!MyPrefix.empty())
                                                newhost = MyPrefix + MySeparator + complete;
                                        else
index 7c93a70b609418255da3bccd81854775039463f4..eba78b98bbc88e3f855997297d7e05a0c3ad3333 100644 (file)
@@ -38,7 +38,7 @@ class HttpServerSocket : public BufferedSocket
 {
        FileReader* index;
        HttpState InternalState;
-       
+
        HTTPHeaders headers;
        std::string reqbuffer;
        std::string postdata;
@@ -46,7 +46,7 @@ class HttpServerSocket : public BufferedSocket
        std::string request_type;
        std::string uri;
        std::string http_version;
-       
+
  public:
 
        HttpServerSocket(InspIRCd* SI, std::string shost, int iport, bool listening, unsigned long maxtime, FileReader* index_page) : BufferedSocket(SI, shost, iport, listening, maxtime), index(index_page), postsize(0)
@@ -67,7 +67,7 @@ class HttpServerSocket : public BufferedSocket
        ~HttpServerSocket()
        {
        }
-       
+
        virtual int OnIncomingConnection(int newsock, char* ip)
        {
                if (InternalState == HTTP_LISTEN)
@@ -168,21 +168,21 @@ class HttpServerSocket : public BufferedSocket
                        default:
                                return "WTF";
                        break;
-                               
+
                }
        }
-       
+
        void SendHTTPError(int response)
        {
                HTTPHeaders empty;
                std::string data = "<html><head></head><body>Server error "+ConvToStr(response)+": "+Response(response)+"<br>"+
                                   "<small>Powered by <a href='http://www.inspircd.org'>InspIRCd</a></small></body></html>";
-               
+
                SendHeaders(data.length(), response, empty);
                this->Write(data);
                this->FlushWriteBuffer();
        }
-       
+
        void SendHeaders(unsigned long size, int response, HTTPHeaders &rheaders)
        {
 
@@ -193,20 +193,20 @@ class HttpServerSocket : public BufferedSocket
                char *date = asctime(timeinfo);
                date[strlen(date) - 1] = '\0';
                rheaders.CreateHeader("Date", date);
-               
+
                rheaders.CreateHeader("Server", "InspIRCd/m_httpd.so/1.2");
                rheaders.SetHeader("Content-Length", ConvToStr(size));
-               
+
                if (size)
                        rheaders.CreateHeader("Content-Type", "text/html");
                else
                        rheaders.RemoveHeader("Content-Type");
-               
+
                /* Supporting Connection: keep-alive causes a whole world of hurt syncronizing timeouts,
                 * so remove it, its not essential for what we need.
                 */
                rheaders.SetHeader("Connection", "Close");
-               
+
                this->Write(rheaders.GetFormattedHeaders());
                this->Write("\r\n");
        }
@@ -218,7 +218,7 @@ class HttpServerSocket : public BufferedSocket
                /* Check that the data read is a valid pointer and it has some content */
                if (!data || !*data)
                        return false;
-               
+
                if (InternalState == HTTP_SERVE_RECV_POSTDATA)
                {
                        postdata.append(data);
@@ -228,54 +228,54 @@ class HttpServerSocket : public BufferedSocket
                else
                {
                        reqbuffer.append(data);
-                       
+
                        if (reqbuffer.length() >= 8192)
                        {
                                Instance->Logs->Log("m_httpd",DEBUG, "m_httpd dropped connection due to an oversized request buffer");
                                reqbuffer.clear();
                                return false;
                        }
-                       
+
                        if (InternalState == HTTP_SERVE_WAIT_REQUEST)
                                CheckRequestBuffer();
                }
-               
+
                return true;
        }
-       
+
        void CheckRequestBuffer()
        {
                std::string::size_type reqend = reqbuffer.find("\r\n\r\n");
                if (reqend == std::string::npos)
                        return;
-               
+
                // We have the headers; parse them all
                std::string::size_type hbegin = 0, hend;
                while ((hend = reqbuffer.find("\r\n", hbegin)) != std::string::npos)
                {
                        if (hbegin == hend)
                                break;
-                       
+
                        if (request_type.empty())
                        {
                                std::istringstream cheader(std::string(reqbuffer, hbegin, hend - hbegin));
                                cheader >> request_type;
                                cheader >> uri;
                                cheader >> http_version;
-                               
+
                                if (request_type.empty() || uri.empty() || http_version.empty())
                                {
                                        SendHTTPError(400);
                                        SetWrite();
                                        return;
                                }
-                               
+
                                hbegin = hend + 2;
                                continue;
                        }
-                       
+
                        std::string cheader = reqbuffer.substr(hbegin, hend - hbegin);
-                       
+
                        std::string::size_type fieldsep = cheader.find(':');
                        if ((fieldsep == std::string::npos) || (fieldsep == 0) || (fieldsep == cheader.length() - 1))
                        {
@@ -283,28 +283,28 @@ class HttpServerSocket : public BufferedSocket
                                SetWrite();
                                return;
                        }
-                       
+
                        headers.SetHeader(cheader.substr(0, fieldsep), cheader.substr(fieldsep + 2));
-                       
+
                        hbegin = hend + 2;
                }
-               
+
                reqbuffer.erase(0, reqend + 4);
-               
+
                std::transform(request_type.begin(), request_type.end(), request_type.begin(), ::toupper);
                std::transform(http_version.begin(), http_version.end(), http_version.begin(), ::toupper);
-               
+
                if ((http_version != "HTTP/1.1") && (http_version != "HTTP/1.0"))
                {
                        SendHTTPError(505);
                        SetWrite();
                        return;
                }
-       
+
                if (headers.IsSet("Content-Length") && (postsize = atoi(headers.GetHeader("Content-Length").c_str())) != 0)
                {
                        InternalState = HTTP_SERVE_RECV_POSTDATA;
-                       
+
                        if (reqbuffer.length() >= postsize)
                        {
                                postdata = reqbuffer.substr(0, postsize);
@@ -315,13 +315,13 @@ class HttpServerSocket : public BufferedSocket
                                postdata = reqbuffer;
                                reqbuffer.clear();
                        }
-                       
+
                        if (postdata.length() >= postsize)
                                ServeData();
-                       
+
                        return;
                }
-               
+
                ServeData();
        }
 
index 685eae5c69ad8fc5dd2a7af40d3080b441fce790..bdcc3be6e7d02c65cd99d2ecc584a7e02ef96f87 100644 (file)
@@ -38,7 +38,7 @@ class HTTPACL : public Extensible
 
 class ModuleHTTPAccessList : public Module
 {
-       
+
        std::string stylesheet;
        bool changed;
        std::vector<HTTPACL> acl_list;
@@ -226,7 +226,7 @@ class ModuleHTTPAccessList : public Module
                                                        irc::spacesepstream sep(authorization);
                                                        std::string authtype;
                                                        std::string base64;
-                                                       
+
                                                        sep.GetToken(authtype);
                                                        if (authtype == "Basic")
                                                        {
index 84fa3a375ba57b64765bc20712a9112180871e87..2a3041c2282cd5e5b597eb550b4722a82310d6f0 100644 (file)
@@ -20,7 +20,7 @@
 
 class ModuleHttpStats : public Module
 {
-       
+
        std::string stylesheet;
        bool changed;
 
index 131a9dca1071020e2eacfd2e1a370a1abfc65945..d2205b80bc7cebaf9746a4037e4707481cc9ce61 100644 (file)
@@ -20,7 +20,7 @@
 
 class ModuleHttpStats : public Module
 {
-       
+
        std::string stylesheet;
        bool changed;
 
@@ -155,7 +155,7 @@ class ModuleHttpStats : public Module
                                }
 
                                data << "</userlist><serverlist>";
-                               
+
                                ProtoServerList sl;
                                ServerInstance->PI->GetServerList(sl);
 
index 197a6e5e2486eea0876f8984ca041f7d9c260c4b..3eded4daf59e2eb7a21eb59076d8c6647a05bfb3 100644 (file)
@@ -40,7 +40,7 @@
  * Using this framework we have a much more stable module.
  *
  * A few things to note:
- * 
+ *
  *   O  The only place that may *delete* an active or inactive
  *      ident socket is OnUserDisconnect in the module class.
  *      Because this is out of scope of the socket class there is
@@ -49,7 +49,7 @@
  *
  *   O  Closure of the ident socket with the Close() method will
  *      not cause removal of the socket from memory or detatchment
- *      from its 'parent' User class. It will only flag it as an 
+ *      from its 'parent' User class. It will only flag it as an
  *      inactive socket in the socket engine.
  *
  *   O  Timeouts are handled in OnCheckReaady at the same time as
@@ -106,7 +106,7 @@ class IdentRequestSocket : public EventHandler
                /* We allocate two of these because sizeof(sockaddr_in6) > sizeof(sockaddr_in) */
                sockaddr* s = new sockaddr[2];
                sockaddr* addr = new sockaddr[2];
-       
+
 #ifdef IPV6
                /* Horrid icky nasty ugly berkely socket crap. */
                if (v6)
@@ -208,7 +208,7 @@ class IdentRequestSocket : public EventHandler
                #else
                int req_size = snprintf(req, sizeof(req), "%d,%d\r\n", ntohs(raddr.sin6_port), ntohs(laddr.sin6_port));
                #endif
-               
+
                /* Send failed if we didnt write the whole ident request --
                 * might as well give up if this happens!
                 */
@@ -345,22 +345,22 @@ class ModuleIdent : public Module
                Implementation eventlist[] = { I_OnRehash, I_OnUserRegister, I_OnCheckReady, I_OnCleanup, I_OnUserDisconnect };
                ServerInstance->Modules->Attach(eventlist, this, 5);
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1, 2, 1, 0, VF_VENDOR, API_VERSION);
        }
-       
-       
+
+
        virtual void OnRehash(User *user, const std::string &param)
        {
                ConfigReader MyConf(ServerInstance);
-               
+
                RequestTimeout = MyConf.ReadInteger("ident", "timeout", 0, true);
                if (!RequestTimeout)
                        RequestTimeout = 5;
        }
-       
+
        virtual int OnUserRegister(User *user)
        {
                /* User::ident is currently the username field from USER; with m_ident loaded, that
index 32e09ab57d836a2f09c33b08820606603a65c424..999151f7994be0108fcf4e03b41db48979386e9f 100644 (file)
@@ -187,7 +187,7 @@ class ModuleInvisible : public Module
                return Version(1, 2, 0, 0, VF_COMMON | VF_VENDOR, API_VERSION);
        }
 
-       
+
        virtual void OnUserJoin(User* user, Channel* channel, bool sync, bool &silent)
        {
                if (user->IsModeSet('Q'))
@@ -253,7 +253,7 @@ class ModuleInvisible : public Module
                }
                return 0;
        }
-       
+
        virtual int OnUserPreMessage(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
        {
                return OnUserPreNotice(user, dest, target_type, text, status, exempt_list);
@@ -265,14 +265,14 @@ class ModuleInvisible : public Module
                va_list argsPtr;
                char textbuffer[MAXBUF];
                char tb[MAXBUF];
-       
+
                va_start(argsPtr, text);
                vsnprintf(textbuffer, MAXBUF, text, argsPtr);
                va_end(argsPtr);
                snprintf(tb,MAXBUF,":%s %s",user->GetFullHost().c_str(), textbuffer);
-               
+
                CUList *ulist = channel->GetUsers();
-               
+
                for (CUList::iterator i = ulist->begin(); i != ulist->end(); i++)
                {
                        /* User only appears to vanish for non-opers */
index a310697919ce9c86ba8970d7688d613b8b06169b..98b1ab55e9a96fee7fe5379a20890bc56ed69bfd 100644 (file)
@@ -52,12 +52,12 @@ public:
                Implementation eventlist[] = { I_OnRequest, I_On005Numeric, I_OnCheckInvite };
                ServerInstance->Modules->Attach(eventlist, this, 3);
        }
-       
+
        virtual void On005Numeric(std::string &output)
        {
                output.append(" INVEX=I");
        }
-        
+
        virtual int OnCheckInvite(User* user, Channel* chan)
        {
                if(chan != NULL)
@@ -79,7 +79,7 @@ public:
                        // or if there wasn't a list, there can't be anyone on it, so we don't need to do anything.
                }
 
-               return 0;               
+               return 0;
        }
 
        virtual const char* OnRequest(Request* request)
@@ -125,7 +125,7 @@ public:
        {
                ie->DoRehash();
        }
-               
+
        virtual Version GetVersion()
        {
                return Version(1, 2, 0, 3, VF_VENDOR | VF_COMMON, API_VERSION);
index f6f58f0dc0ba383c44974a175e3ab65a2bec3a8f..6c3ffdc574cc8cdfde497318ddf907b1c7d90910 100644 (file)
@@ -97,7 +97,7 @@ class JoinFlood : public ModeHandler
                        return std::make_pair(true, ConvToStr(x->joins)+":"+ConvToStr(x->secs));
                else
                        return std::make_pair(false, parameter);
-       } 
+       }
 
        bool CheckTimeStamp(time_t theirs, time_t ours, const std::string &their_param, const std::string &our_param, Channel* channel)
        {
@@ -206,22 +206,22 @@ class JoinFlood : public ModeHandler
 
 class ModuleJoinFlood : public Module
 {
-       
+
        JoinFlood* jf;
-       
+
  public:
+
        ModuleJoinFlood(InspIRCd* Me)
                : Module(Me)
        {
-               
+
                jf = new JoinFlood(ServerInstance);
                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);
        }
-       
+
        virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs, const std::string &keygiven)
        {
                if (chan)
@@ -276,7 +276,7 @@ class ModuleJoinFlood : public Module
                ServerInstance->Modes->DelMode(jf);
                delete jf;
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1, 2, 0, 0, VF_COMMON | VF_VENDOR, API_VERSION);
index 0bb198a4d0e3aa5dee8b254f204a2a9f984f734a..424ea9438c50a68281d64abad36814fbe147240a 100644 (file)
@@ -126,13 +126,13 @@ class ModuleJumpServer : public Module
        ModuleJumpServer(InspIRCd* Me)
                : Module(Me)
        {
-               
+
                js = new CommandJumpserver(ServerInstance);
                ServerInstance->AddCommand(js);
                Implementation eventlist[] = { I_OnUserRegister };
                ServerInstance->Modules->Attach(eventlist, this, 1);
        }
-       
+
        virtual ~ModuleJumpServer()
        {
        }
@@ -153,7 +153,7 @@ class ModuleJumpServer : public Module
        {
                return Version(1,2,0,1,VF_VENDOR,API_VERSION);
        }
-       
+
 };
 
 MODULE_INIT(ModuleJumpServer)
index 310c0db3a018083e8779a0659068b2f61a28a579..21bc25799b4fddd88b1451f969ff1031070a4cbd 100644 (file)
@@ -38,27 +38,27 @@ class KickRejoin : public ModeHandler
                        return std::make_pair(true, channel->GetModeParameter('J'));
                else
                        return std::make_pair(false, parameter);
-       } 
+       }
 
        bool CheckTimeStamp(time_t theirs, time_t ours, const std::string &their_param, const std::string &our_param, Channel* channel)
        {
                /* When TS is equal, the alphabetically later one wins */
                return (their_param < our_param);
        }
-       
+
        ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding, bool)
        {
                if (!adding)
                {
                        // Taking the mode off, we need to clean up.
                        delaylist* dl;
-                       
+
                        if (channel->GetExt("norejoinusers", dl))
                        {
                                delete dl;
                                channel->Shrink("norejoinusers");
                        }
-                       
+
                        if (!channel->IsModeSet('J'))
                        {
                                return MODEACTION_DENY;
@@ -114,15 +114,15 @@ class KickRejoin : public ModeHandler
 
 class ModuleKickNoRejoin : public Module
 {
-       
+
        KickRejoin* kr;
-       
+
 public:
+
        ModuleKickNoRejoin(InspIRCd* Me)
                : Module(Me)
        {
-               
+
                kr = new KickRejoin(ServerInstance);
                if (!ServerInstance->Modes->AddMode(kr))
                        throw ModuleException("Could not add new modes!");
@@ -138,12 +138,12 @@ public:
                        if (chan->GetExt("norejoinusers", dl))
                        {
                                std::vector<User*> itemstoremove;
-                       
+
                                for (delaylist::iterator iter = dl->begin(); iter != dl->end(); iter++)
                                {
                                        if (iter->second > time(NULL))
                                        {
-                                               if (iter->first == user)                                        
+                                               if (iter->first == user)
                                                {
                                                        user->WriteNumeric(495, "%s %s :You must wait %s seconds after being kicked to rejoin (+J)", user->nick.c_str(), chan->name.c_str(), chan->GetModeParameter('J').c_str());
                                                        return 1;
@@ -155,10 +155,10 @@ public:
                                                itemstoremove.push_back(iter->first);
                                        }
                                }
-                               
+
                                for (unsigned int i = 0; i < itemstoremove.size(); i++)
                                        dl->erase(itemstoremove[i]);
-                                                                                                                                       
+
                                if (!dl->size())
                                {
                                        // Now it's empty..
@@ -169,7 +169,7 @@ public:
                }
                return 0;
        }
-               
+
        virtual void OnUserKick(User* source, User* user, Channel* chan, const std::string &reason, bool &silent)
        {
                if (chan->IsModeSet('J') && (source != user))
@@ -183,18 +183,18 @@ public:
                        (*dl)[user] = time(NULL) + strtoint(chan->GetModeParameter('J'));
                }
        }
-       
+
        virtual void OnChannelDelete(Channel* chan)
        {
                delaylist* dl;
-                       
+
                if (chan->GetExt("norejoinusers", dl))
                {
                        delete dl;
                        chan->Shrink("norejoinusers");
                }
        }
-       
+
        virtual void OnCleanup(int target_type, void* item)
        {
                if(target_type == TYPE_CHANNEL)
@@ -207,7 +207,7 @@ public:
                ServerInstance->Modes->DelMode(kr);
                delete kr;
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1, 2, 0, 0, VF_COMMON | VF_VENDOR, API_VERSION);
index 12dc1c79694b8c876eb5ad22ee4dd038cf544ce4..3d244ac4f3a12426838ba7b66eb96f656316579e 100644 (file)
@@ -26,7 +26,7 @@ class CommandKnock : public Command
                syntax = "<channel> <reason>";
                TRANSLATE3(TR_TEXT, TR_TEXT, TR_END);
        }
-       
+
        CmdResult Handle (const std::vector<std::string> &parameters, User *user)
        {
                Channel* c = ServerInstance->FindChan(parameters[0]);
index 6096f9afa9bd4116f4449f9a0b91633eb3e7601a..dbb38734ba5d6b3d87f44fdabbc0ed83aa6a65c0 100644 (file)
@@ -52,7 +52,7 @@ class ModuleMD5 : public Module
        void byteSwap(word32 *buf, unsigned words)
        {
                byte *p = (byte *)buf;
-       
+
                do
                {
                        *buf++ = (word32)((unsigned)p[3] << 8 | p[2]) << 16 |
@@ -78,7 +78,7 @@ class ModuleMD5 : public Module
                        ctx->buf[2] = ikey[2];
                        ctx->buf[3] = ikey[3];
                }
-       
+
                ctx->bytes[0] = 0;
                ctx->bytes[1] = 0;
        }
@@ -86,13 +86,13 @@ class ModuleMD5 : public Module
        void MD5Update(MD5Context *ctx, byte const *buf, int len)
        {
                word32 t;
-       
+
                /* Update byte count */
-       
+
                t = ctx->bytes[0];
                if ((ctx->bytes[0] = t + len) < t)
                        ctx->bytes[1]++;        /* Carry from low to high */
-       
+
                t = 64 - (t & 0x3f);    /* Space available in ctx->in (at least 1) */
                if ((unsigned)t > (unsigned)len)
                {
@@ -105,7 +105,7 @@ class ModuleMD5 : public Module
                MD5Transform(ctx->buf, ctx->in);
                buf += (unsigned)t;
                len -= (unsigned)t;
-       
+
                /* Process data in 64-byte chunks */
                while (len >= 64)
                {
@@ -115,22 +115,22 @@ class ModuleMD5 : public Module
                        buf += 64;
                        len -= 64;
                }
-       
+
                /* Handle any remaining bytes of data. */
                memcpy(ctx->in, buf, len);
        }
-       
+
        void MD5Final(byte digest[16], MD5Context *ctx)
        {
                int count = (int)(ctx->bytes[0] & 0x3f); /* Bytes in ctx->in */
                byte *p = (byte *)ctx->in + count;      /* First unused byte */
-       
+
                /* Set the first char of padding to 0x80.  There is always room. */
                *p++ = 0x80;
-       
+
                /* Bytes of padding needed to make 56 bytes (-8..55) */
                count = 56 - 1 - count;
-       
+
                if (count < 0)
                {       /* Padding forces an extra block */
                        memset(p, 0, count+8);
@@ -141,26 +141,26 @@ class ModuleMD5 : public Module
                }
                memset(p, 0, count+8);
                byteSwap(ctx->in, 14);
-       
+
                /* Append length in bits and transform */
                ctx->in[14] = ctx->bytes[0] << 3;
                ctx->in[15] = ctx->bytes[1] << 3 | ctx->bytes[0] >> 29;
                MD5Transform(ctx->buf, ctx->in);
-       
+
                byteSwap(ctx->buf, 4);
                memcpy(digest, ctx->buf, 16);
                memset(ctx, 0, sizeof(ctx));
        }
-       
+
        void MD5Transform(word32 buf[4], word32 const in[16])
        {
                register word32 a, b, c, d;
-       
+
                a = buf[0];
                b = buf[1];
                c = buf[2];
                d = buf[3];
-       
+
                MD5STEP(F1, a, b, c, d, in[0] + 0xd76aa478, 7);
                MD5STEP(F1, d, a, b, c, in[1] + 0xe8c7b756, 12);
                MD5STEP(F1, c, d, a, b, in[2] + 0x242070db, 17);
@@ -177,7 +177,7 @@ class ModuleMD5 : public Module
                MD5STEP(F1, d, a, b, c, in[13] + 0xfd987193, 12);
                MD5STEP(F1, c, d, a, b, in[14] + 0xa679438e, 17);
                MD5STEP(F1, b, c, d, a, in[15] + 0x49b40821, 22);
-       
+
                MD5STEP(F2, a, b, c, d, in[1] + 0xf61e2562, 5);
                MD5STEP(F2, d, a, b, c, in[6] + 0xc040b340, 9);
                MD5STEP(F2, c, d, a, b, in[11] + 0x265e5a51, 14);
@@ -194,7 +194,7 @@ class ModuleMD5 : public Module
                MD5STEP(F2, d, a, b, c, in[2] + 0xfcefa3f8, 9);
                MD5STEP(F2, c, d, a, b, in[7] + 0x676f02d9, 14);
                MD5STEP(F2, b, c, d, a, in[12] + 0x8d2a4c8a, 20);
-       
+
                MD5STEP(F3, a, b, c, d, in[5] + 0xfffa3942, 4);
                MD5STEP(F3, d, a, b, c, in[8] + 0x8771f681, 11);
                MD5STEP(F3, c, d, a, b, in[11] + 0x6d9d6122, 16);
@@ -211,7 +211,7 @@ class ModuleMD5 : public Module
                MD5STEP(F3, d, a, b, c, in[12] + 0xe6db99e5, 11);
                MD5STEP(F3, c, d, a, b, in[15] + 0x1fa27cf8, 16);
                MD5STEP(F3, b, c, d, a, in[2] + 0xc4ac5665, 23);
-       
+
                MD5STEP(F4, a, b, c, d, in[0] + 0xf4292244, 6);
                MD5STEP(F4, d, a, b, c, in[7] + 0x432aff97, 10);
                MD5STEP(F4, c, d, a, b, in[14] + 0xab9423a7, 15);
@@ -228,14 +228,14 @@ class ModuleMD5 : public Module
                MD5STEP(F4, d, a, b, c, in[11] + 0xbd3af235, 10);
                MD5STEP(F4, c, d, a, b, in[2] + 0x2ad7d2bb, 15);
                MD5STEP(F4, b, c, d, a, in[9] + 0xeb86d391, 21);
-       
+
                buf[0] += a;
                buf[1] += b;
                buf[2] += c;
                buf[3] += d;
        }
-       
-       
+
+
        void MyMD5(void *dest, void *orig, int len, unsigned int* ikey)
        {
                MD5Context context;
@@ -243,8 +243,8 @@ class ModuleMD5 : public Module
                MD5Update(&context, (const unsigned char*)orig, len);
                MD5Final((unsigned char*)dest, &context);
        }
-       
-       
+
+
        void GenHash(const char* src, char* dest, const char* xtab, unsigned int* ikey, size_t srclen)
        {
                unsigned char bytes[16];
@@ -271,13 +271,13 @@ class ModuleMD5 : public Module
                Implementation eventlist[] = { I_OnRequest };
                ServerInstance->Modules->Attach(eventlist, this, 1);
        }
-       
+
        virtual ~ModuleMD5()
        {
                ServerInstance->Modules->UnpublishInterface("HashRequest", this);
        }
 
-       
+
        virtual const char* OnRequest(Request* request)
        {
                HashRequest* MD5 = (HashRequest*)request;
index b0065f0658bc49ce5161ae640e57c1adc6a033dd..166e252d60c553ddbac17afb3fe71bacf4e97894 100644 (file)
@@ -192,29 +192,29 @@ class MsgFlood : public ModeHandler
                                return MODEACTION_ALLOW;
                        }
                }
-               
+
                return MODEACTION_DENY;
        }
 };
 
 class ModuleMsgFlood : public Module
 {
-       
+
        MsgFlood* mf;
-       
+
  public:
+
        ModuleMsgFlood(InspIRCd* Me)
                : Module(Me)
        {
-               
+
                mf = new MsgFlood(ServerInstance);
                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);
        }
-       
+
        int ProcessMessages(User* user,Channel* dest, const std::string &text)
        {
                if (!IS_LOCAL(user) || CHANOPS_EXEMPT(ServerInstance, 'f') && dest->GetStatus(user) == STATUS_OP)
@@ -252,7 +252,7 @@ class ModuleMsgFlood : public Module
                                return 1;
                        }
                }
-               
+
                return 0;
        }
 
@@ -260,7 +260,7 @@ class ModuleMsgFlood : public Module
        {
                if (target_type == TYPE_CHANNEL)
                        return ProcessMessages(user,(Channel*)dest,text);
-               
+
                return 0;
        }
 
@@ -268,7 +268,7 @@ class ModuleMsgFlood : public Module
        {
                if (target_type == TYPE_CHANNEL)
                        return ProcessMessages(user,(Channel*)dest,text);
-                       
+
                return 0;
        }
 
@@ -288,7 +288,7 @@ class ModuleMsgFlood : public Module
                ServerInstance->Modes->DelMode(mf);
                delete mf;
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1, 2, 0, 0, VF_COMMON | VF_VENDOR, API_VERSION);
index 6ad15fa1d990c4fb7873a9f9c011d0e0acb914b1..d8ba80735f5f59b92f905e20ce00489bccdb00c6 100644 (file)
@@ -19,7 +19,7 @@
 class ModuleNamesX : public Module
 {
  public:
-       
+
        ModuleNamesX(InspIRCd* Me)
                : Module(Me)
        {
index 09a981b44048521c20e3c822ccb9a787ec1623e2..c2bd883a81a2429dc38a194a8a0909112432eb7e 100644 (file)
@@ -24,11 +24,11 @@ class ModuleNickBan : public Module
                Implementation eventlist[] = { I_OnUserPreNick, I_On005Numeric };
                ServerInstance->Modules->Attach(eventlist, this, 2);
        }
-       
+
        virtual ~ModuleNickBan()
        {
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1,2,0,0,VF_VENDOR,API_VERSION);
index 3e811da93fa0f7eff692b897b7000ee4958a1a17..34f599a522817dca833e078735d6ff7b70a84a4d 100644 (file)
@@ -97,7 +97,7 @@ class NickFlood : public ModeHandler
                        return std::make_pair(true, ConvToStr(x->nicks)+":"+ConvToStr(x->secs));
                else
                        return std::make_pair(false, parameter);
-       } 
+       }
 
        bool CheckTimeStamp(time_t theirs, time_t ours, const std::string &their_param, const std::string &our_param, Channel* channel)
        {
@@ -207,13 +207,13 @@ class NickFlood : public ModeHandler
 class ModuleNickFlood : public Module
 {
        NickFlood* jf;
-       
+
  public:
+
        ModuleNickFlood(InspIRCd* Me)
                : Module(Me)
        {
-               
+
                jf = new NickFlood(ServerInstance);
                if (!ServerInstance->Modes->AddMode(jf))
                        throw ModuleException("Could not add new modes!");
@@ -255,7 +255,7 @@ class ModuleNickFlood : public Module
 
                return 0;
        }
-       
+
        void OnChannelDelete(Channel* chan)
        {
                nickfloodsettings *f;
@@ -272,7 +272,7 @@ class ModuleNickFlood : public Module
                ServerInstance->Modes->DelMode(jf);
                delete jf;
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1, 2, 0, 0, VF_COMMON | VF_VENDOR, API_VERSION);
index 86054ab3e1a36e9ce4bfdd95cac1e3783ce20674..caa71b53f6f03a64551fe8bb8e1d03dc1a216243 100644 (file)
@@ -110,7 +110,7 @@ class ModuleNickLock : public Module
        ModuleNickLock(InspIRCd* Me)
                : Module(Me)
        {
-               
+
                cmd1 = new CommandNicklock(ServerInstance);
                cmd2 = new CommandNickunlock(ServerInstance);
                ServerInstance->AddCommand(cmd1);
@@ -118,11 +118,11 @@ class ModuleNickLock : public Module
                Implementation eventlist[] = { I_OnUserPreNick, I_OnUserQuit, I_OnCleanup };
                ServerInstance->Modules->Attach(eventlist, this, 3);
        }
-       
+
        virtual ~ModuleNickLock()
        {
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1, 2, 0, 1, VF_COMMON | VF_VENDOR, API_VERSION);
index 55777169714a858defa98bc05c7f3afba4630454..00eea1309665c308374487baa5783a38cf60a31e 100644 (file)
@@ -45,15 +45,15 @@ class NoCTCP : public ModeHandler
 
 class ModuleNoCTCP : public Module
 {
-       
+
        NoCTCP* nc;
-       
+
  public:
+
        ModuleNoCTCP(InspIRCd* Me)
                : Module(Me)
        {
-               
+
                nc = new NoCTCP(ServerInstance);
                if (!ServerInstance->Modes->AddMode(nc))
                        throw ModuleException("Could not add new modes!");
@@ -66,18 +66,18 @@ class ModuleNoCTCP : public Module
        {
                return OnUserPreNotice(user,dest,target_type,text,status,exempt_list);
        }
-       
+
        virtual int OnUserPreNotice(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
        {
                if ((target_type == TYPE_CHANNEL) && (IS_LOCAL(user)))
                {
                        Channel* c = (Channel*)dest;
-                       
+
                        if (CHANOPS_EXEMPT(ServerInstance, 'C') && c->GetStatus(user) == STATUS_OP)
                        {
                                return 0;
                        }
-                       
+
                        if (c->IsModeSet('C'))
                        {
                                if ((text.length()) && (text[0] == '\1'))
index f7a3ac692aee1f5e46ea5b45ecf5f30c12c73379..d9f01f04416e07a125d4d657d44f06eb946c1e4c 100644 (file)
@@ -55,7 +55,7 @@ class ModuleNoInvite : public Module
                ServerInstance->Modes->DelMode(ni);
                delete ni;
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1,2,0,0,VF_COMMON|VF_VENDOR,API_VERSION);
index 74701795ba6043cb7a29424beba5c06af5669e3f..3956c265f9f34473ce49e3db11db4b8a9513c5c3 100644 (file)
@@ -23,15 +23,15 @@ class NoKicks : public SimpleChannelModeHandler
 
 class ModuleNoKicks : public Module
 {
-       
+
        NoKicks* nk;
-       
+
  public:
+
        ModuleNoKicks(InspIRCd* Me)
                : Module(Me)
        {
-               
+
                nk = new NoKicks(ServerInstance);
                if (!ServerInstance->Modes->AddMode(nk))
                        throw ModuleException("Could not add new modes!");
@@ -67,7 +67,7 @@ class ModuleNoKicks : public Module
                ServerInstance->Modes->DelMode(nk);
                delete nk;
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1,2,0,0,VF_COMMON|VF_VENDOR,API_VERSION);
index 0e5e967bd6d398e4f9239721011958f464bfe9fa..a816018e62759f9ebed24c24f403e59df604aca7 100644 (file)
@@ -50,19 +50,19 @@ class ModuleNoNickChange : public Module
        ModuleNoNickChange(InspIRCd* Me)
                : Module(Me)
        {
-               
+
                nn = new NoNicks(ServerInstance);
                ServerInstance->Modes->AddMode(nn);
                Implementation eventlist[] = { I_OnUserPreNick };
                ServerInstance->Modules->Attach(eventlist, this, 1);
        }
-       
+
        virtual ~ModuleNoNickChange()
        {
                ServerInstance->Modes->DelMode(nn);
                delete nn;
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1,2,0,1,VF_COMMON|VF_VENDOR,API_VERSION);
index bb5e6222922667535a1d2b46c60e546c7895bb0d..ae00a126acbb12be2bdd1039fc65e9489020317d 100644 (file)
@@ -23,14 +23,14 @@ class NoNotice : public SimpleChannelModeHandler
 
 class ModuleNoNotice : public Module
 {
-       
+
        NoNotice* nt;
  public:
+
        ModuleNoNotice(InspIRCd* Me)
                : Module(Me)
        {
-               
+
                nt = new NoNotice(ServerInstance);
                if (!ServerInstance->Modes->AddMode(nt))
                        throw ModuleException("Could not add new modes!");
@@ -38,7 +38,7 @@ class ModuleNoNotice : public Module
                ServerInstance->Modules->Attach(eventlist, this, 1);
        }
 
-       
+
        virtual int OnUserPreNotice(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
        {
                if ((target_type == TYPE_CHANNEL) && (IS_LOCAL(user)))
@@ -71,7 +71,7 @@ class ModuleNoNotice : public Module
                ServerInstance->Modes->DelMode(nt);
                delete nt;
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1,2,0,0,VF_COMMON|VF_VENDOR,API_VERSION);
index 4600760f2c35cf62e8d1d144208bece8ea874836..020e097ffca126d58467c0f793612542acc9f042 100644 (file)
@@ -46,13 +46,13 @@ class OperChans : public ModeHandler
 
 class ModuleOperChans : public Module
 {
-       
+
        OperChans* oc;
  public:
        ModuleOperChans(InspIRCd* Me)
                : Module(Me)
        {
-                               
+
                oc = new OperChans(ServerInstance);
                if (!ServerInstance->Modes->AddMode(oc))
                        throw ModuleException("Could not add new modes!");
@@ -76,13 +76,13 @@ class ModuleOperChans : public Module
                }
                return 0;
        }
-       
+
        virtual ~ModuleOperChans()
        {
                ServerInstance->Modes->DelMode(oc);
                delete oc;
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1,2,0,0,VF_VENDOR|VF_COMMON,API_VERSION);
index b0976b1cc35536eaa1ef82d0bb6bab386178f2ae..4b05b372ae92eb37a1f73b8b9283d0bf47e3ba8d 100644 (file)
@@ -54,7 +54,7 @@ class ModuleOperjoin : public Module
                virtual void OnRehash(User* user, const std::string &parameter)
                {
                        ConfigReader* conf = new ConfigReader(ServerInstance);
-    
+
                        operChan = conf->ReadValue("operjoin", "channel", 0);
                        override = conf->ReadFlag("operjoin", "override", "0", 0);
                        operChans.clear();
index 9c82222c1eb1ba4a05ad69bb446741a3331aea98..10e4503f87015aad43fc3db452b9a9223a09117d 100644 (file)
 class ModuleOperLog : public Module
 {
  private:
-        
+
  public:
        ModuleOperLog(InspIRCd* Me) : Module(Me)
        {
-               
+
                Implementation eventlist[] = { I_OnPreCommand, I_On005Numeric };
                ServerInstance->Modules->Attach(eventlist, this, 2);
        }
+
        virtual ~ModuleOperLog()
        {
        }
+
        virtual Version GetVersion()
        {
                return Version(1,2,0,0,VF_VENDOR,API_VERSION);
        }
+
 
        virtual int OnPreCommand(std::string &command, std::vector<std::string> &parameters, User *user, bool validated, const std::string &original_line)
        {
                /* If the command doesnt appear to be valid, we dont want to mess with it. */
                if (!validated)
                        return 0;
+
                if ((IS_OPER(user)) && (IS_LOCAL(user)) && (user->HasPermission(command)))
                {
                        Command* thiscommand = ServerInstance->Parser->GetHandler(command);
@@ -59,6 +59,6 @@ class ModuleOperLog : public Module
        }
 
 };
+
+
 MODULE_INIT(ModuleOperLog)
index 4184409f15ab062909772ce5c387537807441589..0d923d7cbb7bd670d393bd665fda8d44b686d8f1 100644 (file)
@@ -19,14 +19,14 @@ class ModuleModesOnOper : public Module
 {
  private:
 
-       
+
        ConfigReader *Conf;
 
  public:
        ModuleModesOnOper(InspIRCd* Me)
                : Module(Me)
        {
-               
+
                Conf = new ConfigReader(ServerInstance);
                Implementation eventlist[] = { I_OnPostOper, I_OnRehash };
                ServerInstance->Modules->Attach(eventlist, this, 2);
@@ -38,17 +38,17 @@ class ModuleModesOnOper : public Module
                delete Conf;
                Conf = new ConfigReader(ServerInstance);
        }
-       
+
        virtual ~ModuleModesOnOper()
        {
                delete Conf;
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1,2,0,1,VF_VENDOR,API_VERSION);
        }
-       
+
        virtual void OnPostOper(User* user, const std::string &opertype, const std::string &opername)
        {
                // whenever a user opers, go through the oper types, find their <type:modes>,
index d834a6029887a8086e95dd61e611f64c3c2e5b96..f8da2cd107f6428baafb1ebe950be54746549f8f 100644 (file)
@@ -74,7 +74,7 @@ class ModuleOpermotd : public Module
                opermotd = new FileReader(ServerInstance, filename);
                delete conf;
        }
-       
+
        ModuleOpermotd(InspIRCd* Me)
                : Module(Me)
        {
index 31e99609b01c8c326952c7933ec69219befa526b..15cf2ae55ed2266a349275a933c5cfbaeceef65f 100644 (file)
@@ -20,7 +20,7 @@ typedef std::map<std::string,std::string> override_t;
 
 class ModuleOverride : public Module
 {
-       
+
        override_t overrides;
        bool RequireKey;
        bool NoisyOverride;
@@ -28,10 +28,10 @@ class ModuleOverride : public Module
        int OverOps, OverDeops, OverVoices, OverDevoices, OverHalfops, OverDehalfops;
 
  public:
+
        ModuleOverride(InspIRCd* Me)
                : Module(Me)
-       {               
+       {
                // read our config options (main config file)
                OnRehash(NULL,"");
                ServerInstance->SNO->EnableSnomask('O', "OVERRIDE");
@@ -40,12 +40,12 @@ class ModuleOverride : public Module
                Implementation eventlist[] = { I_OnRehash, I_OnAccessCheck, I_On005Numeric, I_OnUserPreJoin, I_OnUserPreKick, I_OnPostCommand };
                ServerInstance->Modules->Attach(eventlist, this, 6);
        }
-       
+
        virtual void OnRehash(User* user, const std::string &parameter)
        {
                // on a rehash we delete our classes for good measure and create them again.
                ConfigReader* Conf = new ConfigReader(ServerInstance);
-               
+
                // re-read our config options on a rehash
                NoisyOverride = Conf->ReadFlag("override", "noisy", 0);
                RequireKey = Conf->ReadFlag("override", "requirekey", 0);
@@ -58,7 +58,7 @@ class ModuleOverride : public Module
                        std::string tokenlist = Conf->ReadValue("type","override",j);
                        overrides[typen] = tokenlist;
                }
-               
+
                delete Conf;
        }
 
@@ -116,7 +116,7 @@ class ModuleOverride : public Module
                }
                return 0;
        }
-       
+
        virtual int OnAccessCheck(User* source,User* dest,Channel* channel,int access_type)
        {
                if (IS_OPER(source))
@@ -207,7 +207,7 @@ class ModuleOverride : public Module
                                                }
                                        break;
                                }
-                       
+
                                if (CanOverride(source,"OTHERMODE"))
                                {
                                        if (NoisyOverride)
@@ -227,7 +227,7 @@ class ModuleOverride : public Module
 
                return ACR_DEFAULT;
        }
-       
+
        virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs, const std::string &keygiven)
        {
                if (IS_LOCAL(user) && IS_OPER(user))
@@ -252,7 +252,7 @@ class ModuleOverride : public Module
                                        }
                                        return -1;
                                }
-                               
+
                                if ((!chan->key.empty()) && (CanOverride(user,"KEY")) && keygiven != chan->key)
                                {
                                        if (RequireKey && keygiven != "override")
@@ -267,7 +267,7 @@ class ModuleOverride : public Module
                                        ServerInstance->SNO->WriteToSnoMask('O', user->nick+" used oper override to bypass +k on "+std::string(cname));
                                        return -1;
                                }
-                                       
+
                                if ((chan->limit > 0) && (chan->GetUserCounter() >=  chan->limit) && (CanOverride(user,"LIMIT")))
                                {
                                        if (RequireKey && keygiven != "override")
@@ -304,12 +304,12 @@ class ModuleOverride : public Module
                }
                return 0;
        }
-       
+
        virtual ~ModuleOverride()
        {
                ServerInstance->SNO->DisableSnomask('O');
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1,2,0,1,VF_VENDOR,API_VERSION);
index 93c7ca00a66d50e8e941ccc3e02c3872df6f3c7e..4d3a9da63dadca4a3df5fbcb8863652ba1390ced 100644 (file)
@@ -65,7 +65,7 @@ class CommandMkpasswd : public Command
 
 class ModuleOperHash : public Module
 {
-       
+
        CommandMkpasswd* mycommand;
        hashymodules hashers; /* List of modules which implement HashRequest */
        std::deque<std::string> names; /* Module names which implement HashRequest */
@@ -109,7 +109,7 @@ class ModuleOperHash : public Module
                Implementation eventlist[] = { I_OnPassCompare, I_OnLoadModule };
                ServerInstance->Modules->Attach(eventlist, this, 2);
        }
-       
+
        virtual ~ModuleOperHash()
        {
                if (diduseiface) ServerInstance->Modules->DoneWithInterface("HashRequest");
index 9ead505354e7907a8e10a3ccf226f1e49bfa853a..304192ca820854f48d48e5622bcaf57410b77039 100644 (file)
@@ -50,7 +50,7 @@ class ModulePermanentChannels : public Module
 {
        PermChannel *p;
 public:
-       
+
        ModulePermanentChannels(InspIRCd* Me) : Module(Me)
        {
                p = new PermChannel(ServerInstance);
index dfccd8781fa04e8a17c0ae50911ea1404be53635..5e302ea8054ee04fa245e3a904b422822bcd89f1 100644 (file)
@@ -31,7 +31,7 @@
 
 /*
  * A few things to note:
- * 
+ *
  *   O  The only place that may *delete* an active or inactive
  *      ident socket is OnUserDisconnect in the module class.
  *      Because this is out of scope of the socket class there is
@@ -40,7 +40,7 @@
  *
  *   O  Closure of the ident socket with the Close() method will
  *      not cause removal of the socket from memory or detatchment
- *      from its 'parent' User class. It will only flag it as an 
+ *      from its 'parent' User class. It will only flag it as an
  *      inactive socket in the socket engine.
  *
  *   O  Timeouts are handled in OnCheckReaady at the same time as
@@ -95,7 +95,7 @@ class ProxySocket : public EventHandler
                {
                        this->response[i] = rstr[i];
                }
-               
+
                socklen_t size = 0;
 #ifdef IPV6
                /* Does this look like a v6 ip address? */
@@ -115,7 +115,7 @@ class ProxySocket : public EventHandler
                /* We allocate two of these because sizeof(sockaddr_in6) > sizeof(sockaddr_in) */
                sockaddr* s = new sockaddr[2];
                sockaddr* addr = new sockaddr[2];
-       
+
 #ifdef IPV6
                /* Horrid icky nasty ugly berkely socket crap. */
                if (v6)
@@ -313,22 +313,22 @@ class ModuleProxy : public Module
                Implementation eventlist[] = { I_OnRehash, I_OnUserRegister, I_OnCleanup, I_OnUserDisconnect };
                ServerInstance->Modules->Attach(eventlist, this, 4);
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1, 2, 1, 0, VF_VENDOR, API_VERSION);
        }
-       
-       
+
+
        virtual void OnRehash(User *user, const std::string &param)
        {
                ConfigReader MyConf(ServerInstance);
-               
+
                RequestTimeout = MyConf.ReadInteger("ident", "timeout", 0, true);
                if (!RequestTimeout)
                        RequestTimeout = 5;
        }
-       
+
        virtual int OnUserRegister(User *user)
        {
                user->WriteServ("NOTICE Auth :*** Checking you for proxies...");
index dbb9f1d519ea97313aed6dfd6297b2ff72f31210..062c45c6439fa08a7fb0fa9ff4e33b2f845ef170 100644 (file)
@@ -24,11 +24,11 @@ class ModuleQuietBan : public Module
                Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice, I_On005Numeric };
                ServerInstance->Modules->Attach(eventlist, this, 3);
        }
-       
+
        virtual ~ModuleQuietBan()
        {
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1,2,0,0,VF_VENDOR,API_VERSION);
@@ -47,7 +47,7 @@ class ModuleQuietBan : public Module
                                return 1;
                        }
                }
-               
+
                return 0;
        }
 
index d7acfadbe584c8da6c0e507af9e7c74c55a0a3e7..503156eef73721c161e9c992f59e0e5865d512ec 100644 (file)
@@ -61,7 +61,7 @@ class ModuleRandQuote : public Module
        ModuleRandQuote(InspIRCd* Me)
                : Module(Me)
        {
-               
+
                conf = new ConfigReader(ServerInstance);
                // Sort the Randomizer thingie..
                srand(time(NULL));
@@ -92,18 +92,18 @@ class ModuleRandQuote : public Module
                ServerInstance->Modules->Attach(eventlist, this, 1);
        }
 
-       
+
        virtual ~ModuleRandQuote()
        {
                delete conf;
                delete quotes;
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1,2,0,1,VF_VENDOR,API_VERSION);
        }
-       
+
        virtual void OnUserConnect(User* user)
        {
                if (mycommand)
index 9c529a37d7af621d841467decf02a393e115f7f4..8b088af8ea1631f8e735fadfcb0bf24308e3f92f 100644 (file)
@@ -35,7 +35,7 @@ class Redirect : public ModeHandler
                /* When TS is equal, the alphabetically later one wins */
                return (their_param < our_param);
        }
-       
+
        ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding, bool)
        {
                if (adding)
@@ -89,28 +89,28 @@ class Redirect : public ModeHandler
                }
 
                return MODEACTION_DENY;
-               
+
        }
 };
 
 class ModuleRedirect : public Module
 {
-       
+
        Redirect* re;
-       
+
  public:
+
        ModuleRedirect(InspIRCd* Me)
                : Module(Me)
        {
-               
+
                re = new Redirect(ServerInstance);
                if (!ServerInstance->Modes->AddMode(re))
                        throw ModuleException("Could not add new modes!");
                Implementation eventlist[] = { I_OnUserPreJoin };
                ServerInstance->Modules->Attach(eventlist, this, 1);
        }
-       
+
 
        virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs, const std::string &keygiven)
        {
@@ -145,7 +145,7 @@ class ModuleRedirect : public Module
                ServerInstance->Modes->DelMode(re);
                delete re;
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1, 2, 0, 0, VF_COMMON | VF_VENDOR, API_VERSION);
index 5c7b825b0d6494dc50eeedcab66aaaf2af8d032a..9be3e14006ed7054868e5273f833348e310a57be 100644 (file)
@@ -42,11 +42,11 @@ class ModuleRegOnlyCreate : public Module
 
                return 0;
        }
-       
+
        virtual ~ModuleRegOnlyCreate()
        {
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1, 2, 0, 0, VF_VENDOR, API_VERSION);
index f0eff03cab0dd9bf08a2bfb7eb65a93dd493ba4e..4dfa0bfb5c18300f3807c3b49953649f90da4e1e 100644 (file)
@@ -15,7 +15,7 @@
 
 /* $ModDesc: Provides a /remove command, this is mostly an alternative to /kick, except makes users appear to have parted the channel */
 
-/*     
+/*
  * This module supports the use of the +q and +a usermodes, but should work without them too.
  * Usage of the command is restricted to +hoaq, and you cannot remove a user with a "higher" level than yourself.
  * eg: +h can remove +hv and users with no modes. +a can remove +aohv and users with no modes.
  */
 class RemoveBase
 {
- private: 
+ private:
        bool& supportnokicks;
        InspIRCd* ServerInstance;
+
  protected:
        RemoveBase(InspIRCd* Instance, bool& snk) : supportnokicks(snk), ServerInstance(Instance)
        {
-       }               
-       enum ModeLevel { PEON = 0, HALFOP = 1, OP = 2, ADMIN = 3, OWNER = 4, ULINE = 5 };        
+       }
+
+       enum ModeLevel { PEON = 0, HALFOP = 1, OP = 2, ADMIN = 3, OWNER = 4, ULINE = 5 };
+
        /* This little function just converts a chanmode character (U ~ & @ & +) into an integer (5 4 3 2 1 0) */
        /* XXX - We should probably use the new mode prefix rank stuff
         * for this instead now -- Brain */
@@ -45,7 +45,7 @@ class RemoveBase
                {
                        return PEON;
                }
-       
+
                switch (privs[0])
                {
                        case 'U':
@@ -68,7 +68,7 @@ class RemoveBase
                                return PEON;
                }
        }
-       
+
        CmdResult Handle (const std::vector<std::string>& parameters, User *user, bool neworder)
        {
                const char* channame;
@@ -81,7 +81,7 @@ class RemoveBase
                std::string protectkey;
                std::string founderkey;
                bool hasnokicks;
-               
+
                /* Set these to the parameters needed, the new version of this module switches it's parameters around
                 * supplying a new command with the new order while keeping the old /remove with the older order.
                 * /remove <nick> <channel> [reason ...]
@@ -89,10 +89,10 @@ class RemoveBase
                 */
                channame = parameters[ neworder ? 0 : 1].c_str();
                username = parameters[ neworder ? 1 : 0].c_str();
-               
+
                /* Look up the user we're meant to be removing from the channel */
                target = ServerInstance->FindNick(username);
-               
+
                /* And the channel we're meant to be removing them from */
                channel = ServerInstance->FindChan(channame);
 
@@ -107,13 +107,13 @@ class RemoveBase
                {
                        user->WriteServ( "NOTICE %s :*** The user %s is not on channel %s", user->nick.c_str(), target->nick.c_str(), channel->name.c_str());
                        return CMD_FAILURE;
-               }       
-               
+               }
+
                /* This is adding support for the +q and +a channel modes, basically if they are enabled, and the remover has them set.
                 * Then we change the @|%|+ to & if they are +a, or ~ if they are +q */
                protectkey = "cm_protect_" + std::string(channel->name);
                founderkey = "cm_founder_" + std::string(channel->name);
-               
+
                if (ServerInstance->ULine(user->server) || ServerInstance->ULine(user->nick.c_str()))
                {
                        ulevel = chartolevel("U");
@@ -130,7 +130,7 @@ class RemoveBase
                {
                        ulevel = chartolevel(channel->GetPrefixChar(user));
                }
-                       
+
                /* Now it's the same idea, except for the target. If they're ulined make sure they get a higher level than the sender can */
                if (ServerInstance->ULine(target->server) || ServerInstance->ULine(target->nick.c_str()))
                {
@@ -148,9 +148,9 @@ class RemoveBase
                {
                        tlevel = chartolevel(channel->GetPrefixChar(target));
                }
-               
+
                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)))
                {
@@ -165,7 +165,7 @@ class RemoveBase
                                // but you can do this, nenolod -brain
 
                                std::string reasonparam("No reason given");
-                               
+
                                /* If a reason is given, use it */
                                if(parameters.size() > 2)
                                {
@@ -212,7 +212,7 @@ class CommandRemove : public Command, public RemoveBase
                syntax = "<nick> <channel> [<reason>]";
                TRANSLATE4(TR_NICK, TR_TEXT, TR_TEXT, TR_END);
        }
-       
+
        CmdResult Handle (const std::vector<std::string>& parameters, User *user)
        {
                return RemoveBase::Handle(parameters, user, false);
@@ -241,8 +241,8 @@ class ModuleRemove : public Module
        CommandRemove* mycommand;
        CommandFpart* mycommand2;
        bool supportnokicks;
-       
-       
+
+
  public:
        ModuleRemove(InspIRCd* Me)
        : Module(Me)
@@ -261,22 +261,22 @@ class ModuleRemove : public Module
        {
                output.append(" REMOVE");
        }
-       
+
        virtual void OnRehash(User* user, const std::string&)
        {
                ConfigReader conf(ServerInstance);
                supportnokicks = conf.ReadFlag("remove", "supportnokicks", 0);
        }
-       
+
        virtual ~ModuleRemove()
        {
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1, 2, 1, 0, VF_COMMON | VF_VENDOR, API_VERSION);
        }
-       
+
 };
 
 MODULE_INIT(ModuleRemove)
index d4054916740e40c9c033a78d41d7dc9e6d9888a0..6068c5279bd38cdfca691a197f2080fca4992cf6 100644 (file)
@@ -24,11 +24,11 @@ class ModuleRestrictBanned : public Module
                Implementation eventlist[] = { I_OnLocalTopicChange, I_OnUserPreNick, I_OnUserPreNotice, I_OnUserPreMessage };
                ServerInstance->Modules->Attach(eventlist, this, 4);
        }
-       
+
        virtual ~ModuleRestrictBanned()
        {
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1,2,0,1,VF_VENDOR,API_VERSION);
@@ -75,7 +75,7 @@ class ModuleRestrictBanned : public Module
        {
                return CheckRestricted(user, channel, "change the topic");
        }
-       
+
        virtual int OnUserPreMessage(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
        {
                return OnUserPreNotice(user,dest,target_type,text,status,exempt_list);
index c0409168f1fdfba987285e13ccbf5f60d3d411cd..7b229687f8a68f91728e3ed931197804034fc8a6 100644 (file)
@@ -17,7 +17,7 @@
 
 class ModuleRestrictChans : public Module
 {
-       
+
 
        std::map<irc::string,int> allowchans;
 
@@ -39,7 +39,7 @@ class ModuleRestrictChans : public Module
        ModuleRestrictChans(InspIRCd* Me)
                : Module(Me)
        {
-               
+
                ReadConfig();
                Implementation eventlist[] = { I_OnUserPreJoin, I_OnRehash };
                ServerInstance->Modules->Attach(eventlist, this, 2);
@@ -50,7 +50,7 @@ class ModuleRestrictChans : public Module
                ReadConfig();
        }
 
-       
+
        virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs, const std::string &keygiven)
        {
                irc::string x = cname;
@@ -66,11 +66,11 @@ class ModuleRestrictChans : public Module
                }
                return 0;
        }
-       
+
        virtual ~ModuleRestrictChans()
        {
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1,2,0,1,VF_VENDOR,API_VERSION);
index eb2026203f8b3be4aa9f72807295bfa85e049ec3..5670286b88fd9311ab7c65b9511f912915d33e13 100644 (file)
 
 class ModuleRestrictMsg : public Module
 {
-       
+
  public:
+
        ModuleRestrictMsg(InspIRCd* Me)
                : Module(Me)
        {
-               
+
                Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice };
                ServerInstance->Modules->Attach(eventlist, this, 2);
        }
@@ -60,7 +60,7 @@ class ModuleRestrictMsg : public Module
        virtual ~ModuleRestrictMsg()
        {
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1,2,0,1,VF_VENDOR,API_VERSION);
index eed343243a3a7fb1620012801c5a8c7cbe1bd20b..007a89f09c5f0cb44d1613b0d4104d930c18af69 100644 (file)
@@ -25,7 +25,7 @@
  *  The RIPEMD-160 software is freely available for use under the terms and
  *  conditions described hereunder, which shall be deemed to be accepted by
  *  any user of the software and applicable on any use of the software:
- * 
+ *
  *  1. K.U.Leuven Department of Electrical Engineering-ESAT/COSIC shall for
  *     all purposes be considered the owner of the RIPEMD-160 software and of
  *     all copyright, trade secret, patent or other intellectual property
@@ -39,9 +39,9 @@
  *     circumstances K.U.Leuven R&D will be held liable for any deficiency,
  *     fault or other mishappening with regard to the use or performance of
  *     the software.
- *  3. User agrees to give due credit to K.U.Leuven in scientific publications 
- *     or communications in relation with the use of the RIPEMD-160 software 
- *     as follows: RIPEMD-160 software written by Antoon Bosselaers, 
+ *  3. User agrees to give due credit to K.U.Leuven in scientific publications
+ *     or communications in relation with the use of the RIPEMD-160 software
+ *     as follows: RIPEMD-160 software written by Antoon Bosselaers,
  *     available at http://www.esat.kuleuven.be/~cosicart/ps/AB-9601/.
  *
  */
@@ -80,12 +80,12 @@ typedef             uint32_t                dword;
 #define ROL(x, n)        (((x) << (n)) | ((x) >> (32-(n))))
 
 /* the five basic functions F(), G() and H() */
-#define F(x, y, z)        ((x) ^ (y) ^ (z)) 
-#define G(x, y, z)        (((x) & (y)) | (~(x) & (z))) 
+#define F(x, y, z)        ((x) ^ (y) ^ (z))
+#define G(x, y, z)        (((x) & (y)) | (~(x) & (z)))
 #define H(x, y, z)        (((x) | ~(y)) ^ (z))
-#define I(x, y, z)        (((x) & (z)) | ((y) & ~(z))) 
+#define I(x, y, z)        (((x) & (z)) | ((y) & ~(z)))
 #define J(x, y, z)        ((x) ^ ((y) | ~(z)))
-  
+
 /* the ten basic operations FF() through III() */
 
 #define FF(a, b, c, d, e, x, s)        {\
@@ -200,7 +200,7 @@ class ModuleRIPEMD160 : public Module
                FF(cc, dd, ee, aa, bb, X[13],  7);
                FF(bb, cc, dd, ee, aa, X[14],  9);
                FF(aa, bb, cc, dd, ee, X[15],  8);
-                             
+
                /* round 2 */
                GG(ee, aa, bb, cc, dd, X[ 7],  7);
                GG(dd, ee, aa, bb, cc, X[ 4],  6);
@@ -218,7 +218,7 @@ class ModuleRIPEMD160 : public Module
                GG(bb, cc, dd, ee, aa, X[14],  7);
                GG(aa, bb, cc, dd, ee, X[11], 13);
                GG(ee, aa, bb, cc, dd, X[ 8], 12);
-       
+
                /* round 3 */
                HH(dd, ee, aa, bb, cc, X[ 3], 11);
                HH(cc, dd, ee, aa, bb, X[10], 13);
@@ -236,7 +236,7 @@ class ModuleRIPEMD160 : public Module
                HH(aa, bb, cc, dd, ee, X[11], 12);
                HH(ee, aa, bb, cc, dd, X[ 5],  7);
                HH(dd, ee, aa, bb, cc, X[12],  5);
-               
+
                /* round 4 */
                II(cc, dd, ee, aa, bb, X[ 1], 11);
                II(bb, cc, dd, ee, aa, X[ 9], 12);
@@ -292,7 +292,7 @@ class ModuleRIPEMD160 : public Module
                JJJ(aaa, bbb, ccc, ddd, eee, X[12],  6);
 
                /* parallel round 2 */
-               III(eee, aaa, bbb, ccc, ddd, X[ 6],  9); 
+               III(eee, aaa, bbb, ccc, ddd, X[ 6],  9);
                III(ddd, eee, aaa, bbb, ccc, X[11], 13);
                III(ccc, ddd, eee, aaa, bbb, X[ 3], 15);
                III(bbb, ccc, ddd, eee, aaa, X[ 7],  7);
@@ -327,7 +327,7 @@ class ModuleRIPEMD160 : public Module
                HHH(eee, aaa, bbb, ccc, ddd, X[ 4],  7);
                HHH(ddd, eee, aaa, bbb, ccc, X[13],  5);
 
-               /* parallel round 4 */   
+               /* parallel round 4 */
                GGG(ccc, ddd, eee, aaa, bbb, X[ 8], 15);
                GGG(bbb, ccc, ddd, eee, aaa, X[ 6],  5);
                GGG(aaa, bbb, ccc, ddd, eee, X[ 4],  8);
index 1c472aa17b8179af5abbdc6d13bc2ace1ff9d437..861aa86b0b2ecbbfa268e4a24ac82685f1f2a4d3 100644 (file)
@@ -31,9 +31,9 @@ class JsonException : public std::exception
                : _what(swhat)
        {
        }
-       
+
        virtual ~JsonException() throw() { }
-       
+
        virtual const char *what() const throw()
        {
                return _what.c_str();
@@ -43,7 +43,7 @@ class JsonException : public std::exception
 class ModuleRpcJson : public Module
 {
  private:
-       
+
  public:
        ModuleRpcJson(InspIRCd *Me) : Module(Me)
        {
@@ -51,52 +51,52 @@ class ModuleRpcJson : public Module
                Implementation eventlist[] = { I_OnEvent };
                ServerInstance->Modules->Attach(eventlist, this, 1);
        }
-       
+
        virtual ~ModuleRpcJson()
        {
                ServerInstance->Modules->UnpublishInterface("RPC", this);
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1, 2, 0, 0, VF_SERVICEPROVIDER | VF_VENDOR, API_VERSION);
        }
-       
-       
+
+
        virtual void OnEvent(Event *event)
        {
                if (event->GetEventID() == "httpd_url")
                {
                        HTTPRequest *req = (HTTPRequest*) event->GetData();
-                       
+
                        if ((req->GetURI() == "/rpc/json") || (req->GetURI() == "/rpc/json/"))
                        {
                                std::stringstream data;
-                               
+
                                RPCValue *reqobj = NULL;
-                               
+
                                try
                                {
                                        reqobj = this->JSONParse(req->GetPostData());
-                                       
+
                                        if (!reqobj || (reqobj->GetType() != RPCObject))
                                                throw JsonException("RPC requests must be in the form of a single object");
-                                       
+
                                        RPCValue *method = reqobj->GetObject("method");
                                        if (!method || method->GetType() != RPCString)
                                                throw JsonException("RPC requests must have a 'method' string field");
-                                       
+
                                        RPCValue *params = reqobj->GetObject("params");
                                        if (!params || params->GetType() != RPCArray)
                                                throw JsonException("RPC requests must have a 'params' array field");
-                                       
+
                                        RPCRequest modreq("json", method->GetString(), params);
                                        Event mev((char*) &modreq, this, "RPCMethod");
                                        mev.Send(ServerInstance);
-                                       
+
                                        if (!modreq.claimed)
                                                throw JsonException("Unrecognized method");
-                                       
+
                                        if (!modreq.error.empty())
                                        {
                                                data << "{\"result\":null,\"error\":\"" << modreq.error << "\"";
@@ -107,14 +107,14 @@ class ModuleRpcJson : public Module
                                                this->JSONSerialize(modreq.result, data);
                                                data << ",\"error\":null";
                                        }
-                                       
+
                                        if (reqobj->GetObject("id"))
                                        {
                                                data << ",\"id\":";
                                                this->JSONSerialize(reqobj->GetObject("id"), data);
                                        }
                                        data << "}";
-                                                                               
+
                                        delete reqobj;
                                        reqobj = NULL;
                                }
@@ -124,23 +124,23 @@ class ModuleRpcJson : public Module
                                                delete reqobj;
                                        data << "{\"result\":null,\"error\":\"" << e.what() << "\"}";
                                }
-                               
+
                                HTTPDocument response(req->sock, &data, 200);
                                response.headers.SetHeader("X-Powered-By", "m_rpc_json.so");
                                response.headers.SetHeader("Content-Type", "application/json");
                                response.headers.SetHeader("Connection", "Keep-Alive");
-                               
+
                                Request rreq((char*) &response, (Module*) this, event->GetSource());
                                rreq.Send();
                        }
                }
        }
-       
+
        void AttachToParent(RPCValue *parent, RPCValue *child, const std::string &key = "")
        {
                if (!parent || !child)
                        return;
-               
+
                if (parent->GetType() == RPCArray)
                        parent->ArrayAdd(child);
                else if (parent->GetType() == RPCObject)
@@ -148,14 +148,14 @@ class ModuleRpcJson : public Module
                else
                        throw JsonException("Cannot add a value to a non-container");
        }
-       
+
        void AttachToParentReset(RPCValue *parent, RPCValue *&child, std::string &key)
        {
                AttachToParent(parent, child, key);
                child = NULL;
                key.clear();
        }
-       
+
        RPCValue *JSONParse(const std::string &data)
        {
                bool pisobject = false;
@@ -165,7 +165,7 @@ class ModuleRpcJson : public Module
                std::string pvkey;
                RPCValue *aparent = NULL;
                RPCValue *value = NULL;
-               
+
                for (std::string::const_iterator i = data.begin(); i != data.end(); i++)
                {
                        if (instring)
@@ -174,29 +174,29 @@ class ModuleRpcJson : public Module
                                if (*i == '"')
                                {
                                        instring = false;
-                                       
+
                                        if (pisobject && vkey.empty())
                                                vkey = stmp;
                                        else
                                                value = new RPCValue(stmp);
-                                       
+
                                        stmp.clear();
                                }
                                else
                                        stmp += *i;
-                               
+
                                continue;
                        }
-                       
+
                        if ((*i == ' ') || (*i == '\t') || (*i == '\r') || (*i == '\n'))
                                continue;
-                       
+
                        if (*i == '{')
                        {
                                // Begin object
                                if ((value) || (pisobject && vkey.empty()))
                                        throw JsonException("Unexpected begin object token ('{')");
-                               
+
                                RPCValue *nobj = new RPCValue(RPCObject, aparent);
                                aparent = nobj;
                                pvkey = vkey;
@@ -208,14 +208,14 @@ class ModuleRpcJson : public Module
                                // End object
                                if ((!aparent) || (!pisobject) || (!vkey.empty() && !value))
                                        throw JsonException("Unexpected end object token ('}')");
-                               
+
                                // End value
                                if (value)
                                        AttachToParentReset(aparent, value, vkey);
-                               
+
                                if (!aparent->parent)
                                        return aparent;
-                               
+
                                value = aparent;
                                aparent = aparent->parent;
                                vkey = pvkey;
@@ -227,7 +227,7 @@ class ModuleRpcJson : public Module
                                // Begin string
                                if (value)
                                        throw JsonException("Unexpected begin string token ('\"')");
-                               
+
                                instring = true;
                        }
                        else if (*i == ':')
@@ -239,7 +239,7 @@ class ModuleRpcJson : public Module
                        {
                                if ((!aparent) || (!value) || ((pisobject) && (vkey.empty())))
                                        throw JsonException("Unexpected value seperator token (',')");
-                               
+
                                AttachToParentReset(aparent, value, vkey);
                        }
                        else if (*i == '[')
@@ -247,7 +247,7 @@ class ModuleRpcJson : public Module
                                // Begin array
                                if ((value) || (pisobject && vkey.empty()))
                                        throw JsonException("Unexpected begin array token ('[')");
-                               
+
                                RPCValue *nar = new RPCValue(RPCArray, aparent);
                                aparent = nar;
                                pvkey = vkey;
@@ -259,13 +259,13 @@ class ModuleRpcJson : public Module
                                // End array (also an end value delimiter)
                                if (!aparent || pisobject)
                                        throw JsonException("Unexpected end array token (']')");
-                               
+
                                if (value)
                                        AttachToParentReset(aparent, value, vkey);
-                               
+
                                if (!aparent->parent)
                                        return aparent;
-                               
+
                                value = aparent;
                                aparent = aparent->parent;
                                vkey = pvkey;
@@ -294,36 +294,36 @@ class ModuleRpcJson : public Module
                                {
                                        std::string ds = std::string(i, data.end());
                                        char *eds = NULL;
-                                       
+
                                        errno = 0;
                                        double v = strtod(ds.c_str(), &eds);
-                                       
+
                                        if (errno != 0)
                                                throw JsonException("Error parsing numeric value");
-                                       
+
                                        value = new RPCValue(v);
-                                       
+
                                        i += eds - ds.c_str() - 1;
                                }
                                else
                                        throw JsonException("Unknown data in value portion");
                        }
                }
-               
+
                if (instring)
                        throw JsonException("Unterminated string");
-               
+
                if (aparent && pisobject)
                        throw JsonException("Unterminated object");
                else if (aparent && !pisobject)
                        throw JsonException("Unterminated array");
-               
+
                if (value)
                        return value;
                else
                        throw JsonException("No JSON data found");
        }
-       
+
        void JSONSerialize(RPCValue *value, std::stringstream &re)
        {
                int ac;
index 673955a0dceaf58cab23a48c3cd7452bf161a2c4..0ff938041938bf141423f32459a1b352b3fd0e79 100644 (file)
 class ModuleRPCTest : public Module
 {
  private:
-       
+
  public:
        ModuleRPCTest(InspIRCd *Me) : Module(Me)
        {
                Implementation eventlist[] = { I_OnEvent };
                ServerInstance->Modules->Attach(eventlist, this, 1);
        }
-       
+
        virtual ~ModuleRPCTest()
        {
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1, 2, 0, 0, VF_VENDOR, API_VERSION);
        }
-       
-       
+
+
        virtual void OnEvent(Event *ev)
        {
                if (ev->GetEventID() == "RPCMethod")
                {
                        RPCRequest *req = (RPCRequest*) ev->GetData();
-                       
+
                        if (req->method == "test.echo")
                        {
                                req->claimed = true;
@@ -55,7 +55,7 @@ class ModuleRPCTest : public Module
                                        req->error = "Insufficient parameters";
                                        return;
                                }
-                               
+
                                req->result->SetString(req->parameters->GetArray(0)->GetString());
                        }
                }
index 9bcc78806b62b222c87a0a61c57cfff09dc6eba3..f719b9e878e3317a0b98c66ef396c60b14ceec01 100644 (file)
@@ -45,7 +45,7 @@ class ModuleSafeList : public Module
                Implementation eventlist[] = { I_OnBufferFlushed, I_OnPreCommand, I_OnCleanup, I_OnUserQuit, I_On005Numeric, I_OnRehash };
                ServerInstance->Modules->Attach(eventlist, this, 6);
        }
+
        virtual ~ModuleSafeList()
        {
        }
@@ -58,30 +58,30 @@ class ModuleSafeList : public Module
                ServerNameSize = strlen(ServerInstance->Config->ServerName) + 4;
                global_listing = 0;
        }
+
        virtual Version GetVersion()
        {
                return Version(1,2,0,0,VF_VENDOR,API_VERSION);
        }
+
 
        /*
         * OnPreCommand()
         *   Intercept the LIST command.
-        */ 
+        */
        virtual int OnPreCommand(std::string &command, std::vector<std::string> &parameters, User *user, bool validated, const std::string &original_line)
        {
                /* If the command doesnt appear to be valid, we dont want to mess with it. */
                if (!validated)
                        return 0;
+
                if (command == "LIST")
                {
                        return this->HandleList(parameters, user);
                }
                return 0;
        }
-       
+
        /*
         * HandleList()
         *   Handle (override) the LIST command.
@@ -102,7 +102,7 @@ class ModuleSafeList : public Module
                /* First, let's check if the user is currently /list'ing */
                ListData *ld;
                user->GetExt("safelist_cache", ld);
+
                if (ld)
                {
                        /* user is already /list'ing, we don't want to do shit. */
@@ -142,7 +142,7 @@ class ModuleSafeList : public Module
                        user->Shrink("safelist_last");
                }
 
+
                /*
                 * start at channel 0! ;)
                 */
index c320287e1462003de4d0261e410febc4d9b65d28..72fdd3e08c2a2852d8f18ba9d4aef02a9eb20a12 100644 (file)
@@ -93,21 +93,21 @@ class ModuleSajoin : public Module
        ModuleSajoin(InspIRCd* Me)
                : Module(Me)
        {
-               
+
                mycommand = new CommandSajoin(ServerInstance);
                ServerInstance->AddCommand(mycommand);
 
        }
-       
+
        virtual ~ModuleSajoin()
        {
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1, 2, 0, 1, VF_COMMON | VF_VENDOR, API_VERSION);
        }
-       
+
 };
 
 MODULE_INIT(ModuleSajoin)
index 67b30b3ec380cf33d5443e14afedf4804ea5fcd4..8b5e94c5fe0277c6b03d8a6901645459b639cd36 100644 (file)
@@ -69,16 +69,16 @@ class ModuleSaMode : public Module
        ModuleSaMode(InspIRCd* Me)
                : Module(Me)
        {
-               
+
                mycommand = new CommandSamode(ServerInstance);
                ServerInstance->AddCommand(mycommand);
 
        }
-       
+
        virtual ~ModuleSaMode()
        {
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1, 2, 0, 0, VF_COMMON | VF_VENDOR, API_VERSION);
index 83d7fabd44c4cc5614bac1206691dbc76c421eb8..9adaff40cbd35c94a856a8026050fbe49783a0e1 100644 (file)
@@ -76,21 +76,21 @@ class ModuleSanick : public Module
        ModuleSanick(InspIRCd* Me)
                : Module(Me)
        {
-               
+
                mycommand = new CommandSanick(ServerInstance);
                ServerInstance->AddCommand(mycommand);
 
        }
-       
+
        virtual ~ModuleSanick()
        {
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1, 2, 0, 1, VF_COMMON | VF_VENDOR, API_VERSION);
        }
-       
+
 };
 
 MODULE_INIT(ModuleSanick)
index 40a4c54e59eb581f101495bb76fba9de8e2286e9..05fe5ffdc0c1d6d1bbc7683172ff9f6ef07e67d8 100644 (file)
@@ -98,21 +98,21 @@ class ModuleSapart : public Module
        ModuleSapart(InspIRCd* Me)
                : Module(Me)
        {
-               
+
                mycommand = new CommandSapart(ServerInstance);
                ServerInstance->AddCommand(mycommand);
 
        }
-       
+
        virtual ~ModuleSapart()
        {
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1, 2, 0, 1, VF_COMMON | VF_VENDOR, API_VERSION);
        }
-       
+
 };
 
 MODULE_INIT(ModuleSapart)
index 91e792c8b72c1f4a1e384350790c94364d47a2c0..00f8cfba2660045337233c191595fccb73eda583 100644 (file)
@@ -37,13 +37,13 @@ class CommandSaquit : public Command
                                user->WriteNumeric(990, "%s :Cannot use an SA command on a u-lined client",user->nick.c_str());
                                return CMD_FAILURE;
                        }
-                       
+
                        ServerInstance->SNO->WriteToSnoMask('A', std::string(user->nick)+" used SAQUIT to make "+std::string(dest->nick)+" quit with a reason of "+parameters[1]);
-                       
+
                        // Pass the command on, so the client's server can quit it properly.
                        if (!IS_LOCAL(dest))
                                return CMD_SUCCESS;
-                       
+
                        ServerInstance->Users->QuitUser(dest, parameters[1]);
                        return CMD_LOCALONLY;
                }
@@ -63,21 +63,21 @@ class ModuleSaquit : public Module
        ModuleSaquit(InspIRCd* Me)
                : Module(Me)
        {
-               
+
                mycommand = new CommandSaquit(ServerInstance);
                ServerInstance->AddCommand(mycommand);
 
        }
-       
+
        virtual ~ModuleSaquit()
        {
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1, 2, 0, 0, VF_COMMON | VF_VENDOR, API_VERSION);
        }
-       
+
 };
 
 MODULE_INIT(ModuleSaquit)
index 1ad51b1641b7e2b40b4215292983f9c6d12ed86c..96130d039c32d2c2b6f42b665c942acfaf03d4d4 100644 (file)
@@ -188,7 +188,7 @@ class ModuleSASL : public Module
 {
        CommandAuthenticate* sasl;
  public:
-       
+
        ModuleSASL(InspIRCd* Me)
                : Module(Me)
        {
index 356a1a93e65ae9130d5dcca8dbc3f9dec4b14b1f..0d04a13ae17b3c136667621a9f801263deabb91c 100644 (file)
@@ -27,11 +27,11 @@ class ModuleSecureList : public Module
                Implementation eventlist[] = { I_OnRehash, I_OnPreCommand, I_On005Numeric };
                ServerInstance->Modules->Attach(eventlist, this, 3);
        }
+
        virtual ~ModuleSecureList()
        {
        }
+
        virtual Version GetVersion()
        {
                return Version(1,2,0,0,VF_VENDOR,API_VERSION);
@@ -48,18 +48,18 @@ class ModuleSecureList : public Module
                WaitTime = MyConf->ReadInteger("securelist", "waittime", "60", 0, true);
                delete MyConf;
        }
+
 
        /*
         * OnPreCommand()
         *   Intercept the LIST command.
-        */ 
+        */
        virtual int OnPreCommand(std::string &command, std::vector<std::string> &parameters, User *user, bool validated, const std::string &original_line)
        {
                /* If the command doesnt appear to be valid, we dont want to mess with it. */
                if (!validated)
                        return 0;
+
                if ((command == "LIST") && (ServerInstance->Time() < (user->signon+WaitTime)) && (!IS_OPER(user)))
                {
                        /* Normally wouldnt be allowed here, are they exempt? */
@@ -91,5 +91,5 @@ class ModuleSecureList : public Module
        }
 
 };
+
 MODULE_INIT(ModuleSecureList)
index 2ea856db2afeab2cb55f67a216b256eb323ec840..bc6c68864533e698244258df253a03f7f1718011 100644 (file)
@@ -21,7 +21,7 @@ static bool kludgeme = false;
  */
 class Channel_r : public ModeHandler
 {
-       
+
  public:
        Channel_r(InspIRCd* Instance) : ModeHandler(Instance, 'r', 0, 0, false, MODETYPE_CHANNEL, false) { }
 
@@ -45,7 +45,7 @@ class Channel_r : public ModeHandler
  */
 class User_r : public ModeHandler
 {
-       
+
  public:
        User_r(InspIRCd* Instance) : ModeHandler(Instance, 'r', 0, 0, false, MODETYPE_USER, false) { }
 
@@ -96,7 +96,7 @@ class Channel_M : public SimpleChannelModeHandler
  */
 class ModuleServices : public Module
 {
-       
+
        Channel_r* m1;
        Channel_R* m2;
        Channel_M* m3;
@@ -106,7 +106,7 @@ class ModuleServices : public Module
        ModuleServices(InspIRCd* Me)
                : Module(Me)
        {
-               
+
                m1 = new Channel_r(ServerInstance);
                m2 = new Channel_R(ServerInstance);
                m3 = new Channel_M(ServerInstance);
@@ -118,7 +118,7 @@ class ModuleServices : public Module
                {
                        throw ModuleException("Could not add user and channel modes!");
                }
-       
+
                kludgeme = false;
                Implementation eventlist[] = { I_OnWhois, I_OnUserPostNick, I_OnUserPreMessage, I_OnUserPreNotice, I_OnUserPreJoin };
                ServerInstance->Modules->Attach(eventlist, this, 5);
@@ -148,7 +148,7 @@ class ModuleServices : public Module
                        kludgeme = false;
                }
        }
-       
+
        virtual int OnUserPreMessage(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
        {
                if (!IS_LOCAL(user))
@@ -186,12 +186,12 @@ class ModuleServices : public Module
                }
                return 0;
        }
-       
+
        virtual int OnUserPreNotice(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
        {
                return OnUserPreMessage(user,dest,target_type,text,status, exempt_list);
        }
-       
+
        virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs, const std::string &keygiven)
        {
                if (chan)
@@ -228,7 +228,7 @@ class ModuleServices : public Module
                delete m4;
                delete m5;
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1,2,0,0,VF_COMMON|VF_VENDOR,API_VERSION);
index db9d90de49a95afea543e11256c24d9cf473a252..4a3e0c48b291bef19b36551c1baac221fcadb3db 100644 (file)
@@ -42,14 +42,14 @@ class AChannel_M : public SimpleChannelModeHandler
 
 class ModuleServicesAccount : public Module
 {
-        
+
        AChannel_R* m1;
        AChannel_M* m2;
        AUser_R* m3;
  public:
        ModuleServicesAccount(InspIRCd* Me) : Module(Me)
        {
-               
+
                m1 = new AChannel_R(ServerInstance);
                m2 = new AChannel_M(ServerInstance);
                m3 = new AUser_R(ServerInstance);
@@ -83,11 +83,11 @@ class ModuleServicesAccount : public Module
                        return 0;
 
                user->GetExt("accountname", account);
-               
+
                if (target_type == TYPE_CHANNEL)
                {
                        Channel* c = (Channel*)dest;
-                       
+
                        if ((c->IsModeSet('M')) && (!account))
                        {
                                if ((ServerInstance->ULine(user->nick.c_str())) || (ServerInstance->ULine(user->server)))
@@ -104,7 +104,7 @@ class ModuleServicesAccount : public Module
                if (target_type == TYPE_USER)
                {
                        User* u = (User*)dest;
-                       
+
                        if ((u->modes['R'-65]) && (!account))
                        {
                                if ((ServerInstance->ULine(user->nick.c_str())) || (ServerInstance->ULine(user->server)))
@@ -120,17 +120,17 @@ class ModuleServicesAccount : public Module
                }
                return 0;
        }
-        
+
        virtual int OnUserPreNotice(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
        {
                return OnUserPreMessage(user, dest, target_type, text, status, exempt_list);
        }
-        
+
        virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs, const std::string &keygiven)
        {
                std::string *account;
                user->GetExt("accountname", account);
-               
+
                if (chan)
                {
                        if (chan->IsModeSet('R'))
@@ -150,7 +150,7 @@ class ModuleServicesAccount : public Module
                }
                return 0;
        }
-       
+
        // Whenever the linking module wants to send out data, but doesnt know what the data
        // represents (e.g. it is metadata, added to a User or Channel by a module) then
        // this method is called. We should use the ProtoSendMetaData function after we've
@@ -215,9 +215,9 @@ class ModuleServicesAccount : public Module
        {
                // check if its our metadata key, and its associated with a user
                if ((target_type == TYPE_USER) && (extname == "accountname"))
-               {       
+               {
                        User* dest = (User*)target;
-                       
+
                        /* logging them out? */
                        if (extdata.empty())
                        {
@@ -262,7 +262,7 @@ class ModuleServicesAccount : public Module
                delete m2;
                delete m3;
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1,2,0,0,VF_COMMON|VF_VENDOR,API_VERSION);
index 2c724500ff925e517cc305fb72817c900370fcde..3aafda237d3123c5cbd35eca9418addd852324d8 100644 (file)
@@ -38,13 +38,13 @@ class ServProtectMode : public ModeHandler
 
 class ModuleServProtectMode : public Module
 {
-       
+
        ServProtectMode* bm;
  public:
        ModuleServProtectMode(InspIRCd* Me)
                : Module(Me)
        {
-               
+
                bm = new ServProtectMode(ServerInstance);
                if (!ServerInstance->Modes->AddMode(bm))
                        throw ModuleException("Could not add new modes!");
@@ -52,13 +52,13 @@ class ModuleServProtectMode : public Module
                ServerInstance->Modules->Attach(eventlist, this, 4);
        }
 
-       
+
        virtual ~ModuleServProtectMode()
        {
                ServerInstance->Modes->DelMode(bm);
                delete bm;
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1,2,0,0,VF_COMMON,API_VERSION);
index ba2cc4f45d8e3184a045bbb5c55bd5461c5c3269..b84f11acf5bcd350c9e41418d269b1c9f450ae88 100644 (file)
@@ -69,7 +69,7 @@ class ModuleSetHost : public Module
  public:
        ModuleSetHost(InspIRCd* Me)
                : Module(Me)
-       {       
+       {
                OnRehash(NULL,"");
                mycommand = new CommandSethost(ServerInstance, hostmap);
                ServerInstance->AddCommand(mycommand);
@@ -94,12 +94,12 @@ class ModuleSetHost : public Module
        virtual ~ModuleSetHost()
        {
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1, 2, 0, 1, VF_COMMON | VF_VENDOR, API_VERSION);
        }
-       
+
 };
 
 MODULE_INIT(ModuleSetHost)
index 6577ebbb392271ad2d0e5aa9e38009b819a7226f..c910dfe920849a964df4036e01d387a315492f3d 100644 (file)
@@ -34,19 +34,19 @@ class CommandSetident : public Command
                        user->WriteServ("NOTICE %s :*** SETIDENT: Ident must be specified", user->nick.c_str());
                        return CMD_FAILURE;
                }
-               
+
                if (parameters[0].size() > ServerInstance->Config->Limits.IdentMax)
                {
                        user->WriteServ("NOTICE %s :*** SETIDENT: Ident is too long", user->nick.c_str());
                        return CMD_FAILURE;
                }
-               
+
                if (!ServerInstance->IsIdent(parameters[0].c_str()))
                {
                        user->WriteServ("NOTICE %s :*** SETIDENT: Invalid characters in ident", user->nick.c_str());
                        return CMD_FAILURE;
                }
-               
+
                user->ChangeIdent(parameters[0].c_str());
                ServerInstance->SNO->WriteToSnoMask('A', "%s used SETIDENT to change their ident to '%s'", user->nick.c_str(), user->ident.c_str());
 
@@ -58,25 +58,25 @@ class CommandSetident : public Command
 class ModuleSetIdent : public Module
 {
        CommandSetident*        mycommand;
-       
+
  public:
        ModuleSetIdent(InspIRCd* Me) : Module(Me)
        {
-               
+
                mycommand = new CommandSetident(ServerInstance);
                ServerInstance->AddCommand(mycommand);
 
        }
-       
+
        virtual ~ModuleSetIdent()
        {
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1, 2, 0, 0, VF_COMMON | VF_VENDOR, API_VERSION);
        }
-       
+
 };
 
 
index 89e8c9a1798fdd9d39bd4141f54075e325bb95e8..b6da3529cd17d327fac4ccad38e667ed50b96b18 100644 (file)
@@ -54,16 +54,16 @@ class ModuleSetIdle : public Module
        ModuleSetIdle(InspIRCd* Me)
                : Module(Me)
        {
-               
+
                mycommand = new CommandSetidle(ServerInstance);
                ServerInstance->AddCommand(mycommand);
 
        }
-       
+
        virtual ~ModuleSetIdle()
        {
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1, 2, 0, 0, VF_COMMON | VF_VENDOR, API_VERSION);
index 8c35c2be24bc65368738ae5cb703a0d2c12b261c..4df0a2c5ca4e6c777854c9933491d9929368a76c 100644 (file)
@@ -34,13 +34,13 @@ class CommandSetname : public Command
                        user->WriteServ("NOTICE %s :*** SETNAME: GECOS must be specified", user->nick.c_str());
                        return CMD_FAILURE;
                }
-               
+
                if (parameters[0].size() > ServerInstance->Config->Limits.MaxGecos)
                {
                        user->WriteServ("NOTICE %s :*** SETNAME: GECOS too long", user->nick.c_str());
                        return CMD_FAILURE;
                }
-               
+
                if (user->ChangeName(parameters[0].c_str()))
                {
                        ServerInstance->SNO->WriteToSnoMask('A', "%s used SETNAME to change their GECOS to %s", user->nick.c_str(), parameters[0].c_str());
@@ -59,21 +59,21 @@ class ModuleSetName : public Module
        ModuleSetName(InspIRCd* Me)
                : Module(Me)
        {
-               
+
                mycommand = new CommandSetname(ServerInstance);
                ServerInstance->AddCommand(mycommand);
 
        }
-       
+
        virtual ~ModuleSetName()
        {
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1, 2, 0, 1, VF_COMMON | VF_VENDOR, API_VERSION);
        }
-       
+
 };
 
 MODULE_INIT(ModuleSetName)
index aee1cb12a8ec43298489b81257d257bdfea75903..e79aa4ab069fb72ec99fecf4b9d6b31642e3fc0d 100644 (file)
@@ -159,7 +159,7 @@ class ModuleSHA256 : public Module
                {
                        int j;
                        sub_block = message + ((i - 1) << 6);
-       
+
                        for (j = 0; j < 16; j++)
                                PACK32(&sub_block[j << 2], &w[j]);
                        for (j = 16; j < 64; j++)
@@ -183,7 +183,7 @@ class ModuleSHA256 : public Module
                                ctx->h[j] += wv[j];
                }
        }
-       
+
        void SHA256Update(SHA256Context *ctx, unsigned char *message, unsigned int len)
        {
                /*
@@ -205,7 +205,7 @@ class ModuleSHA256 : public Module
                unsigned int tmp_len = SHA256_BLOCK_SIZE - ctx->len;
                unsigned int rem_len = len < tmp_len ? len : tmp_len;
 
-               
+
                memcpy(&ctx->block[ctx->len], message, rem_len);
                if (ctx->len + len < SHA256_BLOCK_SIZE)
                {
@@ -222,7 +222,7 @@ class ModuleSHA256 : public Module
                ctx->len = rem_len;
                ctx->tot_len += (block_nb + 1) << 6;
        }
-       
+
        void SHA256Final(SHA256Context *ctx, unsigned char *digest)
        {
                unsigned int block_nb = (1 + ((SHA256_BLOCK_SIZE - 9) < (ctx->len % SHA256_BLOCK_SIZE)));
@@ -235,7 +235,7 @@ class ModuleSHA256 : public Module
                for (int i = 0 ; i < 8; i++)
                        UNPACK32(ctx->h[i], &digest[i << 2]);
        }
-       
+
        void SHA256(const char *src, char *dest, int len, const char* hxc, const unsigned int* ikey = NULL)
        {
                // Generate the hash
index a66ea2f9806d4438395b132c727bf72419b1c8e3..05f70b4c4063457b62f43116903c2b1ec2085c04 100644 (file)
@@ -51,14 +51,14 @@ class SeeWhois : public ModeHandler
 
 class ModuleShowwhois : public Module
 {
-       
+
        SeeWhois* sw;
 
  public:
 
        ModuleShowwhois(InspIRCd* Me) : Module(Me)
        {
-               
+
                sw = new SeeWhois(ServerInstance);
                if (!ServerInstance->Modes->AddMode(sw))
                        throw ModuleException("Could not add new modes!");
index cd777340a4058a8d225a0761786472ece1d5f40a..56d4be808e5e66206e00fee02de18b26fd5dbd87 100644 (file)
@@ -174,9 +174,9 @@ class ModuleShun : public Module
        virtual int OnStats(char symbol, User* user, string_list& out)
        {
                // XXX write me
-//format << Srv->Config->ServerName << " 223 " << user->nick << " :" << iter->banmask << " " << iter->set_on << " " << iter->length << " " << 
-//iter->set_by << " " << iter->reason; 
-               
+//format << Srv->Config->ServerName << " 223 " << user->nick << " :" << iter->banmask << " " << iter->set_on << " " << iter->length << " " <<
+//iter->set_by << " " << iter->reason;
+
                return 0;
        }
 
index 310f2d95aa2f16e48bee1d40e491783dd1a54f77..cdd968212395a9852e0aa007e54b28ad6ed20723 100644 (file)
@@ -72,16 +72,16 @@ class CommandSVSSilence : public Command
                 */
                if (!ServerInstance->ULine(user->server))
                        return CMD_FAILURE;
-                       
+
                User *u = ServerInstance->FindNick(parameters[0]);
                if (!u)
                        return CMD_FAILURE;
-                       
+
                if (IS_LOCAL(u))
                {
                        ServerInstance->Parser->CallHandler("SILENCE", std::vector<std::string>(++parameters.begin(), parameters.end()), u);
                }
-               
+
                return CMD_SUCCESS;
        }
 };
@@ -129,13 +129,13 @@ class CommandSilence : public Command
                        if (parameters.size() > 1) {
                                pattern = CompilePattern(parameters[1].c_str());
                        }
-                       
+
                        if (!mask.length())
                        {
                                // 'SILENCE +' or 'SILENCE -', assume *!*@*
                                mask = "*!*@*";
                        }
-                       
+
                        ModeParser::CleanMask(mask);
 
                        if (action == '-')
@@ -219,7 +219,7 @@ class CommandSilence : public Command
                                case 'c':
                                        p |= SILENCE_CHANNEL;
                                        break;
-                               case 'i': 
+                               case 'i':
                                        p |= SILENCE_INVITE;
                                        break;
                                case 'n':
@@ -271,7 +271,7 @@ class ModuleSilence : public Module
        CommandSVSSilence *cmdsvssilence;
        unsigned int maxsilence;
  public:
+
        ModuleSilence(InspIRCd* Me)
                : Module(Me), maxsilence(32)
        {
@@ -401,7 +401,7 @@ class ModuleSilence : public Module
        virtual ~ModuleSilence()
        {
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1, 2, 0, 1, VF_COMMON | VF_VENDOR, API_VERSION);
index b7f2ad42062d902e1d3db26a58c376be0b00c2b1..b9bca310952933d8672b7dd0ed574df58f957a0e 100644 (file)
@@ -66,7 +66,7 @@ bool TreeSocket::AddLine(const std::string &prefix, std::deque<std::string> &par
                User* u = Instance->FindNick(prefix);
                Utils->DoOneToAllButSender(prefix, "ADDLINE", params, u ? u->server : prefix);
                TreeServer *remoteserver = Utils->FindServer(u ? u->server : prefix);
-       
+
                if (!remoteserver->bursting)
                {
                        Instance->XLines->ApplyLines();
index 9a45b8131a8e9d3a0456a33596e1fadaa0e4a938..8037907d07249b9cc6bc251eefe41136aed8b3a1 100644 (file)
@@ -188,7 +188,7 @@ bool TreeSocket::Capab(const std::deque<std::string> &params)
 
                if (((this->CapKeys.find("HALFOP") == this->CapKeys.end()) && (Instance->Config->AllowHalfop)) || ((this->CapKeys.find("HALFOP") != this->CapKeys.end()) && (this->CapKeys.find("HALFOP")->second != ConvToStr(Instance->Config->AllowHalfop))))
                        reason = "We don't both have halfop support enabled/disabled identically";
-       
+
                /* 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->Modules->Find("m_sha256.so")))
index 1b8630f66d47a0bdfb8751aa93e22a3cdcef54bc..e8c398f6be204740dce1c16eeab63c2a193d7420 100644 (file)
@@ -32,7 +32,7 @@ bool TreeSocket::DelLine(const std::string &prefix, std::deque<std::string> &par
        if (user)
                setter = user->nick;
        else
-        {
+       {
                TreeServer* t = Utils->FindServer(prefix);
                if (t)
                        setter = t->GetName().c_str();
index 33f92235acfd3b65669720cd91222aa2eb12982f..b891443ea1d1404a0606f83d1c2e3afe3c83e989 100644 (file)
@@ -73,7 +73,7 @@ bool TreeSocket::ForceJoin(const std::string &source, std::deque<std::string> &p
 
        if (params.size() > 3)
                params[params.size() - 1] = ":" + params[params.size() - 1];
-               
+
        Utils->DoOneToAllButSender(source,"FJOIN",params,source);
 
        if (!TS)
@@ -151,7 +151,7 @@ bool TreeSocket::ForceJoin(const std::string &source, std::deque<std::string> &p
 
                        /* Advance past the comma, to the nick */
                        usr++;
-                       
+
                        /* Check the user actually exists */
                        who = this->Instance->FindUUID(usr);
                        if (who)
@@ -233,4 +233,4 @@ bool TreeSocket::RemoveStatus(const std::string &prefix, std::deque<std::string>
        }
        return true;
 }
+
index 4ad6658b8f5d38fee1491f8b35af56fa3336cfc5..564bef7969f0c46683499666599228a313525bf7 100644 (file)
@@ -145,4 +145,4 @@ bool TreeSocket::ComparePass(const std::string &ours, const std::string &theirs)
        else
                /* Straight string compare of plaintext */
                return ours == theirs;
-}  
+}
index 3fca0a0cb6fec9cce4b0de0f078e1833ef6fb23b..b8413942d058c5314ff858e51df616dc4798ddbe 100644 (file)
@@ -24,7 +24,7 @@
 
 
 bool TreeSocket::RemoteKill(const std::string &prefix, std::deque<std::string> &params)
-{       
+{
        if (params.size() != 2)
                return true;
 
@@ -32,7 +32,7 @@ bool TreeSocket::RemoteKill(const std::string &prefix, std::deque<std::string> &
 
        if (who)
        {
-               /* Prepend kill source, if we don't have one */          
+               /* Prepend kill source, if we don't have one */
                if (*(params[1].c_str()) != '[')
                {
                        params[1] = "[" + prefix + "] Killed (" + params[1] +")";
index b91d76836edaef9ebabb006ecb800f9681dcdcd1..9688cfb7dab10414fae80ce25c72ee34a5d3da86 100644 (file)
@@ -155,10 +155,10 @@ void ModuleSpanningTree::HandleLusers(const std::vector<std::string>& parameters
 
        if (ServerInstance->Users->UnregisteredUserCount())
                user->WriteNumeric(253, "%s %d :unknown connections",user->nick.c_str(),ServerInstance->Users->UnregisteredUserCount());
-       
+
        if (ServerInstance->ChannelCount())
                user->WriteNumeric(254, "%s %ld :channels formed",user->nick.c_str(),ServerInstance->ChannelCount());
-       
+
        user->WriteNumeric(255, "%s :I have %d clients and %d servers",user->nick.c_str(),ServerInstance->Users->LocalUserCount(),ulined_local_count ? this->CountLocalServs() - ulined_local_count : this->CountLocalServs());
        user->WriteNumeric(265, "%s :Current Local Users: %d  Max: %d",user->nick.c_str(),ServerInstance->Users->LocalUserCount(),max_local);
        user->WriteNumeric(266, "%s :Current Global Users: %d  Max: %d",user->nick.c_str(),n_users,max_global);
@@ -221,7 +221,7 @@ void ModuleSpanningTree::DoPingChecks(time_t curtime)
                                        // ... if we can find a proper route to them
                                        if (tsock)
                                        {
-                                               tsock->WriteLine(std::string(":") + ServerInstance->Config->GetSID() + " PING " + 
+                                               tsock->WriteLine(std::string(":") + ServerInstance->Config->GetSID() + " PING " +
                                                                ServerInstance->Config->GetSID() + " " + s->GetID());
                                                s->LastPingMsec = ts;
                                        }
@@ -394,10 +394,10 @@ void ModuleSpanningTree::RemoteMessage(User* user, const char* format, ...)
                else
                        ServerInstance->PI->SendUserNotice(user, text);
        }
-       
+
        SendingRemoteMessage = false;
 }
-       
+
 int ModuleSpanningTree::HandleConnect(const std::vector<std::string>& parameters, User* user)
 {
        for (std::vector<Link>::iterator x = Utils->LinkBlocks.begin(); x < Utils->LinkBlocks.end(); x++)
@@ -731,7 +731,7 @@ void ModuleSpanningTree::OnAddLine(User* user, XLine *x)
                return;
 
        char data[MAXBUF];
-       snprintf(data,MAXBUF,"%s %s %s %lu %lu :%s", x->type.c_str(), x->Displayable(), 
+       snprintf(data,MAXBUF,"%s %s %s %lu %lu :%s", x->type.c_str(), x->Displayable(),
        ServerInstance->Config->ServerName, (unsigned long)x->set_time, (unsigned long)x->duration, x->reason);
        std::deque<std::string> params;
        params.push_back(data);
index 793a3cf9a8d2b8cbacce53ed656c07c8d8ad2ef6..2e7aab25fc5f5903a63cb0a7bb38393b83d00fdf 100644 (file)
@@ -132,7 +132,7 @@ void TreeSocket::SendFJoins(TreeServer* Current, Channel* c)
                {
                        modes.append("b");
                        params.append(" ").append(b->data);
-                       linesize += size; 
+                       linesize += size;
                }
                if ((params.length() >= Instance->Config->Limits.MaxModes) || (currsize > 350))
                {
index a33b77da412f8e0b8e6d4851692dc89b9a6604ab..5531f9c0ee367b53948e72550fb15ce40be30b65 100644 (file)
@@ -35,15 +35,15 @@ int TreeSocket::DoCollision(User *u, time_t remotets, const std::string &remotei
         * These days, we have UID. And, so what we do is, force nick change client(s)
         * involved according to timestamp rules.
         *
-        * RULES:        
-        *  user@ip equal:       
-        *   Force nick change on OLDER timestamped client       
-        *  user@ip differ:      
-        *   Force nick change on NEWER timestamped client       
-        *  TS EQUAL:    
-        *   FNC both.   
-        *       
-        * This stops abusive use of collisions, simplifies problems with loops, and so on.      
+        * RULES:
+        *  user@ip equal:
+        *   Force nick change on OLDER timestamped client
+        *  user@ip differ:
+        *   Force nick change on NEWER timestamped client
+        *  TS EQUAL:
+        *   FNC both.
+        *
+        * This stops abusive use of collisions, simplifies problems with loops, and so on.
         *   -- w00t
         */
        bool bChangeLocal = true;
index 2122a3a243a4742d8032d3481b70e0839f782cc9..a15cba93c2c69e2c8a18f81e877516368f688a80 100644 (file)
  */
 
 /* $ModDesc: Provides a spanning tree server link protocol */
-               
+
 #include "inspircd.h"
 #include "commands/cmd_whois.h"
 #include "commands/cmd_stats.h"
 #include "socket.h"
 #include "wildcard.h"
-#include "xline.h"      
-#include "transport.h"  
-                       
+#include "xline.h"
+#include "transport.h"
+
 #include "m_spanningtree/timesynctimer.h"
 #include "m_spanningtree/resolvers.h"
 #include "m_spanningtree/main.h"
index 01423b60a2a57b57c05b3f27106e0e4ee749b8e9..229997e5b8fc9985cf6cd50a965ea99751ce1353 100644 (file)
@@ -12,7 +12,7 @@
  */
 
 /* $ModDesc: Provides a spanning tree server link protocol */
-               
+
 #include "inspircd.h"
 #include "wildcard.h"
 
@@ -28,19 +28,19 @@ const std::string ModuleSpanningTree::MapOperInfo(TreeServer* Current)
        time_t secs_up = ServerInstance->Time() - Current->age;
        return (" [Up: " + TimeToStr(secs_up) + " Lag: " + (Current->rtt == 0 ? "<1" : ConvToStr(Current->rtt)) + "ms]");
 }
-               
+
 // WARNING: NOT THREAD SAFE - DONT GET ANY SMART IDEAS.
 void ModuleSpanningTree::ShowMap(TreeServer* Current, User* user, int depth, char matrix[128][128], float &totusers, float &totservers)
 {
        ServerInstance->Logs->Log("map",DEBUG,"ShowMap depth %d totusers %0.2f totservers %0.2f", depth, totusers, totservers);
        if (line < 128)
-       {              
+       {
                for (int t = 0; t < depth; t++)
                {
                        ServerInstance->Logs->Log("map",DEBUG,"Zero to depth");
                        matrix[line][t] = ' ';
                }
-       
+
                // For Aligning, we need to work out exactly how deep this thing is, and produce
                // a 'Spacer' String to compensate.
                char spacer[40];
@@ -51,7 +51,7 @@ void ModuleSpanningTree::ShowMap(TreeServer* Current, User* user, int depth, cha
                else
                {
                        spacer[5] = '\0';
-               }       
+               }
 
                float percent;
                char text[128];
index 0a1dd2d3d3218dfad079c45ac72dd4bbf1e0cd0d..b06634a4d775829b30848759c258a4aa23b3ef6a 100644 (file)
  */
 
 /* $ModDesc: Provides a spanning tree server link protocol */
-               
+
 #include "inspircd.h"
 #include "commands/cmd_whois.h"
 #include "commands/cmd_stats.h"
 #include "socket.h"
 #include "wildcard.h"
-#include "xline.h"      
-#include "transport.h"  
-                       
+#include "xline.h"
+#include "transport.h"
+
 #include "m_spanningtree/timesynctimer.h"
 #include "m_spanningtree/resolvers.h"
 #include "m_spanningtree/main.h"
index 3a1182973a2837df17eb7f385c6df7bcf9a503c1..b312769c7fb4c374e6cd6cb4eb8f0e0b6b9cbf8b 100644 (file)
  */
 
 /* $ModDesc: Provides a spanning tree server link protocol */
-               
+
 #include "inspircd.h"
 #include "commands/cmd_whois.h"
 #include "commands/cmd_stats.h"
 #include "socket.h"
 #include "wildcard.h"
-#include "xline.h"      
-#include "transport.h"  
-                       
+#include "xline.h"
+#include "transport.h"
+
 #include "m_spanningtree/timesynctimer.h"
 #include "m_spanningtree/resolvers.h"
 #include "m_spanningtree/main.h"
index 02833464fd9891abc9e3fb111c564a775e31e29f..cacbc51a6bfa0fb4f63aa6e7cbd3222594f7719d 100644 (file)
  */
 
 /* $ModDesc: Provides a spanning tree server link protocol */
-               
+
 #include "inspircd.h"
 #include "commands/cmd_whois.h"
 #include "commands/cmd_stats.h"
 #include "socket.h"
 #include "wildcard.h"
-#include "xline.h"      
-#include "transport.h"  
+#include "xline.h"
+#include "transport.h"
 
 #include "m_spanningtree/timesynctimer.h"
 #include "m_spanningtree/resolvers.h"
index ab50f765642e0d456f297330370271d466bd3dc0..6c66e2d2bb989da13dd0fde1c18592d1f24ef16a 100644 (file)
  */
 
 /* $ModDesc: Provides a spanning tree server link protocol */
-               
+
 #include "inspircd.h"
 #include "commands/cmd_whois.h"
 #include "commands/cmd_stats.h"
 #include "socket.h"
 #include "wildcard.h"
-#include "xline.h"      
-#include "transport.h"  
-                       
+#include "xline.h"
+#include "transport.h"
+
 #include "m_spanningtree/timesynctimer.h"
 #include "m_spanningtree/resolvers.h"
 #include "m_spanningtree/main.h"
@@ -30,7 +30,7 @@
 #include "m_spanningtree/treesocket.h"
 #include "m_spanningtree/rconnect.h"
 #include "m_spanningtree/rsquit.h"
-       
+
 /* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h m_spanningtree/rconnect.h m_spanningtree/rsquit.h */
 
 int ModuleSpanningTree::HandleStats(const std::vector<std::string>& parameters, User* user)
index b0a37b7bede35d774f422f6095a4afd7fa02b131..0f6a1bef642400de65c72c4f4bb17b391222b74b 100644 (file)
  */
 
 /* $ModDesc: Provides a spanning tree server link protocol */
-               
+
 #include "inspircd.h"
 #include "commands/cmd_whois.h"
 #include "commands/cmd_stats.h"
 #include "socket.h"
 #include "wildcard.h"
-#include "xline.h"      
-#include "transport.h"  
-                       
+#include "xline.h"
+#include "transport.h"
+
 #include "m_spanningtree/timesynctimer.h"
 #include "m_spanningtree/resolvers.h"
 #include "m_spanningtree/main.h"
@@ -30,7 +30,7 @@
 #include "m_spanningtree/treesocket.h"
 #include "m_spanningtree/rconnect.h"
 #include "m_spanningtree/rsquit.h"
-       
+
 /* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h m_spanningtree/rconnect.h m_spanningtree/rsquit.h */
 
 int ModuleSpanningTree::HandleTime(const std::vector<std::string>& parameters, User* user)
@@ -43,7 +43,7 @@ int ModuleSpanningTree::HandleTime(const std::vector<std::string>& parameters, U
                        // we dont' override for local server
                        if (found == Utils->TreeRoot)
                                return 0;
-                       
+
                        std::deque<std::string> params;
                        params.push_back(found->GetName());
                        params.push_back(user->uuid);
index 5d9705a87f73f3691740d3b29122acc6bdbb2fb9..a957ee1748d36e9c6922aa6beefa94bbc3d103fc 100644 (file)
  */
 
 /* $ModDesc: Provides a spanning tree server link protocol */
-               
+
 #include "inspircd.h"
 #include "commands/cmd_whois.h"
 #include "commands/cmd_stats.h"
 #include "socket.h"
 #include "wildcard.h"
-#include "xline.h"      
-#include "transport.h"  
-                       
+#include "xline.h"
+#include "transport.h"
+
 #include "m_spanningtree/timesynctimer.h"
 #include "m_spanningtree/resolvers.h"
 #include "m_spanningtree/main.h"
@@ -30,7 +30,7 @@
 #include "m_spanningtree/treesocket.h"
 #include "m_spanningtree/rconnect.h"
 #include "m_spanningtree/rsquit.h"
-       
+
 /* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h m_spanningtree/rconnect.h m_spanningtree/rsquit.h */
 
 int ModuleSpanningTree::HandleRemoteWhois(const std::vector<std::string>& parameters, User* user)
index c485afe5923dc44a4c0a44cc00e69e0ebe5db654..d63fff686273eb688ca36c992197d99cfe03e88e 100644 (file)
  */
 
 /* $ModDesc: Provides a spanning tree server link protocol */
-               
+
 #include "inspircd.h"
 #include "commands/cmd_whois.h"
 #include "commands/cmd_stats.h"
 #include "socket.h"
 #include "wildcard.h"
-#include "xline.h"      
-#include "transport.h"  
-                       
+#include "xline.h"
+#include "transport.h"
+
 #include "m_spanningtree/timesynctimer.h"
 #include "m_spanningtree/resolvers.h"
 #include "m_spanningtree/main.h"
@@ -68,7 +68,7 @@ void ModuleSpanningTree::OnPostCommand(const std::string &command, const std::ve
 
                        ServerInstance->Logs->Log("m_spanningtree",DEBUG,"TRANSLATION: %s - type is %d", parameters[j].c_str(), translate_to);
                        ServerInstance->Parser->TranslateUIDs(translate_to, parameters[j], target);
-                       
+
                        if (j == (parameters.size() - 1))
                                params.push_back(":" + target);
                        else
index e27de1dbd5a9a7a47eb6120930c0eba3fb952ea3..631a205579bf161bbc8be5f046b6f3e5622a275f 100644 (file)
  */
 
 /* $ModDesc: Provides a spanning tree server link protocol */
-               
+
 #include "inspircd.h"
 #include "commands/cmd_whois.h"
 #include "commands/cmd_stats.h"
 #include "socket.h"
 #include "wildcard.h"
-#include "xline.h"      
-#include "transport.h"  
-                       
+#include "xline.h"
+#include "transport.h"
+
 #include "m_spanningtree/timesynctimer.h"
 #include "m_spanningtree/resolvers.h"
 #include "m_spanningtree/main.h"
index cd49001a5a8a911ba1c5e2c1d713d1d6a68a7027..a685900480e34ff42792961f70f0de3d2473ae1f 100644 (file)
@@ -39,7 +39,7 @@ bool TreeSocket::ServerMessage(const std::string &messagetype, const std::string
                }
 
                Channel* channel = Instance->FindChan(target);
-               
+
                if (channel)
                {
                        if (messagetype == "PRIVMSG")
@@ -60,7 +60,7 @@ bool TreeSocket::ServerMessage(const std::string &messagetype, const std::string
                else
                {
                        User* user = Instance->FindNick(target);
-                       
+
                        if (user)
                        {
                                if (messagetype == "PRIVMSG")
index 26785fd39f6b58082f60978b5773f6e0bab6d8b5..5a6a9f301e731d67867dfcfc53b90209c8f2e4fd 100644 (file)
@@ -74,22 +74,22 @@ bool TreeSocket::ProcessLine(std::string &line)
        Instance->Logs->Log("m_spanningtree",DEBUG, "S[%d] I %s", this->GetFd(), line.c_str());
 
        this->Split(line.c_str(),params);
-       
+
        if (params.empty())
                return true;
-       
+
        if ((params[0][0] == ':') && (params.size() > 1))
        {
                prefix = params[0].substr(1);
                params.pop_front();
-               
+
                if (prefix.empty())
                {
                        this->SendError("BUG (?) Empty prefix recieved.");
                        return false;
                }
        }
-       
+
        command = params[0].c_str();
        params.pop_front();
 
@@ -313,8 +313,8 @@ bool TreeSocket::ProcessLine(std::string &line)
 
                        /*
                         * Now, check for (and parse) commands as appropriate. -- w
-                        */     
-               
+                        */
+
                        /* Find the server that this command originated from, used in the handlers below */
                        TreeServer *ServerSource = Utils->FindServer(prefix);
 
@@ -501,7 +501,7 @@ bool TreeSocket::ProcessLine(std::string &line)
                                        this->Instance->SNO->WriteToSnoMask('l', "WTF: Got BURST from a nonexistant server(?): %s", (ServerSource ? ServerSource->GetName().c_str() : prefix.c_str()));
                                        return false;
                                }
-                               
+
                                ServerSource->bursting = true;
                                return Utils->DoOneToAllButSenderRaw(line, sourceserv, prefix, command, params);
                        }
@@ -512,7 +512,7 @@ bool TreeSocket::ProcessLine(std::string &line)
                                        this->Instance->SNO->WriteToSnoMask('l', "WTF: Got ENDBURST from a nonexistant server(?): %s", (ServerSource ? ServerSource->GetName().c_str() : prefix.c_str()));
                                        return false;
                                }
-                               
+
                                ServerSource->FinishBurst();
                                return Utils->DoOneToAllButSenderRaw(line, sourceserv, prefix, command, params);
                        }
@@ -534,10 +534,10 @@ bool TreeSocket::ProcessLine(std::string &line)
                                                return false;
                                        }
                                }
-                                       
+
                                // Insert into the parser
                                this->Instance->SendMode(modelist, this->Instance->FakeClient);
-                               
+
                                // Pass out to the network
                                return Utils->DoOneToAllButSenderRaw(line,sourceserv,prefix,command,params);
                        }
@@ -587,7 +587,7 @@ bool TreeSocket::ProcessLine(std::string &line)
                                                }
                                        }
                                }
-                                       
+
                                // its a user
                                std::vector<std::string> strparams(params.begin(), params.end());
 
@@ -664,7 +664,7 @@ void TreeSocket::OnClose()
        if (!quitserver.empty())
        {
                Utils->Creator->RemoteMessage(NULL,"Connection to '\2%s\2' failed.",quitserver.c_str());
-               time_t server_uptime = Instance->Time() - this->age;    
+               time_t server_uptime = Instance->Time() - this->age;
                if (server_uptime)
                        Utils->Creator->RemoteMessage(NULL,"Connection to '\2%s\2' was established for %s", quitserver.c_str(), Utils->Creator->TimeToStr(server_uptime).c_str());
        }
index f36d2b05cc0f971d8f43b700fd3659cf4fd2c664..32255b576981bac7d0fb8b7871ffd34377f8afbe 100644 (file)
@@ -137,10 +137,10 @@ bool TreeSocket::ParseUID(const std::string &source, std::deque<std::string> &pa
        Instance->Users->AddGlobalClone(_new);
 
        bool dosend = true;
-       
+
        if ((this->Utils->quiet_bursts && remoteserver->bursting) || this->Instance->SilentULine(_new->server))
                dosend = false;
-       
+
        if (dosend)
                this->Instance->SNO->WriteToSnoMask('C',"Client connecting at %s: %s!%s@%s [%s] [%s]", _new->server, _new->nick.c_str(), _new->ident.c_str(), _new->host.c_str(), _new->GetIPString(), _new->fullname.c_str());
 
index b5f0cde6a5bbc1dcb29c163aea591dbec3e71c7f..c43cee9566676abe0e7030a73f25ea27a2f73504 100644 (file)
@@ -33,17 +33,17 @@ class ModuleSpy : public Module
                return 0;
        }
 
-       void Prioritize()       
-       {                      
+       void Prioritize()
+       {
                /* To ensure that we get priority over namesx and delayjoin for names list generation */
                Module* list[] = { ServerInstance->Modules->Find("m_namesx.so"), ServerInstance->Modules->Find("m_delayjoin.so") };
                ServerInstance->Modules->SetPriority(this, I_OnUserList, PRIO_BEFORE, list, 2);
        }
-       
+
        virtual ~ModuleSpy()
        {
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1, 2, 0, 0, VF_VENDOR, API_VERSION);
index 143e1199d7e5b6b5982d4d1061e2dd68761193db..5a8a0e884a509185d94b7a81621c995a9d6744f5 100644 (file)
 
 class ModuleSSLDummy : public Module
 {
-       
+
        char* dummy;
  public:
-       
+
        ModuleSSLDummy(InspIRCd* Me)    : Module(Me)
        {
-               
+
                Implementation eventlist[] = { I_OnSyncUserMetaData, I_OnDecodeMetaData, I_OnWhois };
                ServerInstance->Modules->Attach(eventlist, this, 3);
        }
-       
+
        virtual ~ModuleSSLDummy()
        {
        }
-               
+
        virtual Version GetVersion()
        {
                return Version(1, 0, 0, 0, VF_VENDOR, API_VERSION);
@@ -46,7 +46,7 @@ class ModuleSSLDummy : public Module
                        ServerInstance->SendWhoisLine(source, dest, 320, "%s %s :is using a secure connection", source->nick.c_str(), dest->nick.c_str());
                }
        }
-       
+
        virtual void OnSyncUserMetaData(User* user, Module* proto, void* opaque, const std::string &extname, bool displayable)
        {
                // check if the linking module wants to know about OUR metadata
@@ -61,7 +61,7 @@ class ModuleSSLDummy : public Module
                        }
                }
        }
-       
+
        virtual void OnDecodeMetaData(int target_type, void* target, const std::string &extname, const std::string &extdata)
        {
                // check if its our metadata key, and its associated with a user
index 5a0298b41e2e086e9b894b53506ddbe201d37aff..f720e614788a4dcd30f094c5a97ffe2eea2a0d0e 100644 (file)
@@ -65,14 +65,14 @@ class SSLMode : public ModeHandler
 
 class ModuleSSLModes : public Module
 {
-       
+
        SSLMode* sslm;
-       
+
  public:
        ModuleSSLModes(InspIRCd* Me)
                : Module(Me)
        {
-               
+
 
                sslm = new SSLMode(ServerInstance);
                if (!ServerInstance->Modes->AddMode(sslm))
@@ -98,7 +98,7 @@ class ModuleSSLModes : public Module
                                return 1;
                        }
                }
-               
+
                return 0;
        }
 
@@ -107,7 +107,7 @@ class ModuleSSLModes : public Module
                ServerInstance->Modes->DelMode(sslm);
                delete sslm;
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1, 2, 0, 0, VF_COMMON | VF_VENDOR, API_VERSION);
index 420e2e6e293c1ad0413b86142b6dd2c7f1f82425..9fec3dcad9ad634271780bd1764581407e35d1ee 100644 (file)
@@ -37,7 +37,7 @@ class ModuleStripColor : public Module
        bool AllowChanOps;
        ChannelStripColor *csc;
        UserStripColor *usc;
+
  public:
        ModuleStripColor(InspIRCd* Me) : Module(Me)
        {
@@ -58,7 +58,7 @@ class ModuleStripColor : public Module
                delete usc;
                delete csc;
        }
-       
+
        virtual void ReplaceLine(std::string &sentence)
        {
                /* refactor this completely due to SQUIT bug since the old code would strip last char and replace with \0 --peavey */
@@ -78,7 +78,7 @@ class ModuleStripColor : public Module
                        }
                        else
                                seq = 0;
-                       
+
                        if (seq || ((*i == 2) || (*i == 15) || (*i == 22) || (*i == 21) || (*i == 31)))
                        {
                                if (i != sentence.begin())
@@ -131,17 +131,17 @@ class ModuleStripColor : public Module
 
                return 0;
        }
-       
+
        virtual int OnUserPreNotice(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list)
        {
                return OnUserPreMessage(user,dest,target_type,text,status,exempt_list);
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1, 2, 0, 0, VF_COMMON | VF_VENDOR, API_VERSION);
        }
-       
+
 };
 
 MODULE_INIT(ModuleStripColor)
index c1c7e84217beb6d96542a9903c3efeda795c6481..b90e452bfd6702f6aa02a6e2b3f66c3d71277221 100644 (file)
@@ -109,7 +109,7 @@ class CommandSvshold : public Command
                                // parameters[0] = w00t
                                // parameters[1] = 1h3m2s
                                // parameters[2] = Registered nickname
-                               
+
                                /* Already exists? */
                                if (HoldMap.find(parameters[0].c_str()) != HoldMap.end())
                                {
@@ -119,7 +119,7 @@ class CommandSvshold : public Command
 
                                unsigned long length = ServerInstance->Duration(parameters[1]);
                                std::string reason = (parameters.size() > 2) ? parameters[2] : "No reason supplied";
-                               
+
                                SVSHold* S = new SVSHold(parameters[0], user->nick, ServerInstance->Time(), length, reason);
                                SVSHolds.push_back(S);
                                HoldMap[parameters[0].c_str()] = S;
@@ -156,7 +156,7 @@ bool SVSHoldComp(const SVSHold* ban1, const SVSHold* ban2)
 class ModuleSVSHold : public Module
 {
        CommandSvshold *mycommand;
-       
+
 
  public:
        ModuleSVSHold(InspIRCd* Me) : Module(Me)
@@ -167,11 +167,11 @@ class ModuleSVSHold : public Module
                ServerInstance->Modules->Attach(eventlist, this, 4);
        }
 
-       
+
        virtual int OnStats(char symbol, User* user, string_list &results)
        {
                ExpireBans();
-       
+
                if(symbol == 'S')
                {
                        for(SVSHoldlist::iterator iter = SVSHolds.begin(); iter != SVSHolds.end(); iter++)
@@ -180,14 +180,14 @@ class ModuleSVSHold : public Module
                                results.push_back(std::string(ServerInstance->Config->ServerName)+" 210 "+user->nick+" "+(*iter)->nickname.c_str()+" "+(*iter)->set_by+" "+ConvToStr((*iter)->set_on)+" "+ConvToStr((*iter)->length)+" "+ConvToStr(remaining)+" :"+(*iter)->reason);
                        }
                }
-               
+
                return 0;
        }
 
        virtual int OnUserPreNick(User *user, const std::string &newnick)
        {
                ExpireBans();
-       
+
                /* check SVSHolds in here, and apply as necessary. */
                SVSHoldMap::iterator n = HoldMap.find(assign(newnick));
                if (n != HoldMap.end())
@@ -197,7 +197,7 @@ class ModuleSVSHold : public Module
                }
                return 0;
        }
-       
+
        virtual void OnSyncOtherMetaData(Module* proto, void* opaque, bool displayable)
        {
                for(SVSHoldMap::iterator iter = HoldMap.begin(); iter != HoldMap.end(); iter++)
@@ -227,7 +227,7 @@ class ModuleSVSHold : public Module
        virtual ~ModuleSVSHold()
        {
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1, 2, 0, 1, VF_COMMON | VF_VENDOR, API_VERSION);
@@ -235,9 +235,9 @@ class ModuleSVSHold : public Module
 
        std::string EncodeSVSHold(const SVSHold* ban)
        {
-               std::ostringstream stream;      
+               std::ostringstream stream;
                stream << ban->nickname << " " << ban->set_by << " " << ban->set_on << " " << ban->length << " :" << ban->reason;
-               return stream.str();    
+               return stream.str();
        }
 
        SVSHold* DecodeSVSHold(const std::string &data)
index c2ac8bef1563d8bd908fc7c6fd02cdc2f984cd9f..df959147ae4bd670cca8b951b3169e5cdeb8ab77 100644 (file)
@@ -19,7 +19,7 @@
  */
 class CommandSwhois : public Command
 {
-       
+
  public:
        CommandSwhois (InspIRCd* Instance) : Command(Instance,"SWHOIS","o",2)
        {
@@ -31,13 +31,13 @@ class CommandSwhois : public Command
        CmdResult Handle(const std::vector<std::string> &parameters, User* user)
        {
                User* dest = ServerInstance->FindNick(parameters[0]);
-               
+
                if (!dest)
                {
                        user->WriteNumeric(401, "%s %s :No such nick/channel", user->nick.c_str(), parameters[0].c_str());
                        return CMD_FAILURE;
                }
-               
+
                std::string* text;
                dest->GetExt("swhois", text);
 
@@ -47,7 +47,7 @@ class CommandSwhois : public Command
                        if (!ServerInstance->ULine(user->server))
                                // Ulines set SWHOISes silently
                                ServerInstance->SNO->WriteToSnoMask('A', "%s used SWHOIS to set %s's extra whois from '%s' to '%s'", user->nick.c_str(), dest->nick.c_str(), text->c_str(), parameters[0].c_str());
-                       
+
                        dest->Shrink("swhois");
                        delete text;
                }
@@ -56,7 +56,7 @@ class CommandSwhois : public Command
                        // Ulines set SWHOISes silently
                        ServerInstance->SNO->WriteToSnoMask('A', "%s used SWHOIS to set %s's extra whois to '%s'", user->nick.c_str(), dest->nick.c_str(), parameters[0].c_str());
                }
-               
+
                text = new std::string(parameters[0]);
                dest->Extend("swhois", text);
 
@@ -67,7 +67,7 @@ class CommandSwhois : public Command
                 * -- Brain
                 */
                ServerInstance->PI->SendMetaData(dest, TYPE_USER, "swhois", *text);
-               
+
                // If it's an empty swhois, unset it (not ideal, but ok)
                if (text->empty())
                {
@@ -83,13 +83,13 @@ class CommandSwhois : public Command
 class ModuleSWhois : public Module
 {
        CommandSwhois* mycommand;
-       
+
        ConfigReader* Conf;
-       
+
  public:
        ModuleSWhois(InspIRCd* Me) : Module(Me)
        {
-               
+
                Conf = new ConfigReader(ServerInstance);
                mycommand = new CommandSwhois(ServerInstance);
                ServerInstance->AddCommand(mycommand);
@@ -202,31 +202,31 @@ class ModuleSWhois : public Module
                        dest->Extend("swhois", text);
                }
        }
-       
+
        virtual void OnPostCommand(const std::string &command, const std::vector<std::string> &params, User *user, CmdResult result, const std::string &original_line)
        {
                if ((command != "OPER") || (result != CMD_SUCCESS))
                        return;
-               
+
                std::string swhois;
-               
+
                for (int i = 0; i < Conf->Enumerate("oper"); i++)
                {
                        std::string name = Conf->ReadValue("oper", "name", i);
-                       
+
                        if (name == params[0])
                        {
                                swhois = Conf->ReadValue("oper", "swhois", i);
                                break;
                        }
                }
-               
+
                if (!swhois.length())
                {
                        for (int i = 0; i < Conf->Enumerate("type"); i++)
                        {
                                std::string type = Conf->ReadValue("type", "name", i);
-                               
+
                                if (type == user->oper)
                                {
                                        swhois = Conf->ReadValue("type", "swhois", i);
@@ -241,10 +241,10 @@ class ModuleSWhois : public Module
                        user->Shrink("swhois");
                        delete old;
                }
-               
+
                if (!swhois.length())
                        return;
-               
+
                std::string *text = new std::string(swhois);
                user->Extend("swhois", text);
                ServerInstance->PI->SendMetaData(user, TYPE_USER, "swhois", *text);
@@ -254,7 +254,7 @@ class ModuleSWhois : public Module
        {
                delete Conf;
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1, 2, 0, 0, VF_COMMON | VF_VENDOR, API_VERSION);
index 4102737ac8fd2aa53e67da077139106dd2f38f29..516af20c3af0e2fbacbdd69a5c0c9d28dfef5252 100644 (file)
@@ -60,7 +60,7 @@ class ModuleTaxonomy : public Module
        ModuleTaxonomy(InspIRCd* Me)
                : Module(Me)
        {
-               
+
                // Create a new command
                newcommand = new CommandTaxonomy(ServerInstance, this, claimed);
                ServerInstance->AddCommand(newcommand);
index a2eda3112a46a5e900b814874195b06a3fe06272..dbf7fc07612d4977dfafea72cd662e59645544de 100644 (file)
@@ -113,14 +113,14 @@ class ModuleTimedBans : public Module
        ModuleTimedBans(InspIRCd* Me)
                : Module(Me)
        {
-               
+
                mycommand = new CommandTban(ServerInstance);
                ServerInstance->AddCommand(mycommand);
                TimedBanList.clear();
                Implementation eventlist[] = { I_OnDelBan, I_OnBackgroundTimer };
                ServerInstance->Modules->Attach(eventlist, this, 2);
        }
-       
+
        virtual ~ModuleTimedBans()
        {
                TimedBanList.clear();
@@ -183,7 +183,7 @@ class ModuleTimedBans : public Module
                        }
                }
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1, 2, 0, 0, VF_COMMON | VF_VENDOR, API_VERSION);
index 79f9dff3c9dc99c45eeddc3104b0b947ea0c4e82..31bd67e1716813641164aea6b451164f7e324a6f 100644 (file)
@@ -17,7 +17,7 @@
 /* $ModDesc: Provides /tline command used to test who a mask matches */
 
 /** Handle /TLINE
- */ 
+ */
 class CommandTline : public Command
 {
  public:
@@ -57,7 +57,7 @@ class CommandTline : public Command
                else
                        user->WriteServ( "NOTICE %s :*** TLINE: Counted %0.0f user(s). Matched '%s' against no user(s).", user->nick.c_str(), n_counted, parameters[0].c_str());
 
-               return CMD_LOCALONLY;                   
+               return CMD_LOCALONLY;
        }
 };
 
@@ -68,7 +68,7 @@ class ModuleTLine : public Module
        ModuleTLine(InspIRCd* Me)
                : Module(Me)
        {
-               
+
                newcommand = new CommandTline(ServerInstance);
                ServerInstance->AddCommand(newcommand);
 
@@ -78,7 +78,7 @@ class ModuleTLine : public Module
        virtual ~ModuleTLine()
        {
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1, 2, 0, 0, VF_VENDOR,API_VERSION);
index e2144febcf3d4baf5f2d17f13e57dda14fd31471..882acefc90488b7e8f0a39e6a49bbca5a1579045 100644 (file)
@@ -20,7 +20,7 @@ class ModuleUHNames : public Module
 {
        CUList nl;
  public:
-       
+
        ModuleUHNames(InspIRCd* Me)
                : Module(Me)
        {
index d87caea9d7ac3bf7488f4b6cdbf87287fdd1709d..1761f354c049cab08b2f915711642e6ff0dda594 100644 (file)
@@ -16,7 +16,7 @@
 #include "inspircd.h"
 
 /** Handle /UNINVITE
- */     
+ */
 class CommandUninvite : public Command
 {
  public:
@@ -31,9 +31,9 @@ class CommandUninvite : public Command
        {
                User* u = ServerInstance->FindNick(parameters[0]);
                Channel* c = ServerInstance->FindChan(parameters[1]);
-                        
+
                if ((!c) || (!u))
-               {       
+               {
                        if (!c)
                        {
                                user->WriteNumeric(401, "%s %s :No such nick/channel",user->nick.c_str(), parameters[1].c_str());
@@ -42,9 +42,9 @@ class CommandUninvite : public Command
                        {
                                user->WriteNumeric(401, "%s %s :No such nick/channel",user->nick.c_str(), parameters[0].c_str());
                        }
-                               
+
                        return CMD_FAILURE;
-               }       
+               }
 
                if (c->modes[CM_INVITEONLY])
                {
@@ -86,16 +86,16 @@ class ModuleUninvite : public Module
 
        ModuleUninvite(InspIRCd* Me) : Module(Me)
        {
-               
+
                mycommand = new CommandUninvite(ServerInstance);
                ServerInstance->AddCommand(mycommand);
 
        }
-       
+
        virtual ~ModuleUninvite()
        {
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1, 2, 0, 0, VF_VENDOR, API_VERSION);
index d7c5792e8f066262ed4f75a38d3d75524b2c3ebd..36d9014d93707fa8b8ef5f15645bb3a6cfac0ec3 100644 (file)
@@ -53,7 +53,7 @@ class ModuleUserIP : public Module
        ModuleUserIP(InspIRCd* Me)
                : Module(Me)
        {
-               
+
                mycommand = new CommandUserip(ServerInstance);
                ServerInstance->AddCommand(mycommand);
                Implementation eventlist[] = { I_On005Numeric };
@@ -65,16 +65,16 @@ class ModuleUserIP : public Module
        {
                output = output + std::string(" USERIP");
        }
-       
+
        virtual ~ModuleUserIP()
        {
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1,2,0,1,VF_VENDOR,API_VERSION);
        }
-       
+
 };
 
 MODULE_INIT(ModuleUserIP)
index ecc67b19e29d9c4f3537a07b8e10477616a0c988..406891740af2fc8e4a527dbcfa25b19b12c53849 100644 (file)
@@ -60,7 +60,7 @@ class ModuleVHost : public Module
  private:
 
        CommandVhost* mycommand;
-        
+
  public:
        ModuleVHost(InspIRCd* Me) : Module(Me)
        {
@@ -68,7 +68,7 @@ class ModuleVHost : public Module
                ServerInstance->AddCommand(mycommand);
 
        }
-       
+
        virtual ~ModuleVHost()
        {
        }
@@ -78,7 +78,7 @@ class ModuleVHost : public Module
        {
                return Version(1,2,0,1,VF_VENDOR,API_VERSION);
        }
-       
+
 };
 
 MODULE_INIT(ModuleVHost)
index 62949e48a12495060965c21a7663eaa14c288e12..bbda1f593faa73cf99ba958beead0719523ae851 100644 (file)
@@ -49,7 +49,7 @@
  *
  * KEY: Brain   --->  Watched by:  Boo, w00t, Om
  * KEY: Boo     --->  Watched by:  Brain, w00t
- * 
+ *
  * This is used when we want to tell all the users that are watching someone that
  * they are now available or no longer available. For example, if the hash was
  * populated as shown above, then when Brain signs on, messages are sent to Boo, w00t
@@ -114,16 +114,16 @@ class CommandSVSWatch : public Command
        {
                if (!ServerInstance->ULine(user->server))
                        return CMD_FAILURE;
-                       
+
                User *u = ServerInstance->FindNick(parameters[0]);
                if (!u)
                        return CMD_FAILURE;
-                       
+
                if (IS_LOCAL(u))
                {
                        ServerInstance->Parser->CallHandler("WATCH", parameters, u);
                }
-               
+
                return CMD_SUCCESS;
        }
 };
@@ -373,7 +373,7 @@ class Modulewatch : public Module
        CommandWatch* mycommand;
        CommandSVSWatch *sw;
        unsigned int maxwatch;
-       
+
  public:
        Modulewatch(InspIRCd* Me)
                : Module(Me), maxwatch(32)
@@ -457,7 +457,7 @@ class Modulewatch : public Module
                                                if (n != i2->second.end())
                                                        /* I'm no longer watching you... */
                                                        i2->second.erase(n);
-       
+
                                                if (!i2->second.size())
                                                        whos_watching_me->erase(user->nick.c_str());
                                }
@@ -545,19 +545,19 @@ class Modulewatch : public Module
                                }
                        }
                }
-       }       
+       }
 
        virtual void On005Numeric(std::string &output)
        {
                // we don't really have a limit...
                output = output + " WATCH=" + ConvToStr(maxwatch);
        }
-       
+
        virtual ~Modulewatch()
        {
                delete whos_watching_me;
        }
-       
+
        virtual Version GetVersion()
        {
                return Version(1, 2, 0, 0, VF_COMMON | VF_VENDOR, API_VERSION);
index fa4d67d59a03c0bfb55928ea396b8c1627c39da3..3255030e3fe19076917e6f4ca3bfb9dada670b9b 100644 (file)
@@ -235,7 +235,7 @@ class ModuleXLineDB : public Module
                return true;
        }
 
-       
+
 
        virtual Version GetVersion()
        {
index ea84851725798b46335da9aa53b280e4c624de15..0e29cb99347432d81a47007bdc15f9caba4e5ef4 100644 (file)
@@ -97,7 +97,7 @@ class ModuleXMLSocket : public Module
                }
        }
 
-        virtual void OnCleanup(int target_type, void* item)
+       virtual void OnCleanup(int target_type, void* item)
        {
                if(target_type == TYPE_USER)
                {