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 /scripts/cap_sasl.pl | |
| parent | 70117a316df4e80c6f867b9e30c4f40e99b02aad (diff) | |
| download | scripts.irssi.org-aee64e31a503530d1ad44ae86dbeb9c0fe9fe143.tar.bz2 | |
cap_sasl 1.9: support different cmdchars
Diffstat (limited to 'scripts/cap_sasl.pl')
| -rw-r--r-- | scripts/cap_sasl.pl | 10 | 
1 files changed, 6 insertions, 4 deletions
| 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);  		}  	} | 
