diff options
author | Jilles Tjoelker <jilles@irssi.org> | 2008-11-28 00:16:51 +0000 |
---|---|---|
committer | jilles <jilles@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2008-11-28 00:16:51 +0000 |
commit | 89cd47bf3a937c3077acdc95d98cc4b389e30608 (patch) | |
tree | e96f73aa452cc2fbec41f45f973cfaf42acacb3a /src/fe-common | |
parent | aefa7b47c14f2bd8801b233907a84de4f6eee3b8 (diff) | |
download | irssi-89cd47bf3a937c3077acdc95d98cc4b389e30608.zip |
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
Diffstat (limited to 'src/fe-common')
-rw-r--r-- | src/fe-common/core/fe-channels.c | 10 | ||||
-rw-r--r-- | src/fe-common/core/fe-messages.c | 12 |
2 files changed, 6 insertions, 16 deletions
diff --git a/src/fe-common/core/fe-channels.c b/src/fe-common/core/fe-channels.c index a3325ef8..cc6f200f 100644 --- a/src/fe-common/core/fe-channels.c +++ b/src/fe-common/core/fe-channels.c @@ -413,14 +413,8 @@ static void display_sorted_nicks(CHANNEL_REC *channel, GSList *nicklist) for (tmp = nicklist; tmp != NULL; tmp = tmp->next) { NICK_REC *rec = tmp->data; - if (rec->other) - nickmode[0] = rec->other; - else if (rec->op) - nickmode[0] = '@'; - else if (rec->halfop) - nickmode[0] = '%'; - else if (rec->voice) - nickmode[0] = '+'; + if (rec->prefixes[0]) + nickmode[0] = rec->prefixes[0]; else nickmode[0] = ' '; diff --git a/src/fe-common/core/fe-messages.c b/src/fe-common/core/fe-messages.c index a5bcd2b0..1035c7bb 100644 --- a/src/fe-common/core/fe-messages.c +++ b/src/fe-common/core/fe-messages.c @@ -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; } |