Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/purple/purple.c

    rf85e9d6 r56699f0  
    3535   any context so this is the only way to get that. Don't want to support
    3636   libpurple in daemon mode anyway. */
    37 static irc_t *local_irc;
     37static bee_t *local_bee;
    3838
    3939static char *set_eval_display_name( set_t *set, char *value );
     
    157157                       
    158158                default:
     159                        /** No way to talk to the user right now, invent one when
     160                        this becomes important.
    159161                        irc_usermsg( acc->irc, "Setting with unknown type: %s (%d) Expect stuff to break..\n",
    160162                                     name, purple_account_option_get_type( o ) );
     163                        */
    161164                        name = NULL;
    162165                }
     
    251254        PurpleAccount *pa;
    252255       
    253         if( local_irc != NULL && local_irc != acc->irc )
    254         {
    255                 irc_usermsg( acc->irc, "Daemon mode detected. Do *not* try to use libpurple in daemon mode! "
    256                                        "Please use inetd or ForkDaemon mode instead." );
     256        if( local_bee != NULL && local_bee != acc->bee )
     257        {
     258                imcb_error( ic,  "Daemon mode detected. Do *not* try to use libpurple in daemon mode! "
     259                                 "Please use inetd or ForkDaemon mode instead." );
     260                imc_logout( ic, FALSE );
    257261                return;
    258262        }
    259         local_irc = acc->irc;
     263        local_bee = acc->bee;
    260264       
    261265        /* For now this is needed in the _connected() handlers if using
     
    683687                imcb_buddy_status( ic, bud->name, flags, purple_status_get_name( as ),
    684688                                   purple_status_get_attr_string( as, "message" ) );
     689               
     690                imcb_buddy_times( ic, bud->name,
     691                                  purple_presence_get_login_time( bud->presence ),
     692                                  purple_presence_get_idle_time( bud->presence ) );
    685693        }
    686694}
     
    866874        pqad->user_data = user_data;
    867875       
     876        /* TODO: IRC stuff here :-( */
    868877        q = g_strdup_printf( "Request: %s\n\n%s\n\n%s", title, primary, secondary );
    869         pqad->bee_data = query_add( local_irc, purple_ic_by_pa( account ), q,
     878        pqad->bee_data = query_add( local_bee->ui_data, purple_ic_by_pa( account ), q,
    870879                prplcb_request_action_yes, prplcb_request_action_no, pqad );
    871880       
Note: See TracChangeset for help on using the changeset viewer.