daily pastebin goal
8%
SHARE
TWEET

Untitled

a guest Jun 13th, 2018 48 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. use Irssi;
  2. use Data::Dumper;
  3. use callee;
  4.  
  5. use vars qw($VERSION %IRSSI);
  6.  
  7. $VERSION = '0.2';
  8.  
  9. %IRSSI = (
  10.     authors     => 'unknown',
  11.     contact     => 'none',
  12.     name            => 'signal_test',
  13.     description => 'testing out anonymous signals',
  14.     license => 'Public Domain',);
  15.  
  16. sub testing {
  17.     my ($data,$server,$witem) = @_;
  18.     if ($server && $server->{connected}){
  19.         foreach my $l (split(/ /,$data)) {
  20.             Irssi::signal_add('message public',
  21.                 sub {
  22.                     my ($s,$msg,$nick,$address,$target) = @_;
  23.                     if ($nick eq $l) {
  24.                         Irssi::print("$nick : $msg");
  25.                         Irssi::signal_remove('message public',callee);
  26.                     }
  27.                 });
  28.         }
  29.     }
  30. }
  31. Irssi::command_bind('whaddup','testing');
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top