mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-25 10:36:22 +00:00
Use handle for /info command
This commit is contained in:
@@ -2114,6 +2114,7 @@ static gboolean
|
|||||||
_cmd_info(gchar **args, struct cmd_help_t help)
|
_cmd_info(gchar **args, struct cmd_help_t help)
|
||||||
{
|
{
|
||||||
char *usr = args[0];
|
char *usr = args[0];
|
||||||
|
char *usr_jid = NULL;
|
||||||
|
|
||||||
jabber_conn_status_t conn_status = jabber_get_connection_status();
|
jabber_conn_status_t conn_status = jabber_get_connection_status();
|
||||||
win_type_t win_type = ui_current_win_type();
|
win_type_t win_type = ui_current_win_type();
|
||||||
@@ -2166,7 +2167,11 @@ _cmd_info(gchar **args, struct cmd_help_t help)
|
|||||||
break;
|
break;
|
||||||
case WIN_CONSOLE:
|
case WIN_CONSOLE:
|
||||||
if (usr != NULL) {
|
if (usr != NULL) {
|
||||||
pcontact = roster_get_contact(usr);
|
usr_jid = roster_jid_from_handle(usr);
|
||||||
|
if (usr_jid == NULL) {
|
||||||
|
usr_jid = usr;
|
||||||
|
}
|
||||||
|
pcontact = roster_get_contact(usr_jid);
|
||||||
if (pcontact != NULL) {
|
if (pcontact != NULL) {
|
||||||
cons_show_info(pcontact);
|
cons_show_info(pcontact);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user