diff options
author | attilamolnar <attilamolnar@hush.com> | 2012-10-05 15:04:22 +0200 |
---|---|---|
committer | Adam <Adam@anope.org> | 2012-10-06 02:06:18 -0400 |
commit | 14d7de0cf38d8cbf9d28c527e1be27da071f755e (patch) | |
tree | 4894fe87658309da04aded981f4d45fd3dd1a1ab | |
parent | cd28fdc1929585e5ca1b57331fd5009ba6e72cc4 (diff) |
InspIRCd: Remove has_svshold, use IRCDProto::CanSVSHold
-rw-r--r-- | modules/protocol/inspircd-ts6.h | 4 | ||||
-rw-r--r-- | modules/protocol/inspircd11.cpp | 8 | ||||
-rw-r--r-- | modules/protocol/inspircd12.cpp | 8 | ||||
-rw-r--r-- | modules/protocol/inspircd20.cpp | 8 |
4 files changed, 11 insertions, 17 deletions
diff --git a/modules/protocol/inspircd-ts6.h b/modules/protocol/inspircd-ts6.h index 37e4b1b48..152809c37 100644 --- a/modules/protocol/inspircd-ts6.h +++ b/modules/protocol/inspircd-ts6.h @@ -588,7 +588,7 @@ struct IRCDMessageMetadata : IRCDMessage struct IRCDMessageMode : IRCDMessage { - IRCDMessageMode() : IRCDMessage("MODE", 2) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); } + IRCDMessageMode() : IRCDMessage("MODE", 2) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); } bool Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override { @@ -712,7 +712,7 @@ struct IRCDMessageTime : IRCDMessage struct IRCDMessageUID : IRCDMessage { IRCDMessageUID() : IRCDMessage("UID", 8) { SetFlag(IRCDMESSAGE_REQUIRE_SERVER); SetFlag(IRCDMESSAGE_SOFT_LIMIT); } - + /* * [Nov 03 22:09:58.176252 2009] debug: Received: :964 UID 964AAAAAC 1225746297 w00t2 localhost testnet.user w00t 127.0.0.1 1225746302 +iosw +ACGJKLNOQcdfgjklnoqtx :Robin Burchell <w00t@inspircd.org> * 0: uid diff --git a/modules/protocol/inspircd11.cpp b/modules/protocol/inspircd11.cpp index 3a3463ff8..ee625ac36 100644 --- a/modules/protocol/inspircd11.cpp +++ b/modules/protocol/inspircd11.cpp @@ -15,7 +15,6 @@ static bool has_servicesmod = false; static bool has_globopsmod = false; -static bool has_svsholdmod = false; static bool has_chghostmod = false; static bool has_chgidentmod = false; static bool has_hidechansmod = false; @@ -346,10 +345,10 @@ struct IRCDMessageCapab : IRCDMessage /* reset CAPAB */ has_servicesmod = false; has_globopsmod = false; - has_svsholdmod = false; has_chghostmod = false; has_chgidentmod = false; has_hidechansmod = false; + ircdproto->CanSVSHold = false; } else if (params[0].equals_cs("MODULES") && params.size() > 1) { @@ -358,7 +357,7 @@ struct IRCDMessageCapab : IRCDMessage if (params[1].find("m_services.so") != Anope::string::npos) has_servicesmod = true; if (params[1].find("m_svshold.so") != Anope::string::npos) - has_svsholdmod = true; + ircdproto->CanSVSHold = true; if (params[1].find("m_chghost.so") != Anope::string::npos) has_chghostmod = true; if (params[1].find("m_chgident.so") != Anope::string::npos) @@ -559,13 +558,12 @@ struct IRCDMessageCapab : IRCDMessage quitting = true; return false; } - if (!has_svsholdmod) + if (!ircdproto->CanSVSHold) Log() << "SVSHOLD missing, Usage disabled until module is loaded."; if (!has_chghostmod) Log() << "CHGHOST missing, Usage disabled until module is loaded."; if (!has_chgidentmod) Log() << "CHGIDENT missing, Usage disabled until module is loaded."; - ircdproto->CanSVSHold = has_svsholdmod; } return true; diff --git a/modules/protocol/inspircd12.cpp b/modules/protocol/inspircd12.cpp index 1fd9bbc81..e71e7dbc3 100644 --- a/modules/protocol/inspircd12.cpp +++ b/modules/protocol/inspircd12.cpp @@ -21,7 +21,6 @@ static bool has_rlinemod = false; #include "inspircd-ts6.h" static bool has_servicesmod = false; -static bool has_svsholdmod = false; static bool has_hidechansmod = false; class InspIRCd12Proto : public InspIRCdTS6Proto @@ -92,10 +91,10 @@ struct IRCDMessageCapab : IRCDMessage /* reset CAPAB */ has_servicesmod = false; has_globopsmod = false; - has_svsholdmod = false; has_chghostmod = false; has_chgidentmod = false; has_hidechansmod = false; + ircdproto->CanSVSHold = false; } else if (params[0].equals_cs("MODULES") && params.size() > 1) { @@ -104,7 +103,7 @@ struct IRCDMessageCapab : IRCDMessage if (params[1].find("m_services_account.so") != Anope::string::npos) has_servicesmod = true; if (params[1].find("m_svshold.so") != Anope::string::npos) - has_svsholdmod = true; + ircdproto->CanSVSHold = true; if (params[1].find("m_chghost.so") != Anope::string::npos) has_chghostmod = true; if (params[1].find("m_chgident.so") != Anope::string::npos) @@ -409,13 +408,12 @@ struct IRCDMessageCapab : IRCDMessage quitting = true; return false; } - if (!has_svsholdmod) + if (!ircdproto->CanSVSHold) Log() << "SVSHOLD missing, Usage disabled until module is loaded."; if (!has_chghostmod) Log() << "CHGHOST missing, Usage disabled until module is loaded."; if (!has_chgidentmod) Log() << "CHGIDENT missing, Usage disabled until module is loaded."; - ircdproto->CanSVSHold = has_svsholdmod; } return true; diff --git a/modules/protocol/inspircd20.cpp b/modules/protocol/inspircd20.cpp index ee281420b..4c2b03544 100644 --- a/modules/protocol/inspircd20.cpp +++ b/modules/protocol/inspircd20.cpp @@ -21,7 +21,6 @@ static bool has_rlinemod = false; #include "inspircd-ts6.h" static bool has_servicesmod = false; -static bool has_svsholdmod = false; class InspIRCd20Proto : public InspIRCdTS6Proto { @@ -128,9 +127,9 @@ struct IRCDMessageCapab : IRCDMessage /* reset CAPAB */ has_servicesmod = false; - has_svsholdmod = false; has_chghostmod = false; has_chgidentmod = false; + ircdproto->CanSVSHold = false; } else if (params[0].equals_cs("CHANMODES") && params.size() > 1) { @@ -297,7 +296,7 @@ struct IRCDMessageCapab : IRCDMessage while (ssep.GetToken(module)) { if (module.equals_cs("m_svshold.so")) - has_svsholdmod = true; + ircdproto->CanSVSHold = true; else if (module.find("m_rline.so") == 0) { has_rlinemod = true; @@ -424,13 +423,12 @@ struct IRCDMessageCapab : IRCDMessage quitting = true; return false; } - if (!has_svsholdmod) + if (!ircdproto->CanSVSHold) Log() << "SVSHOLD missing, Usage disabled until module is loaded."; if (!has_chghostmod) Log() << "CHGHOST missing, Usage disabled until module is loaded."; if (!has_chgidentmod) Log() << "CHGIDENT missing, Usage disabled until module is loaded."; - ircdproto->CanSVSHold = has_svsholdmod; } return true; |