about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--src/command/commands.c31
1 files changed, 18 insertions, 13 deletions
diff --git a/src/command/commands.c b/src/command/commands.c
index 7e2294a0..5f24d33e 100644
--- a/src/command/commands.c
+++ b/src/command/commands.c
@@ -4100,21 +4100,26 @@ cmd_pgp(gchar **args, struct cmd_help_t help)
         }
         g_slist_free_full(keys, (GDestroyNotify)p_gpg_free_key);
     } else if (g_strcmp0(args[0], "fps") == 0) {
-        GHashTable *fingerprints = p_gpg_fingerprints();
-        GList *jids = g_hash_table_get_keys(fingerprints);
-        if (jids) {
-            cons_show("Received PGP fingerprints:");
-            GList *curr = jids;
-            while (curr) {
-                char *jid = curr->data;
-                char *fingerprint = g_hash_table_lookup(fingerprints, jid);
-                cons_show("  %s: %s", jid, fingerprint);
-                curr = g_list_next(curr);
-            }
+        jabber_conn_status_t conn_status = jabber_get_connection_status();
+        if (conn_status != JABBER_CONNECTED) {
+            cons_show("You are not currently connected.");
         } else {
-            cons_show("No PGP fingerprints received.");
+            GHashTable *fingerprints = p_gpg_fingerprints();
+            GList *jids = g_hash_table_get_keys(fingerprints);
+            if (jids) {
+                cons_show("Received PGP fingerprints:");
+                GList *curr = jids;
+                while (curr) {
+                    char *jid = curr->data;
+                    char *fingerprint = g_hash_table_lookup(fingerprints, jid);
+                    cons_show("  %s: %s", jid, fingerprint);
+                    curr = g_list_next(curr);
+                }
+            } else {
+                cons_show("No PGP fingerprints received.");
+            }
+            g_list_free(jids);
         }
-        g_list_free(jids);
     } else if (g_strcmp0(args[0], "libver") == 0) {
         const char *libver = p_gpg_libver();
         if (libver) {
abit.com> 2009-11-27 10:49:48 +0100 more VROOM' href='/akspecs/ranger/commit/test/tc_directory.py?h=v1.5.0&id=9506fb8e79f2d04a1ab78039bacdbee7b22109b5'>9506fb8e ^
fe179145 ^
5822dff7 ^
fe179145 ^
9506fb8e ^
fe179145 ^

fae694a0 ^

fe179145 ^
fae694a0 ^

fe179145 ^
5822dff7 ^
9506fb8e ^
fae694a0 ^
9506fb8e ^
fae694a0 ^
fe179145 ^

fae694a0 ^
fe179145 ^
fae694a0 ^


4c05e43d ^

fae694a0 ^

fe179145 ^

fae694a0 ^




9506fb8e ^
fae694a0 ^
fae694a0 ^
1159f9ec ^



fe179145 ^
5822dff7 ^
9506fb8e ^
fae694a0 ^
fe179145 ^
fae694a0 ^
fe179145 ^

fae694a0 ^


fe179145 ^
fae694a0 ^
9506fb8e ^

f6f26231 ^
4c05e43d ^
f6f26231 ^







9506fb8e ^
fae694a0 ^

f6f26231 ^










4c05e43d ^

fae694a0 ^

fe179145 ^
5822dff7 ^

fe179145 ^
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105