diff options
| author | 2023-07-11 15:35:19 +0100 | |
|---|---|---|
| committer | 2023-07-11 15:35:19 +0100 | |
| commit | f414f25cfc4325f2735990610b68f5ecb815b172 (patch) | |
| tree | 0b1b19d51358859a1e282a67b00937be87f40767 /src/modules | |
| parent | Update the description of the ircv3 module. (diff) | |
Log if a user specifies an invalid country code in <connect:country>.
Diffstat (limited to 'src/modules')
| -rw-r--r-- | src/modules/m_geoclass.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/modules/m_geoclass.cpp b/src/modules/m_geoclass.cpp index 44e0de209..d613b91d4 100644 --- a/src/modules/m_geoclass.cpp +++ b/src/modules/m_geoclass.cpp @@ -60,6 +60,13 @@ class ModuleGeoClass irc::spacesepstream codes(country); for (std::string token; codes.GetToken(token); ) { + if (token.length() != 2) + { + ServerInstance->Logs->Log("CONNECTCLASS", LOG_DEBUG, "The %s connect class contains an invalid country code: %s", + myclass->GetName().c_str(), token.c_str()); + continue; + } + // If the user matches this country code then they can use this // connect class. if (stdalgo::string::equalsci(token, code)) |
