diff options
Diffstat (limited to 'src/modules/extra')
-rw-r--r-- | src/modules/extra/m_geoip.cpp | 4 | ||||
-rw-r--r-- | src/modules/extra/m_ldapauth.cpp | 12 | ||||
-rw-r--r-- | src/modules/extra/m_ldapoper.cpp | 6 | ||||
-rw-r--r-- | src/modules/extra/m_sqlauth.cpp | 12 | ||||
-rw-r--r-- | src/modules/extra/m_sqllog.cpp | 8 | ||||
-rw-r--r-- | src/modules/extra/m_sqloper.cpp | 6 | ||||
-rw-r--r-- | src/modules/extra/m_ziplink.cpp | 6 |
7 files changed, 27 insertions, 27 deletions
diff --git a/src/modules/extra/m_geoip.cpp b/src/modules/extra/m_geoip.cpp index 21a57a283..e04d5b963 100644 --- a/src/modules/extra/m_geoip.cpp +++ b/src/modules/extra/m_geoip.cpp @@ -63,7 +63,7 @@ class ModuleGeoIP : public Module } } - virtual int OnUserRegister(User* user) + virtual ModResult OnUserRegister(User* user) { /* only do lookups on local users */ if (IS_LOCAL(user)) @@ -81,7 +81,7 @@ class ModuleGeoIP : public Module ServerInstance->Users->QuitUser(user, "Could not identify your country of origin. Access denied."); } } - return 0; + return MOD_RES_PASSTHRU; } }; diff --git a/src/modules/extra/m_ldapauth.cpp b/src/modules/extra/m_ldapauth.cpp index 94c0df469..8ffccd863 100644 --- a/src/modules/extra/m_ldapauth.cpp +++ b/src/modules/extra/m_ldapauth.cpp @@ -111,20 +111,20 @@ public: return true; } - virtual int OnUserRegister(User* user) + virtual ModResult OnUserRegister(User* user) { if ((!allowpattern.empty()) && (InspIRCd::Match(user->nick,allowpattern))) { user->Extend("ldapauthed"); - return 0; + return MOD_RES_PASSTHRU; } if (!CheckCredentials(user)) { ServerInstance->Users->QuitUser(user, killreason); - return 1; + return MOD_RES_DENY; } - return 0; + return MOD_RES_PASSTHRU; } bool CheckCredentials(User* user) @@ -217,9 +217,9 @@ public: user->Shrink("ldapauth_failed"); } - virtual bool OnCheckReady(User* user) + virtual ModResult OnCheckReady(User* user) { - return user->GetExt("ldapauthed"); + return user->GetExt("ldapauthed") ? MOD_RES_PASSTHRU : MOD_RES_DENY; } virtual Version GetVersion() diff --git a/src/modules/extra/m_ldapoper.cpp b/src/modules/extra/m_ldapoper.cpp index f99b80db3..46b6cbcb2 100644 --- a/src/modules/extra/m_ldapoper.cpp +++ b/src/modules/extra/m_ldapoper.cpp @@ -97,7 +97,7 @@ public: return true; } - virtual int OnPassCompare(Extensible* ex, const std::string &data, const std::string &input, const std::string &hashtype) + virtual ModResult OnPassCompare(Extensible* ex, const std::string &data, const std::string &input, const std::string &hashtype) { User* user = dynamic_cast<User*>(ex); if (hashtype == "ldap") @@ -105,11 +105,11 @@ public: if (LookupOper(user, data, input)) { /* This is an ldap oper and has been found, claim the OPER command */ - return 1; + return MOD_RES_DENY; } } /* We don't know this oper! */ - return 0; + return MOD_RES_PASSTHRU; } bool LookupOper(User* user, const std::string &what, const std::string &opassword) diff --git a/src/modules/extra/m_sqlauth.cpp b/src/modules/extra/m_sqlauth.cpp index 6dc01a5f8..e20f4e33e 100644 --- a/src/modules/extra/m_sqlauth.cpp +++ b/src/modules/extra/m_sqlauth.cpp @@ -69,20 +69,20 @@ public: verbose = Conf.ReadFlag("sqlauth", "verbose", 0); /* Set to true if failed connects should be reported to operators */ } - virtual int OnUserRegister(User* user) + virtual ModResult OnUserRegister(User* user) { if ((!allowpattern.empty()) && (InspIRCd::Match(user->nick,allowpattern))) { user->Extend("sqlauthed"); - return 0; + return MOD_RES_PASSTHRU; } if (!CheckCredentials(user)) { ServerInstance->Users->QuitUser(user, killreason); - return 1; + return MOD_RES_DENY; } - return 0; + return MOD_RES_PASSTHRU; } bool CheckCredentials(User* user) @@ -196,9 +196,9 @@ public: user->Shrink("sqlauth_failed"); } - virtual bool OnCheckReady(User* user) + virtual ModResult OnCheckReady(User* user) { - return user->GetExt("sqlauthed"); + return user->GetExt("sqlauthed") ? MOD_RES_PASSTHRU : MOD_RES_DENY; } virtual Version GetVersion() diff --git a/src/modules/extra/m_sqllog.cpp b/src/modules/extra/m_sqllog.cpp index c952d495e..7313556d7 100644 --- a/src/modules/extra/m_sqllog.cpp +++ b/src/modules/extra/m_sqllog.cpp @@ -269,19 +269,19 @@ class ModuleSQLLog : public Module AddLogEntry(LT_OPER,user->nick,user->host,user->server); } - virtual int OnKill(User* source, User* dest, const std::string &reason) + virtual ModResult OnKill(User* source, User* dest, const std::string &reason) { AddLogEntry(LT_KILL,dest->nick,dest->host,source->nick); - return 0; + return MOD_RES_PASSTHRU; } - virtual int OnPreCommand(std::string &command, std::vector<std::string> ¶meters, User *user, bool validated, const std::string &original_line) + virtual ModResult OnPreCommand(std::string &command, std::vector<std::string> ¶meters, User *user, bool validated, const std::string &original_line) { if ((command == "GLINE" || command == "KLINE" || command == "ELINE" || command == "ZLINE") && validated) { AddLogEntry(LT_XLINE,user->nick,command[0]+std::string(":")+parameters[0],user->server); } - return 0; + return MOD_RES_PASSTHRU; } virtual void OnUserConnect(User* user) diff --git a/src/modules/extra/m_sqloper.cpp b/src/modules/extra/m_sqloper.cpp index 52a73eba9..8e96a781d 100644 --- a/src/modules/extra/m_sqloper.cpp +++ b/src/modules/extra/m_sqloper.cpp @@ -120,7 +120,7 @@ public: hashtype = assign(Conf.ReadValue("sqloper", "hash", 0)); } - virtual int OnPreCommand(std::string &command, std::vector<std::string> ¶meters, User *user, bool validated, const std::string &original_line) + virtual ModResult OnPreCommand(std::string &command, std::vector<std::string> ¶meters, User *user, bool validated, const std::string &original_line) { if ((validated) && (command == "OPER")) { @@ -131,10 +131,10 @@ public: * If the oper lookup fails later, we pass the command to the original handler * for /oper by calling its Handle method directly. */ - return 1; + return MOD_RES_DENY; } } - return 0; + return MOD_RES_PASSTHRU; } bool LookupOper(User* user, const std::string &username, const std::string &password) diff --git a/src/modules/extra/m_ziplink.cpp b/src/modules/extra/m_ziplink.cpp index efff13644..c220460bd 100644 --- a/src/modules/extra/m_ziplink.cpp +++ b/src/modules/extra/m_ziplink.cpp @@ -134,7 +134,7 @@ class ModuleZLib : public Module } /* Handle stats z (misc stats) */ - virtual int OnStats(char symbol, User* user, string_list &results) + virtual ModResult OnStats(char symbol, User* user, string_list &results) { if (symbol == 'z') { @@ -168,10 +168,10 @@ class ModuleZLib : public Module results.push_back(sn+" 304 "+user->nick+" :ZIPSTATS percentage_of_original_outbound_traffic = "+outbound_ratio); results.push_back(sn+" 304 "+user->nick+" :ZIPSTATS percentage_of_orignal_inbound_traffic = "+inbound_ratio); results.push_back(sn+" 304 "+user->nick+" :ZIPSTATS total_size_of_original_traffic = "+combined_ratio); - return 0; + return MOD_RES_PASSTHRU; } - return 0; + return MOD_RES_PASSTHRU; } virtual void OnRawSocketConnect(int fd) |