From ea9ae80dc2dbad15c2a6e9cde49d8322ce6f3f4f Mon Sep 17 00:00:00 2001 From: Markus Mittendrein Date: Sun, 14 Aug 2016 21:29:27 +0200 Subject: Handle IRC-Nicks case-insensitively --- src/ClientInfo.hpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/ClientInfo.hpp') 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 -- cgit v1.2.3-54-g00ecf