Changes in / [c4a1036:e46e077]


Ignore:
Files:
23 edited

Legend:

Unmodified
Added
Removed
  • bitlbee.c

    rc4a1036 re46e077  
    5454        ;
    5555
    56         i = getaddrinfo( global.conf->iface_in, global.conf->port, &hints, &addrinfo_bind );
     56        i = getaddrinfo( global.conf->iface, global.conf->port, &hints, &addrinfo_bind );
    5757        if( i )
    5858        {
    5959                log_message( LOGLVL_ERROR, "Couldn't parse address `%s': %s",
    60                                            global.conf->iface_in, gai_strerror(i) );
     60                                           global.conf->iface, gai_strerror(i) );
    6161                return -1;
    6262        }
     
    225225        if( st == size )
    226226        {
     227                g_free( irc->sendbuffer );
     228                irc->sendbuffer = NULL;
     229                irc->w_watch_source_id = 0;
     230               
    227231                if( irc->status & USTATUS_SHUTDOWN )
    228                 {
    229232                        irc_free( irc );
    230                 }
    231                 else
    232                 {
    233                         g_free( irc->sendbuffer );
    234                         irc->sendbuffer = NULL;
    235                         irc->w_watch_source_id = 0;
    236                 }
    237233               
    238234                return FALSE;
  • bitlbee.conf

    rc4a1036 re46e077  
    3434# DaemonInterface = 0.0.0.0
    3535# DaemonPort = 6667
    36 
    37 ## ClientInterface:
    38 ##
    39 ## If for any reason, you want BitlBee to use a specific address/interface
    40 ## for outgoing traffic (IM connections, HTTP(S), etc.), set it here.
    41 ##
    42 # ClientInterface = 0.0.0.0
    4336
    4437## AuthMode
  • bitlbee.h

    rc4a1036 re46e077  
    157157gboolean bitlbee_shutdown( gpointer data, gint fd, b_input_condition cond );
    158158
    159 char *set_eval_root_nick( set_t *set, char *new_nick );
    160 
    161159extern global_t global;
    162160
  • conf.c

    rc4a1036 re46e077  
    4545        conf = g_new0( conf_t, 1 );
    4646       
    47         conf->iface_in = NULL;
    48         conf->iface_out = NULL;
     47        conf->iface = NULL;
    4948        conf->port = g_strdup( "6667" );
    5049        conf->nofork = 0;
     
    8382                if( opt == 'i' )
    8483                {
    85                         conf->iface_in = g_strdup( optarg );
     84                        conf->iface = g_strdup( optarg );
    8685                }
    8786                else if( opt == 'p' )
     
    203202                        else if( g_strcasecmp( ini->key, "daemoninterface" ) == 0 )
    204203                        {
    205                                 g_free( conf->iface_in );
    206                                 conf->iface_in = g_strdup( ini->value );
     204                                g_free( conf->iface );
     205                                conf->iface = g_strdup( ini->value );
    207206                        }
    208207                        else if( g_strcasecmp( ini->key, "daemonport" ) == 0 )
     
    210209                                g_free( conf->port );
    211210                                conf->port = g_strdup( ini->value );
    212                         }
    213                         else if( g_strcasecmp( ini->key, "clientinterface" ) == 0 )
    214                         {
    215                                 g_free( conf->iface_out );
    216                                 conf->iface_out = g_strdup( ini->value );
    217211                        }
    218212                        else if( g_strcasecmp( ini->key, "authmode" ) == 0 )
  • conf.h

    rc4a1036 re46e077  
    3232typedef struct conf
    3333{
    34         char *iface_in, *iface_out;
     34        char *iface;
    3535        char *port;
    3636        int nofork;
  • debian/changelog

    rc4a1036 re46e077  
    1 bitlbee (1.2-5) UNRELEASED; urgency=low
    2 
    3   * Add Homepage and Vcs-Bzr fields.
    4 
    5  -- Jelmer Vernooij <jelmer@samba.org>  Sun, 11 May 2008 14:18:16 +0200
    6 
    71bitlbee (1.2-4) unstable; urgency=low
    82
     3  * Not a real release, just a placeholder for the changelog.
    94  * Fixed init script to use the BITLBEE_OPTS variable, not an undefined
    10     DAEMON_OPT. (Closes: #474583)
     5    DAEMON_OPT.
    116  * Added dependency information to the init script. (Closes: #472567)
    12   * Added bitlbee-dev package. Patch from RISKO Gergely <risko@debian.org>
    13     with some small modifications. (Closes: #473480)
    14 
    15  -- Wilmer van der Gaast <wilmer@gaast.net>  Wed, 07 May 2008 22:40:40 -0700
     7
     8 -- Wilmer van der Gaast <wilmer@gaast.net>  Sat, 29 Mar 2008 21:10:33 +0000
    169
    1710bitlbee (1.2-3) unstable; urgency=low
  • debian/control

    rc4a1036 re46e077  
    55Standards-Version: 3.5.9
    66Build-Depends: libglib2.0-dev (>= 2.4), libevent-dev, libgnutls-dev | libnss-dev (>= 1.6), debconf-2.0, po-debconf
    7 Homepage: http://www.bitlbee.org/
    8 Vcs-Bzr: http://code.bitlbee.org/bitlbee/
    97
    108Package: bitlbee
     
    1412 This program can be used as an IRC server which forwards everything you
    1513 say to people on other chat networks: Jabber, ICQ, AIM, MSN and Yahoo.
    16 
    17 Package: bitlbee-dev
    18 Architecture: all
    19 Depends: bitlbee (= ${binary:Version})
    20 Description: An IRC to other chat networks gateway
    21  This program can be used as an IRC server which forwards everything you
    22  say to people on other chat networks: Jabber, ICQ, AIM, MSN and Yahoo.
    23  .
    24  This package holds development stuff for compiling plug-ins.
  • debian/rules

    rc4a1036 re46e077  
    1313build-arch: build-arch-stamp
    1414build-arch-stamp:
    15         [ -d debian ]
     15        if [ ! -d debian ]; then exit 1; fi
    1616        ./configure --debug=$(DEBUG) --prefix=/usr --etcdir=/etc/bitlbee --events=libevent
    1717        $(MAKE)
     
    2020
    2121clean:
    22         [ "`whoami`" = "root" -a -d debian ]
    23         rm -rf build-arch-stamp debian/bitlbee debian/*.substvars debian/files debian/bitlbee-dev
     22        if [ "`whoami`" != "root" -o ! -d debian ]; then exit 1; fi
     23        rm -rf build-arch-stamp debian/bitlbee debian/*.substvars debian/files
    2424        -$(MAKE) distclean
    2525#       -$(MAKE) -C doc/ clean
     
    2727
    2828install-arch: build-arch
    29         [ "`whoami`" = "root" -a -d debian ]
     29        if [ "`whoami`" != "root" -o ! -d debian ]; then exit 1; fi
    3030        mkdir -p debian/bitlbee/DEBIAN/
    3131        $(MAKE) install install-etc DESTDIR=`pwd`/debian/bitlbee
     
    3535        cp doc/user-guide/user-guide.html debian/bitlbee/usr/share/doc/bitlbee/
    3636
    37 install-indep: install-arch
    38         [ "`whoami`" = "root" -a -d debian ]
    39         mkdir -p debian/bitlbee-dev/DEBIAN/
    40         $(MAKE) install-dev DESTDIR=`pwd`/debian/bitlbee-dev
    41 
    42         mkdir -p debian/bitlbee-dev/usr/share/doc/bitlbee-dev/
    43 
    4437binary-arch: build-arch install-arch
    45         [ "`whoami`" = "root" -a -d debian ]
     38        if [ "`whoami`" != "root" -o ! -d debian ]; then exit 1; fi
    4639
    4740        chmod 755 debian/post* debian/pre* debian/config debian/bitlbee.init
     
    5952                        doc/bitlbee/examples/* man/man8/bitlbee.8 man/man5/bitlbee.conf.5
    6053       
    61         chown -R root:root debian/bitlbee/
     54        chown -R root.root debian/bitlbee/
    6255        find debian/bitlbee/usr/share/ -type d -exec chmod 755 {} \;
    6356        find debian/bitlbee/usr/share/ -type f -exec chmod 644 {} \;
     
    8477        dpkg --build debian/bitlbee ..
    8578
    86 binary-indep: install-indep
    87         [ "`whoami`" = "root" -a -d debian ]
     79debug-build:
     80        BITLBEE_VERSION=\"`date +%Y%m%d`-`hostname`-debug\" debian/rules clean binary DEBUG=1
    8881
    89         chown -R root.root debian/bitlbee-dev/
    90         find debian/bitlbee-dev/usr/share/ -type d -exec chmod 755 {} \;
    91         find debian/bitlbee-dev/usr/share/ -type f -exec chmod 644 {} \;
     82binary: binary-arch
     83build: build-arch
     84install: install-arch
    9285
    93         cp debian/changelog debian/bitlbee-dev/usr/share/doc/bitlbee-dev/changelog.Debian
    94         gzip -9 debian/bitlbee-dev/usr/share/doc/bitlbee-dev/changelog.Debian
    95         cp debian/copyright debian/bitlbee-dev/usr/share/doc/bitlbee-dev/copyright
    96 
    97         cd debian/bitlbee-dev; \
    98                 find usr -type f -exec md5sum {} \; > DEBIAN/md5sums
    99 
    100         dpkg-gencontrol -ldebian/changelog -isp -pbitlbee-dev -Pdebian/bitlbee-dev
    101 
    102         dpkg --build debian/bitlbee-dev ..
    103 
    104 binary: binary-arch binary-indep
    105 build: build-arch
    106 install: install-arch install-indep
    107 
    108 .PHONY: build-arch build clean binary-arch binary install-arch install binary-indep install-indep
     86.PHONY: build-arch build clean binary-arch binary install-arch install
  • doc/user-guide/commands.xml

    rc4a1036 re46e077  
    589589        </bitlbee-setting>
    590590
    591         <bitlbee-setting name="root_nick" type="string" scope="global">
    592                 <default>root</default>
    593 
    594                 <description>
    595                         <para>
    596                                 Normally the "bot" that takes all your BitlBee commands is called "root". If you don't like this name, you can rename it to anything else using the <emphasis>rename</emphasis> command, or by changing this setting.
    597                         </para>
    598                 </description>
    599         </bitlbee-setting>
    600 
    601591        <bitlbee-setting name="save_on_quit" type="boolean" scope="global">
    602592                <default>true</default>
  • irc.c

    rc4a1036 re46e077  
    151151        set_add( &irc->set, "private", "true", set_eval_bool, irc );
    152152        set_add( &irc->set, "query_order", "lifo", NULL, irc );
    153         set_add( &irc->set, "root_nick", irc->mynick, set_eval_root_nick, irc );
    154153        set_add( &irc->set, "save_on_quit", "true", set_eval_bool, irc );
    155154        set_add( &irc->set, "simulate_netsplit", "true", set_eval_bool, irc );
     
    200199        if( irc->sendbuffer && !immed )
    201200        {
    202                 /* Set up a timeout event that should shut down the connection
    203                    in a second, just in case ..._write doesn't do it first. */
     201                /* We won't read from this socket anymore. Instead, we'll connect a timer
     202                   to it that should shut down the connection in a second, just in case
     203                   bitlbee_.._write doesn't do it first. */
    204204               
    205205                b_event_remove( irc->r_watch_source_id );
    206                 irc->r_watch_source_id = 0;
    207                
    208                 b_event_remove( irc->ping_source_id );
    209                 irc->ping_source_id = b_timeout_add( 1000, (b_event_handler) irc_free, irc );
     206                irc->r_watch_source_id = b_timeout_add( 1000, (b_event_handler) irc_free, irc );
    210207        }
    211208        else
     
    277274        if( irc->ping_source_id > 0 )
    278275                b_event_remove( irc->ping_source_id );
    279         if( irc->r_watch_source_id > 0 )
    280                 b_event_remove( irc->r_watch_source_id );
     276        b_event_remove( irc->r_watch_source_id );
    281277        if( irc->w_watch_source_id > 0 )
    282278                b_event_remove( irc->w_watch_source_id );
  • lib/arc.h

    rc4a1036 re46e077  
    3131};
    3232
    33 #ifndef G_GNUC_MALLOC
    34 #define G_GNUC_MALLOC
    35 #endif
    36 
    3733G_GNUC_MALLOC struct arc_state *arc_keymaker( unsigned char *key, int kl, int cycles );
    3834unsigned char arc_getbyte( struct arc_state *st );
  • lib/proxy.c

    rc4a1036 re46e077  
    114114{
    115115        struct sockaddr_in *sin;
    116         struct sockaddr_in me;
    117116        int fd = -1;
    118117
     
    128127
    129128        sock_make_nonblocking(fd);
    130        
    131         if( global.conf->iface_out )
    132         {
    133                 me.sin_family = AF_INET;
    134                 me.sin_port = 0;
    135                 me.sin_addr.s_addr = inet_addr( global.conf->iface_out );
    136                
    137                 if( bind( fd, (struct sockaddr *) &me, sizeof( me ) ) != 0 )
    138                         event_debug( "bind( %d, \"%s\" ) failure\n", fd, global.conf->iface_out );
    139         }
    140129       
    141130        event_debug("proxy_connect_none( \"%s\", %d ) = %d\n", host, port, fd);
  • protocols/jabber/jabber_util.c

    rc4a1036 re46e077  
    246246};
    247247
    248 static void jabber_buddy_ask_yes( void *data )
    249 {
    250         struct jabber_buddy_ask_data *bla = data;
    251        
     248static void jabber_buddy_ask_yes( gpointer w, struct jabber_buddy_ask_data *bla )
     249{
    252250        presence_send_request( bla->ic, bla->handle, "subscribed" );
    253251       
     
    259257}
    260258
    261 static void jabber_buddy_ask_no( void *data )
    262 {
    263         struct jabber_buddy_ask_data *bla = data;
    264        
     259static void jabber_buddy_ask_no( gpointer w, struct jabber_buddy_ask_data *bla )
     260{
    265261        presence_send_request( bla->ic, bla->handle, "subscribed" );
    266262       
  • protocols/msn/msn.h

    rc4a1036 re46e077  
    2929#define GROUPCHAT_SWITCHBOARD_MESSAGE "\r\r\rME WANT TALK TO MANY PEOPLE\r\r\r"
    3030
    31 #ifdef DEBUG_MSN
     31#ifdef DEBUG
    3232#define debug( text... ) imcb_log( ic, text );
    3333#else
  • protocols/msn/msn_util.c

    rc4a1036 re46e077  
    9090};
    9191
    92 static void msn_buddy_ask_yes( void *data )
    93 {
    94         struct msn_buddy_ask_data *bla = data;
    95        
     92static void msn_buddy_ask_yes( gpointer w, struct msn_buddy_ask_data *bla )
     93{
    9694        msn_buddy_list_add( bla->ic, "AL", bla->handle, bla->realname );
    9795       
     
    104102}
    105103
    106 static void msn_buddy_ask_no( void *data )
    107 {
    108         struct msn_buddy_ask_data *bla = data;
    109        
     104static void msn_buddy_ask_no( gpointer w, struct msn_buddy_ask_data *bla )
     105{
    110106        msn_buddy_list_add( bla->ic, "BL", bla->handle, bla->realname );
    111107       
  • protocols/msn/ns.c

    rc4a1036 re46e077  
    178178                       
    179179                        debug( "Connecting to a new switchboard with key %s", cmd[5] );
    180 
    181                         if( ( sb = msn_sb_create( ic, server, port, cmd[5], MSN_SB_NEW ) ) == NULL )
    182                         {
    183                                 /* Although this isn't strictly fatal for the NS connection, it's
    184                                    definitely something serious (we ran out of file descriptors?). */
    185                                 imcb_error( ic, "Could not create new switchboard" );
    186                                 imc_logout( ic, TRUE );
    187                                 return( 0 );
    188                         }
     180                        sb = msn_sb_create( ic, server, port, cmd[5], MSN_SB_NEW );
    189181                       
    190182                        if( md->msgq )
     
    476468                debug( "Got a call from %s (session %d). Key = %s", cmd[5], session, cmd[4] );
    477469               
    478                 if( ( sb = msn_sb_create( ic, server, port, cmd[4], session ) ) == NULL )
    479                 {
    480                         /* Although this isn't strictly fatal for the NS connection, it's
    481                            definitely something serious (we ran out of file descriptors?). */
    482                         imcb_error( ic, "Could not create new switchboard" );
    483                         imc_logout( ic, TRUE );
    484                         return( 0 );
    485                 }
    486                 else
    487                 {
    488                         sb->who = g_strdup( cmd[5] );
    489                 }
     470                sb = msn_sb_create( ic, server, port, cmd[4], session );
     471                sb->who = g_strdup( cmd[5] );
    490472        }
    491473        else if( strcmp( cmd[0], "ADD" ) == 0 )
  • protocols/nogaim.c

    rc4a1036 re46e077  
    343343/* dialogs.c */
    344344
    345 void imcb_ask( struct im_connection *ic, char *msg, void *data,
    346                query_callback doit, query_callback dont )
     345void imcb_ask( struct im_connection *ic, char *msg, void *data, void *doit, void *dont )
    347346{
    348347        query_add( ic->irc, ic, msg, doit, dont, data );
     
    496495};
    497496
    498 void show_got_added_no( void *data )
    499 {
    500         g_free( ((struct show_got_added_data*)data)->handle );
     497void show_got_added_no( gpointer w, struct show_got_added_data *data )
     498{
     499        g_free( data->handle );
    501500        g_free( data );
    502501}
    503502
    504 void show_got_added_yes( void *data )
    505 {
    506         struct show_got_added_data *sga = data;
    507        
    508         sga->ic->acc->prpl->add_buddy( sga->ic, sga->handle, NULL );
    509         /* imcb_add_buddy( sga->ic, NULL, sga->handle, sga->handle ); */
    510        
    511         return show_got_added_no( data );
     503void show_got_added_yes( gpointer w, struct show_got_added_data *data )
     504{
     505        data->ic->acc->prpl->add_buddy( data->ic, data->handle, NULL );
     506        /* imcb_add_buddy( data->ic, NULL, data->handle, data->handle ); */
     507       
     508        return show_got_added_no( w, data );
    512509}
    513510
  • protocols/nogaim.h

    rc4a1036 re46e077  
    4242#include "account.h"
    4343#include "proxy.h"
    44 #include "query.h"
    4544#include "md5.h"
    4645
     
    281280 * - 'doit' or 'dont' will be called depending of the answer of the user.
    282281 */
    283 G_MODULE_EXPORT void imcb_ask( struct im_connection *ic, char *msg, void *data, query_callback doit, query_callback dont );
     282G_MODULE_EXPORT void imcb_ask( struct im_connection *ic, char *msg, void *data, void *doit, void *dont );
    284283G_MODULE_EXPORT void imcb_ask_add( struct im_connection *ic, char *handle, const char *realname );
    285284
  • protocols/oscar/oscar.c

    rc4a1036 re46e077  
    10841084}
    10851085
    1086 void oscar_accept_chat(void *data);
    1087 void oscar_reject_chat(void *data);
     1086void oscar_accept_chat(gpointer w, struct aim_chat_invitation * inv);
     1087void oscar_reject_chat(gpointer w, struct aim_chat_invitation * inv);
    10881088       
    10891089static int incomingim_chan2(aim_session_t *sess, aim_conn_t *conn, aim_userinfo_t *userinfo, struct aim_incomingim_ch2_args *args) {
     
    11191119}
    11201120
    1121 static void gaim_icq_authgrant(void *data_) {
    1122         struct icq_auth *data = data_;
     1121static void gaim_icq_authgrant(gpointer w, struct icq_auth *data) {
    11231122        char *uin, message;
    11241123        struct oscar_data *od = (struct oscar_data *)data->ic->proto_data;
     
    11351134}
    11361135
    1137 static void gaim_icq_authdeny(void *data_) {
    1138         struct icq_auth *data = data_;
     1136static void gaim_icq_authdeny(gpointer w, struct icq_auth *data) {
    11391137        char *uin, *message;
    11401138        struct oscar_data *od = (struct oscar_data *)data->ic->proto_data;
     
    25902588}
    25912589
    2592 void oscar_accept_chat(void *data)
     2590void oscar_accept_chat(gpointer w, struct aim_chat_invitation * inv)
    25932591{
    2594         struct aim_chat_invitation * inv = data;
    2595        
    25962592        oscar_chat_join(inv->ic, inv->name, NULL, NULL);
    25972593        g_free(inv->name);
     
    25992595}
    26002596
    2601 void oscar_reject_chat(void *data)
     2597void oscar_reject_chat(gpointer w, struct aim_chat_invitation * inv)
    26022598{
    2603         struct aim_chat_invitation * inv = data;
    2604        
    26052599        g_free(inv->name);
    26062600        g_free(inv);
  • protocols/yahoo/yahoo.c

    rc4a1036 re46e077  
    797797}
    798798
    799 static void byahoo_accept_conf( void *data )
    800 {
    801         struct byahoo_conf_invitation *inv = data;
    802        
     799static void byahoo_accept_conf( gpointer w, struct byahoo_conf_invitation *inv )
     800{
    803801        yahoo_conference_logon( inv->yid, NULL, inv->members, inv->name );
    804802        imcb_chat_add_buddy( inv->c, inv->ic->acc->user );
     
    807805}
    808806
    809 static void byahoo_reject_conf( void *data )
    810 {
    811         struct byahoo_conf_invitation *inv = data;
    812        
     807static void byahoo_reject_conf( gpointer w, struct byahoo_conf_invitation *inv )
     808{
    813809        yahoo_conference_decline( inv->yid, NULL, inv->members, inv->name, "User rejected groupchat" );
    814810        imcb_chat_free( inv->c );
  • query.c

    rc4a1036 re46e077  
    3030static query_t *query_default( irc_t *irc );
    3131
    32 query_t *query_add( irc_t *irc, struct im_connection *ic, char *question,
    33                     query_callback yes, query_callback no, void *data )
     32query_t *query_add( irc_t *irc, struct im_connection *ic, char *question, void *yes, void *no, void *data )
    3433{
    3534        query_t *q = g_new0( query_t, 1 );
     
    145144                else
    146145                        irc_usermsg( irc, "Accepted: %s", q->question );
    147                 q->yes( q->data );
     146                q->yes( NULL, q->data );
    148147        }
    149148        else
     
    153152                else
    154153                        irc_usermsg( irc, "Rejected: %s", q->question );
    155                 q->no( q->data );
     154                q->no( NULL, q->data );
    156155        }
    157156        q->data = NULL;
  • query.h

    rc4a1036 re46e077  
    2727#define _QUERY_H
    2828
    29 typedef void (*query_callback) ( void *data );
    30 
    3129typedef struct query
    3230{
    3331        struct im_connection *ic;
    3432        char *question;
    35         query_callback yes, no;
     33        void (* yes) ( gpointer w, void *data );
     34        void (* no) ( gpointer w, void *data );
    3635        void *data;
    3736        struct query *next;
    3837} query_t;
    3938
    40 query_t *query_add( irc_t *irc, struct im_connection *ic, char *question,
    41                     query_callback yes, query_callback no, void *data );
     39query_t *query_add( irc_t *irc, struct im_connection *ic, char *question, void *yes, void *no, void *data );
    4240void query_del( irc_t *irc, query_t *q );
    4341void query_del_by_conn( irc_t *irc, struct im_connection *ic );
  • root_commands.c

    rc4a1036 re46e077  
    204204}
    205205
    206 struct cmd_account_del_data
    207 {
    208         account_t *a;
    209         irc_t *irc;
    210 };
    211 
    212 void cmd_account_del_yes( void *data )
    213 {
    214         struct cmd_account_del_data *cad = data;
    215         account_t *a;
    216        
    217         for( a = cad->irc->accounts; a && a != cad->a; a = a->next );
    218        
    219         if( a == NULL )
    220         {
    221                 irc_usermsg( cad->irc, "Account already deleted" );
    222         }
    223         else if( a->ic )
    224         {
    225                 irc_usermsg( cad->irc, "Account is still logged in, can't delete" );
    226         }
    227         else
    228         {
    229                 account_del( cad->irc, a );
    230                 irc_usermsg( cad->irc, "Account deleted" );
    231         }
    232         g_free( data );
    233 }
    234 
    235 void cmd_account_del_no( void *data )
    236 {
    237         g_free( data );
     206void cmd_account_del_yes( gpointer w, void *data )
     207{
     208        account_t *a = data;
     209        irc_t *irc = a->irc;
     210       
     211        if( a->ic )
     212        {
     213                irc_usermsg( irc, "Account is still logged in, can't delete" );
     214        }
     215        else
     216        {
     217                account_del( irc, a );
     218                irc_usermsg( irc, "Account deleted" );
     219        }
     220}
     221
     222void cmd_account_del_no( gpointer w, void *data )
     223{
    238224}
    239225
     
    292278                else
    293279                {
    294                         struct cmd_account_del_data *cad;
    295280                        char *msg;
    296                        
    297                         cad = g_malloc( sizeof( struct cmd_account_del_data ) );
    298                         cad->a = a;
    299                         cad->irc = irc;
    300281                       
    301282                        msg = g_strdup_printf( "If you remove this account (%s(%s)), BitlBee will "
     
    304285                                               "set' command. Are you sure you want to delete this "
    305286                                               "account?", a->prpl->name, a->user );
    306                         query_add( irc, NULL, msg, cmd_account_del_yes, cmd_account_del_no, cad );
     287                        query_add( irc, NULL, msg, cmd_account_del_yes, cmd_account_del_no, a );
    307288                        g_free( msg );
    308289                }
     
    423404                        acc_handle = g_strdup( cmd[2] );
    424405               
    425                 if( !acc_handle )
    426                 {
    427                         irc_usermsg( irc, "Not enough parameters given (need %d)", 3 );
    428                         return;
    429                 }
    430                
    431406                if( ( tmp = strchr( acc_handle, '/' ) ) )
    432407                {
     
    609584                        g_free( irc->mynick );
    610585                        irc->mynick = g_strdup( cmd[2] );
    611                        
    612                         if( strcmp( cmd[0], "set_rename" ) != 0 )
    613                                 set_setstr( &irc->set, "root_nick", cmd[2] );
    614586                }
    615587                else if( u->send_handler == buddy_send_handler )
     
    620592                irc_usermsg( irc, "Nick successfully changed" );
    621593        }
    622 }
    623 
    624 char *set_eval_root_nick( set_t *set, char *new_nick )
    625 {
    626         irc_t *irc = set->data;
    627        
    628         if( strcmp( irc->mynick, new_nick ) != 0 )
    629         {
    630                 char *cmd[] = { "set_rename", irc->mynick, new_nick, NULL };
    631                
    632                 cmd_rename( irc, cmd );
    633         }
    634        
    635         return strcmp( irc->mynick, new_nick ) == 0 ? new_nick : NULL;
    636594}
    637595
Note: See TracChangeset for help on using the changeset viewer.