diff options
| author | 2023-01-02 22:33:19 +0000 | |
|---|---|---|
| committer | 2023-01-02 22:49:07 +0000 | |
| commit | b1e6084b2d0c5fa2c9fdf594c96a6339ba9306c1 (patch) | |
| tree | 0f2d5968be4ffcadc08ff25ea0d637e60d5f75c1 /src/snomasks.cpp | |
| parent | Get rid of the virtual Has*Permission methods. (diff) | |
Fix getting the full snomask and mode lists.
Diffstat (limited to 'src/snomasks.cpp')
| -rw-r--r-- | src/snomasks.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/snomasks.cpp b/src/snomasks.cpp index 1aac3c415..ea11388f3 100644 --- a/src/snomasks.cpp +++ b/src/snomasks.cpp @@ -79,9 +79,14 @@ SnomaskManager::SnomaskManager() EnableSnomask('r', "REHASH"); } +bool SnomaskManager::IsSnomask(char ch) +{ + return (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z'); +} + bool SnomaskManager::IsSnomaskUsable(char ch) const { - return ((isalpha(ch)) && (!masks[tolower(ch) - 'a'].Description.empty())); + return IsSnomask(ch) && !masks[tolower(ch) - 'a'].Description.empty(); } void Snomask::SendMessage(const std::string& message, char letter) |
