]> jfr.im git - irc/rizon/znc.git/commitdiff
Make /znc detach case insensitive
authorKyle Fuller <redacted>
Sat, 22 Dec 2012 17:41:24 +0000 (17:41 +0000)
committerNolan Lum <redacted>
Tue, 4 Mar 2014 03:06:17 +0000 (19:06 -0800)
Closes #213

Conflicts:
ClientCommand.cpp

ClientCommand.cpp

index fa9179bb97adad6257c02123ea3f0d0a08b1a8e4..bf1efc78b0616c4f3936902105e9be4bbcf8ec7b 100644 (file)
@@ -89,7 +89,7 @@ void CClient::UserCommand(CString& sLine) {
 
                PutStatus(Table);
        } else if (sCommand.Equals("DETACH")) {
-               CString sChan = sLine.Token(1);
+               CString sChan = sLine.Token(1).MakeLower();
 
                if (sChan.empty()) {
                        PutStatus("Usage: Detach <#chan>");
@@ -100,7 +100,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++;