From 3d955f1642492fd57fcc42e82329936eb6520810 Mon Sep 17 00:00:00 2001 From: cras Date: Thu, 14 Mar 2002 11:42:58 +0000 Subject: [PATCH] updated --- CHANGES | 6 ++++++ apps/irssi/src/silc/core/silc-expandos.c | 9 +++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 2ad64b42..e99ec8c4 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,9 @@ +Thu Mar 14 13:38:12 EET 2002 Timo Sirainen + + * $usermode, $cumode and $cumode_space expandos shouldn't do + anything with non-SILC server records. Affected file + irssi/src/silc/core/silc-expandos.c + Wed Mar 13 21:38:26 EET 2002 Pekka Riikonen * Fixed the silc_net_check_[host/local]_by_sock to support diff --git a/apps/irssi/src/silc/core/silc-expandos.c b/apps/irssi/src/silc/core/silc-expandos.c index 3bffb9e6..d29a31d4 100644 --- a/apps/irssi/src/silc/core/silc-expandos.c +++ b/apps/irssi/src/silc/core/silc-expandos.c @@ -47,7 +47,7 @@ static char *expando_usermode(SERVER_REC *server, void *item, int *free_ret) static char *expando_cumode(SERVER_REC *server, void *item, int *free_ret) { - if (IS_CHANNEL(item) && CHANNEL(item)->ownnick) { + if (IS_SILC_CHANNEL(item) && CHANNEL(item)->ownnick) { SILC_NICK_REC *nick = (SILC_NICK_REC *)CHANNEL(item)->ownnick; return (nick->op && nick->founder) ? "*@" : nick->op ? "@" : nick->founder ? "*" : ""; @@ -59,7 +59,12 @@ static char *expando_cumode(SERVER_REC *server, void *item, int *free_ret) static char *expando_cumode_space(SERVER_REC *server, void *item, int *free_ret) { - char *ret = expando_cumode(server, item, free_ret); + char *ret; + + if (!IS_SILC_SERVER(server)) + return ""; + + ret = expando_cumode(server, item, free_ret); return *ret == '\0' ? " " : ret; } -- 2.43.0