mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-11 19:49:02 -04:00
Fix warnings in configreader.cpp on FreeBSD
Fixes #348 reported by @netkurd
This commit is contained in:
parent
df2ee078aa
commit
1357ed09cc
@ -610,7 +610,9 @@ void ServerConfig::Fill()
|
||||
std::string modes = ConfValue("disabled")->getString("usermodes");
|
||||
for (std::string::const_iterator p = modes.begin(); p != modes.end(); ++p)
|
||||
{
|
||||
if (*p < 'A' || *p > ('A' + 64)) throw CoreException("Invalid usermode " + std::string(1, *p) + " was found.");
|
||||
// Complain when the character is not a-z or A-Z
|
||||
if ((*p < 'A') || (*p > 'z') || ((*p < 'a') && (*p > 'Z')))
|
||||
throw CoreException("Invalid usermode " + std::string(1, *p) + " was found.");
|
||||
DisabledUModes[*p - 'A'] = 1;
|
||||
}
|
||||
|
||||
@ -618,7 +620,8 @@ void ServerConfig::Fill()
|
||||
modes = ConfValue("disabled")->getString("chanmodes");
|
||||
for (std::string::const_iterator p = modes.begin(); p != modes.end(); ++p)
|
||||
{
|
||||
if (*p < 'A' || *p > ('A' + 64)) throw CoreException("Invalid chanmode " + std::string(1, *p) + " was found.");
|
||||
if ((*p < 'A') || (*p > 'z') || ((*p < 'a') && (*p > 'Z')))
|
||||
throw CoreException("Invalid chanmode " + std::string(1, *p) + " was found.");
|
||||
DisabledCModes[*p - 'A'] = 1;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user