mirror of
https://github.com/irssi/irssi.git
synced 2026-08-10 12:23:37 +02:00
Fixed lag checking when nick was just being changed.
Support for DALnet event 437 "can't change nick while being banned in some channel" which conflicts with ircnet's "nick/channel temporarily unavailable" git-svn-id: http://svn.irssi.org/repos/irssi/trunk@806 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
990e2741aa
commit
cbcf1b07bc
5 changed files with 88 additions and 22 deletions
|
|
@ -60,6 +60,11 @@ static void lag_get(IRC_SERVER_REC *server)
|
|||
|
||||
g_return_if_fail(server != NULL);
|
||||
|
||||
/* nick changes may fail this check, so we should never do this
|
||||
while there's nick change request waiting for reply in server.. */
|
||||
if (server->nick_changing)
|
||||
return;
|
||||
|
||||
lag = g_new0(LAG_REC, 1);
|
||||
lags = g_slist_append(lags, lag);
|
||||
lag->server = server;
|
||||
|
|
@ -70,9 +75,6 @@ static void lag_get(IRC_SERVER_REC *server)
|
|||
server->lag_sent = time(NULL);
|
||||
server->lag_last_check = time(NULL);
|
||||
|
||||
/* NOTE: this will fail if there's any nick changes in buffer -
|
||||
that's why this function should be called only when the buffer
|
||||
is empty */
|
||||
irc_send_cmdv(server, "NOTICE %s :\001IRSSILAG %ld %ld\001",
|
||||
server->nick, lag->time.tv_sec, lag->time.tv_usec);
|
||||
}
|
||||
|
|
@ -141,8 +143,7 @@ static int sig_check_lag(void)
|
|||
rec->connection_lost = TRUE;
|
||||
server_disconnect((SERVER_REC *) rec);
|
||||
}
|
||||
}
|
||||
else if (rec->lag_last_check+lag_check_time < now &&
|
||||
} else if (rec->lag_last_check+lag_check_time < now &&
|
||||
rec->cmdcount == 0 && rec->connected) {
|
||||
/* no commands in buffer - get the lag */
|
||||
lag_get(rec);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue