View difference between Paste ID: DZudTXnx and 78MEURg9
SHOW: | | - or go back to the newest paste.
1
use Irssi;
2-
	my ($text) = @_;
2+
use Irssi::Irc;
3-
	my ($server, $data, $nick, $mask, $target, $channel, ) =@_;
3+
use strict;
4-
	if ($data=~/^!test/){
4+
use vars qw($VERSION %IRSSI);
5
use IO::Socket;
6-
		my ($alphacheck) = 'status';			
6+
use warnings;
7-
		if($alpha) { my ($alphacheck) = 'online'; }			
7+
8-
		else { my ($alphacheck) = 'offline'}
8+
$VERSION = '3.0';
9-
		$server->command("/MSG ".$target." Alpha: ".$alphacheck."");
9+
%IRSSI = (
10
    authors     => 'Aha2Y alias Shiny',
11-
}
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.");