mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-20 00:06:22 +00:00
WIP - /statuses command options
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#include "config.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <glib.h>
|
||||
@@ -86,6 +87,7 @@ prefs_close(void)
|
||||
{
|
||||
autocomplete_free(boolean_choice_ac);
|
||||
g_key_file_free(prefs);
|
||||
prefs = NULL;
|
||||
}
|
||||
|
||||
char *
|
||||
|
||||
@@ -315,11 +315,17 @@ handle_contact_online(char *barejid, Resource *resource,
|
||||
{
|
||||
gboolean updated = roster_update_presence(barejid, resource, last_activity);
|
||||
|
||||
if (updated && prefs_get_boolean(PREF_STATUSES)) {
|
||||
if (updated) {
|
||||
char *show_console = prefs_get_string(PREF_STATUSES_CONSOLE);
|
||||
PContact contact = roster_get_contact(barejid);
|
||||
if (p_contact_subscription(contact) != NULL) {
|
||||
if (strcmp(p_contact_subscription(contact), "none") != 0) {
|
||||
cons_show_contact_online(contact, resource, last_activity);
|
||||
if (g_strcmp0(show_console, "all") == 0) {
|
||||
cons_show_contact_online(contact, resource, last_activity);
|
||||
} else if (g_strcmp0(show_console, "online") == 0 &&
|
||||
resource->presence == RESOURCE_ONLINE) {
|
||||
cons_show_contact_online(contact, resource, last_activity);
|
||||
}
|
||||
ui_chat_win_contact_online(contact, resource, last_activity);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
#ifndef SERVER_EVENTS_H
|
||||
#define SERVER_EVENTS_H
|
||||
|
||||
#include "xmpp/xmpp.h"
|
||||
|
||||
void handle_error_message(const char *from, const char *err_msg);
|
||||
void handle_login_account_success(char *account_name);
|
||||
void handle_lost_connection(void);
|
||||
|
||||
Reference in New Issue
Block a user