summaryrefslogtreecommitdiff
path: root/src/irc/core/irc-special-vars.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/irc/core/irc-special-vars.c')
-rw-r--r--src/irc/core/irc-special-vars.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/irc/core/irc-special-vars.c b/src/irc/core/irc-special-vars.c
index 92acd246..03335114 100644
--- a/src/irc/core/irc-special-vars.c
+++ b/src/irc/core/irc-special-vars.c
@@ -101,10 +101,7 @@ static char *expando_chanmode(void *server, void *item, int *free_ret)
CHANNEL_REC *channel;
channel = irc_item_channel(item);
- if (channel == NULL) return NULL;
-
- *free_ret = TRUE;
- return channel_get_mode(channel);
+ return channel == NULL ? NULL : channel->mode;
}
/* current nickname */