Last active
October 5, 2016 17:36
-
-
Save MikeRixWolfe/b239351610eb711f1e7e442cf16036a0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use strict; | |
| use vars qw($VERSION %IRSSI); | |
| use Irssi; | |
| $VERSION = '0.01'; | |
| %IRSSI = ( | |
| authors => 'Mike Wolfe', | |
| contact => 'bears@ccowmu.org', | |
| name => 'noxd', | |
| description => 'deal with idiots', | |
| license => 'GPLv3', | |
| ); | |
| sub sig_printtext { | |
| my ($server, $data, $nick, $address) = @_; | |
| my ($target, $text) = split(/ :/, $data, 2); | |
| if ($text =~ m/x.?D+/i) { | |
| $text =~ s/x.?D+/I AM AN IDIOT/ig; | |
| Irssi::signal_stop(); | |
| Irssi::signal_remove('event privmsg', 'sig_printtext'); | |
| Irssi::signal_emit('event privmsg', $server, $target." :".$text, $nick, $address); | |
| Irssi::signal_add('event privmsg', 'sig_printtext'); | |
| } | |
| } | |
| Irssi::signal_add('event privmsg', 'sig_printtext'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment