summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2006-02-28 15:59:33 +0000
committerSebastien Helleu <flashcode@flashtux.org>2006-02-28 15:59:33 +0000
commit8c662f69f97d1adfd83c8fd7b6427bdfa386ca98 (patch)
tree0a585b145cf76fea5ddae8a007667838382a471c /src
parent5c29def9d961ae45eaf2732ead01ee155a4a2596 (diff)
downloadweechat-8c662f69f97d1adfd83c8fd7b6427bdfa386ca98.zip
/msg command does not open any buffer any more
Diffstat (limited to 'src')
-rw-r--r--src/irc/irc-send.c50
1 files changed, 25 insertions, 25 deletions
diff --git a/src/irc/irc-send.c b/src/irc/irc-send.c
index 591ab496f..b021714cf 100644
--- a/src/irc/irc-send.c
+++ b/src/irc/irc-send.c
@@ -1220,34 +1220,34 @@ irc_cmd_send_msg (t_irc_server *server, t_irc_channel *channel,
return 0;
}
+ string = (char *)gui_color_decode ((unsigned char *)pos, 1);
ptr_channel = channel_search (server, arguments);
- if (!ptr_channel)
+ if (ptr_channel)
{
- ptr_channel = channel_new (server, CHANNEL_TYPE_PRIVATE, arguments);
- if (!ptr_channel)
- {
- irc_display_prefix (NULL, server->buffer, PREFIX_ERROR);
- gui_printf_nolog (server->buffer,
- _("%s cannot create new private buffer \"%s\"\n"),
- WEECHAT_ERROR, arguments);
- return -1;
- }
- gui_buffer_new (window, server, ptr_channel,
- BUFFER_TYPE_STANDARD, 1);
- gui_draw_buffer_title (ptr_channel->buffer, 1);
+ gui_printf_type (ptr_channel->buffer, MSG_TYPE_NICK,
+ "%s<%s%s%s> ",
+ GUI_COLOR(COLOR_WIN_CHAT_DARK),
+ GUI_COLOR(COLOR_WIN_NICK_SELF),
+ server->nick,
+ GUI_COLOR(COLOR_WIN_CHAT_DARK));
+ gui_printf_type (ptr_channel->buffer, MSG_TYPE_MSG,
+ "%s%s\n",
+ GUI_COLOR(COLOR_WIN_CHAT),
+ (string) ? string : "");
+ }
+ else
+ {
+ irc_display_prefix (server, server->buffer, PREFIX_SERVER);
+ gui_printf (server->buffer, "MSG%s(%s%s%s)%s: ",
+ GUI_COLOR(COLOR_WIN_CHAT_DARK),
+ GUI_COLOR(COLOR_WIN_CHAT_NICK),
+ arguments,
+ GUI_COLOR(COLOR_WIN_CHAT_DARK),
+ GUI_COLOR(COLOR_WIN_CHAT));
+ gui_printf_type (server->buffer, MSG_TYPE_MSG,
+ "%s\n",
+ (string) ? string : pos);
}
-
- gui_printf_type (ptr_channel->buffer, MSG_TYPE_NICK,
- "%s<%s%s%s> ",
- GUI_COLOR(COLOR_WIN_CHAT_DARK),
- GUI_COLOR(COLOR_WIN_NICK_SELF),
- server->nick,
- GUI_COLOR(COLOR_WIN_CHAT_DARK));
- string = (char *)gui_color_decode ((unsigned char *)pos, 1);
- gui_printf_type (ptr_channel->buffer, MSG_TYPE_MSG,
- "%s%s\n",
- GUI_COLOR(COLOR_WIN_CHAT),
- (string) ? string : "");
if (string)
free (string);
server_sendf (server, "PRIVMSG %s :%s\r\n", arguments, pos);