Skip to content

Instantly share code, notes, and snippets.

@hrefhref
Created February 21, 2014 21:53
Show Gist options
  • Save hrefhref/9144292 to your computer and use it in GitHub Desktop.
Save hrefhref/9144292 to your computer and use it in GitHub Desktop.
use strict;
use vars qw($VERSION %IRSSI);
use Irssi;
$VERSION = '20120624';
%IRSSI = (
authors => 'href',
contact => 'href@random.sh',
name => 'anti_fail',
description => '(almost) no more /w or /a fails',
license => 'Public Domain',
);
sub send_text {
my ( $data, $server, $witem ) = @_;
if ( $witem
&& ( $data =~ /^[\s\/]?+[\/]?(\.|\:|)[wW][\s]?+[\d]+$/ ) )
{
$witem->print("lol, noob");
Irssi::signal_stop();
}
if ( $witem
&& ( $data =~ /^[\s\/]?+[\/]?(\.|\:|)a\s?/ ) )
{
$witem->print("lol, noob");
Irssi::signal_stop();
}
}
Irssi::signal_add 'send text' => 'send_text'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment