diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2010-07-24 15:28:36 +0200 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2010-07-24 15:28:36 +0200 |
commit | c495217e7c02c908d831645b033cf115ccdc3d6d (patch) | |
tree | 6fb660cf39c58f3d880d4db7466391fdff169811 | |
parent | ccc595b4b445bd8eab7ea454c6eebc3ff2e5a521 (diff) |
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.
-rw-r--r-- | protocols/yahoo/yahoo.c | 10 |
1 files changed, 6 insertions, 4 deletions
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"; |