Advertisement
Aha2Y

Untitled

Mar 8th, 2012
384
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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 ($server, $data, $nick, $mask, $target, $channel) =@_;
  20.     if ($data=~/^!elitebnc/){
  21.     $server->command("/MSG ".$target." Sending PING request to elitebnc servers...");
  22.         my ($alpha) = IO::Socket::INET->new(PeerAddr=>'alpha.elitebnc.net',PeerPort=>'1337',Proto=>'tcp');
  23.         if($alpha) {
  24.         my ($alpha2) = "online";  }    
  25.         else    {
  26.         my ($alpha2) = "offline";   }
  27.         $server->command("/MSG ".$target." Alpha: ".$alpha2."");
  28.     }
  29. }
  30. Irssi::signal_add_last('message public', 'cmd_check');
  31. Irssi::print("Loaded $IRSSI{name} $VERSION by Aha2Y.");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement