mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
/MSG !channel is now expanded to full !12345channel
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2944 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
40f2e1caf5
commit
42d4598e06
@ -74,7 +74,8 @@ static int ischannel_func(SERVER_REC *server, const char *data)
|
|||||||
static void send_message(SERVER_REC *server, const char *target,
|
static void send_message(SERVER_REC *server, const char *target,
|
||||||
const char *msg, int target_type)
|
const char *msg, int target_type)
|
||||||
{
|
{
|
||||||
IRC_SERVER_REC *ircserver;
|
IRC_SERVER_REC *ircserver;
|
||||||
|
CHANNEL_REC *channel;
|
||||||
char *str;
|
char *str;
|
||||||
|
|
||||||
ircserver = IRC_SERVER(server);
|
ircserver = IRC_SERVER(server);
|
||||||
@ -82,6 +83,13 @@ static void send_message(SERVER_REC *server, const char *target,
|
|||||||
g_return_if_fail(target != NULL);
|
g_return_if_fail(target != NULL);
|
||||||
g_return_if_fail(msg != NULL);
|
g_return_if_fail(msg != NULL);
|
||||||
|
|
||||||
|
if (*target == '!') {
|
||||||
|
/* !chan -> !12345chan */
|
||||||
|
channel = channel_find(server, target);
|
||||||
|
if (channel != NULL && g_strcasecmp(channel->name, target) != 0)
|
||||||
|
target = channel->name;
|
||||||
|
}
|
||||||
|
|
||||||
str = g_strdup_printf("PRIVMSG %s :%s", target, msg);
|
str = g_strdup_printf("PRIVMSG %s :%s", target, msg);
|
||||||
irc_send_cmd_split(ircserver, str, 2, ircserver->max_msgs_in_cmd);
|
irc_send_cmd_split(ircserver, str, 2, ircserver->max_msgs_in_cmd);
|
||||||
g_free(str);
|
g_free(str);
|
||||||
|
Loading…
Reference in New Issue
Block a user