diff options
| author | Markus Mittendrein <git@maxmitti.tk> | 2016-08-14 21:29:27 +0200 |
|---|---|---|
| committer | Markus Mittendrein <git@maxmitti.tk> | 2016-08-14 21:29:27 +0200 |
| commit | ea9ae80dc2dbad15c2a6e9cde49d8322ce6f3f4f (patch) | |
| tree | e1d3e1e4716eb333b258d13ba939dcbf2d7af8bb /src | |
| parent | 99eeb53fcb714d3028f1ddf8c3343c114920fa38 (diff) | |
| download | manager-ea9ae80dc2dbad15c2a6e9cde49d8322ce6f3f4f.tar.gz manager-ea9ae80dc2dbad15c2a6e9cde49d8322ce6f3f4f.zip | |
Handle IRC-Nicks case-insensitively
Diffstat (limited to 'src')
| -rw-r--r-- | src/ClientInfo.hpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/ClientInfo.hpp b/src/ClientInfo.hpp index 4a4ef0b..d176965 100644 --- a/src/ClientInfo.hpp +++ b/src/ClientInfo.hpp @@ -82,7 +82,18 @@ public: inline bool operator==(const ClientInfo& other) const { - return other.interface == interface && other.nick == nick && (interface == Clonk ? other.pcName == pcName && other.CUID == CUID : true); + if(other.interface != interface) + { + return false; + } + if(interface == IRC) + { + return other.nick.compare(nick, Qt::CaseInsensitive) == 0; + } + else + { + return other.interface == interface && other.nick == nick && (interface == Clonk ? other.pcName == pcName && other.CUID == CUID : true); + } } inline bool operator!=(const ClientInfo& other) const |
