summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--src/irc/irc-nick.c4
-rw-r--r--weechat/ChangeLog1
-rw-r--r--weechat/src/irc/irc-nick.c4
4 files changed, 6 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 36f8c7ce4..a9d70e251 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,7 @@ ChangeLog - 2003-10-12
Version 0.0.3 (under dev!):
+ * nicks are now correctly sorted (op, halfop, voice, other)
* fixed crash when entering text without any server connection
* fixed display bug (text was blinking when scrolling)
* french translation
diff --git a/src/irc/irc-nick.c b/src/irc/irc-nick.c
index 1f9faf3b3..ef0814e4e 100644
--- a/src/irc/irc-nick.c
+++ b/src/irc/irc-nick.c
@@ -79,8 +79,8 @@ nick_compare (t_irc_nick *nick1, t_irc_nick *nick2)
{
int score1, score2, comp;
- score1 = - ( (nick1->is_op * 3) + (nick1->is_halfop * 2) + nick1->has_voice );
- score2 = - ( (nick2->is_op * 3) + (nick2->is_halfop * 2) + nick2->has_voice );
+ score1 = - ( (nick1->is_op * 4) + (nick1->is_halfop * 3) + (nick1->has_voice * 2));
+ score2 = - ( (nick2->is_op * 4) + (nick2->is_halfop * 3) + (nick2->has_voice * 2));
comp = strcasecmp(nick1->nick, nick2->nick);
if (comp > 0)
diff --git a/weechat/ChangeLog b/weechat/ChangeLog
index 36f8c7ce4..a9d70e251 100644
--- a/weechat/ChangeLog
+++ b/weechat/ChangeLog
@@ -5,6 +5,7 @@ ChangeLog - 2003-10-12
Version 0.0.3 (under dev!):
+ * nicks are now correctly sorted (op, halfop, voice, other)
* fixed crash when entering text without any server connection
* fixed display bug (text was blinking when scrolling)
* french translation
diff --git a/weechat/src/irc/irc-nick.c b/weechat/src/irc/irc-nick.c
index 1f9faf3b3..ef0814e4e 100644
--- a/weechat/src/irc/irc-nick.c
+++ b/weechat/src/irc/irc-nick.c
@@ -79,8 +79,8 @@ nick_compare (t_irc_nick *nick1, t_irc_nick *nick2)
{
int score1, score2, comp;
- score1 = - ( (nick1->is_op * 3) + (nick1->is_halfop * 2) + nick1->has_voice );
- score2 = - ( (nick2->is_op * 3) + (nick2->is_halfop * 2) + nick2->has_voice );
+ score1 = - ( (nick1->is_op * 4) + (nick1->is_halfop * 3) + (nick1->has_voice * 2));
+ score2 = - ( (nick2->is_op * 4) + (nick2->is_halfop * 3) + (nick2->has_voice * 2));
comp = strcasecmp(nick1->nick, nick2->nick);
if (comp > 0)