Advertisement
Aha2Y

Untitled

Mar 8th, 2012
357
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.92 KB | None | 0 0
  1. use Irssi;
  2. use Irssi::Irc;
  3. use strict;
  4. use vars qw($VERSION %IRSSI);
  5. use IO::Socket;
  6. use warnings;
  7.  
  8. $VERSION = '3.0';
  9. %IRSSI = (
  10.     authors     => 'Aha2Y alias Shiny',
  11.     contact     => 'Aha2Y@Hush.com',
  12.     name        => 'EliteBNC',
  13.     description => 'EliteBNC Module for IRSSI.',
  14.     license     => 'Aha2Y',
  15.     changes => "v3.0 - Fixed critical freeze bug."
  16. );
  17.  
  18. sub cmd_check {
  19.     my ($text) = @_;
  20.     my ($server, $data, $nick, $mask, $target, $channel, ) =@_;
  21.     if ($data=~/^!test/){
  22.         my ($alpha) = IO::Socket::INET(PeerAddr=>'alpha.elitebnc.net',PeerPort=>'1337',Proto=>'tcp');
  23.         my ($alphacheck) = 'status';           
  24.         if($alpha)         
  25.         {
  26.             my ($alphacheck) = 'online';           
  27.         }          
  28.         else
  29.         {
  30.             my ($alphacheck) = 'offline';          
  31.  
  32.         }
  33.         $server->command("/MSG ".$target." Alpha: ".$alphacheck."");
  34.     }
  35. }
  36. Irssi::signal_add_last('message public', 'cmd_check');
  37. Irssi::print("Loaded $IRSSI{name} $VERSION by Aha2Y.");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement