about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--src/command/commands.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/command/commands.c b/src/command/commands.c
index 757b8115..396aa880 100644
--- a/src/command/commands.c
+++ b/src/command/commands.c
@@ -2109,13 +2109,17 @@ cmd_software(ProfWin *window, gchar **args, struct cmd_help_t help)
         case WIN_CHAT:
         case WIN_CONSOLE:
             if (args[0]) {
+                Jid *myJid = jid_create(jabber_get_fulljid());
                 Jid *jid = jid_create(args[0]);
 
                 if (jid == NULL || jid->fulljid == NULL) {
                     cons_show("You must provide a full jid to the /software command.");
+                } else if (g_strcmp0(jid->barejid, myJid->barejid) == 0) {
+                    cons_show("Cannot request software version for yourself.");
                 } else {
                     iq_send_software_version(jid->fulljid);
                 }
+                jid_destroy(myJid);
                 jid_destroy(jid);
             } else {
                 cons_show("You must provide a jid to the /software command.");
pre>6e455985 ^
a3195d44 ^

6e455985 ^
a3195d44 ^
4a48bedc ^
5059f32d ^
6e455985 ^
a3195d44 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25