Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use strict;
- use vars qw($VERSION %IRSSI);
- use Irssi;
- $VERSION = '1.00';
- %IRSSI = (
- authors => 'Dafydd "Afal" Francis',
- contact => 'afal@somethingafal.com',
- name => 'Blah Blah Fishcakes',
- description => 'This script allows ' .
- 'you to turn anything someone ' .
- 'says to "blah blah fishcakes".',
- license => 'Public Domain',
- );
- #main event handler
- sub pony_message {
- my ($server, $data, $nick, $address) = @_;
- my ($target, $msg) = split(/ :/, $data,2);
- if ($nick == 'Indigopony') {
- my $replacement = Irssi::settings_get_str('text_replace');
- #re-emit the signal to make Irssi display it
- Irssi::signal_emit('event privmsg', ($server, "$target :$replacement", $nick, $address));
- #and stop
- Irssi::signal_stop();
- }
- }
- Irssi::signal_add('event privmsg', 'pony_message');
- Irssi::settings_add_str('misc', 'text_replace', "blah blah fishcakes");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement