Report abuse
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
use strict;
use IO::Socket;
my $server = shift || 'irc.rizon.net';
my $port = shift || 6667;
my $user = 'I r teh NeenBot';
my $nick = shift || 'NeenBot';
my $chan = shift || '#animekatsu!';
my $upass = 'rea34floz';
our $conx = IO::Socket::INET->new(
PeerAddr => $server,
PeerPort => $port,
Proto => 'tcp',
Timeout => '30'
) || die "$_";
command("USER $user $user $user $user");
command("NICK $nick");
command("PRIVMSG NickServ :IDENTIFY rea34floz");
$b = 0;
while (<$conx>) {
command("PONG $1") if /^PING (.*)$/;
if ($b == 0 && /376/) {
command("JOIN $chan"); $b = 1;
}
my $who;
chop(my $nick = shift);
print $nick;
print "$_";
}
sub command {
print $conx "$_\r\n";
}
|