Make mood display optional
This commit is contained in:
@@ -90,6 +90,7 @@
|
||||
#include "xmpp/muc.h"
|
||||
#include "xmpp/chat_session.h"
|
||||
#include "xmpp/avatar.h"
|
||||
#include "xmpp/stanza.h"
|
||||
|
||||
#ifdef HAVE_LIBOTR
|
||||
#include "otr/otr.h"
|
||||
@@ -9769,7 +9770,13 @@ cmd_register(ProfWin* window, const char* const command, gchar** args)
|
||||
gboolean
|
||||
cmd_mood(ProfWin* window, const char* const command, gchar** args)
|
||||
{
|
||||
if (g_strcmp0(args[0], "set") == 0) {
|
||||
if (g_strcmp0(args[0], "on") == 0) {
|
||||
_cmd_set_boolean_preference(args[0], command, "User mood", PREF_MOOD);
|
||||
caps_add_feature(STANZA_NS_MOOD_NOTIFY);
|
||||
} else if (g_strcmp0(args[0], "off") == 0) {
|
||||
_cmd_set_boolean_preference(args[0], command, "User mood", PREF_MOOD);
|
||||
caps_remove_feature(STANZA_NS_MOOD_NOTIFY);
|
||||
} else if (g_strcmp0(args[0], "set") == 0) {
|
||||
if (args[1]) {
|
||||
cons_show("Your mood: %s", args[1]);
|
||||
if (args[2]) {
|
||||
@@ -9782,5 +9789,6 @@ cmd_mood(ProfWin* window, const char* const command, gchar** args)
|
||||
cons_show("Clearing the user mood.");
|
||||
publish_user_mood(NULL, NULL);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user