- Timestamp:
- 2010-09-06T09:26:39Z (14 years ago)
- Branches:
- master
- Children:
- ecae65f
- Parents:
- 674a01d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/purple/purple.c
r674a01d r3c9b095 80 80 char help_title[64]; 81 81 GString *help; 82 static gboolean dir_fixed = FALSE; 83 84 /* Layer violation coming up: Making an exception for libpurple here. 85 Dig in the IRC state a bit to get a username. Ideally we should 86 check if s/he identified but this info doesn't seem *that* important. 87 It's just that fecking libpurple can't *not* store this shit. 88 89 Remember that libpurple is not really meant to be used on public 90 servers anyway! */ 91 if( !dir_fixed ) 92 { 93 irc_t *irc = acc->bee->ui_data; 94 char *dir; 95 96 dir = g_strdup_printf( "%s/purple/%s", global.conf->configdir, irc->user->nick ); 97 purple_util_set_user_dir( dir ); 98 g_free( dir ); 99 100 purple_blist_load(); 101 purple_prefs_load(); 102 dir_fixed = TRUE; 103 } 82 104 83 105 help = g_string_new( "" ); … … 254 276 PurpleAccount *pa; 255 277 256 if( local_bee != NULL && local_bee != acc->bee ) 278 if( ( local_bee != NULL && local_bee != acc->bee ) || 279 ( global.conf->runmode == RUNMODE_DAEMON && !getenv( "BITLBEE_DEBUG" ) ) ) 257 280 { 258 281 imcb_error( ic, "Daemon mode detected. Do *not* try to use libpurple in daemon mode! " … … 351 374 account_t *acc = set->data; 352 375 struct im_connection *ic = acc->ic; 376 377 if( ic ) 378 imcb_log( ic, "Changing display_name not currently supported with libpurple!" ); 353 379 354 380 return NULL; … … 517 543 } 518 544 519 struct groupchat *purple_chat_join( struct im_connection *ic, const char *room, const char *nick, const char *password )545 struct groupchat *purple_chat_join( struct im_connection *ic, const char *room, const char *nick, const char *password, set_t **sets ) 520 546 { 521 547 PurpleAccount *pa = ic->proto_data; … … 1132 1158 GList *prots; 1133 1159 GString *help; 1160 char *dir; 1134 1161 1135 1162 if( B_EV_IO_READ != PURPLE_INPUT_READ || … … 1140 1167 } 1141 1168 1142 purple_util_set_user_dir( "/tmp" ); 1169 dir = g_strdup_printf( "%s/purple", global.conf->configdir ); 1170 purple_util_set_user_dir( dir ); 1171 g_free( dir ); 1172 1143 1173 purple_debug_set_enabled( FALSE ); 1144 1174 purple_core_set_ui_ops( &bee_core_uiops ); … … 1151 1181 } 1152 1182 1153 /* This seems like stateful shit we don't want... */1154 1183 purple_set_blist( purple_blist_new() ); 1155 purple_blist_load();1156 1157 /* Meh? */1158 purple_prefs_load();1159 1184 1160 1185 /* No, really. So far there were ui_ops for everything, but now suddenly … … 1221 1246 1222 1247 g_string_append( help, "\n\nFor used protocols, more information about available " 1223 "settings can be found using \x02help purple <protocol name>\x02" ); 1248 "settings can be found using \x02help purple <protocol name>\x02 " 1249 "(create an account using that protocol first!)" ); 1224 1250 1225 1251 /* Add a simple dynamically-generated help item listing all
Note: See TracChangeset
for help on using the changeset viewer.