From 6d59ead76baf62ec9ae3b6f57ee0050ec14330ef Mon Sep 17 00:00:00 2001 From: =?utf8?q?Enrico=20Tr=C3=B6ger?= Date: Thu, 10 Jul 2008 20:08:38 +0200 Subject: [PATCH] Delay a pending kick also when we have already op status, not only when waiting for it. --- src/irc.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/irc.c b/src/irc.c index 285fce6..a6c7908 100644 --- a/src/irc.c +++ b/src/irc.c @@ -50,6 +50,7 @@ config_t *config; static void irc_kick(irc_conn_t *irc_conn, const gchar *nickname); + gboolean irc_query_names(gpointer data) { irc_conn_t *irc = data; @@ -356,6 +357,7 @@ static gboolean process_line(irc_conn_t *irc_conn, const gchar *line, guint len) content = irc_get_message(line, len); irc_log(irc_conn, line, FALSE); +TRACE // An error occurred, try to quit cleanly and print the error if (response > 400 && response < 503) @@ -629,7 +631,6 @@ static gboolean irc_amiop(irc_conn_t *irc_conn) const gchar *pos; const gchar *userlist; - irc_query_names(irc_conn); userlist = get_user_list(); if ( (pos = strstr(userlist, config->nickname)) ) @@ -660,12 +661,13 @@ static void irc_kick(irc_conn_t *irc_conn, const gchar *nickname) if (! irc_amiop(irc_conn)) { irc_toggle_op(irc_conn, TRUE); /// TODO: prüfen, ob das auch erfolreich war - // give the server a chance to set the op status for us before we make us of it, - // and let the victim read his *bang* message - g_usleep(1500000); need_deop = TRUE; } + // give the server a chance to set the op status for us before we make us of it, + // and let the victim read his *bang* message + g_usleep(1500000); + msg_len = g_snprintf(msg, sizeof msg, "KICK #%s %s\r\n", config->channel, nickname); irc_send(irc_conn, msg, msg_len); if (need_deop) -- 2.11.4.GIT