Changes in / [f4b0911:3b878a1]
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/user-guide/commands.xml
rf4b0911 r3b878a1 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 863 873 <bitlbee-setting name="simulate_netsplit" type="boolean" scope="global"> 864 874 <default>true</default> -
irc.c
rf4b0911 r3b878a1 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 ); 203 204 s = set_add( &irc->set, "simulate_netsplit", "true", set_eval_bool, irc ); 204 205 s = set_add( &irc->set, "status", NULL, set_eval_away_status, irc ); -
lib/oauth.c
rf4b0911 r3b878a1 233 233 } 234 234 235 static void oauth_add_default_params( GSList **params, struct oauth_service *sp )235 static void oauth_add_default_params( GSList **params, const 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( struct oauth_service *sp, oauth_cb func, void *data )296 struct oauth_info *oauth_request_token( const 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, struct oauth_service *sp )441 struct oauth_info *oauth_from_string( char *in, const struct oauth_service *sp ) 442 442 { 443 443 struct oauth_info *oi = g_new0( struct oauth_info, 1 ); -
lib/oauth.h
rf4b0911 r3b878a1 40 40 { 41 41 oauth_stage_t stage; 42 struct oauth_service *sp;42 const 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( struct oauth_service *sp, oauth_cb func, void *data );70 struct oauth_info *oauth_request_token( const 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, struct oauth_service *sp );90 struct oauth_info *oauth_from_string( char *in, const struct oauth_service *sp ); -
protocols/nogaim.c
rf4b0911 r3b878a1 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 { … … 698 725 } 699 726 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 */ 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" ) ) 705 729 { 706 730 char *from; … … 715 739 ic->irc->myhost ); 716 740 } 717 irc_write( ic->irc, ":%s MODE %s %cv %s", from, ic->irc->channel, 718 u->away?'-':'+', u->nick ); 719 g_free( from ); 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 } 720 778 } 721 779 } … … 1194 1252 return g_strdup_printf( "\x02[\x02\x02\x02%04d-%02d-%02d " 1195 1253 "%02d:%02d:%02d\x02]\x02 ", 1196 msg.tm_year + 1900, msg.tm_mon , msg.tm_mday,1254 msg.tm_year + 1900, msg.tm_mon + 1, msg.tm_mday, 1197 1255 msg.tm_hour, msg.tm_min, msg.tm_sec ); 1198 1256 } -
protocols/twitter/twitter.c
rf4b0911 r3b878a1 66 66 67 67 68 static struct oauth_service twitter_oauth =68 static const 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 )117 if( info->token == NULL || info->token_secret == 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.