Skip to content
Browse files

Make /znc detach case insensitive

Closes #213
  • Loading branch information...
1 parent 9e71101 commit 6a55c3a0ee993427a3fec81ba5532969c8088624 @kylef kylef committed
Showing with 5 additions and 2 deletions.
  1. +5 −2 src/ClientCommand.cpp
View
7 src/ClientCommand.cpp
@@ -106,7 +106,7 @@ void CClient::UserCommand(CString& sLine) {
return;
}
- CString sChan = sLine.Token(1);
+ CString sChan = sLine.Token(1).MakeLower();
if (sChan.empty()) {
PutStatus("Usage: Detach <#chan>");
@@ -117,7 +117,10 @@ void CClient::UserCommand(CString& sLine) {
vector<CChan*>::const_iterator it;
unsigned int uMatches = 0, uDetached = 0;
for (it = vChans.begin(); it != vChans.end(); ++it) {
- if (!(*it)->GetName().WildCmp(sChan))
+ CChan *pChannel = *it;
+ CString channelName = pChannel->GetName().AsLower();
+
+ if (!channelName.WildCmp(sChan))
continue;
uMatches++;

0 comments on commit 6a55c3a

Please sign in to comment.
Something went wrong with that request. Please try again.