1
0
mirror of https://github.com/irssi/irssi.git synced 2024-08-04 03:34:18 -04:00

/msg , fix again by c0ffee

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3199 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2004-01-10 16:30:31 +00:00 committed by cras
parent 2337386565
commit 20e9a7cfb6

View File

@ -372,9 +372,7 @@ static void cmd_msg(const char *data, SERVER_REC *server, WI_ITEM_REC *item)
} }
} }
if (target == NULL) if (target != NULL) {
target = origtarget;
if (strcmp(target, "*") == 0) { if (strcmp(target, "*") == 0) {
/* send to active channel/query */ /* send to active channel/query */
if (item == NULL) if (item == NULL)
@ -389,12 +387,14 @@ static void cmd_msg(const char *data, SERVER_REC *server, WI_ITEM_REC *item)
target_type = SEND_TARGET_NICK; target_type = SEND_TARGET_NICK;
else { else {
/* Need to rely on server_ischannel(). If the protocol /* Need to rely on server_ischannel(). If the protocol
doesn't really know if it's channel or nick based on the doesn't really know if it's channel or nick based on
name, it should just assume it's nick, because when typing the name, it should just assume it's nick, because
text to channels it's always sent with /MSG -channel. */ when typing text to channels it's always sent with
/MSG -channel. */
target_type = server_ischannel(server, target) ? target_type = server_ischannel(server, target) ?
SEND_TARGET_CHANNEL : SEND_TARGET_NICK; SEND_TARGET_CHANNEL : SEND_TARGET_NICK;
} }
}
if (target != NULL) if (target != NULL)
server->send_message(server, target, msg, target_type); server->send_message(server, target, msg, target_type);