summaryrefslogtreecommitdiff
path: root/src/fe-common
diff options
context:
space:
mode:
Diffstat (limited to 'src/fe-common')
-rw-r--r--src/fe-common/core/fe-channels.c10
-rw-r--r--src/fe-common/core/fe-messages.c12
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;
}