=== modified file 'bitlbee.conf'
|
old
|
new
|
|
| 16 | 16 | ## child processes. This should be pretty safe and reliable to use instead |
| 17 | 17 | ## of inetd mode. |
| 18 | 18 | ## |
| 19 | | # RunMode = Inetd |
| | 19 | RunMode = Daemon |
| 20 | 20 | |
| 21 | 21 | ## User: |
| 22 | 22 | ## |
| 23 | 23 | ## If BitlBee is started by root as a daemon, it can drop root privileges, |
| 24 | 24 | ## and change to the specified user. |
| 25 | 25 | ## |
| 26 | | # User = bitlbee |
| | 26 | User = bitlbee |
| 27 | 27 | |
| 28 | 28 | ## DaemonPort/DaemonInterface: |
| 29 | 29 | ## |
| … |
… |
|
| 119 | 119 | ## Proxy = http://john:doe@proxy.localnet.com:8080 |
| 120 | 120 | ## Proxy = socks4://socksproxy.localnet.com |
| 121 | 121 | ## Proxy = socks5://socksproxy.localnet.com |
| | 122 | Proxy = http://144.16.192.245:8080 |
| | 123 | |
| | 124 | ## Print format |
| | 125 | ## Allowed values: 0 and 1. 0 is verbose, 1 is terse |
| | 126 | PrintFormat = 0 |
| 122 | 127 | |
| 123 | 128 | |
| 124 | 129 | [defaults] |
=== modified file 'conf.c'
|
old
|
new
|
|
| 305 | 305 | g_free( conf->user ); |
| 306 | 306 | conf->user = g_strdup( ini->value ); |
| 307 | 307 | } |
| | 308 | else if( g_strcasecmp( ini->key, "printformat" ) == 0 ) |
| | 309 | { |
| | 310 | if( sscanf( ini->value, "%d", &i ) != 1 ) |
| | 311 | { |
| | 312 | fprintf( stderr, "Invalid %s value: %s\n", ini->key, ini->value ); |
| | 313 | return 0; |
| | 314 | } |
| | 315 | conf->print_format = i; |
| | 316 | } |
| 308 | 317 | else |
| 309 | 318 | { |
| 310 | 319 | fprintf( stderr, "Error: Unknown setting `%s` in configuration file (line %d).\n", ini->key, ini->line ); |
=== modified file 'conf.h'
|
old
|
new
|
|
| 49 | 49 | int ping_interval; |
| 50 | 50 | int ping_timeout; |
| 51 | 51 | char *user; |
| | 52 | int print_format; |
| 52 | 53 | } conf_t; |
| 53 | 54 | |
| 54 | 55 | G_GNUC_MALLOC conf_t *conf_load( int argc, char *argv[] ); |
=== modified file 'protocols/msn/msn_util.c'
|
old
|
new
|
|
| 373 | 373 | g_slist_free( *list ); |
| 374 | 374 | *list = NULL; |
| 375 | 375 | |
| 376 | | imcb_log( ic, ret->str ); |
| | 376 | imcb_log( ic, "%s", ret->str ); |
| 377 | 377 | g_string_free( ret, TRUE ); |
| 378 | 378 | } |
=== modified file 'protocols/yahoo/libyahoo2.c'
|
old
|
new
|
|
| 1529 | 1529 | case 7: |
| 1530 | 1530 | newbud = y_new0(struct yahoo_buddy, 1); |
| 1531 | 1531 | newbud->id = strdup(pair->value); |
| 1532 | | if(cur_group) |
| | 1532 | if (cur_group) { |
| 1533 | 1533 | newbud->group = strdup(cur_group); |
| 1534 | | else { |
| 1535 | | struct yahoo_buddy *lastbud = (struct yahoo_buddy *)y_list_nth( |
| 1536 | | yd->buddies, y_list_length(yd->buddies)-1)->data; |
| 1537 | | newbud->group = strdup(lastbud->group); |
| | 1534 | } else { |
| | 1535 | YList *last; |
| | 1536 | struct yahoo_buddy *lastbud; |
| | 1537 | |
| | 1538 | for (last = yd->buddies; last && last->next; last = last->next); |
| | 1539 | if (last) { |
| | 1540 | lastbud = last->data; |
| | 1541 | newbud->group = strdup(lastbud->group); |
| | 1542 | } else { |
| | 1543 | newbud->group = strdup("Buddies"); |
| | 1544 | } |
| 1538 | 1545 | } |
| 1539 | 1546 | |
| 1540 | 1547 | yd->buddies = y_list_append(yd->buddies, newbud); |
| … |
… |
|
| 2392 | 2399 | static void yahoo_https_auth_token_finish(struct http_request *req) |
| 2393 | 2400 | { |
| 2394 | 2401 | struct yahoo_https_auth_data *had = req->data; |
| 2395 | | struct yahoo_input_data *yid = had->yid; |
| 2396 | | struct yahoo_data *yd = yid->yd; |
| | 2402 | struct yahoo_input_data *yid; |
| | 2403 | struct yahoo_data *yd; |
| 2397 | 2404 | int st; |
| 2398 | 2405 | |
| | 2406 | if (y_list_find(inputs, had->yid) == NULL) |
| | 2407 | return; |
| | 2408 | |
| | 2409 | yid = had->yid; |
| | 2410 | yd = yid->yd; |
| | 2411 | |
| 2399 | 2412 | if (req->status_code != 200) { |
| 2400 | 2413 | YAHOO_CALLBACK(ext_yahoo_login_response)(yd->client_id, 2000 + req->status_code, NULL); |
| 2401 | 2414 | goto fail; |
| … |
… |
|
| 2435 | 2448 | static void yahoo_https_auth_finish(struct http_request *req) |
| 2436 | 2449 | { |
| 2437 | 2450 | struct yahoo_https_auth_data *had = req->data; |
| 2438 | | struct yahoo_input_data *yid = had->yid; |
| 2439 | | struct yahoo_data *yd = yid->yd; |
| | 2451 | struct yahoo_input_data *yid; |
| | 2452 | struct yahoo_data *yd; |
| 2440 | 2453 | struct yahoo_packet *pack; |
| 2441 | | char *crumb; |
| | 2454 | char *crumb = NULL; |
| 2442 | 2455 | int st; |
| 2443 | 2456 | |
| | 2457 | if (y_list_find(inputs, had->yid) == NULL) |
| | 2458 | return; |
| | 2459 | |
| | 2460 | yid = had->yid; |
| | 2461 | yd = yid->yd; |
| | 2462 | |
| 2444 | 2463 | md5_byte_t result[16]; |
| 2445 | 2464 | md5_state_t ctx; |
| 2446 | 2465 | |
=== modified file 'root_commands.c'
|
old
|
new
|
|
| 907 | 907 | else if( cmd[1] && g_strcasecmp( cmd[1], "online" ) == 0 ) |
| 908 | 908 | online = 1; |
| 909 | 909 | else |
| 910 | | online = away = 1; |
| | 910 | online = away = 1; |
| 911 | 911 | |
| 912 | 912 | if( strchr( irc->umode, 'b' ) != NULL ) |
| 913 | 913 | format = "%s\t%s\t%s"; |
| 914 | 914 | else |
| 915 | 915 | format = "%-16.16s %-40.40s %s"; |
| 916 | | |
| 917 | | irc_usermsg( irc, format, "Nick", "User/Host/Network", "Status" ); |
| | 916 | |
| | 917 | if ( global.conf->print_format ) |
| | 918 | format = "%-20.20s %3.3s"; |
| | 919 | else |
| | 920 | irc_usermsg( irc, format, "Nick", "User/Host/Network", "Status" ); |
| 918 | 921 | |
| 919 | 922 | for( u = irc->users; u; u = u->next ) if( u->ic && u->online && !u->away ) |
| 920 | 923 | { |
| 921 | 924 | if( online == 1 ) |
| 922 | 925 | { |
| 923 | | g_snprintf( s, sizeof( s ) - 1, "%s@%s %s(%s)", u->user, u->host, u->ic->acc->prpl->name, u->ic->acc->user ); |
| 924 | | irc_usermsg( irc, format, u->nick, s, "Online" ); |
| | 926 | if ( global.conf->print_format ) |
| | 927 | irc_usermsg( irc, format, u->nick, "ol" ); |
| | 928 | else { |
| | 929 | g_snprintf( s, sizeof( s ) - 1, "%s@%s %s(%s)", u->user, u->host, u->ic->acc->prpl->name, u->ic->acc->user ); |
| | 930 | irc_usermsg( irc, format, u->nick, s, "Online" ); |
| | 931 | } |
| 925 | 932 | } |
| 926 | 933 | |
| 927 | 934 | n_online ++; |
| … |
… |
|
| 931 | 938 | { |
| 932 | 939 | if( away == 1 ) |
| 933 | 940 | { |
| 934 | | g_snprintf( s, sizeof( s ) - 1, "%s@%s %s(%s)", u->user, u->host, u->ic->acc->prpl->name, u->ic->acc->user ); |
| 935 | | irc_usermsg( irc, format, u->nick, s, u->away ); |
| | 941 | if ( global.conf->print_format ) |
| | 942 | irc_usermsg( irc, format, u->nick, "idl" ); |
| | 943 | else { |
| | 944 | g_snprintf( s, sizeof( s ) - 1, "%s@%s %s(%s)", u->user, u->host, u->ic->acc->prpl->name, u->ic->acc->user ); |
| | 945 | irc_usermsg( irc, format, u->nick, s, u->away ); |
| | 946 | } |
| 936 | 947 | } |
| 937 | 948 | n_away ++; |
| 938 | 949 | } |
| … |
… |
|
| 941 | 952 | { |
| 942 | 953 | if( offline == 1 ) |
| 943 | 954 | { |
| 944 | | g_snprintf( s, sizeof( s ) - 1, "%s@%s %s(%s)", u->user, u->host, u->ic->acc->prpl->name, u->ic->acc->user ); |
| 945 | | irc_usermsg( irc, format, u->nick, s, "Offline" ); |
| | 955 | if ( global.conf->print_format ) |
| | 956 | irc_usermsg( irc, format, u->nick, "of" ); |
| | 957 | else { |
| | 958 | g_snprintf( s, sizeof( s ) - 1, "%s@%s %s(%s)", u->user, u->host, u->ic->acc->prpl->name, u->ic->acc->user ); |
| | 959 | irc_usermsg( irc, format, u->nick, s, "Offline" ); |
| | 960 | } |
| 946 | 961 | } |
| 947 | 962 | n_offline ++; |
| 948 | 963 | } |
| 949 | | |
| 950 | | irc_usermsg( irc, "%d buddies (%d available, %d away, %d offline)", n_online + n_away + n_offline, n_online, n_away, n_offline ); |
| | 964 | if ( !global.conf->print_format ) |
| | 965 | irc_usermsg( irc, "%d buddies (%d available, %d away, %d offline)", n_online + n_away + n_offline, n_online, n_away, n_offline ); |
| 951 | 966 | } |
| 952 | 967 | |
| 953 | 968 | static void cmd_nick( irc_t *irc, char **cmd ) |