Changeset bb09b3c for protocols/nogaim.c
- Timestamp:
- 2010-06-03T21:13:57Z (14 years ago)
- Branches:
- master
- Children:
- 1dd3470
- Parents:
- a6b2f13 (diff), df1ae622 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/nogaim.c
ra6b2f13 rbb09b3c 657 657 u->away = u->status_msg = NULL; 658 658 659 if( ( flags & OPT_LOGGED_IN ) && !u->online ) 660 { 659 if( set_getbool( &ic->irc->set, "show_offline" ) && !u->online ) 660 { 661 /* always set users as online */ 661 662 irc_spawn( ic->irc, u ); 662 663 u->online = 1; 664 if( !( flags & OPT_LOGGED_IN ) ) 665 { 666 /* set away message if user isn't really online */ 667 u->away = g_strdup( "User is offline" ); 668 } 669 } 670 else if( ( flags & OPT_LOGGED_IN ) && !u->online ) 671 { 672 irc_spawn( ic->irc, u ); 673 u->online = 1; 663 674 } 664 675 else if( !( flags & OPT_LOGGED_IN ) && u->online ) … … 666 677 struct groupchat *c; 667 678 668 irc_kill( ic->irc, u ); 669 u->online = 0; 670 671 /* Remove him/her from the groupchats to prevent PART messages after he/she QUIT already */ 672 for( c = ic->groupchats; c; c = c->next ) 673 remove_chat_buddy_silent( c, handle ); 674 } 675 679 if( set_getbool( &ic->irc->set, "show_offline" ) ) 680 { 681 /* keep offline users in channel and set away message to "offline" */ 682 u->away = g_strdup( "User is offline" ); 683 684 /* Keep showing him/her in the control channel but not in groupchats. */ 685 for( c = ic->groupchats; c; c = c->next ) 686 { 687 if( remove_chat_buddy_silent( c, handle ) && c->joined ) 688 irc_part( c->ic->irc, u, c->channel ); 689 } 690 } 691 else 692 { 693 /* kill offline users */ 694 irc_kill( ic->irc, u ); 695 u->online = 0; 696 697 /* Remove him/her from the groupchats to prevent PART messages after he/she QUIT already */ 698 for( c = ic->groupchats; c; c = c->next ) 699 remove_chat_buddy_silent( c, handle ); 700 } 701 } 702 676 703 if( flags & OPT_AWAY ) 677 704 { … … 700 727 /* LISPy... */ 701 728 if( ( u->online ) && /* Don't touch offline people */ 702 ( ( ( u->online != oo ) && !u->away ) ||/* Do joining people */729 ( ( u->online != oo ) || /* Do joining people */ 703 730 ( ( u->online == oo ) && ( oa == !u->away ) ) ) ) /* Do people changing state */ 704 731 { … … 714 741 ic->irc->myhost ); 715 742 } 743 744 if(!strcmp(set_getstr(&ic->irc->set, "voice_buddies"), "online")) { 745 irc_write( ic->irc, ":%s MODE %s +v %s", from, ic->irc->channel, u->nick ); 746 } 747 if(!strcmp(set_getstr(&ic->irc->set, "halfop_buddies"), "online")) { 748 irc_write( ic->irc, ":%s MODE %s +h %s", from, ic->irc->channel, u->nick ); 749 } 750 if(!strcmp(set_getstr(&ic->irc->set, "op_buddies"), "online")) { 751 irc_write( ic->irc, ":%s MODE %s +o %s", from, ic->irc->channel, u->nick ); 752 } 753 716 754 if(!strcmp(set_getstr(&ic->irc->set, "voice_buddies"), "notaway")) { 717 755 irc_write( ic->irc, ":%s MODE %s %cv %s", from, ic->irc->channel, … … 726 764 u->away?'-':'+', u->nick ); 727 765 } 766 728 767 g_free( from ); 729 768 } … … 1156 1195 return g_strdup_printf( "\x02[\x02\x02\x02%04d-%02d-%02d " 1157 1196 "%02d:%02d:%02d\x02]\x02 ", 1158 msg.tm_year + 1900, msg.tm_mon , msg.tm_mday,1197 msg.tm_year + 1900, msg.tm_mon + 1, msg.tm_mday, 1159 1198 msg.tm_hour, msg.tm_min, msg.tm_sec ); 1160 1199 }
Note: See TracChangeset
for help on using the changeset viewer.