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:
Timo Sirainen 2000-11-04 16:54:58 +00:00 committed by cras
commit cbcf1b07bc
5 changed files with 88 additions and 22 deletions

View file

@ -104,14 +104,22 @@ static void channel_rejoin(IRC_SERVER_REC *server, const char *channel)
static void event_target_unavailable(const char *data, IRC_SERVER_REC *server)
{
char *params, *channel;
IRC_CHANNEL_REC *chanrec;
g_return_if_fail(data != NULL);
params = event_get_params(data, 2, NULL, &channel);
if (ischannel(*channel)) {
/* channel is unavailable - try to join again a bit later */
channel_rejoin(server, channel);
signal_stop();
chanrec = irc_channel_find(server, channel);
if (chanrec != NULL && chanrec->joined) {
/* dalnet event - can't change nick while
banned in channel */
} else {
/* channel is unavailable - try to join again
a bit later */
channel_rejoin(server, channel);
signal_stop();
}
}
g_free(params);