Changeset 6a415e9
- Timestamp:
- Jun 4, 2003, 10:55:13 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:
- 65ad073
- Parents:
- 2824f79
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
Makefile.in
raa5f725 r6a415e9 23 23 regex.c history.c view.c dict.c variable.c filterelement.c pair.c \ 24 24 keypress.c keymap.c keybinding.c cmd.c context.c zcrypt.c \ 25 aim.c buddylist.c 25 aim.c buddylist.c timer.c 26 26 OWL_SRC = owl.c 27 27 TESTER_SRC = tester.c -
aim.c
rfd93b41 r6a415e9 1409 1409 va_end(ap); 1410 1410 1411 /* first check that we're not still ignoreing login messages */ 1412 if (!owl_timer_is_expired(owl_global_get_aim_login_timer(&g))) return; 1413 1411 1414 owl_buddylist_oncoming(owl_global_get_buddylist(&g), userinfo->sn); 1412 1415 -
commands.c
r38cf544c r6a415e9 1931 1931 if (!ret) { 1932 1932 owl_function_makemsg("%s logged in.\n", argv[1]); 1933 1934 /* start the ingorelogin timer */ 1935 owl_timer_reset_newstart(owl_global_get_aim_login_timer(&g), 1936 owl_global_get_aim_ignorelogin_timer(&g)); 1937 1933 1938 return(NULL); 1934 1939 } -
global.c
raa5f725 r6a415e9 91 91 g->aim_screenname=NULL; 92 92 g->aim_loggedin=0; 93 g->aim_lastnop=0;94 93 owl_timer_create_countdown(&(g->aim_noop_timer), 30); 94 owl_timer_create_countdown(&(g->aim_ignorelogin_timer), 0); 95 95 owl_buddylist_init(&(g->buddylist)); 96 96 } … … 647 647 /* AIM stuff */ 648 648 649 int owl_global_is_aimloggedin(owl_global *g) { 649 int owl_global_is_aimloggedin(owl_global *g) 650 { 650 651 if (g->aim_loggedin) return(1); 651 652 return(0); 652 653 } 653 654 654 char *owl_global_get_aim_screenname(owl_global *g) { 655 char *owl_global_get_aim_screenname(owl_global *g) 656 { 655 657 return (g->aim_screenname); 656 658 } 657 659 658 void owl_global_set_aimloggedin(owl_global *g, char *screenname) { 660 void owl_global_set_aimloggedin(owl_global *g, char *screenname) 661 { 659 662 g->aim_loggedin=1; 660 663 if (g->aim_screenname) owl_free(g->aim_screenname); … … 662 665 } 663 666 664 void owl_global_set_aimnologgedin(owl_global *g) { 667 void owl_global_set_aimnologgedin(owl_global *g) 668 { 665 669 g->aim_loggedin=0; 666 670 } 667 671 668 aim_session_t *owl_global_get_aimsess(owl_global *g) { 672 aim_session_t *owl_global_get_aimsess(owl_global *g) 673 { 669 674 return(&(g->aimsess)); 670 675 } 671 676 672 aim_conn_t *owl_global_get_waitingconn(owl_global *g) { 677 aim_conn_t *owl_global_get_waitingconn(owl_global *g) 678 { 673 679 return(&(g->waitingconn)); 674 680 } 675 681 676 int owl_global_is_aimnop_time(owl_global *g) { 677 time_t now; 678 679 now=time(NULL); 680 if (g->aim_lastnop==0) { 681 g->aim_lastnop=now; 682 return(0); 683 } 684 685 if (now-g->aim_lastnop >= 30) { 686 return(1); 687 } 688 return(0); 689 } 690 691 void owl_global_aimnop_sent(owl_global *g) { 692 time_t now; 693 694 now=time(NULL); 695 g->aim_lastnop=now; 682 int owl_global_is_aimnop_time(owl_global *g) 683 { 684 if (owl_timer_is_expired(&(g->aim_noop_timer))) return(1); 685 return(0); 686 } 687 688 void owl_global_aimnop_sent(owl_global *g) 689 { 690 owl_timer_reset(&(g->aim_noop_timer)); 691 } 692 693 owl_timer *owl_global_get_aim_login_timer(owl_global *g) 694 { 695 return(&(g->aim_ignorelogin_timer)); 696 696 } 697 697 698 698 /* message queue */ 699 699 700 void owl_global_messagequeue_addmsg(owl_global *g, owl_message *m) { 700 void owl_global_messagequeue_addmsg(owl_global *g, owl_message *m) 701 { 701 702 owl_list_append_element(&(g->messagequeue), m); 702 703 } … … 706 707 * necessary. 707 708 */ 708 owl_message *owl_global_messageuque_popmsg(owl_global *g) { 709 owl_message *owl_global_messageuque_popmsg(owl_global *g) 710 { 709 711 owl_message *out; 710 712 … … 715 717 } 716 718 717 int owl_global_messagequeue_pending(owl_global *g) { 719 int owl_global_messagequeue_pending(owl_global *g) 720 { 718 721 if (owl_list_get_size(&(g->messagequeue))==0) return(0); 719 722 return(1); 720 723 } 721 724 722 owl_buddylist *owl_global_get_buddylist(owl_global *g) { 725 owl_buddylist *owl_global_get_buddylist(owl_global *g) 726 { 723 727 return(&(g->buddylist)); 724 728 } -
owl.h
r38cf544c r6a415e9 358 358 } owl_buddylist; 359 359 360 typedef struct _owl_timer { 361 int direction; 362 time_t starttime; 363 int start; 364 } owl_timer; 360 365 361 366 typedef struct _owl_global { … … 408 413 aim_session_t aimsess; 409 414 aim_conn_t waitingconn; 410 time_t aim_lastnop; 415 owl_timer aim_noop_timer; 416 owl_timer aim_ignorelogin_timer; 411 417 int aim_loggedin; 412 418 char *aim_screenname; -
owl_prototypes.h
r38cf544c r6a415e9 495 495 extern int owl_global_is_aimnop_time(owl_global *g); 496 496 extern void owl_global_aimnop_sent(owl_global *g); 497 extern owl_timer *owl_global_get_aim_login_timer(owl_global *g); 497 498 extern void owl_global_messagequeue_addmsg(owl_global *g, owl_message *m); 498 499 extern owl_message *owl_global_messageuque_popmsg(owl_global *g); … … 715 716 extern int owl_text_num_lines(char *in); 716 717 extern char *owl_text_htmlstrip(char *in); 718 719 /* -------------------------------- timer.c -------------------------------- */ 720 extern void owl_timer_create_countup(owl_timer *t); 721 extern void owl_timer_create_countdown(owl_timer *t, int start); 722 extern void owl_timer_reset(owl_timer *t); 723 extern void owl_timer_reset_newstart(owl_timer *t, int start); 724 extern int owl_timer_get_time(owl_timer *t); 725 extern int owl_timer_is_expired(owl_timer *t); 717 726 718 727 /* -------------------------------- util.c -------------------------------- */ … … 883 892 extern void owl_global_set_edit_maxwrapcols(owl_global *g, int n); 884 893 extern int owl_global_get_edit_maxwrapcols(owl_global *g); 894 extern void owl_global_set_aim_ignorelogin_timer(owl_global *g, int n); 895 extern int owl_global_get_aim_ignorelogin_timer(owl_global *g); 885 896 extern void owl_global_set_typwin_lines(owl_global *g, int n); 886 897 extern int owl_global_get_typwin_lines(owl_global *g); -
variable.c
recd5dc5 r6a415e9 219 219 "than 60 columns, as a courtesy to recipients.\n"), 220 220 221 OWLVAR_INT( "aim_ignorelogin_timer" /* %OwlVarStub */, 0, 222 "number of seconds after AIM login to ignore login messages", 223 "This specifies the number of seconds to wait after an\n" 224 "AIM login before allowing the recipt of AIM login notifications.\n" 225 "By default this is set to 0 and all login notifications are\n" 226 "viewed immediately. If you dislike this behavior try setting\n" 227 "the value to 20 instead.\n"), 228 229 221 230 OWLVAR_INT_FULL( "typewinsize" /* %OwlVarStub:typwin_lines */, 222 231 OWL_TYPWIN_SIZE,
Note: See TracChangeset
for help on using the changeset viewer.