summaryrefslogtreecommitdiff
path: root/src/irc/irc-server.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2003-11-09 00:03:57 +0000
committerSebastien Helleu <flashcode@flashtux.org>2003-11-09 00:03:57 +0000
commit176198fdc68f3db2803c9ee1c586cacd02cf979b (patch)
tree8e0ddd007f8b3ed5aad12ce59310332d2f964578 /src/irc/irc-server.c
parent97d5c9bd0e42d4fa523351f7cbbbfafc464fd402 (diff)
downloadweechat-176198fdc68f3db2803c9ee1c586cacd02cf979b.zip
DEBUG macro moved to config.h
Diffstat (limited to 'src/irc/irc-server.c')
-rw-r--r--src/irc/irc-server.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/irc/irc-server.c b/src/irc/irc-server.c
index e7fe42880..fdbc3d3a5 100644
--- a/src/irc/irc-server.c
+++ b/src/irc/irc-server.c
@@ -90,10 +90,6 @@ t_irc_server *
server_alloc ()
{
t_irc_server *new_server;
-
- #if DEBUG >= 1
- log_printf ("allocating new server\n");
- #endif
/* alloc memory for new server */
if ((new_server = (t_irc_server *) malloc (sizeof (t_irc_server))) == NULL)
@@ -208,7 +204,7 @@ server_new (char *name, int autoconnect, char *address, int port,
if (!name || !address || (port < 0))
return NULL;
- #if DEBUG >= 1
+ #ifdef DEBUG
log_printf ("creating new server (name:%s, address:%s, port:%d, pwd:%s, "
"nick1:%s, nick2:%s, nick3:%s, username:%s, realname:%s, "
"command:%s, autojoin:%s)\n",
@@ -281,7 +277,7 @@ server_sendf (t_irc_server * server, char *fmt, ...)
if ((size_buf < 0) || (size_buf > (int) (sizeof (buffer) - 1)))
size_buf = strlen (buffer);
buffer[size_buf - 2] = '\0';
- #if DEBUG >= 2
+ #ifdef DEBUG
gui_printf (server->window, "[DEBUG] Sending to server >>> %s\n", buffer);
#endif
buffer[size_buf - 2] = '\r';
@@ -376,7 +372,7 @@ server_msgq_flush ()
/* TODO: optimize this function, parse only a few messages (for low CPU time!) */
while (recv_msgq)
{
- #if DEBUG >= 2
+ #ifdef DEBUG
gui_printf (gui_current_window, "[DEBUG] %s\n", recv_msgq->data);
#endif
@@ -387,7 +383,7 @@ server_msgq_flush ()
if (ptr_data)
{
- #if DEBUG >= 2
+ #ifdef DEBUG
gui_printf (NULL, "[DEBUG] data received from server: %s\n", ptr_data);
#endif