mirror of
https://github.com/irssi/irssi.git
synced 2025-02-02 15:08:01 -05: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:
parent
2337386565
commit
20e9a7cfb6
@ -372,28 +372,28 @@ 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) {
|
||||||
|
/* send to active channel/query */
|
||||||
|
if (item == NULL)
|
||||||
|
cmd_param_error(CMDERR_NOT_JOINED);
|
||||||
|
|
||||||
if (strcmp(target, "*") == 0) {
|
target_type = IS_CHANNEL(item) ?
|
||||||
/* send to active channel/query */
|
SEND_TARGET_CHANNEL : SEND_TARGET_NICK;
|
||||||
if (item == NULL)
|
target = (char *) window_item_get_target(item);
|
||||||
cmd_param_error(CMDERR_NOT_JOINED);
|
} else if (g_hash_table_lookup(optlist, "channel") != NULL)
|
||||||
|
target_type = SEND_TARGET_CHANNEL;
|
||||||
target_type = IS_CHANNEL(item) ?
|
else if (g_hash_table_lookup(optlist, "nick") != NULL)
|
||||||
SEND_TARGET_CHANNEL : SEND_TARGET_NICK;
|
target_type = SEND_TARGET_NICK;
|
||||||
target = (char *) window_item_get_target(item);
|
else {
|
||||||
} else if (g_hash_table_lookup(optlist, "channel") != NULL)
|
/* Need to rely on server_ischannel(). If the protocol
|
||||||
target_type = SEND_TARGET_CHANNEL;
|
doesn't really know if it's channel or nick based on
|
||||||
else if (g_hash_table_lookup(optlist, "nick") != NULL)
|
the name, it should just assume it's nick, because
|
||||||
target_type = SEND_TARGET_NICK;
|
when typing text to channels it's always sent with
|
||||||
else {
|
/MSG -channel. */
|
||||||
/* Need to rely on server_ischannel(). If the protocol
|
target_type = server_ischannel(server, target) ?
|
||||||
doesn't really know if it's channel or nick based on the
|
SEND_TARGET_CHANNEL : SEND_TARGET_NICK;
|
||||||
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)
|
if (target != NULL)
|
||||||
|
Loading…
Reference in New Issue
Block a user