1
0
mirror of https://github.com/irssi/irssi.git synced 2024-07-07 02:54:19 -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)
target = origtarget;
if (target != NULL) {
if (strcmp(target, "*") == 0) {
/* send to active channel/query */
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;
else {
/* Need to rely on server_ischannel(). If the protocol
doesn't really know if it's channel or nick based on the
name, it should just assume it's nick, because when typing
text to channels it's always sent with /MSG -channel. */
doesn't really know if it's channel or nick based on
the name, it should just assume it's nick, because
when typing text to channels it's always sent with
/MSG -channel. */
target_type = server_ischannel(server, target) ?
SEND_TARGET_CHANNEL : SEND_TARGET_NICK;
}
}
if (target != NULL)
server->send_message(server, target, msg, target_type);