Changes in / [3b878a1:f4b0911]


Ignore:
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • doc/user-guide/commands.xml

    r3b878a1 rf4b0911  
    861861        </bitlbee-setting>
    862862
    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 
    873863        <bitlbee-setting name="simulate_netsplit" type="boolean" scope="global">
    874864                <default>true</default>
  • irc.c

    r3b878a1 rf4b0911  
    201201        s = set_add( &irc->set, "root_nick", irc->mynick, set_eval_root_nick, irc );
    202202        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 );
    204203        s = set_add( &irc->set, "simulate_netsplit", "true", set_eval_bool, irc );
    205204        s = set_add( &irc->set, "status", NULL,  set_eval_away_status, irc );
  • lib/oauth.c

    r3b878a1 rf4b0911  
    233233}
    234234
    235 static void oauth_add_default_params( GSList **params, const struct oauth_service *sp )
     235static void oauth_add_default_params( GSList **params, struct oauth_service *sp )
    236236{
    237237        char *s;
     
    294294static void oauth_request_token_done( struct http_request *req );
    295295
    296 struct oauth_info *oauth_request_token( const struct oauth_service *sp, oauth_cb func, void *data )
     296struct oauth_info *oauth_request_token( struct oauth_service *sp, oauth_cb func, void *data )
    297297{
    298298        struct oauth_info *st = g_new0( struct oauth_info, 1 );
     
    439439}
    440440
    441 struct oauth_info *oauth_from_string( char *in, const struct oauth_service *sp )
     441struct oauth_info *oauth_from_string( char *in, struct oauth_service *sp )
    442442{
    443443        struct oauth_info *oi = g_new0( struct oauth_info, 1 );
  • lib/oauth.h

    r3b878a1 rf4b0911  
    4040{
    4141        oauth_stage_t stage;
    42         const struct oauth_service *sp;
     42        struct oauth_service *sp;
    4343       
    4444        oauth_cb func;
     
    6868   authorization URL for the user. This is passed to the callback function
    6969   in a struct oauth_info. */
    70 struct oauth_info *oauth_request_token( const struct oauth_service *sp, oauth_cb func, void *data );
     70struct oauth_info *oauth_request_token( struct oauth_service *sp, oauth_cb func, void *data );
    7171
    7272/* http://oauth.net/core/1.0a/#auth_step3 (section 6.3)
     
    8888/* Convert to and back from strings, for easier saving. */
    8989char *oauth_to_string( struct oauth_info *oi );
    90 struct oauth_info *oauth_from_string( char *in, const struct oauth_service *sp );
     90struct oauth_info *oauth_from_string( char *in, struct oauth_service *sp );
  • protocols/nogaim.c

    r3b878a1 rf4b0911  
    657657        u->away = u->status_msg = NULL;
    658658       
    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        {
    662661                irc_spawn( ic->irc, u );
    663662                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;
    674663        }
    675664        else if( !( flags & OPT_LOGGED_IN ) && u->online )
     
    677666                struct groupchat *c;
    678667               
    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 );
    690689                }
    691690                else
    692691                {
    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                 else
    718                 {
    719692                        u->away = g_strdup( "Away" );
    720693                }
     
    725698        }
    726699       
    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 */
    729705        {
    730706                char *from;
     
    739715                                                            ic->irc->myhost );
    740716                }
    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 );
    778720        }
    779721}
     
    12521194                return g_strdup_printf( "\x02[\x02\x02\x02%04d-%02d-%02d "
    12531195                                        "%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,
    12551197                                        msg.tm_hour, msg.tm_min, msg.tm_sec );
    12561198}
  • protocols/twitter/twitter.c

    r3b878a1 rf4b0911  
    6666
    6767
    68 static const struct oauth_service twitter_oauth =
     68static struct oauth_service twitter_oauth =
    6969{
    7070        "http://api.twitter.com/oauth/request_token",
     
    115115        else if( info->stage == OAUTH_ACCESS_TOKEN )
    116116        {
    117                 if( info->token == NULL || info->token_secret == NULL )
     117                if( info->token == NULL )
    118118                {
    119119                        imcb_error( ic, "OAuth error: %s", info->http->status_string );
Note: See TracChangeset for help on using the changeset viewer.