- Timestamp:
- Jul 5, 2003, 7:38:16 AM (22 years ago)
- Branches:
- master, barnowl_perlaim, debian, owl, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- 6873455
- Parents:
- c045455
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
aim.c
rc045455 ra352335c 147 147 priv->server = "login.oscar.aol.com"; 148 148 owl_global_get_aimsess(&g)->aux_data = priv; 149 150 149 151 150 /* login */ … … 153 152 if (ret) { 154 153 owl_global_set_aimnologgedin(&g); 155 /* printf("login returned %i\n"); */154 owl_global_set_no_doaimevents(&g); 156 155 return(-1); 157 156 } 157 owl_global_set_doaimevents(&g); 158 return(0); 159 } 160 161 /* stuff to run once login has been successful */ 162 void owl_aim_successful_login(char *screenname) 163 { 158 164 owl_global_set_aimloggedin(&g, screenname); 159 160 return(0); 165 owl_global_set_doaimevents(&g); /* this should already be on */ 166 owl_function_makemsg("%s logged in", screenname); 167 168 owl_function_debugmsg("Successful AIM login for %s", screenname); 169 170 /* start the ingorelogin timer */ 171 owl_timer_reset_newstart(owl_global_get_aim_login_timer(&g), 172 owl_global_get_aim_ignorelogin_timer(&g)); 173 161 174 } 162 175 … … 166 179 logout(owl_global_get_aimsess(&g)); 167 180 owl_global_set_aimnologgedin(&g); 168 } 169 170 void owl_aim_login_error(void) 171 { 172 owl_function_makemsg("Authentication error on login"); 181 owl_global_set_no_doaimevents(&g); 182 } 183 184 void owl_aim_login_error(char *message) 185 { 186 if (message) { 187 owl_function_makemsg(message); 188 } else { 189 owl_function_makemsg("Authentication error on login"); 190 } 173 191 owl_function_beep(); 174 192 owl_global_set_aimnologgedin(&g); 193 owl_global_set_no_doaimevents(&g); 175 194 } 176 195 … … 365 384 366 385 /* printf("Screen name: %s\n", info->sn); */ 386 owl_function_debugmsg("Here with %s", info->sn); 367 387 368 388 /* … … 374 394 printf("Error URL: %s\n", info->errorurl); 375 395 */ 376 owl_aim_login_error(); 377 /* aim_conn_kill(sess, &fr->conn); */ 396 if (info->errorcode==0x05) { 397 /* Incorrect nick/password */ 398 owl_aim_login_error("Incorrect nickname or password."); 399 } else if (info->errorcode==0x11) { 400 /* Suspended account */ 401 owl_aim_login_error("Your account is currently suspended."); 402 } else if (info->errorcode==0x14) { 403 /* service temporarily unavailable */ 404 owl_aim_login_error("The AOL Instant Messenger service is temporarily unavailable."); 405 } else if (info->errorcode==0x18) { 406 /* connecting too frequently */ 407 owl_aim_login_error("You have been connecting and disconnecting too frequently. Wait ten minutes and try again. If you continue to try, you will need to wait even longer."); 408 } else if (info->errorcode==0x1c) { 409 /* client too old */ 410 owl_aim_login_error("The client version you are using is too old."); 411 } else { 412 owl_aim_login_error(NULL); 413 } 414 aim_conn_kill(sess, &fr->conn); 378 415 return 1; 379 416 } … … 395 432 return 1; 396 433 } 434 owl_aim_successful_login(info->sn); 397 435 addcb_bos(sess, bosconn); 398 436 aim_sendcookie(sess, bosconn, info->cookie); 399 owl_function_makemsg("%s logged in", info->sn);400 437 return 1; 401 438 } … … 424 461 int faimtest_conncomplete(aim_session_t *sess, aim_frame_t *fr, ...) 425 462 { 463 /* owl_aim_successful_login(info->sn); */ 464 426 465 return 1; 427 466 }
Note: See TracChangeset
for help on using the changeset viewer.