summaryrefslogtreecommitdiff
path: root/src/irc
diff options
context:
space:
mode:
Diffstat (limited to 'src/irc')
-rw-r--r--src/irc/irc-channel.c3
-rw-r--r--src/irc/irc-recv.c12
-rw-r--r--src/irc/irc-send.c6
-rw-r--r--src/irc/irc-server.c11
4 files changed, 22 insertions, 10 deletions
diff --git a/src/irc/irc-channel.c b/src/irc/irc-channel.c
index fbff9d67d..84a7c2fb4 100644
--- a/src/irc/irc-channel.c
+++ b/src/irc/irc-channel.c
@@ -384,7 +384,8 @@ channel_create_dcc (t_irc_dcc *ptr_dcc)
ptr_dcc->nick);
if (!ptr_channel)
return 0;
- gui_buffer_new (gui_current_window, ptr_dcc->server, ptr_channel, 0, 0);
+ gui_buffer_new (gui_current_window, ptr_dcc->server, ptr_channel,
+ BUFFER_TYPE_STANDARD, 0);
if (ptr_channel->dcc_chat &&
(!DCC_ENDED(((t_irc_dcc *)(ptr_channel->dcc_chat))->status)))
diff --git a/src/irc/irc-recv.c b/src/irc/irc-recv.c
index e74bdcdb3..a6b539d5f 100644
--- a/src/irc/irc-recv.c
+++ b/src/irc/irc-recv.c
@@ -402,7 +402,8 @@ irc_cmd_recv_join (t_irc_server *server, char *host, char *nick, char *arguments
WEECHAT_ERROR, arguments);
return -1;
}
- gui_buffer_new (gui_current_window, server, ptr_channel, 0, 1);
+ gui_buffer_new (gui_current_window, server, ptr_channel,
+ BUFFER_TYPE_STANDARD, 1);
}
if (!command_ignored)
@@ -1234,7 +1235,8 @@ irc_cmd_recv_notice (t_irc_server *server, char *host, char *nick, char *argumen
WEECHAT_ERROR, nick);
return -1;
}
- gui_buffer_new (gui_current_window, server, ptr_channel, 0, 0);
+ gui_buffer_new (gui_current_window, server, ptr_channel,
+ BUFFER_TYPE_STANDARD, 0);
}
if (!ptr_channel->topic)
ptr_channel->topic = strdup ((host2) ? host2 : "");
@@ -2050,7 +2052,8 @@ irc_cmd_recv_privmsg (t_irc_server *server, char *host, char *nick, char *argume
WEECHAT_ERROR, nick);
return -1;
}
- gui_buffer_new (gui_current_window, server, ptr_channel, 0, 0);
+ gui_buffer_new (gui_current_window, server, ptr_channel,
+ BUFFER_TYPE_STANDARD, 0);
}
if (!ptr_channel->topic)
ptr_channel->topic = strdup (host2);
@@ -2142,7 +2145,8 @@ irc_cmd_recv_privmsg (t_irc_server *server, char *host, char *nick, char *argume
WEECHAT_ERROR, nick);
return -1;
}
- gui_buffer_new (gui_current_window, server, ptr_channel, 0, 0);
+ gui_buffer_new (gui_current_window, server, ptr_channel,
+ BUFFER_TYPE_STANDARD, 0);
}
if (!ptr_channel->topic)
ptr_channel->topic = strdup (host2);
diff --git a/src/irc/irc-send.c b/src/irc/irc-send.c
index 81890211e..591ab496f 100644
--- a/src/irc/irc-send.c
+++ b/src/irc/irc-send.c
@@ -1232,7 +1232,8 @@ irc_cmd_send_msg (t_irc_server *server, t_irc_channel *channel,
WEECHAT_ERROR, arguments);
return -1;
}
- gui_buffer_new (window, server, ptr_channel, 0, 1);
+ gui_buffer_new (window, server, ptr_channel,
+ BUFFER_TYPE_STANDARD, 1);
gui_draw_buffer_title (ptr_channel->buffer, 1);
}
@@ -1603,7 +1604,8 @@ irc_cmd_send_query (t_irc_server *server, t_irc_channel *channel,
WEECHAT_ERROR, arguments);
return -1;
}
- gui_buffer_new (window, server, ptr_channel, 0, 1);
+ gui_buffer_new (window, server, ptr_channel,
+ BUFFER_TYPE_STANDARD, 1);
gui_draw_buffer_title (ptr_channel->buffer, 1);
}
else
diff --git a/src/irc/irc-server.c b/src/irc/irc-server.c
index 1f5d4dda3..7c00e4687 100644
--- a/src/irc/irc-server.c
+++ b/src/irc/irc-server.c
@@ -552,11 +552,14 @@ server_sendf (t_irc_server *server, char *fmt, ...)
buffer[sizeof (buffer) - 1] = '\0';
if ((size_buf < 0) || (size_buf > (int) (sizeof (buffer) - 1)))
size_buf = strlen (buffer);
-#ifdef DEBUG
+
buffer[size_buf - 2] = '\0';
+ gui_printf_raw_data (server, 1, buffer);
+#ifdef DEBUG
gui_printf (server->buffer, "[DEBUG] Sending to server >>> %s\n", buffer);
- buffer[size_buf - 2] = '\r';
#endif
+ buffer[size_buf - 2] = '\r';
+
if (server_send (server, buffer, strlen (buffer)) <= 0)
{
irc_display_prefix (server, server->buffer, PREFIX_ERROR);
@@ -726,6 +729,7 @@ server_msgq_flush ()
if (ptr_data && ptr_data[0])
{
+ gui_printf_raw_data (recv_msgq->server, 0, ptr_data);
#ifdef DEBUG
gui_printf (NULL, "[DEBUG] data received from server: %s\n", ptr_data);
#endif
@@ -1633,7 +1637,8 @@ server_auto_connect (int auto_connect, int command_line)
if ( ((command_line) && (ptr_server->command_line))
|| ((!command_line) && (auto_connect) && (ptr_server->autoconnect)) )
{
- (void) gui_buffer_new (gui_current_window, ptr_server, NULL, 0, 1);
+ (void) gui_buffer_new (gui_current_window, ptr_server, NULL,
+ BUFFER_TYPE_STANDARD, 1);
gui_redraw_buffer (gui_current_window->buffer);
if (!server_connect (ptr_server))
server_reconnect_schedule (ptr_server);