Changeset c2fb3809
- Timestamp:
- 2007-04-15T22:39:35Z (17 years ago)
- Branches:
- master
- Children:
- 84b045d
- Parents:
- cd4723c
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
account.c
rcd4723c rc2fb3809 223 223 void account_off( irc_t *irc, account_t *a ) 224 224 { 225 a->ic->wants_to_die = TRUE; 226 imc_logout( a->ic ); 225 imc_logout( a->ic, TRUE ); 227 226 a->ic = NULL; 228 227 if( a->reconnect ) -
irc.c
rcd4723c rc2fb3809 231 231 for (account = irc->accounts; account; account = account->next) { 232 232 if (account->ic) { 233 account->ic->wants_to_die = TRUE; 234 imc_logout(account->ic); 233 imc_logout(account->ic, TRUE); 235 234 } else if (account->reconnect) { 236 235 cancel_auto_reconnect(account); … … 916 915 g_snprintf( reason, sizeof( reason ), "%s %s", irc->myhost, 917 916 u->ic->acc->server ); 918 else if( ( s = strchr( u->ic-> username, '@' ) ) )917 else if( ( s = strchr( u->ic->acc->user, '@' ) ) ) 919 918 g_snprintf( reason, sizeof( reason ), "%s %s", irc->myhost, 920 919 s + 1 ); -
protocols/jabber/io.c
rcd4723c rc2fb3809 118 118 119 119 imc_error( ic, "Short write() to server" ); 120 imc_logout( ic );120 imc_logout( ic, TRUE ); 121 121 return FALSE; 122 122 } … … 161 161 { 162 162 imc_error( ic, "XML stream error" ); 163 imc_logout( ic );163 imc_logout( ic, TRUE ); 164 164 return FALSE; 165 165 } … … 205 205 imc_error( ic, "TLS is turned on for this " 206 206 "account, but is not supported by this server" ); 207 imc_logout( ic );207 imc_logout( ic, FALSE ); 208 208 return FALSE; 209 209 } … … 217 217 { 218 218 imc_error( ic, "XML stream error" ); 219 imc_logout( ic );219 imc_logout( ic, TRUE ); 220 220 return FALSE; 221 221 } … … 228 228 229 229 imc_error( ic, "Error while reading from server" ); 230 imc_logout( ic );230 imc_logout( ic, TRUE ); 231 231 return FALSE; 232 232 } … … 243 243 { 244 244 imc_error( ic, "Could not connect to server" ); 245 imc_logout( ic );245 imc_logout( ic, TRUE ); 246 246 return FALSE; 247 247 } … … 264 264 265 265 imc_error( ic, "Could not connect to server" ); 266 imc_logout( ic );266 imc_logout( ic, TRUE ); 267 267 return FALSE; 268 268 } … … 275 275 static xt_status jabber_end_of_stream( struct xt_node *node, gpointer data ) 276 276 { 277 imc_logout( data );277 imc_logout( data, TRUE ); 278 278 return XT_ABORT; 279 279 } … … 298 298 { 299 299 imc_error( ic, "Server requires TLS connections, but TLS is turned off for this account" ); 300 imc_logout( ic );300 imc_logout( ic, FALSE ); 301 301 302 302 return XT_ABORT; … … 328 328 { 329 329 imc_error( ic, "TLS is turned on for this account, but is not supported by this server" ); 330 imc_logout( ic );330 imc_logout( ic, FALSE ); 331 331 332 332 return XT_ABORT; … … 429 429 struct xt_node *c; 430 430 char *s, *type = NULL, *text = NULL; 431 int allow_reconnect = TRUE; 431 432 432 433 for( c = node->children; c; c = c->next ) … … 453 454 { 454 455 imc_error( ic, "Unknown stream error reported by server" ); 455 imc_logout( ic );456 imc_logout( ic, allow_reconnect ); 456 457 return XT_ABORT; 457 458 } … … 463 464 { 464 465 imc_error( ic, "Account and resource used from a different location" ); 465 ic->wants_to_die = TRUE;466 allow_reconnect = FALSE; 466 467 } 467 468 else … … 470 471 } 471 472 472 imc_logout( ic );473 imc_logout( ic, allow_reconnect ); 473 474 474 475 return XT_ABORT; -
protocols/jabber/iq.c
rcd4723c rc2fb3809 40 40 { 41 41 imc_error( ic, "Received IQ packet without type." ); 42 imc_logout( ic );42 imc_logout( ic, TRUE ); 43 43 return XT_ABORT; 44 44 } … … 220 220 { 221 221 imc_log( ic, "WARNING: Received incomplete IQ packet while authenticating" ); 222 imc_logout( ic );222 imc_logout( ic, FALSE ); 223 223 return XT_HANDLED; 224 224 } … … 259 259 260 260 imc_error( ic, "Can't find suitable authentication method" ); 261 imc_logout( ic );261 imc_logout( ic, FALSE ); 262 262 return XT_ABORT; 263 263 } … … 278 278 { 279 279 imc_log( ic, "WARNING: Received incomplete IQ packet while authenticating" ); 280 imc_logout( ic );280 imc_logout( ic, FALSE ); 281 281 return XT_HANDLED; 282 282 } … … 285 285 { 286 286 imc_error( ic, "Authentication failure" ); 287 imc_logout( ic );287 imc_logout( ic, FALSE ); 288 288 return XT_ABORT; 289 289 } -
protocols/jabber/jabber.c
rcd4723c rc2fb3809 73 73 { 74 74 imc_error( ic, "Incomplete account name (format it like <username@jabberserver.name>)" ); 75 imc_logout( ic );75 imc_logout( ic, FALSE ); 76 76 return; 77 77 } … … 166 166 imc_log( ic, "Incorrect port number, must be in the %d-%d range", 167 167 JABBER_PORT_MIN, JABBER_PORT_MAX ); 168 imc_logout( ic );168 imc_logout( ic, FALSE ); 169 169 return; 170 170 } … … 187 187 { 188 188 imc_error( ic, "Could not connect to server" ); 189 imc_logout( ic );189 imc_logout( ic, TRUE ); 190 190 } 191 191 } -
protocols/jabber/sasl.c
rcd4723c rc2fb3809 45 45 if( !s || strcmp( s, XMLNS_SASL ) != 0 ) 46 46 { 47 imc_logout( ic ); 47 imc_log( ic, "Stream error while authenticating" ); 48 imc_logout( ic, FALSE ); 48 49 return XT_ABORT; 49 50 } … … 63 64 { 64 65 imc_error( ic, "No known SASL authentication schemes supported" ); 65 imc_logout( ic );66 imc_logout( ic, FALSE ); 66 67 return XT_ABORT; 67 68 } … … 280 281 error: 281 282 imc_error( ic, "Incorrect SASL challenge received" ); 282 imc_logout( ic );283 imc_logout( ic, FALSE ); 283 284 284 285 silent_error: … … 303 304 if( !s || strcmp( s, XMLNS_SASL ) != 0 ) 304 305 { 305 imc_logout( ic ); 306 imc_log( ic, "Stream error while authenticating" ); 307 imc_logout( ic, FALSE ); 306 308 return XT_ABORT; 307 309 } … … 315 317 { 316 318 imc_error( ic, "Authentication failure" ); 317 imc_logout( ic );319 imc_logout( ic, FALSE ); 318 320 return XT_ABORT; 319 321 } -
protocols/msn/msn.c
rcd4723c rc2fb3809 48 48 { 49 49 imc_error( ic, "Invalid account name" ); 50 imc_logout( ic );50 imc_logout( ic, FALSE ); 51 51 return; 52 52 } … … 58 58 { 59 59 imc_error( ic, "Could not connect to server" ); 60 imc_logout( ic );60 imc_logout( ic, TRUE ); 61 61 return; 62 62 } … … 379 379 fn = msn_http_encode( value ); 380 380 381 g_snprintf( buf, sizeof( buf ), "REA %d %s %s\r\n", ++md->trId, ic-> username, fn );381 g_snprintf( buf, sizeof( buf ), "REA %d %s %s\r\n", ++md->trId, ic->acc->user, fn ); 382 382 msn_write( ic, buf, strlen( buf ) ); 383 383 g_free( fn ); -
protocols/msn/msn_util.c
rcd4723c rc2fb3809 37 37 { 38 38 imc_error( ic, "Short write() to main server" ); 39 imc_logout( ic );39 imc_logout( ic, TRUE ); 40 40 return( 0 ); 41 41 } -
protocols/msn/ns.c
rcd4723c rc2fb3809 48 48 { 49 49 imc_error( ic, "Could not connect to server" ); 50 imc_logout( ic );50 imc_logout( ic, TRUE ); 51 51 return FALSE; 52 52 } … … 90 90 { 91 91 imc_error( ic, "Error while reading from server" ); 92 imc_logout( ic );92 imc_logout( ic, TRUE ); 93 93 94 94 return FALSE; … … 115 115 { 116 116 imc_error( ic, "Unsupported protocol" ); 117 imc_logout( ic );117 imc_logout( ic, FALSE ); 118 118 return( 0 ); 119 119 } 120 120 121 121 g_snprintf( buf, sizeof( buf ), "CVR %d 0x0409 mac 10.2.0 ppc macmsgs 3.5.1 macmsgs %s\r\n", 122 ++md->trId, ic-> username);122 ++md->trId, ic->acc->user ); 123 123 return( msn_write( ic, buf, strlen( buf ) ) ); 124 124 } … … 126 126 { 127 127 /* We don't give a damn about the information we just received */ 128 g_snprintf( buf, sizeof( buf ), "USR %d TWN I %s\r\n", ++md->trId, ic-> username);128 g_snprintf( buf, sizeof( buf ), "USR %d TWN I %s\r\n", ++md->trId, ic->acc->user ); 129 129 return( msn_write( ic, buf, strlen( buf ) ) ); 130 130 } … … 144 144 { 145 145 imc_error( ic, "Syntax error" ); 146 imc_logout( ic );146 imc_logout( ic, TRUE ); 147 147 return( 0 ); 148 148 } … … 163 163 { 164 164 imc_error( ic, "Syntax error" ); 165 imc_logout( ic );165 imc_logout( ic, TRUE ); 166 166 return( 0 ); 167 167 } … … 173 173 { 174 174 imc_error( ic, "Unknown authentication method for switchboard" ); 175 imc_logout( ic );175 imc_logout( ic, TRUE ); 176 176 return( 0 ); 177 177 } … … 205 205 { 206 206 imc_error( ic, "Syntax error" ); 207 imc_logout( ic );207 imc_logout( ic, TRUE ); 208 208 return( 0 ); 209 209 } … … 214 214 { 215 215 /* Time for some Passport black magic... */ 216 if( !passport_get_id( msn_auth_got_passport_id, ic, ic-> username, ic->password, cmd[4] ) )216 if( !passport_get_id( msn_auth_got_passport_id, ic, ic->acc->user, ic->acc->pass, cmd[4] ) ) 217 217 { 218 218 imc_error( ic, "Error while contacting Passport server" ); 219 imc_logout( ic );219 imc_logout( ic, TRUE ); 220 220 return( 0 ); 221 221 } … … 244 244 { 245 245 imc_error( ic, "Unknown authentication type" ); 246 imc_logout( ic );246 imc_logout( ic, FALSE ); 247 247 return( 0 ); 248 248 } … … 253 253 { 254 254 imc_error( ic, "Syntax error" ); 255 imc_logout( ic );255 imc_logout( ic, TRUE ); 256 256 return( 0 ); 257 257 } … … 262 262 { 263 263 imc_error( ic, "Syntax error" ); 264 imc_logout( ic );264 imc_logout( ic, TRUE ); 265 265 return( 0 ); 266 266 } … … 293 293 { 294 294 imc_error( ic, "Syntax error" ); 295 imc_logout( ic );295 imc_logout( ic, TRUE ); 296 296 return( 0 ); 297 297 } … … 345 345 { 346 346 imc_error( ic, "Syntax error" ); 347 imc_logout( ic );347 imc_logout( ic, TRUE ); 348 348 return( 0 ); 349 349 } … … 364 364 { 365 365 imc_error( ic, "Syntax error" ); 366 imc_logout( ic );366 imc_logout( ic, TRUE ); 367 367 return( 0 ); 368 368 } … … 386 386 { 387 387 imc_error( ic, "Syntax error" ); 388 imc_logout( ic );388 imc_logout( ic, TRUE ); 389 389 return( 0 ); 390 390 } … … 414 414 { 415 415 imc_error( ic, "Syntax error" ); 416 imc_logout( ic );416 imc_logout( ic, TRUE ); 417 417 return( 0 ); 418 418 } … … 439 439 { 440 440 imc_error( ic, "Syntax error" ); 441 imc_logout( ic );441 imc_logout( ic, TRUE ); 442 442 return( 0 ); 443 443 } … … 449 449 { 450 450 imc_error( ic, "Syntax error" ); 451 imc_logout( ic );451 imc_logout( ic, TRUE ); 452 452 return( 0 ); 453 453 } … … 459 459 { 460 460 imc_error( ic, "Unknown authentication method for switchboard" ); 461 imc_logout( ic );461 imc_logout( ic, TRUE ); 462 462 return( 0 ); 463 463 } … … 479 479 { 480 480 imc_error( ic, "Syntax error" ); 481 imc_logout( ic );481 imc_logout( ic, TRUE ); 482 482 return( 0 ); 483 483 } … … 497 497 else if( strcmp( cmd[0], "OUT" ) == 0 ) 498 498 { 499 int allow_reconnect = TRUE; 500 499 501 if( cmd[1] && strcmp( cmd[1], "OTH" ) == 0 ) 500 502 { 501 503 imc_error( ic, "Someone else logged in with your account" ); 502 ic->wants_to_die = 1;504 allow_reconnect = FALSE; 503 505 } 504 506 else if( cmd[1] && strcmp( cmd[1], "SSD" ) == 0 ) … … 511 513 } 512 514 513 imc_logout( ic );515 imc_logout( ic, allow_reconnect ); 514 516 return( 0 ); 515 517 } … … 519 521 { 520 522 imc_error( ic, "Syntax error" ); 521 imc_logout( ic );522 return( 0 ); 523 } 524 525 if( g_strcasecmp( cmd[3], ic-> username) == 0 )523 imc_logout( ic, TRUE ); 524 return( 0 ); 525 } 526 527 if( g_strcasecmp( cmd[3], ic->acc->user ) == 0 ) 526 528 { 527 529 set_t *s; … … 553 555 { 554 556 imc_error( ic, "Syntax error" ); 555 imc_logout( ic );557 imc_logout( ic, TRUE ); 556 558 return( 0 ); 557 559 } … … 566 568 if( err->flags & STATUS_FATAL ) 567 569 { 568 imc_logout( ic );570 imc_logout( ic, TRUE ); 569 571 return( 0 ); 570 572 } … … 673 675 imc_error( ic, "Error during Passport authentication (%s)", 674 676 rep->error_string ? rep->error_string : "Unknown error" ); 675 imc_logout( ic );677 imc_logout( ic, TRUE ); 676 678 } 677 679 else -
protocols/msn/sb.c
rcd4723c rc2fb3809 142 142 else 143 143 { 144 i = strlen( MSN_TYPING_HEADERS ) + strlen( sb->ic-> username);144 i = strlen( MSN_TYPING_HEADERS ) + strlen( sb->ic->acc->user ); 145 145 buf = g_new0( char, i ); 146 i = g_snprintf( buf, i, MSN_TYPING_HEADERS, sb->ic-> username);146 i = g_snprintf( buf, i, MSN_TYPING_HEADERS, sb->ic->acc->user ); 147 147 } 148 148 … … 188 188 /* Populate the channel. */ 189 189 if( sb->who ) add_chat_buddy( sb->chat, sb->who ); 190 add_chat_buddy( sb->chat, ic-> username);190 add_chat_buddy( sb->chat, ic->acc->user ); 191 191 192 192 /* And make sure the switchboard doesn't look like a regular chat anymore. */ … … 280 280 281 281 if( sb->session == MSN_SB_NEW ) 282 g_snprintf( buf, sizeof( buf ), "USR %d %s %s\r\n", ++sb->trId, ic-> username, sb->key );282 g_snprintf( buf, sizeof( buf ), "USR %d %s %s\r\n", ++sb->trId, ic->acc->user, sb->key ); 283 283 else 284 g_snprintf( buf, sizeof( buf ), "ANS %d %s %s %d\r\n", ++sb->trId, ic-> username, sb->key, sb->session );284 g_snprintf( buf, sizeof( buf ), "ANS %d %s %s %d\r\n", ++sb->trId, ic->acc->user, sb->key, sb->session ); 285 285 286 286 if( msn_sb_write( sb, buf, strlen( buf ) ) ) … … 322 322 { 323 323 imc_error( ic, "Received an XFR from a switchboard server, unable to comply! This is likely to be a bug, please report it!" ); 324 imc_logout( ic );324 imc_logout( ic, TRUE ); 325 325 return( 0 ); 326 326 } … … 384 384 if( num == tot ) 385 385 { 386 add_chat_buddy( sb->chat, ic-> username);386 add_chat_buddy( sb->chat, ic->acc->user ); 387 387 } 388 388 } … … 537 537 else if( err->flags & STATUS_FATAL ) 538 538 { 539 imc_logout( ic );539 imc_logout( ic, TRUE ); 540 540 return 0; 541 541 } -
protocols/nogaim.c
rcd4723c rc2fb3809 151 151 ic = g_new0( struct im_connection, 1 ); 152 152 153 /* Maybe we should get rid of this memory waste later. ;-) */154 g_snprintf( ic->username, sizeof( ic->username ), "%s", acc->user );155 g_snprintf( ic->password, sizeof( ic->password ), "%s", acc->pass );156 157 153 ic->irc = acc->irc; 158 154 ic->acc = acc; … … 201 197 /* If we found one, include the screenname in the message. */ 202 198 if( a ) 203 irc_usermsg( ic->irc, "%s(%s) - %s", ic->acc->prpl->name, ic-> username, text );199 irc_usermsg( ic->irc, "%s(%s) - %s", ic->acc->prpl->name, ic->acc->user, text ); 204 200 else 205 201 irc_usermsg( ic->irc, "%s - %s", ic->acc->prpl->name, text ); … … 291 287 } 292 288 293 void imc_logout( struct im_connection *ic )289 void imc_logout( struct im_connection *ic, int allow_reconnect ) 294 290 { 295 291 irc_t *irc = ic->irc; … … 333 329 /* Uhm... This is very sick. */ 334 330 } 335 else if( !ic->wants_to_die&& set_getbool( &irc->set, "auto_reconnect" ) &&331 else if( allow_reconnect && set_getbool( &irc->set, "auto_reconnect" ) && 336 332 set_getbool( &a->set, "auto_reconnect" ) ) 337 333 { … … 436 432 437 433 return( b ); 438 }439 440 void signoff_blocked( struct im_connection *ic )441 {442 return; /* Make all blocked users look invisible (TODO?) */443 434 } 444 435 … … 730 721 731 722 /* Gaim sends own messages through this too. IRC doesn't want this, so kill them */ 732 if( g_strcasecmp( who, ic-> username) == 0 )723 if( g_strcasecmp( who, ic->acc->user ) == 0 ) 733 724 return; 734 725 … … 781 772 782 773 /* It might be yourself! */ 783 if( b->ic->acc->prpl->handle_cmp( handle, b->ic-> username) == 0 )774 if( b->ic->acc->prpl->handle_cmp( handle, b->ic->acc->user ) == 0 ) 784 775 { 785 776 u = user_find( b->ic->irc, b->ic->irc->nick ); … … 815 806 816 807 /* It might be yourself! */ 817 if( g_strcasecmp( handle, b->ic-> username) == 0 )808 if( g_strcasecmp( handle, b->ic->acc->user ) == 0 ) 818 809 { 819 810 u = user_find( b->ic->irc, b->ic->irc->nick ); … … 958 949 { 959 950 char *buf = NULL; 960 int st;961 951 962 952 if( ( c->ic->flags & OPT_CONN_HTML ) && ( g_strncasecmp( msg, "<html>", 6 ) != 0 ) ) -
protocols/nogaim.h
rcd4723c rc2fb3809 80 80 int permdeny; 81 81 82 char username[64];83 82 char displayname[128]; 84 char password[32];85 86 83 char *away; 87 84 88 85 int evil; 89 gboolean wants_to_die; /* defaults to FALSE */90 86 91 87 /* BitlBee */ … … 211 207 G_MODULE_EXPORT void imc_error( struct im_connection *ic, char *format, ... ); 212 208 G_MODULE_EXPORT void imc_connected( struct im_connection *ic ); 213 G_MODULE_EXPORT void imc_logout( struct im_connection *ic );209 G_MODULE_EXPORT void imc_logout( struct im_connection *ic, int allow_reconnect ); 214 210 215 211 /* dialogs.c */ -
protocols/oscar/oscar.c
rcd4723c rc2fb3809 263 263 aim_rxdispatch(odata->sess); 264 264 if (odata->killme) 265 imc_logout(ic );265 imc_logout(ic, TRUE); 266 266 } else { 267 267 if ((conn->type == AIM_CONN_TYPE_BOS) || 268 268 !(aim_getconn_type(odata->sess, AIM_CONN_TYPE_BOS))) { 269 269 imc_error(ic, _("Disconnected.")); 270 imc_logout(ic );270 imc_logout(ic, TRUE); 271 271 } else if (conn->type == AIM_CONN_TYPE_CHAT) { 272 272 struct chat_connection *c = find_oscar_chat_by_conn(ic, conn); … … 326 326 if (source < 0) { 327 327 imc_error(ic, _("Couldn't connect to host")); 328 imc_logout(ic );328 imc_logout(ic, TRUE); 329 329 return FALSE; 330 330 } … … 361 361 We don't do those anymore, but let's stick with it, just in case 362 362 it accidentally fixes something else too... </bitlbee> */ 363 ic->password[8] = 0; 363 /* ic->acc->pass[8] = 0; 364 Not touching this anymore now that it belongs to account_t! 365 Let's hope nothing will break. ;-) */ 364 366 } else { 365 367 ic->flags |= OPT_CONN_HTML; … … 379 381 if (conn == NULL) { 380 382 imc_error(ic, _("Unable to login to AIM")); 381 imc_logout(ic );383 imc_logout(ic, TRUE); 382 384 return; 383 385 } … … 385 387 if (acc->server == NULL) { 386 388 imc_error(ic, "No servername specified"); 387 imc_logout(ic );389 imc_logout(ic, FALSE); 388 390 return; 389 391 } … … 394 396 } 395 397 396 imc_log(ic, _("Signon: %s"), ic-> username);398 imc_log(ic, _("Signon: %s"), ic->acc->user); 397 399 398 400 aim_conn_addhandler(sess, conn, 0x0017, 0x0007, gaim_parse_login, 0); … … 403 405 if (conn->fd < 0) { 404 406 imc_error(ic, _("Couldn't connect to host")); 405 imc_logout(ic );407 imc_logout(ic, TRUE); 406 408 return; 407 409 } 408 aim_request_login(sess, conn, ic-> username);410 aim_request_login(sess, conn, ic->acc->user); 409 411 } 410 412 … … 463 465 if (source < 0) { 464 466 imc_error(ic, _("Could Not Connect")); 465 imc_logout(ic );467 imc_logout(ic, TRUE); 466 468 return FALSE; 467 469 } … … 728 730 va_end(ap); 729 731 730 aim_send_login(sess, fr->conn, ic-> username, ic->password, &info, key);732 aim_send_login(sess, fr->conn, ic->acc->user, ic->acc->pass, &info, key); 731 733 732 734 return 1; … … 1013 1015 signon = time(NULL) - info->sessionlen; 1014 1016 1015 tmp = g_strdup(normalize(ic-> username));1017 tmp = g_strdup(normalize(ic->acc->user)); 1016 1018 if (!strcmp(tmp, normalize(info->sn))) 1017 1019 g_snprintf(ic->displayname, sizeof(ic->displayname), "%s", info->sn); … … 2136 2138 switch(ic->permdeny) { 2137 2139 case 1: 2138 aim_bos_changevisibility(od->sess, od->conn, AIM_VISIBILITYCHANGE_DENYADD, ic-> username);2140 aim_bos_changevisibility(od->sess, od->conn, AIM_VISIBILITYCHANGE_DENYADD, ic->acc->user); 2139 2141 break; 2140 2142 case 2: 2141 aim_bos_changevisibility(od->sess, od->conn, AIM_VISIBILITYCHANGE_PERMITADD, ic-> username);2143 aim_bos_changevisibility(od->sess, od->conn, AIM_VISIBILITYCHANGE_PERMITADD, ic->acc->user); 2142 2144 break; 2143 2145 case 3: … … 2162 2164 break; 2163 2165 } 2164 signoff_blocked(ic);2165 2166 } else { 2166 2167 if (od->sess->ssi.received_data) … … 2584 2585 char * chatname; 2585 2586 2586 chatname = g_strdup_printf("%s%d", ic-> username, chat_id++);2587 chatname = g_strdup_printf("%s%d", ic->acc->user, chat_id++); 2587 2588 2588 2589 ret = oscar_chat_join(ic, chatname); -
protocols/yahoo/yahoo.c
rcd4723c rc2fb3809 361 361 YList *members; 362 362 363 roomname = g_new0( char, strlen( ic->username ) + 16 ); 364 g_snprintf( roomname, strlen( ic->username ) + 16, "%s-Bee-%d", ic->username, byahoo_chat_id ); 363 roomname = g_strdup_printf( "%s-Bee-%d", ic->acc->user, byahoo_chat_id ); 365 364 366 365 c = serv_got_joined_chat( ic, roomname ); 367 add_chat_buddy( c, ic-> username);366 add_chat_buddy( c, ic->acc->user ); 368 367 369 368 /* FIXME: Free this thing when the chat's destroyed. We can't *always* … … 518 517 { 519 518 char *errstr; 519 int allow_reconnect = TRUE; 520 520 521 521 yd->logged_in = FALSE; … … 530 530 { 531 531 errstr = "Logged in on a different machine or device"; 532 ic->wants_to_die = TRUE;532 allow_reconnect = FALSE; 533 533 } 534 534 else if( succ == YAHOO_LOGIN_SOCK ) … … 542 542 imc_error( ic, "Error %d (%s)", succ, errstr ); 543 543 544 imc_logout( ic );544 imc_logout( ic, allow_reconnect ); 545 545 } 546 546 } … … 642 642 643 643 if( fatal ) 644 imc_logout( ic );644 imc_logout( ic, TRUE ); 645 645 } 646 646 … … 768 768 { 769 769 yahoo_conference_logon( inv->yid, NULL, inv->members, inv->name ); 770 add_chat_buddy( inv->c, inv->ic-> username);770 add_chat_buddy( inv->c, inv->ic->acc->user ); 771 771 g_free( inv->name ); 772 772 g_free( inv ); … … 798 798 799 799 for( m = members; m; m = m->next ) 800 if( g_strcasecmp( m->data, ic-> username) != 0 )800 if( g_strcasecmp( m->data, ic->acc->user ) != 0 ) 801 801 add_chat_buddy( inv->c, m->data ); 802 802 -
root_commands.c
rcd4723c rc2fb3809 880 880 for( num = 0; q; q = q->next, num ++ ) 881 881 if( q->ic ) /* Not necessary yet, but it might come later */ 882 irc_usermsg( irc, "%d, %s(%s): %s", num, q->ic->acc->prpl->name, q->ic-> username, q->question );882 irc_usermsg( irc, "%d, %s(%s): %s", num, q->ic->acc->prpl->name, q->ic->acc->user, q->question ); 883 883 else 884 884 irc_usermsg( irc, "%d, BitlBee: %s", num, q->question );
Note: See TracChangeset
for help on using the changeset viewer.