From 955213d274c2f0c11d0f153e2fed5df5170e50f6 Mon Sep 17 00:00:00 2001 From: wimpie Date: Sat, 08 Jan 2005 15:16:37 +0000 Subject: Changes in this patch: *Added some irc numerical codes (253, 422) *Reordered codes *Unified some functions which did exactly the same in two functions *Changed nick ordering in channel list, now nicks get ordered first by flags and then by name. --- (limited to 'noncore/net/opieirc/ircchannellist.cpp') diff --git a/noncore/net/opieirc/ircchannellist.cpp b/noncore/net/opieirc/ircchannellist.cpp index 4e13dee..6bef318 100644 --- a/noncore/net/opieirc/ircchannellist.cpp +++ b/noncore/net/opieirc/ircchannellist.cpp @@ -14,16 +14,17 @@ void IRCChannelList::update() { for (; it.current(); ++it) { IRCChannelPerson *person = it.current(); if (person->flags & PERSON_FLAG_OP) { - insertItem(op, person->person->nick()); + insertItem(op, "1" + person->person->nick()); } else if (person->flags & PERSON_FLAG_HALFOP) { - insertItem(op, person->person->nick()); + insertItem(op, "2" + person->person->nick()); } else if (person->flags & PERSON_FLAG_VOICE) { - insertItem(voice, person->person->nick()); + insertItem(voice, "3" + person->person->nick()); } else { - insertItem(person->person->nick()); + insertItem("4" + person->person->nick()); } } sort(); + adjustNicks(); } @@ -45,3 +46,20 @@ bool IRCChannelList::removePerson(QString nick) { return FALSE; } +void IRCChannelList::adjustNicks() { + QString txt; + QPixmap pm; + + for(unsigned int i=0; i