Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use Irssi;
- use Irssi::Irc;
- use strict;
- use vars qw($VERSION %IRSSI);
- use IO::Socket;
- use warnings;
- $VERSION = '3.0';
- %IRSSI = (
- authors => 'Aha2Y alias Shiny',
- contact => 'Aha2Y@Hush.com',
- name => 'EliteBNC Status Script',
- description => 'EliteBNC Server check!',
- license => 'Aha2Y',
- changes => "v3.0 - Fixed critical freeze bug."
- );
- sub cmd_check {
- my ($server, $data, $nick, $mask, $target, $channel) =@_;
- if ($data=~/^!elitebnc/){
- my ($alpha) = IO::Socket::INET->new(PeerAddr=>'alpha.elitebnc.net',PeerPort=>'1337',Proto=>'tcp');
- my ($delta) = IO::Socket::INET->new(PeerAddr=>'delta.elitebnc.net',PeerPort=>'1337',Proto=>'tcp');
- my ($epilson) = IO::Socket::INET->new(PeerAddr=>'Epsilon.elitebnc.net',PeerPort=>'1337',Proto=>'tcp');
- my ($gamma) = IO::Socket::INET->new(PeerAddr=>'Gamma.elitebnc.net',PeerPort=>'1337',Proto=>'tcp');
- my ($omega) = IO::Socket::INET->new(PeerAddr=>'Omega.elitebnc.net',PeerPort=>'1337',Proto=>'tcp');
- my ($sigma) = IO::Socket::INET->new(PeerAddr=>'Sigma.elitebnc.net',PeerPort=>'1337',Proto=>'tcp');
- my ($xi) = IO::Socket::INET->new(PeerAddr=>'xi.elitebnc.net',PeerPort=>'1337',Proto=>'tcp');
- my ($zeta) = IO::Socket::INET->new(PeerAddr=>'zeta.elitebnc.net',PeerPort=>'1337',Proto=>'tcp');
- my ($test) = IO::Socket::INET->new(PeerAddr=>'test.elitebnc.net',PeerPort=>'1337',Proto=>'tcp');
- my ($alpha2, $delta2, $epilson2, $gamma2, $omega2, $sigma2, $xi2, $zeta2, $test2);
- if($alpha) { $alpha2 = "3UP"; }
- else { $alpha2 = "4DOWN!"; }
- if($delta) { $delta2 = "3UP"; }
- else { $delta2 = "4DOWN"; }
- if($epilson) { $epilson2 = "3UP"; }
- else { $epilson2 = "4DOWN"; }
- if($gamma) { $gamma2 = "3UP"; }
- else { $gamma2 = "4DOWN"; }
- if($sigma) { $sigma2 = "3UP"; }
- else { $sigma2 = "4DOWN"; }
- if($xi) { $xi2 = "3UP"; }
- else { $xi2 = "4DOWN"; }
- if($zeta) { $zeta2 = "3UP"; }
- else { $zeta2 = "4DOWN"; }
- if($test) { $test2 = "3UP"; }
- else { $test2 = "4DOWN"; }
- $server->command("/MSG ".$target." Alpha: ".$alpha2." Delta: ".$delta2." Epilson: ".$epilson2." Gamma: ".$gamma2." Sigma: ".$sigma2." Xi: ".$xi2." Zeta: ".$zeta2." Test: ".$test2."");
- }
- }
- Irssi::signal_add_last('message public', 'cmd_check');
- Irssi::print("Loaded $IRSSI{name} $VERSION by Aha2Y.");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement