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',
- description => 'EliteBNC Module for IRSSI.',
- license => 'Aha2Y',
- changes => "v3.0 - Fixed critical freeze bug."
- );
- sub cmd_check {
- my ($server, $data, $nick, $mask, $target, $channel) =@_;
- if ($data=~/^!elitebnc/){
- $server->command("/MSG ".$target." Sending PING request to elitebnc servers...");
- my ($alpha) = IO::Socket::INET->new(PeerAddr=>'alpha.elitebnc.net',PeerPort=>'1337',Proto=>'tcp');
- if($alpha) {
- my ($alpha2) = "online"; }
- else {
- my ($alpha2) = "offline"; }
- $server->command("/MSG ".$target." Alpha: ".$alpha2."");
- }
- }
- 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