diff options
Diffstat (limited to 'src/modes.cpp')
-rw-r--r-- | src/modes.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modes.cpp b/src/modes.cpp index 23cc87132..9f886cc3e 100644 --- a/src/modes.cpp +++ b/src/modes.cpp @@ -168,9 +168,9 @@ ChannelModeStatus::~ChannelModeStatus() * @param value The key * @return true or false */ -bool ChannelModeKey::IsValid(const char *value) +bool ChannelModeKey::IsValid(const std::string &value) { - if (value && *value != ':' && !strchr(value, ',')) + if (!value.empty() && value.find(':') != std::string::npos && value.find(',') != std::string::npos) return true; return false; |