1
0
mirror of https://github.com/profanity-im/profanity.git synced 2025-01-03 14:57:42 -05:00

Moved cons_show_room_invite() to console module

This commit is contained in:
James Booth 2013-04-21 01:15:10 +01:00
parent 688eea083b
commit 60acd47780
2 changed files with 31 additions and 31 deletions

View File

@ -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)
{

View File

@ -1105,37 +1105,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)
{