diff options
| -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);  		}  	} | 
