summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--default.theme8
-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
4 files changed, 24 insertions, 7 deletions
diff --git a/default.theme b/default.theme
index 0972a647..1146f919 100644
--- a/default.theme
+++ b/default.theme
@@ -166,12 +166,18 @@ abstracts = {
## Actions (/ME stuff)
##
+ # used internally by this theme
+ action_core = "%W * $0-%n";
+
# generic one that's used by most actions
- action = "%W * $0-%n ";
+ action = "{action_core $0-} ";
# own action, both private/public
ownaction = "{action $0-}";
+ # own action with target, both private/public
+ ownaction_target = "{action_core $0}%K:%c$1%n ";
+
# private action sent by others
pvtaction = "%W (*) $0-%n ";
pvtaction_query = "{action $0-}";
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,