/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
This commit is contained in:
Timo Sirainen 2001-02-06 22:10:57 +00:00 committed by cras
commit 45ad955d9e
4 changed files with 24 additions and 7 deletions

View file

@ -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,

View file

@ -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 } },
/* ---- */

View file

@ -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,