about summary refs log tree commit diff stats
path: root/src/jid.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/jid.c')
-rw-r--r--src/jid.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/jid.c b/src/jid.c
index 4eef9384..04c69636 100644
--- a/src/jid.c
+++ b/src/jid.c
@@ -20,6 +20,7 @@
  *
  */
 
+#include <stdlib.h>
 #include <string.h>
 
 #include <glib.h>
@@ -98,6 +99,17 @@ jid_create(const gchar * const str)
     }
 }
 
+Jid *
+jid_create_room_jid(const char * const room, const char * const nick)
+{
+    Jid *result;
+    char *jid = create_full_room_jid(room, nick);
+    result = jid_create(jid);
+    free(jid);
+
+    return result;
+}
+
 /*
  * Given a full room JID of the form
  * room@server/nick