aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_geoclass.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2023-07-12 09:36:58 +0100
committerGravatar Sadie Powell2023-07-12 09:36:58 +0100
commitc9668b8ab67fbe4d8a1577edac33bd65625a7df9 (patch)
tree37e8983829bb162314b3ff08ea6776f8043f8ca8 /src/modules/m_geoclass.cpp
parentFix disabling user mode +r on nick change. (diff)
parentDefine _BSD_SOURCE when building on Haiku. (diff)
downloadinspircd++-c9668b8ab67fbe4d8a1577edac33bd65625a7df9.tar.gz
inspircd++-c9668b8ab67fbe4d8a1577edac33bd65625a7df9.tar.bz2
inspircd++-c9668b8ab67fbe4d8a1577edac33bd65625a7df9.zip
Merge branch 'insp3' into master.
Diffstat (limited to 'src/modules/m_geoclass.cpp')
-rw-r--r--src/modules/m_geoclass.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/modules/m_geoclass.cpp b/src/modules/m_geoclass.cpp
index e229d475c..511180851 100644
--- a/src/modules/m_geoclass.cpp
+++ b/src/modules/m_geoclass.cpp
@@ -50,6 +50,13 @@ public:
irc::spacesepstream codes(country);
for (std::string token; codes.GetToken(token); )
{
+ if (token.length() != 2)
+ {
+ ServerInstance->Logs.Debug("CONNECTCLASS", "The {} connect class contains an invalid country code: {}",
+ klass->GetName(), token);
+ continue;
+ }
+
// If the user matches this country code then they can use this
// connect class.
if (stdalgo::string::equalsci(token, code))