about summary refs log tree commit diff stats
path: root/src/xmpp_presence.c
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2013-01-30 22:45:35 +0000
committerJames Booth <boothj5@gmail.com>2013-01-30 22:45:35 +0000
commitfa9826a36af3aea03369f77288b1ba6b6a231484 (patch)
tree830e9b157d3e1419e7220888d9020c70819fc055 /src/xmpp_presence.c
parent603e1934a553371daf807b1f5e9a0df71852f2cf (diff)
downloadprofani-tty-fa9826a36af3aea03369f77288b1ba6b6a231484.tar.gz
Added "set status" to /account
Diffstat (limited to 'src/xmpp_presence.c')
-rw-r--r--src/xmpp_presence.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/xmpp_presence.c b/src/xmpp_presence.c
index 125e1400..f2918812 100644
--- a/src/xmpp_presence.c
+++ b/src/xmpp_presence.c
@@ -56,6 +56,23 @@ presence_add_handlers(void)
     HANDLE(NULL, NULL, _presence_handler);
 }
 
+gboolean
+presence_valid_string(const char * const str)
+{
+    if (str == NULL) {
+        return FALSE;
+    } else if ((strcmp(str, "online") == 0) ||
+                (strcmp(str, "chat") == 0) ||
+                (strcmp(str, "away") == 0) ||
+                (strcmp(str, "xa") == 0) ||
+                (strcmp(str, "dnd") == 0)) {
+        return TRUE;
+    } else {
+        return FALSE;
+    }
+}
+
+
 void
 presence_subscription(const char * const jid, const jabber_subscr_t action)
 {