about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2013-04-21 01:15:10 +0100
committerJames Booth <boothj5@gmail.com>2013-04-21 01:15:10 +0100
commit60acd4778020fac0e0207f242304323e2aa56cb8 (patch)
tree884a2ef4394c11911525bc2a0a819d7e54ea0081 /src
parent688eea083bd25af39d11b6f993b0d1bf02535959 (diff)
downloadprofani-tty-60acd4778020fac0e0207f242304323e2aa56cb8.tar.gz
Moved cons_show_room_invite() to console module
Diffstat (limited to 'src')
-rw-r--r--src/ui/console.c31
-rw-r--r--src/ui/windows.c31
2 files changed, 31 insertions, 31 deletions
diff --git a/src/ui/console.c b/src/ui/console.c
index 727fb606..05be9928 100644
--- a/src/ui/console.c
+++ b/src/ui/console.c
@@ -596,6 +596,37 @@ cons_show_status(const char * const contact)
     }
 }
 
+void
+cons_show_room_invite(const char * const invitor, const char * const room,
+    const char * const reason)
+{
+    char *display_room = NULL;
+    char *domain = strdup(jabber_get_domain());
+    Jid *room_jid = jid_create(room);
+    GString *default_service = g_string_new("conference.");
+    g_string_append(default_service, domain);
+
+    cons_show("");
+    cons_show("Chat room invite received:");
+    cons_show("  From   : %s", invitor);
+    cons_show("  Room   : %s", room);
+
+    if (reason != NULL) {
+        cons_show("  Message: %s", reason);
+    }
+
+    if (strcmp(room_jid->domainpart, default_service->str) == 0) {
+        display_room = room_jid->localpart;
+    } else {
+        display_room = room_jid->barejid;
+    }
+
+    cons_show("Type \"/join %s\" to accept the invitation", display_room);
+
+    jid_destroy(room_jid);
+    g_string_free(default_service, TRUE);
+}
+
 static void
 _cons_splash_logo(void)
 {
diff --git a/src/ui/windows.c b/src/ui/windows.c
index 9ae361f7..f9cd343b 100644
--- a/src/ui/windows.c
+++ b/src/ui/windows.c
@@ -1106,37 +1106,6 @@ win_show_room_broadcast(const char * const room_jid, const char * const message)
 }
 
 void
-cons_show_room_invite(const char * const invitor, const char * const room,
-    const char * const reason)
-{
-    char *display_room = NULL;
-    char *domain = strdup(jabber_get_domain());
-    Jid *room_jid = jid_create(room);
-    GString *default_service = g_string_new("conference.");
-    g_string_append(default_service, domain);
-
-    cons_show("");
-    cons_show("Chat room invite received:");
-    cons_show("  From   : %s", invitor);
-    cons_show("  Room   : %s", room);
-
-    if (reason != NULL) {
-        cons_show("  Message: %s", reason);
-    }
-
-    if (strcmp(room_jid->domainpart, default_service->str) == 0) {
-        display_room = room_jid->localpart;
-    } else {
-        display_room = room_jid->barejid;
-    }
-
-    cons_show("Type \"/join %s\" to accept the invitation", display_room);
-
-    jid_destroy(room_jid);
-    g_string_free(default_service, TRUE);
-}
-
-void
 cons_show_account_list(gchar **accounts)
 {
     int size = g_strv_length(accounts);