summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-02-06 22:10:57 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-02-06 22:10:57 +0000
commit45ad955d9e0e666e1d28908651c6b04caea4a8f8 (patch)
tree8985ad16372c681ccabaa9260f9384d905bfa27d /src
parent70322d695f566d0f18cd4eb1b420f7cf316ee45c (diff)
downloadirssi-45ad955d9e0e666e1d28908651c6b04caea4a8f8.zip
/ACTION didn't print the target when there was no query/channel where
to print the action git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1188 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rw-r--r--src/fe-common/irc/fe-irc-messages.c17
-rw-r--r--src/fe-common/irc/module-formats.c3
-rw-r--r--src/fe-common/irc/module-formats.h3
3 files changed, 17 insertions, 6 deletions
diff --git a/src/fe-common/irc/fe-irc-messages.c b/src/fe-common/irc/fe-irc-messages.c
index ae1df824..27ece21a 100644
--- a/src/fe-common/irc/fe-irc-messages.c
+++ b/src/fe-common/irc/fe-irc-messages.c
@@ -26,6 +26,7 @@
#include "irc.h"
#include "irc-channels.h"
+#include "irc-queries.h"
#include "../core/module-formats.h"
#include "module-formats.h"
@@ -93,10 +94,18 @@ static void sig_message_own_wall(SERVER_REC *server, const char *msg,
static void sig_message_own_action(IRC_SERVER_REC *server, const char *msg,
const char *target)
{
- printformat(server, target, MSGLEVEL_ACTIONS |
- (ischannel(*target) ? MSGLEVEL_PUBLIC : MSGLEVEL_MSGS) |
- MSGLEVEL_NOHILIGHT | MSGLEVEL_NO_ACT,
- IRCTXT_OWN_ME, server->nick, msg);
+ void *item;
+
+ if (ischannel(*target))
+ item = irc_channel_find(server, target);
+ else
+ item = irc_query_find(server, target);
+
+ printformat(server, target,
+ MSGLEVEL_ACTIONS | MSGLEVEL_NOHILIGHT | MSGLEVEL_NO_ACT |
+ (ischannel(*target) ? MSGLEVEL_PUBLIC : MSGLEVEL_MSGS),
+ item != NULL ? IRCTXT_OWN_ACTION : IRCTXT_OWN_ACTION_TARGET,
+ server->nick, msg, target);
}
static void sig_message_irc_action(IRC_SERVER_REC *server, const char *msg,
diff --git a/src/fe-common/irc/module-formats.c b/src/fe-common/irc/module-formats.c
index 3181be96..ead4b193 100644
--- a/src/fe-common/irc/module-formats.c
+++ b/src/fe-common/irc/module-formats.c
@@ -113,7 +113,8 @@ FORMAT_REC fecommon_irc_formats[] = {
{ NULL, "Your messages", 0 },
{ "own_notice", "{ownnotice notice $0}$1", 2, { 0, 0 } },
- { "own_action", "{ownaction $0}$1", 2, { 0, 0 } },
+ { "own_action", "{ownaction $0}$1", 3, { 0, 0, 0 } },
+ { "own_action_target", "{ownaction_target $0 $2}$1", 3, { 0, 0, 0 } },
{ "own_ctcp", "{ownctcp ctcp $0}$1 $2", 3, { 0, 0, 0 } },
/* ---- */
diff --git a/src/fe-common/irc/module-formats.h b/src/fe-common/irc/module-formats.h
index 26ec3e4b..5ca2673a 100644
--- a/src/fe-common/irc/module-formats.h
+++ b/src/fe-common/irc/module-formats.h
@@ -87,7 +87,8 @@ enum {
IRCTXT_FILL_6,
IRCTXT_OWN_NOTICE,
- IRCTXT_OWN_ME,
+ IRCTXT_OWN_ACTION,
+ IRCTXT_OWN_ACTION_TARGET,
IRCTXT_OWN_CTCP,
IRCTXT_FILL_7,