Allow storing multiple "other" prefixes such as +q and +a.

Original patch by JasonX, somewhat changed by exg and me.


git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4922 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Jilles Tjoelker 2008-11-28 00:16:51 +00:00 committed by jilles
commit 89cd47bf3a
15 changed files with 110 additions and 88 deletions

View file

@ -140,17 +140,13 @@ static char *channel_get_nickmode_rec(NICK_REC *nickrec)
emptystr = settings_get_bool("show_nickmode_empty") ? " " : "";
if (nickrec == NULL)
if (nickrec == NULL || nickrec->prefixes[0] == '\0')
nickmode = g_strdup(emptystr);
else if (nickrec->other) {
else {
nickmode = g_malloc(2);
nickmode[0] = nickrec->other;
nickmode[0] = nickrec->prefixes[0];
nickmode[1] = '\0';
} else
nickmode = g_strdup(nickrec->op ? "@" :
nickrec->halfop ? "%" :
nickrec->voice ? "+" :
emptystr);
}
return nickmode;
}