Changes in / [68b518d6:41ca004]


Ignore:
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • configure

    r68b518d6 r41ca004  
    169169fi
    170170
    171 GLIB=0
    172 
    173171if $PKG_CONFIG --version > /dev/null 2>/dev/null && $PKG_CONFIG glib-2.0; then
    174172        cat<<EOF>>Makefile.settings
     
    177175EOF
    178176        echo '#define GLIB2' >> config.h
    179         GLIB=2
    180177elif type glib-config > /dev/null 2> /dev/null; then
    181178        cat<<EOF>>Makefile.settings
     
    184181EOF
    185182        echo '#define GLIB1' >> config.h
    186         GLIB=1
    187183else
    188184        echo 'Cannot find glib development libraries, aborting. (Install libglib-dev?)'
     
    190186fi
    191187
    192 if [ GLIB = 1 -o -r /usr/include/iconv.h ]; then
     188if [ -r /usr/include/iconv.h ]; then
    193189        :;
    194190elif [ -r /usr/local/include/iconv.h ]; then
  • ipc.h

    r68b518d6 r41ca004  
    4747
    4848void ipc_to_master( char **cmd );
    49 void ipc_to_master_str( char *format, ... ) G_GNUC_PRINTF( 1, 2 );
     49void ipc_to_master_str( char *format, ... );
    5050void ipc_to_children( char **cmd );
    51 void ipc_to_children_str( char *format, ... ) G_GNUC_PRINTF( 1, 2 );
     51void ipc_to_children_str( char *format, ... );
    5252
    5353/* We need this function in inetd mode, so let's just make it non-static. */
  • irc.c

    r68b518d6 r41ca004  
    832832                        irc_reply( irc, 332, "%s :BitlBee groupchat: \"%s\". Please keep in mind that root-commands won't work here. Have fun!", channel, c->title );
    833833                else
    834                         irc_reply( irc, 331, "%s :No topic for this channel", channel );
     834                        irc_reply( irc, 331, "%s :No topic for this channel" );
    835835        }
    836836}
     
    888888        if( g_hash_table_lookup( irc->watches, nick ) )
    889889        {
    890                 irc_reply( irc, 600, "%s %s %s %d :%s", u->nick, u->user, u->host, (int) time( NULL ), "logged online" );
     890                irc_reply( irc, 600, "%s %s %s %d :%s", u->nick, u->user, u->host, time( NULL ), "logged online" );
    891891        }
    892892        g_free( nick );
     
    913913        if( g_hash_table_lookup( irc->watches, nick ) )
    914914        {
    915                 irc_reply( irc, 601, "%s %s %s %d :%s", u->nick, u->user, u->host, (int) time( NULL ), "logged offline" );
     915                irc_reply( irc, 601, "%s %s %s %d :%s", u->nick, u->user, u->host, time( NULL ), "logged offline" );
    916916        }
    917917        g_free( nick );
     
    10131013        else if( c && c->gc && c->gc->prpl )
    10141014        {
    1015                 return( bim_chat_msg( c->gc, c->id, s ) );
     1015                return( serv_send_chat( irc, c->gc, c->id, s ) );
    10161016        }
    10171017       
     
    10231023        user_t *u = data;
    10241024       
    1025         /* Shouldn't happen, but just to be sure. */
    1026         if( u->sendbuf_len < 2 )
    1027                 return FALSE;
    1028        
    10291025        u->sendbuf[u->sendbuf_len-2] = 0; /* Cut off the last newline */
    1030         bim_buddy_msg( u->gc, u->handle, u->sendbuf, u->sendbuf_flags );
     1026        serv_send_im( u->gc->irc, u, u->sendbuf, u->sendbuf_flags );
    10311027       
    10321028        g_free( u->sendbuf );
     
    10491045                if( u->sendbuf_len > 0 && u->sendbuf_flags != flags)
    10501046                {
    1051                         /* Flush the buffer */
     1047                        //Flush the buffer
    10521048                        b_event_remove( u->sendbuf_timer );
    10531049                        buddy_send_handler_delayed( u, -1, 0 );
     
    10571053                {
    10581054                        u->sendbuf_len = strlen( msg ) + 2;
    1059                         u->sendbuf = g_new( char, u->sendbuf_len );
     1055                        u->sendbuf = g_new (char, u->sendbuf_len );
    10601056                        u->sendbuf[0] = 0;
    10611057                        u->sendbuf_flags = flags;
     
    10641060                {
    10651061                        u->sendbuf_len += strlen( msg ) + 1;
    1066                         u->sendbuf = g_renew( char, u->sendbuf, u->sendbuf_len );
     1062                        u->sendbuf = g_renew ( char, u->sendbuf, u->sendbuf_len );
    10671063                }
    10681064               
     
    10801076        else
    10811077        {
    1082                 bim_buddy_msg( u->gc, u->handle, msg, flags );
     1078                serv_send_im( irc, u, msg, flags );
    10831079        }
    10841080}
  • irc.h

    r68b518d6 r41ca004  
    103103
    104104irc_t *irc_new( int fd );
    105 void irc_abort( irc_t *irc, int immed, char *format, ... ) G_GNUC_PRINTF( 3, 4 );
     105void irc_abort( irc_t *irc, int immed, char *format, ... );
    106106void irc_free( irc_t *irc );
    107107
     
    112112
    113113void irc_vawrite( irc_t *irc, char *format, va_list params );
    114 void irc_write( irc_t *irc, char *format, ... ) G_GNUC_PRINTF( 2, 3 );
    115 void irc_write_all( int now, char *format, ... ) G_GNUC_PRINTF( 2, 3 );
    116 void irc_reply( irc_t *irc, int code, char *format, ... ) G_GNUC_PRINTF( 3, 4 );
    117 G_MODULE_EXPORT int irc_usermsg( irc_t *irc, char *format, ... ) G_GNUC_PRINTF( 2, 3 );
     114void irc_write( irc_t *irc, char *format, ... );
     115void irc_write_all( int now, char *format, ... );
     116void irc_reply( irc_t *irc, int code, char *format, ... );
     117G_MODULE_EXPORT int irc_usermsg( irc_t *irc, char *format, ... );
    118118char **irc_tokenize( char *buffer );
    119119
  • irc_commands.c

    r68b518d6 r41ca004  
    385385                       
    386386                        if( u && u->online )
    387                                 irc_reply( irc, 604, "%s %s %s %d :%s", u->nick, u->user, u->host, (int) time( NULL ), "is online" );
     387                                irc_reply( irc, 604, "%s %s %s %d :%s", u->nick, u->user, u->host, time( NULL ), "is online" );
    388388                        else
    389                                 irc_reply( irc, 605, "%s %s %s %d :%s", nick, "*", "*", (int) time( NULL ), "is offline" );
     389                                irc_reply( irc, 605, "%s %s %s %d :%s", nick, "*", "*", time( NULL ), "is offline" );
    390390                }
    391391                else if( cmd[i][0] == '-' )
     
    448448               
    449449                if( gc && gc->flags & OPT_LOGGED_IN )
    450                         bim_set_away( gc, u->away );
     450                        proto_away( gc, u->away );
    451451        }
    452452}
  • log.h

    r68b518d6 r41ca004  
    5454void log_init(void);
    5555void log_link(int level, int output);
    56 void log_message(int level, char *message, ...) G_GNUC_PRINTF( 2, 3 );
     56void log_message(int level, char *message, ...);
    5757void log_error(char *functionname);
    5858
  • protocols/http_client.c

    r68b518d6 r41ca004  
    240240
    241241got_reply:
    242         /* Maybe if the webserver is overloaded, or when there's bad SSL
    243            support... */
    244         if( req->bytes_read == 0 )
    245                 goto cleanup;
    246        
    247242        /* Zero termination is very convenient. */
    248243        req->reply_headers[req->bytes_read] = 0;
  • protocols/nogaim.c

    r68b518d6 r41ca004  
    3636#include <ctype.h>
    3737
     38static char *proto_away_alias[8][5] =
     39{
     40        { "Away from computer", "Away", "Extended away", NULL },
     41        { "NA", "N/A", "Not available", NULL },
     42        { "Busy", "Do not disturb", "DND", "Occupied", NULL },
     43        { "Be right back", "BRB", NULL },
     44        { "On the phone", "Phone", "On phone", NULL },
     45        { "Out to lunch", "Lunch", "Food", NULL },
     46        { "Invisible", "Hidden" },
     47        { NULL }
     48};
     49static char *proto_away_alias_find( GList *gcm, char *away );
     50
    3851static int remove_chat_buddy_silent( struct conversation *b, char *handle );
    3952
     
    143156GSList *get_connections() { return connections; }
    144157
     158int proto_away( struct gaim_connection *gc, char *away )
     159{
     160        GList *m, *ms;
     161        char *s;
     162       
     163        if( !away ) away = "";
     164        ms = m = gc->prpl->away_states( gc );
     165       
     166        while( m )
     167        {
     168                if( *away )
     169                {
     170                        if( g_strncasecmp( m->data, away, strlen( m->data ) ) == 0 )
     171                                break;
     172                }
     173                else
     174                {
     175                        if( g_strcasecmp( m->data, "Available" ) == 0 )
     176                                break;
     177                        if( g_strcasecmp( m->data, "Online" ) == 0 )
     178                                break;
     179                }
     180                m = m->next;
     181        }
     182       
     183        if( m )
     184        {
     185                gc->prpl->set_away( gc, m->data, *away ? away : NULL );
     186        }
     187        else
     188        {
     189                s = proto_away_alias_find( ms, away );
     190                if( s )
     191                {
     192                        gc->prpl->set_away( gc, s, away );
     193                        if( set_getint( gc->irc, "debug" ) )
     194                                serv_got_crap( gc, "Setting away state to %s", s );
     195                }
     196                else
     197                        gc->prpl->set_away( gc, GAIM_AWAY_CUSTOM, away );
     198        }
     199       
     200        g_list_free( ms );
     201       
     202        return( 1 );
     203}
     204
     205static char *proto_away_alias_find( GList *gcm, char *away )
     206{
     207        GList *m;
     208        int i, j;
     209       
     210        for( i = 0; *proto_away_alias[i]; i ++ )
     211        {
     212                for( j = 0; proto_away_alias[i][j]; j ++ )
     213                        if( g_strncasecmp( away, proto_away_alias[i][j], strlen( proto_away_alias[i][j] ) ) == 0 )
     214                                break;
     215               
     216                if( !proto_away_alias[i][j] )   /* If we reach the end, this row */
     217                        continue;               /* is not what we want. Next!    */
     218               
     219                /* Now find an entry in this row which exists in gcm */
     220                for( j = 0; proto_away_alias[i][j]; j ++ )
     221                {
     222                        m = gcm;
     223                        while( m )
     224                        {
     225                                if( g_strcasecmp( proto_away_alias[i][j], m->data ) == 0 )
     226                                        return( proto_away_alias[i][j] );
     227                                m = m->next;
     228                        }
     229                }
     230        }
     231       
     232        return( NULL );
     233}
     234
    145235/* multi.c */
    146236
     
    267357        /* Also necessary when we're not away, at least for some of the
    268358           protocols. */
    269         bim_set_away( gc, u->away );
     359        proto_away( gc, u->away );
    270360}
    271361
     
    391481        else if( gc->user->proto_opt[0] && *gc->user->proto_opt[0] )
    392482        {
    393                 char *colon;
    394                
    395                 if( ( colon = strchr( gc->user->proto_opt[0], ':' ) ) )
    396                         u->host = g_strndup( gc->user->proto_opt[0],
    397                                              colon - gc->user->proto_opt[0] );
    398                 else
    399                         u->host = g_strdup( gc->user->proto_opt[0] );
    400                
     483                u->host = g_strdup( gc->user->proto_opt[0] );
    401484                u->user = g_strdup( handle );
    402485               
     
    9391022}
    9401023
    941 
    942 
    943 
    944 /* The plan is to not allow straight calls to prpl functions anymore, but do
    945    them all from some wrappers. We'll start to define some down here: */
    946 
    947 int bim_buddy_msg( struct gaim_connection *gc, char *handle, char *msg, int flags )
     1024int serv_send_im( irc_t *irc, user_t *u, char *msg, int flags )
    9481025{
    9491026        char *buf = NULL;
    9501027        int st;
    9511028       
    952         if( ( gc->flags & OPT_CONN_HTML ) && ( g_strncasecmp( msg, "<html>", 6 ) != 0 ) )
     1029        if( ( u->gc->flags & OPT_CONN_HTML ) && ( g_strncasecmp( msg, "<html>", 6 ) != 0 ) )
    9531030        {
    9541031                buf = escape_html( msg );
     
    9561033        }
    9571034       
    958         st = gc->prpl->send_im( gc, handle, msg, strlen( msg ), flags );
     1035        st = ((struct gaim_connection *)u->gc)->prpl->send_im( u->gc, u->handle, msg, strlen( msg ), flags );
    9591036        g_free( buf );
    9601037       
     
    9621039}
    9631040
    964 int bim_chat_msg( struct gaim_connection *gc, int id, char *msg )
     1041int serv_send_chat( irc_t *irc, struct gaim_connection *gc, int id, char *msg )
    9651042{
    9661043        char *buf = NULL;
     
    9781055        return st;
    9791056}
    980 
    981 static char *bim_away_alias_find( GList *gcm, char *away );
    982 
    983 int bim_set_away( struct gaim_connection *gc, char *away )
    984 {
    985         GList *m, *ms;
    986         char *s;
    987        
    988         if( !away ) away = "";
    989         ms = m = gc->prpl->away_states( gc );
    990        
    991         while( m )
    992         {
    993                 if( *away )
    994                 {
    995                         if( g_strncasecmp( m->data, away, strlen( m->data ) ) == 0 )
    996                                 break;
    997                 }
    998                 else
    999                 {
    1000                         if( g_strcasecmp( m->data, "Available" ) == 0 )
    1001                                 break;
    1002                         if( g_strcasecmp( m->data, "Online" ) == 0 )
    1003                                 break;
    1004                 }
    1005                 m = m->next;
    1006         }
    1007        
    1008         if( m )
    1009         {
    1010                 gc->prpl->set_away( gc, m->data, *away ? away : NULL );
    1011         }
    1012         else
    1013         {
    1014                 s = bim_away_alias_find( ms, away );
    1015                 if( s )
    1016                 {
    1017                         gc->prpl->set_away( gc, s, away );
    1018                         if( set_getint( gc->irc, "debug" ) )
    1019                                 serv_got_crap( gc, "Setting away state to %s", s );
    1020                 }
    1021                 else
    1022                         gc->prpl->set_away( gc, GAIM_AWAY_CUSTOM, away );
    1023         }
    1024        
    1025         g_list_free( ms );
    1026        
    1027         return( 1 );
    1028 }
    1029 
    1030 static char *bim_away_alias_list[8][5] =
    1031 {
    1032         { "Away from computer", "Away", "Extended away", NULL },
    1033         { "NA", "N/A", "Not available", NULL },
    1034         { "Busy", "Do not disturb", "DND", "Occupied", NULL },
    1035         { "Be right back", "BRB", NULL },
    1036         { "On the phone", "Phone", "On phone", NULL },
    1037         { "Out to lunch", "Lunch", "Food", NULL },
    1038         { "Invisible", "Hidden" },
    1039         { NULL }
    1040 };
    1041 
    1042 static char *bim_away_alias_find( GList *gcm, char *away )
    1043 {
    1044         GList *m;
    1045         int i, j;
    1046        
    1047         for( i = 0; *bim_away_alias_list[i]; i ++ )
    1048         {
    1049                 for( j = 0; bim_away_alias_list[i][j]; j ++ )
    1050                         if( g_strncasecmp( away, bim_away_alias_list[i][j], strlen( bim_away_alias_list[i][j] ) ) == 0 )
    1051                                 break;
    1052                
    1053                 if( !bim_away_alias_list[i][j] )        /* If we reach the end, this row */
    1054                         continue;                       /* is not what we want. Next!    */
    1055                
    1056                 /* Now find an entry in this row which exists in gcm */
    1057                 for( j = 0; bim_away_alias_list[i][j]; j ++ )
    1058                 {
    1059                         m = gcm;
    1060                         while( m )
    1061                         {
    1062                                 if( g_strcasecmp( bim_away_alias_list[i][j], m->data ) == 0 )
    1063                                         return( bim_away_alias_list[i][j] );
    1064                                 m = m->next;
    1065                         }
    1066                 }
    1067         }
    1068        
    1069         return( NULL );
    1070 }
    1071 
    1072 void bim_add_allow( struct gaim_connection *gc, char *handle )
    1073 {
    1074         if( g_slist_find_custom( gc->permit, handle, (GCompareFunc) gc->prpl->cmp_buddynames ) == NULL )
    1075         {
    1076                 gc->permit = g_slist_prepend( gc->permit, g_strdup( handle ) );
    1077         }
    1078        
    1079         gc->prpl->add_permit( gc, handle );
    1080 }
    1081 
    1082 void bim_rem_allow( struct gaim_connection *gc, char *handle )
    1083 {
    1084         GSList *l;
    1085        
    1086         if( ( l = g_slist_find_custom( gc->permit, handle, (GCompareFunc) gc->prpl->cmp_buddynames ) ) )
    1087         {
    1088                 g_free( l->data );
    1089                 gc->permit = g_slist_delete_link( gc->permit, l );
    1090         }
    1091        
    1092         gc->prpl->rem_permit( gc, handle );
    1093 }
    1094 
    1095 void bim_add_block( struct gaim_connection *gc, char *handle )
    1096 {
    1097         if( g_slist_find_custom( gc->deny, handle, (GCompareFunc) gc->prpl->cmp_buddynames ) == NULL )
    1098         {
    1099                 gc->deny = g_slist_prepend( gc->deny, g_strdup( handle ) );
    1100         }
    1101        
    1102         gc->prpl->add_deny( gc, handle );
    1103 }
    1104 
    1105 void bim_rem_block( struct gaim_connection *gc, char *handle )
    1106 {
    1107         GSList *l;
    1108        
    1109         if( ( l = g_slist_find_custom( gc->deny, handle, (GCompareFunc) gc->prpl->cmp_buddynames ) ) )
    1110         {
    1111                 g_free( l->data );
    1112                 gc->deny = g_slist_delete_link( gc->deny, l );
    1113         }
    1114        
    1115         gc->prpl->rem_deny( gc, handle );
    1116 }
  • protocols/nogaim.h

    r68b518d6 r41ca004  
    5252#define BUDDY_ALIAS_MAXLEN 388   /* because MSN names can be 387 characters */
    5353
    54 #define WEBSITE "http://www.bitlbee.org/"
     54#define WEBSITE "http://www.bitlee.org/"
    5555#define IM_FLAG_AWAY 0x0020
    5656#define OPT_CONN_HTML 0x00000001
     
    194194
    195195/* nogaim.c */
    196 int bim_set_away( struct gaim_connection *gc, char *away );
    197 int bim_buddy_msg( struct gaim_connection *gc, char *handle, char *msg, int flags );
    198 int bim_chat_msg( struct gaim_connection *gc, int id, char *msg );
    199 
    200 void bim_add_allow( struct gaim_connection *gc, char *handle );
    201 void bim_rem_allow( struct gaim_connection *gc, char *handle );
    202 void bim_add_block( struct gaim_connection *gc, char *handle );
    203 void bim_rem_block( struct gaim_connection *gc, char *handle );
     196int serv_send_im(irc_t *irc, user_t *u, char *msg, int flags);
     197int serv_send_chat(irc_t *irc, struct gaim_connection *gc, int id, char *msg );
    204198
    205199void nogaim_init();
     200int proto_away( struct gaim_connection *gc, char *away );
    206201char *set_eval_away_devoice( irc_t *irc, set_t *set, char *value );
    207202
     
    215210G_MODULE_EXPORT void hide_login_progress( struct gaim_connection *gc, char *msg );
    216211G_MODULE_EXPORT void hide_login_progress_error( struct gaim_connection *gc, char *msg );
    217 G_MODULE_EXPORT void serv_got_crap( struct gaim_connection *gc, char *format, ... ) G_GNUC_PRINTF( 2, 3 );
     212G_MODULE_EXPORT void serv_got_crap( struct gaim_connection *gc, char *format, ... );
    218213G_MODULE_EXPORT void account_online( struct gaim_connection *gc );
    219214G_MODULE_EXPORT void signoff( struct gaim_connection *gc );
  • protocols/oscar/aim.h

    r68b518d6 r41ca004  
    728728};
    729729
    730 #define AIM_CHATFLAGS_NOREFLECT         0x0001
    731 #define AIM_CHATFLAGS_AWAY              0x0002
    732 #define AIM_CHATFLAGS_UNICODE           0x0004
    733 #define AIM_CHATFLAGS_ISO_8859_1        0x0008
    734 
     730#define AIM_CHATFLAGS_NOREFLECT 0x0001
     731#define AIM_CHATFLAGS_AWAY      0x0002
    735732int aim_chat_send_im(aim_session_t *sess, aim_conn_t *conn, guint16 flags, const char *msg, int msglen);
    736733int aim_chat_join(aim_session_t *sess, aim_conn_t *conn, guint16 exchange, const char *roomname, guint16 instance);
  • protocols/oscar/chat.c

    r68b518d6 r41ca004  
    159159        if (flags & AIM_CHATFLAGS_AWAY)
    160160                aim_addtlvtochain_noval(&otl, 0x0007);
    161        
    162         /* [WvG] This wasn't there originally, but we really should send
    163                  the right charset flags, as we also do with normal
    164                  messages. Hope this will work. :-) */
    165         /*
    166         if (flags & AIM_CHATFLAGS_UNICODE)
    167                 aimbs_put16(&fr->data, 0x0002);
    168         else if (flags & AIM_CHATFLAGS_ISO_8859_1)
    169                 aimbs_put16(&fr->data, 0x0003);
    170         else
    171                 aimbs_put16(&fr->data, 0x0000);
    172        
    173         aimbs_put16(&fr->data, 0x0000);
    174         */
    175        
     161
    176162        /*
    177163         * SubTLV: Type 1: Message
  • protocols/oscar/im.c

    r68b518d6 r41ca004  
    14691469            case 0x9c:  /* ICQ 5 seems to send this */
    14701470                aim_send_im_ch2_statusmessage(sess, userinfo->sn, args->cookie,
    1471                         gc->away ? gc->away : "", sess->aim_icq_state, dc);
     1471                        gc->away, sess->aim_icq_state, dc);
    14721472                break;
    14731473
  • protocols/oscar/oscar.c

    r68b518d6 r41ca004  
    22 * gaim
    33 *
    4  * Some code copyright (C) 2002-2006, Jelmer Vernooij <jelmer@samba.org>
    5  *                                    and the BitlBee team.
    64 * Some code copyright (C) 1998-1999, Mark Spencer <markster@marko.net>
    75 * libfaim code copyright 1998, 1999 Adam Fritzler <afritz@auk.cx>
     
    138136        int i, j;
    139137        char *x = strchr(name, '-');
    140         if (!x) return g_strdup(name);
     138        if (!x) return NULL;
    141139        x = strchr(++x, '-');
    142         if (!x) return g_strdup(name);
     140        if (!x) return NULL;
    143141        tmp = g_strdup(++x);
    144142
     
    392390        if (g_strcasecmp(user->proto_opt[USEROPT_AUTH], "login.icq.com") != 0 &&
    393391            g_strcasecmp(user->proto_opt[USEROPT_AUTH], "login.oscar.aol.com") != 0) {
    394                 serv_got_crap(gc, "Warning: Unknown OSCAR server: `%s'. Please review your configuration if the connection fails.",user->proto_opt[USEROPT_AUTH]);
     392                serv_got_crap(gc, "Warning: Unknown OSCAR server: `%s'. Please review your configuration if the connection fails.");
    395393        }
    396394       
     
    25192517        int ret;
    25202518        guint8 len = strlen(message);
    2521         guint16 flags;
    25222519        char *s;
    25232520       
     
    25282525                if (*s & 128)
    25292526                        break;
    2530        
    2531         flags = AIM_CHATFLAGS_NOREFLECT;
    2532        
     2527               
    25332528        /* Message contains high ASCII chars, time for some translation! */
    25342529        if (*s) {
     
    25372532                   If we can't, fall back to UTF16. */
    25382533                if ((ret = do_iconv("UTF-8", "ISO8859-1", message, s, len, BUF_LONG)) >= 0) {
    2539                         flags |= AIM_CHATFLAGS_ISO_8859_1;
    25402534                        len = ret;
    25412535                } else if ((ret = do_iconv("UTF-8", "UNICODEBIG", message, s, len, BUF_LONG)) >= 0) {
    2542                         flags |= AIM_CHATFLAGS_UNICODE;
    25432536                        len = ret;
    25442537                } else {
     
    25512544        }
    25522545               
    2553         ret = aim_chat_send_im(od->sess, ccon->conn, flags, s, len);
     2546        ret = aim_chat_send_im(od->sess, ccon->conn, AIM_CHATFLAGS_NOREFLECT, s, len);
    25542547               
    25552548        if (s != message) {     
     
    26242617        int ret;
    26252618        static int chat_id = 0;
    2626         char * chatname;
    2627        
    2628         chatname = g_strdup_printf("%s%d", gc->username, chat_id++);
     2619        char * chatname = g_new0(char, strlen(gc->username)+4);
     2620       
     2621        g_snprintf(chatname, strlen(gc->username) + 4, "%s%d", gc->username, chat_id++);
    26292622 
    26302623        ret = oscar_chat_join(gc, chatname);
  • root_commands.c

    r68b518d6 r41ca004  
    5656                                cmd[k++] = s;
    5757                                s --;
    58                         }
    59                         else
    60                         {
    61                                 break;
    6258                        }
    6359                }
     
    558554        else
    559555        {
    560                 bim_rem_allow( gc, cmd[2] );
    561                 bim_add_block( gc, cmd[2] );
    562                 irc_usermsg( irc, "Buddy `%s' moved from your allow- to your block-list", cmd[2] );
     556                gc->prpl->rem_permit( gc, cmd[2] );
     557                gc->prpl->add_deny( gc, cmd[2] );
     558                irc_usermsg( irc, "Buddy `%s' moved from your permit- to your deny-list", cmd[2] );
    563559        }
    564560}
     
    617613        else
    618614        {
    619                 bim_rem_block( gc, cmd[2] );
    620                 bim_add_allow( gc, cmd[2] );
    621                
    622                 irc_usermsg( irc, "Buddy `%s' moved from your block- to your allow-list", cmd[2] );
     615                gc->prpl->rem_deny( gc, cmd[2] );
     616                gc->prpl->add_permit( gc, cmd[2] );
     617               
     618                irc_usermsg( irc, "Buddy `%s' moved from your deny- to your permit-list", cmd[2] );
    623619        }
    624620}
  • user.c

    r68b518d6 r41ca004  
    168168        u->nick = g_strdup( newnick );
    169169        if( !u->user ) u->user = u->nick;
    170         if( !u->host ) u->host = u->nick;
    171         if( !u->realname ) u->realname = u->nick;
     170        if( !u->host ) u->user = u->host;
     171        if( !u->realname ) u->user = u->realname;
    172172       
    173173        /* Remove the old reference to this user from the hash and create a
  • util.c

    r68b518d6 r41ca004  
    3939#include <glib.h>
    4040#include <time.h>
    41 #ifdef GLIB2
    42 #define iconv_t GIConv
    43 #define iconv_open g_iconv_open
    44 #define iconv_close g_iconv_close
    45 #define iconv g_iconv
    46 #else
    4741#include <iconv.h>
    48 #endif
    4942
    5043void strip_linefeed(gchar *text)
Note: See TracChangeset for help on using the changeset viewer.