Changes in / [3b878a1:f4b0911]
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/user-guide/commands.xml
r3b878a1 rf4b0911 861 861 </bitlbee-setting> 862 862 863 <bitlbee-setting name="show_offline" type="boolean" scope="global">864 <default>true</default>865 866 <description>867 <para>868 If enabled causes BitlBee to also show offline users in Channel. Online-users will get op, away-users voice and offline users none of both. This option takes effect as soon as you reconnect.869 </para>870 </description>871 </bitlbee-setting>872 873 863 <bitlbee-setting name="simulate_netsplit" type="boolean" scope="global"> 874 864 <default>true</default> -
irc.c
r3b878a1 rf4b0911 201 201 s = set_add( &irc->set, "root_nick", irc->mynick, set_eval_root_nick, irc ); 202 202 s = set_add( &irc->set, "save_on_quit", "true", set_eval_bool, irc ); 203 s = set_add( &irc->set, "show_offline", "false", set_eval_bool, irc );204 203 s = set_add( &irc->set, "simulate_netsplit", "true", set_eval_bool, irc ); 205 204 s = set_add( &irc->set, "status", NULL, set_eval_away_status, irc ); -
lib/oauth.c
r3b878a1 rf4b0911 233 233 } 234 234 235 static void oauth_add_default_params( GSList **params, conststruct oauth_service *sp )235 static void oauth_add_default_params( GSList **params, struct oauth_service *sp ) 236 236 { 237 237 char *s; … … 294 294 static void oauth_request_token_done( struct http_request *req ); 295 295 296 struct oauth_info *oauth_request_token( conststruct oauth_service *sp, oauth_cb func, void *data )296 struct oauth_info *oauth_request_token( struct oauth_service *sp, oauth_cb func, void *data ) 297 297 { 298 298 struct oauth_info *st = g_new0( struct oauth_info, 1 ); … … 439 439 } 440 440 441 struct oauth_info *oauth_from_string( char *in, conststruct oauth_service *sp )441 struct oauth_info *oauth_from_string( char *in, struct oauth_service *sp ) 442 442 { 443 443 struct oauth_info *oi = g_new0( struct oauth_info, 1 ); -
lib/oauth.h
r3b878a1 rf4b0911 40 40 { 41 41 oauth_stage_t stage; 42 conststruct oauth_service *sp;42 struct oauth_service *sp; 43 43 44 44 oauth_cb func; … … 68 68 authorization URL for the user. This is passed to the callback function 69 69 in a struct oauth_info. */ 70 struct oauth_info *oauth_request_token( conststruct oauth_service *sp, oauth_cb func, void *data );70 struct oauth_info *oauth_request_token( struct oauth_service *sp, oauth_cb func, void *data ); 71 71 72 72 /* http://oauth.net/core/1.0a/#auth_step3 (section 6.3) … … 88 88 /* Convert to and back from strings, for easier saving. */ 89 89 char *oauth_to_string( struct oauth_info *oi ); 90 struct oauth_info *oauth_from_string( char *in, conststruct oauth_service *sp );90 struct oauth_info *oauth_from_string( char *in, struct oauth_service *sp ); -
protocols/nogaim.c
r3b878a1 rf4b0911 657 657 u->away = u->status_msg = NULL; 658 658 659 if( set_getbool( &ic->irc->set, "show_offline" ) && !u->online ) 660 { 661 /* always set users as online */ 659 if( ( flags & OPT_LOGGED_IN ) && !u->online ) 660 { 662 661 irc_spawn( ic->irc, u ); 663 662 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;674 663 } 675 664 else if( !( flags & OPT_LOGGED_IN ) && u->online ) … … 677 666 struct groupchat *c; 678 667 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 } 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 676 if( flags & OPT_AWAY ) 677 { 678 if( state && message ) 679 { 680 u->away = g_strdup_printf( "%s (%s)", state, message ); 681 } 682 else if( state ) 683 { 684 u->away = g_strdup( state ); 685 } 686 else if( message ) 687 { 688 u->away = g_strdup( message ); 690 689 } 691 690 else 692 691 { 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 703 if( flags & OPT_AWAY )704 {705 if( state && message )706 {707 u->away = g_strdup_printf( "%s (%s)", state, message );708 }709 else if( state )710 {711 u->away = g_strdup( state );712 }713 else if( message )714 {715 u->away = g_strdup( message );716 }717 else718 {719 692 u->away = g_strdup( "Away" ); 720 693 } … … 725 698 } 726 699 727 /* early if-clause for show_offline even if there is some redundant code here because this isn't LISP but C ;) */ 728 if( set_getbool( &ic->irc->set, "show_offline" ) && set_getbool( &ic->irc->set, "away_devoice" ) ) 700 /* LISPy... */ 701 if( ( set_getbool( &ic->irc->set, "away_devoice" ) ) && /* Don't do a thing when user doesn't want it */ 702 ( u->online ) && /* Don't touch offline people */ 703 ( ( ( u->online != oo ) && !u->away ) || /* Voice joining people */ 704 ( ( u->online == oo ) && ( oa == !u->away ) ) ) ) /* (De)voice people changing state */ 729 705 { 730 706 char *from; … … 739 715 ic->irc->myhost ); 740 716 } 741 742 /* if we use show_offline, we op online users, voice away users, and devoice/deop offline users */ 743 if( flags & OPT_LOGGED_IN ) 744 { 745 /* user is "online" (either really online or away) */ 746 irc_write( ic->irc, ":%s MODE %s %cv%co %s %s", from, ic->irc->channel, 747 u->away?'+':'-', u->away?'-':'+', u->nick, u->nick ); 748 } 749 else 750 { 751 /* user is offline */ 752 irc_write( ic->irc, ":%s MODE %s -vo %s %s", from, ic->irc->channel, u->nick, u->nick ); 753 } 754 } 755 else 756 { 757 /* LISPy... */ 758 if( ( set_getbool( &ic->irc->set, "away_devoice" ) ) && /* Don't do a thing when user doesn't want it */ 759 ( u->online ) && /* Don't touch offline people */ 760 ( ( ( u->online != oo ) && !u->away ) || /* Voice joining people */ 761 ( ( u->online == oo ) && ( oa == !u->away ) ) ) ) /* (De)voice people changing state */ 762 { 763 char *from; 764 765 if( set_getbool( &ic->irc->set, "simulate_netsplit" ) ) 766 { 767 from = g_strdup( ic->irc->myhost ); 768 } 769 else 770 { 771 from = g_strdup_printf( "%s!%s@%s", ic->irc->mynick, ic->irc->mynick, 772 ic->irc->myhost ); 773 } 774 irc_write( ic->irc, ":%s MODE %s %cv %s", from, ic->irc->channel, 775 u->away?'-':'+', u->nick ); 776 g_free( from ); 777 } 717 irc_write( ic->irc, ":%s MODE %s %cv %s", from, ic->irc->channel, 718 u->away?'-':'+', u->nick ); 719 g_free( from ); 778 720 } 779 721 } … … 1252 1194 return g_strdup_printf( "\x02[\x02\x02\x02%04d-%02d-%02d " 1253 1195 "%02d:%02d:%02d\x02]\x02 ", 1254 msg.tm_year + 1900, msg.tm_mon + 1, msg.tm_mday,1196 msg.tm_year + 1900, msg.tm_mon, msg.tm_mday, 1255 1197 msg.tm_hour, msg.tm_min, msg.tm_sec ); 1256 1198 } -
protocols/twitter/twitter.c
r3b878a1 rf4b0911 66 66 67 67 68 static conststruct oauth_service twitter_oauth =68 static struct oauth_service twitter_oauth = 69 69 { 70 70 "http://api.twitter.com/oauth/request_token", … … 115 115 else if( info->stage == OAUTH_ACCESS_TOKEN ) 116 116 { 117 if( info->token == NULL || info->token_secret == NULL)117 if( info->token == NULL ) 118 118 { 119 119 imcb_error( ic, "OAuth error: %s", info->http->status_string );
Note: See TracChangeset
for help on using the changeset viewer.