aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_geoclass.cpp
diff options
context:
space:
mode:
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))