summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2002-05-31 16:47:08 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2002-05-31 16:47:08 +0000
commit8f00c21b98fde3bb14e7c0cc7220ced780607dbb (patch)
tree92b48ca8f2dbe48e7952cb2bfb38417a4e7d2886 /src
parentb152578725e297aeeda1124529b32d08a9444891 (diff)
downloadirssi-8f00c21b98fde3bb14e7c0cc7220ced780607dbb.zip
"message own_public" should be printed with channel's visible_name, not
name. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2831 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rw-r--r--src/fe-common/core/fe-messages.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/src/fe-common/core/fe-messages.c b/src/fe-common/core/fe-messages.c
index 311c2adf..e210c2a2 100644
--- a/src/fe-common/core/fe-messages.c
+++ b/src/fe-common/core/fe-messages.c
@@ -227,14 +227,19 @@ static void sig_message_private(SERVER_REC *server, const char *msg,
g_free_not_null(freemsg);
}
-static void print_own_channel_message(SERVER_REC *server, CHANNEL_REC *channel,
- const char *target, const char *msg)
+static void sig_message_own_public(SERVER_REC *server, const char *msg,
+ const char *target)
{
WINDOW_REC *window;
+ CHANNEL_REC *channel;
const char *nickmode;
char *freemsg = NULL;
int print_channel;
+ channel = channel_find(server, target);
+ if (channel != NULL)
+ target = channel->visible_name;
+
nickmode = channel_get_nickmode(channel, server->nick);
window = channel == NULL ? NULL :
@@ -261,18 +266,6 @@ static void print_own_channel_message(SERVER_REC *server, CHANNEL_REC *channel,
g_free_not_null(freemsg);
}
-static void sig_message_own_public(SERVER_REC *server, const char *msg,
- const char *target)
-{
- CHANNEL_REC *channel;
-
- g_return_if_fail(server != NULL);
- g_return_if_fail(msg != NULL);
-
- channel = channel_find(server, target);
- print_own_channel_message(server, channel, target, msg);
-}
-
static void sig_message_own_private(SERVER_REC *server, const char *msg,
const char *target, const char *origtarget)
{