]> jfr.im git - irc/atheme/atheme.git/commitdiff
contrib/cap_sasl.pl: explain why '/sasl keygen' is missing
authorMantas Mikulėnas <redacted>
Mon, 23 Mar 2015 07:09:24 +0000 (09:09 +0200)
committerMantas Mikulėnas <redacted>
Mon, 23 Mar 2015 07:09:24 +0000 (09:09 +0200)
contrib/cap_sasl.pl

index 9e730bae85bcfc89f45004a970462521a0474890..e99e008282a47c34c09ad4efef436a1a053a97e0 100644 (file)
@@ -420,10 +420,18 @@ if (eval {require Crypt::PK::ECC}) {
                Irssi::print("SASL: loaded keyfile '$f'");
                Irssi::print("SASL: your pubkey is $pub");
        }
+} else {
+       sub cmd_sasl_keygen {
+               Irssi::print("'/sasl keygen' requires the Perl 'CryptX' module, which could not be loaded.", MSGLEVEL_CLIENTERROR);
+       }
 
-       Irssi::command_bind('sasl keygen', \&cmd_sasl_keygen);
-       Irssi::command_bind('sasl pubkey', \&cmd_sasl_pubkey);
-};
+       sub cmd_sasl_pubkey {
+               Irssi::print("'/sasl pubkey' requires the Perl 'CryptX' module, which could not be loaded.", MSGLEVEL_CLIENTERROR);
+       }
+}
+
+Irssi::command_bind('sasl keygen', \&cmd_sasl_keygen);
+Irssi::command_bind('sasl pubkey', \&cmd_sasl_pubkey);
 
 cmd_sasl_load();