--- a/mcabber/mcabberrc.example Sat Dec 02 13:11:44 2006 +0100
+++ b/mcabber/mcabberrc.example Sat Dec 02 13:29:56 2006 +0100
@@ -43,8 +43,9 @@
# To sign outgoing messages, select your private key id with
# the pgp_private_key option. You cannot change these options once
# mcabber is running.
+# Note: you can get the Key Id with gpg: "gpg --list-keys --keyid-format long"
#set pgp = 0
-#set pgp_private_key = "B0B92210"
+#set pgp_private_key = "C9940A9BB0B92210"
#
# You can set your PGP passhrase here, although it's NOT advised.
#set pgp_passphrase = "PGPpassword"
@@ -256,6 +257,17 @@
# log window (default: 0, no)
#set log_display_sender = 0
+# Contacts PGP information
+# You can provide a PGP key to be used for a given Jabber user, or
+# disbale PGP on a per-account basis.
+# If you provide a KeyId for a contact, it will be compared to the key the
+# contact uses to sign their presence/messages and it will be used for
+# all outgoing encrypted messages (that is, the contact signature key will
+# be ignored).
+# Please note that the key must match exactly the id seen with /info.
+#pgp disable foo@bar.org
+#pgp setkey bar@foo.net C9940A9BB0B92210
+
# Aliases
alias me = say /me
alias online = status online
--- a/mcabber/src/settings.c Sat Dec 02 13:11:44 2006 +0100
+++ b/mcabber/src/settings.c Sat Dec 02 13:29:56 2006 +0100
@@ -149,9 +149,10 @@
if ((*line == '\n') || (*line == '\0') || (*line == '#'))
continue;
- if ((strchr(line, '=') != NULL)) {
- // Only accept the set, alias and bind commands
+ if ((strchr(line, '=') != NULL) || !strncmp(line, "pgp ", strlen("pgp "))) {
+ // Only accept the set, alias, bind and pgp commands
if (strncmp(line, "set ", strlen("set ")) &&
+ strncmp(line, "pgp ", strlen("pgp ")) &&
strncmp(line, "bind ", strlen("bind ")) &&
strncmp(line, "alias ", strlen("alias "))) {
scr_LogPrint(LPRINT_LOGNORM,