diff options
author | James Booth <boothj5@gmail.com> | 2015-10-24 21:42:04 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2015-10-24 21:42:04 +0100 |
commit | 1d4d693a536349981af68e74f29f30dc9c89bf08 (patch) | |
tree | b9f4273a8f8846a0de1dc21cb6bdf41b4db7a89a /src/command | |
parent | 496616256e7be273833499814d80fdb1915cec13 (diff) | |
parent | 7a0e8f87b512678b725a25ba563d0db110162fa2 (diff) | |
download | profani-tty-1d4d693a536349981af68e74f29f30dc9c89bf08.tar.gz |
Merge remote-tracking branch 'jubalh/jub'
Diffstat (limited to 'src/command')
-rw-r--r-- | src/command/commands.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/command/commands.c b/src/command/commands.c index c37af0c7..4184b945 100644 --- a/src/command/commands.c +++ b/src/command/commands.c @@ -2064,7 +2064,6 @@ cmd_info(ProfWin *window, const char * const command, gchar **args) char *usr = args[0]; jabber_conn_status_t conn_status = jabber_get_connection_status(); - PContact pcontact = NULL; if (conn_status != JABBER_CONNECTED) { cons_show("You are not currently connected."); @@ -2127,7 +2126,7 @@ cmd_info(ProfWin *window, const char * const command, gchar **args) if (usr_jid == NULL) { usr_jid = usr; } - pcontact = roster_get_contact(usr_jid); + PContact pcontact = roster_get_contact(usr_jid); if (pcontact) { cons_show_info(pcontact); } else { @@ -2148,7 +2147,6 @@ gboolean cmd_caps(ProfWin *window, const char * const command, gchar **args) { jabber_conn_status_t conn_status = jabber_get_connection_status(); - PContact pcontact = NULL; Occupant *occupant = NULL; if (conn_status != JABBER_CONNECTED) { @@ -2182,7 +2180,7 @@ cmd_caps(ProfWin *window, const char * const command, gchar **args) if (jid->fulljid == NULL) { cons_show("You must provide a full jid to the /caps command."); } else { - pcontact = roster_get_contact(jid->barejid); + PContact pcontact = roster_get_contact(jid->barejid); if (pcontact == NULL) { cons_show("Contact not found in roster: %s", jid->barejid); } else { @@ -2225,7 +2223,6 @@ gboolean cmd_software(ProfWin *window, const char * const command, gchar **args) { jabber_conn_status_t conn_status = jabber_get_connection_status(); - Occupant *occupant = NULL; if (conn_status != JABBER_CONNECTED) { cons_show("You are not currently connected."); @@ -2238,7 +2235,7 @@ cmd_software(ProfWin *window, const char * const command, gchar **args) if (args[0]) { ProfMucWin *mucwin = (ProfMucWin*)window; assert(mucwin->memcheck == PROFMUCWIN_MEMCHECK); - occupant = muc_roster_item(mucwin->roomjid, args[0]); + Occupant *occupant = muc_roster_item(mucwin->roomjid, args[0]); if (occupant) { Jid *jid = jid_create_from_bare_and_resource(mucwin->roomjid, args[0]); iq_send_software_version(jid->fulljid); |