diff options
| author | Mantas Mikulėnas | 2014-12-18 22:59:16 +0200 |
|---|---|---|
| committer | Mantas Mikulėnas | 2014-12-18 22:59:16 +0200 |
| commit | aee64e31a503530d1ad44ae86dbeb9c0fe9fe143 (patch) | |
| tree | 2c9b75715bbf7d91484526342124676a5d3a7718 | |
| parent | 70117a316df4e80c6f867b9e30c4f40e99b02aad (diff) | |
| download | scripts.irssi.org-aee64e31a503530d1ad44ae86dbeb9c0fe9fe143.tar.bz2 | |
cap_sasl 1.9: support different cmdchars
| -rw-r--r-- | _data/scripts.yaml | 4 | ||||
| -rw-r--r-- | scripts/cap_sasl.pl | 10 |
2 files changed, 8 insertions, 6 deletions
diff --git a/_data/scripts.yaml b/_data/scripts.yaml index 5944567..e8732fe 100644 --- a/_data/scripts.yaml +++ b/_data/scripts.yaml @@ -716,12 +716,12 @@ 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" diff --git a/scripts/cap_sasl.pl b/scripts/cap_sasl.pl index ad6df45..a9dc237 100644 --- a/scripts/cap_sasl.pl +++ b/scripts/cap_sasl.pl @@ -4,7 +4,7 @@ use MIME::Base64; 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', @@ -340,7 +340,9 @@ if (eval {require Crypt::PK::ECC}) { 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); @@ -370,10 +372,10 @@ if (eval {require Crypt::PK::ECC}) { $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); } } |
