]> git.99rst.org Git - irssi-scripts.irssi.org.git/commitdiff
Add yubikey.pl script
authorPhilip Paeps <redacted>
Fri, 29 Jul 2022 05:50:19 +0000 (13:50 +0800)
committerPhilip Paeps <redacted>
Fri, 29 Jul 2022 05:50:19 +0000 (13:50 +0800)
This script helps prevent accidentally sending YubiKey OTPs to IRC.

scripts/yubikey.pl [new file with mode: 0644]

diff --git a/scripts/yubikey.pl b/scripts/yubikey.pl
new file mode 100644 (file)
index 0000000..d132001
--- /dev/null
@@ -0,0 +1,21 @@
+#!/usr/bin/env perl
+
+use strict;
+use vars qw($VERSION %IRSSI);
+use Irssi;
+
+$VERSION = "20151026";
+%IRSSI = (
+    authors     => "Philip Paeps",
+    contact     => "philip\@trouble.is",
+    name        => "yubikey",
+    description => "This script stops accidental YubiKey output on IRC",
+    license     => "BSD",
+    changed     => "$VERSION",
+);
+
+sub event_send_text {
+    my ($line, $server_rec, $wi_item_rec) = @_;
+    Irssi::signal_stop() if $line =~ /^cccccc/;
+}
+Irssi::signal_add_first('send text', \&event_send_text);
git clone https://git.99rst.org/PROJECT