From c495217e7c02c908d831645b033cf115ccdc3d6d Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sat, 24 Jul 2010 15:28:36 +0200 Subject: Inverting allow_reconnect logic on login failures. Automatic reconnects were getting im.bitlbee.org IP-banned sometimes. This fix keeps it happy for some time already. --- protocols/yahoo/yahoo.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'protocols/yahoo') diff --git a/protocols/yahoo/yahoo.c b/protocols/yahoo/yahoo.c index fd0b0bc3..dfd2e70f 100644 --- a/protocols/yahoo/yahoo.c +++ b/protocols/yahoo/yahoo.c @@ -510,7 +510,7 @@ void ext_yahoo_login_response( int id, int succ, const char *url ) else { char *errstr; - int allow_reconnect = TRUE; + int allow_reconnect = FALSE; yd->logged_in = FALSE; @@ -520,13 +520,15 @@ void ext_yahoo_login_response( int id, int succ, const char *url ) errstr = "Incorrect Yahoo! password"; else if( succ == YAHOO_LOGIN_LOCK ) errstr = "Yahoo! account locked"; + else if( succ == 1236 ) + errstr = "Yahoo! account locked or machine temporarily banned"; else if( succ == YAHOO_LOGIN_DUPL ) - { errstr = "Logged in on a different machine or device"; - allow_reconnect = FALSE; - } else if( succ == YAHOO_LOGIN_SOCK ) + { errstr = "Socket problem"; + allow_reconnect = TRUE; + } else errstr = "Unknown error"; -- cgit v1.2.3