mirror of
https://github.com/irssi/irssi.git
synced 2026-08-11 04:43:34 +02:00
Added target_type to send_message(), -channel and -nick parameters to /MSG
to specify if it's supposed to be to channel/nick. /MSG -channel is used automatically by irssi when sending messages to channel (the "normal" way without /msg). This should help with protocols that don't have any channel name prefixes. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2383 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
6ea882f893
commit
7c94cb083f
7 changed files with 74 additions and 41 deletions
|
|
@ -226,7 +226,8 @@ static void cmd_query(const char *data, SERVER_REC *server, WI_ITEM_REC *item)
|
|||
|
||||
query = query_find(server, nick);
|
||||
if (query == NULL)
|
||||
CHAT_PROTOCOL(server)->query_create(server->tag, nick, FALSE);
|
||||
query = CHAT_PROTOCOL(server)->
|
||||
query_create(server->tag, nick, FALSE);
|
||||
else {
|
||||
/* query already exists */
|
||||
WINDOW_REC *window = window_item_window(query);
|
||||
|
|
@ -252,13 +253,9 @@ static void cmd_query(const char *data, SERVER_REC *server, WI_ITEM_REC *item)
|
|||
}
|
||||
|
||||
if (*msg != '\0') {
|
||||
/* FIXME: we'll need some function that does both
|
||||
of these. and separate the , and . target handling
|
||||
from own_private messagge.. */
|
||||
server->send_message(server, nick, msg);
|
||||
|
||||
signal_emit("message own_private", 4,
|
||||
server, msg, nick, nick);
|
||||
msg = g_strdup_printf("-nick %s %s", nick, msg);
|
||||
signal_emit("command msg", 3, msg, server, query);
|
||||
g_free(msg);
|
||||
}
|
||||
|
||||
cmd_params_free(free_arg);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue