diff options
author | James Booth <boothj5@gmail.com> | 2014-12-10 01:44:32 +0000 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2014-12-10 01:44:32 +0000 |
commit | 706f31422dc73fff68c2955ec7e830943a5143e2 (patch) | |
tree | ada79673c0e450cca5d81897429e9a79939446ed /src/command/commands.c | |
parent | 12d0d22ab325aafc38e094f16f76ddf3408da181 (diff) | |
download | profani-tty-706f31422dc73fff68c2955ec7e830943a5143e2.tar.gz |
Moved chat resource to WIN_CHAT type
Diffstat (limited to 'src/command/commands.c')
-rw-r--r-- | src/command/commands.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/command/commands.c b/src/command/commands.c index e6e6923f..40310e45 100644 --- a/src/command/commands.c +++ b/src/command/commands.c @@ -1151,9 +1151,9 @@ cmd_msg(gchar **args, struct cmd_help_t help) } GString *send_jid = g_string_new(usr_jid); ProfWin *current = wins_get_current(); - if (current && current->chat_resource) { + if (current->type == WIN_CHAT && current->wins.chat.chat_resource) { g_string_append(send_jid, "/"); - g_string_append(send_jid, current->chat_resource); + g_string_append(send_jid, current->wins.chat.chat_resource); } if (msg != NULL) { @@ -1574,11 +1574,11 @@ cmd_resource(gchar **args, struct cmd_help_t help) return TRUE; } - current->chat_resource = strdup(resource); + current->wins.chat.chat_resource = strdup(resource); return TRUE; } else if (g_strcmp0(cmd, "off") == 0) { - FREE_SET_NULL(current->chat_resource); + FREE_SET_NULL(current->wins.chat.chat_resource); return TRUE; } else { cons_show("Usage: %s", help.usage); @@ -2941,9 +2941,9 @@ cmd_tiny(gchar **args, struct cmd_help_t help) char *recipient = ui_current_recipient(); GString *send_recipient = g_string_new(recipient); ProfWin *current = wins_get_current(); - if (current && current->chat_resource) { + if (current && current->wins.chat.chat_resource) { g_string_append(send_recipient, "/"); - g_string_append(send_recipient, current->chat_resource); + g_string_append(send_recipient, current->wins.chat.chat_resource); } #ifdef HAVE_LIBOTR |