src/status.c

changeset 12145
25b628495c37
parent 12123
a5890e156848
child 12164
b39dc890f640
equal deleted inserted replaced
12144:a24ccdee060b 12145:25b628495c37
1340 } 1340 }
1341 } 1341 }
1342 else if(gaim_presence_get_context(presence) == GAIM_PRESENCE_CONTEXT_ACCOUNT) 1342 else if(gaim_presence_get_context(presence) == GAIM_PRESENCE_CONTEXT_ACCOUNT)
1343 { 1343 {
1344 GaimAccount *account; 1344 GaimAccount *account;
1345 GaimLog *log;
1346 char *msg;
1347 GaimConnection *gc; 1345 GaimConnection *gc;
1348 GaimPluginProtocolInfo *prpl_info = NULL; 1346 GaimPluginProtocolInfo *prpl_info = NULL;
1349 1347
1350 account = gaim_presence_get_account(presence); 1348 account = gaim_presence_get_account(presence);
1351 log = gaim_account_get_log(account); 1349
1352 1350 if (gaim_prefs_get_bool("/core/logging/log_system"))
1353 if (idle) 1351 {
1354 msg = g_strdup_printf(_("+++ %s became idle"), gaim_account_get_username(account)); 1352 GaimLog *log = gaim_account_get_log(account);
1355 else 1353 char *msg;
1356 msg = g_strdup_printf(_("+++ %s became unidle"), gaim_account_get_username(account)); 1354
1357 gaim_log_write(log, GAIM_MESSAGE_SYSTEM, 1355 if (idle)
1358 gaim_account_get_username(account), 1356 msg = g_strdup_printf(_("+++ %s became idle"), gaim_account_get_username(account));
1359 idle_time, msg); 1357 else
1360 g_free(msg); 1358 msg = g_strdup_printf(_("+++ %s became unidle"), gaim_account_get_username(account));
1359 gaim_log_write(log, GAIM_MESSAGE_SYSTEM,
1360 gaim_account_get_username(account),
1361 idle_time, msg);
1362 g_free(msg);
1363 }
1361 1364
1362 gc = gaim_account_get_connection(account); 1365 gc = gaim_account_get_connection(account);
1363 1366
1364 if (gc != NULL && gc->prpl != NULL) 1367 if (gc != NULL && gc->prpl != NULL)
1365 prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl); 1368 prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl);

mercurial