contact: "grawity@gmail.com"
description: "Implements SASL authentication (and multi-prefix as free bonus)"
filename: "cap_sasl.pl"
- modified: "2014-12-18 05:37:00"
+ modified: "2014-12-18 22:58:00"
modules: "Crypt::PK::ECC MIME::Base64"
license: "GPLv2"
name: "cap_sasl"
url: "https://nullroute.eu.org/~grawity/irssi.html"
- version: "1.8"
+ version: "1.9"
- authors: "ZaMz0n"
commands: "cddb"
use vars qw($VERSION %IRSSI);
use constant CHALLENGE_SIZE => 32;
-$VERSION = "1.8a";
+$VERSION = "1.9";
%IRSSI = (
authors => 'Michael Tharp (gxti), Jilles Tjoelker (jilles), Mantas Mikulėnas (grawity)',
contact => 'grawity@gmail.com',
my $priv = $pk->export_key_pem("private");
my $pub = encode_base64($pk->export_key_raw("public_compressed"), "");
- my $cmd = "/msg NickServ SET PROPERTY pubkey $pub";
+
+ my $cmdchar = substr(Irssi::settings_get_str("cmdchars"), 0, 1);
+ my $cmd = "msg NickServ SET PROPERTY pubkey $pub";
if (open(my $fh, ">", $f_priv)) {
chmod(0600, $f_priv);
$server->command($cmd);
} else {
$print->("SASL: update your Irssi settings:");
- $print->("%P/sasl set $net <nick> $f_name.key $mech");
+ $print->("%P".$cmdchar."sasl set $net <nick> $f_name.key $mech");
$print->("SASL: submit your public key to $net:");
- $print->("%P$cmd");
+ $print->("%P".$cmdchar.$cmd);
}
}