mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-24 05:46:21 +00:00
xep-0092: make it possible to ask servers or components for software
This adds the new `/serversoftware` command. ``` /software user@domain.org/resource /serversoftware domain.org ``` Fix https://github.com/profanity-im/profanity/issues/1338
This commit is contained in:
@@ -3521,6 +3521,25 @@ cmd_software(ProfWin *window, const char *const command, gchar **args)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
cmd_serversoftware(ProfWin *window, const char *const command, gchar **args)
|
||||
{
|
||||
jabber_conn_status_t conn_status = connection_get_status();
|
||||
|
||||
if (conn_status != JABBER_CONNECTED) {
|
||||
cons_show("You are not currently connected.");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (args[0]) {
|
||||
iq_send_software_version(args[0]);
|
||||
} else {
|
||||
cons_show("You must provide a jid to the /serversoftware command.");
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
cmd_join(ProfWin *window, const char *const command, gchar **args)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user