Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- # perl irc bot
- # @author
- # B.A.R.S
- # here you go syk you fucking faggot
- # ima do some chop($sideburns); for you
- #################
- use strict;
- use IO::Socket::INET;
- # configuration data
- my ($server, $ident, $channel) = ('irc.gcode.biz', 'sykgondie', '#gcode');
- our $socket = IO::Socket::INET->new(PeerAddr => $server,
- PeerPort => 6667,
- Proto => 'tcp') or die "Could not establish connection to " . $server ."\n";
- print $socket "USER $ident $ident $ident $ident :$ident\n";
- print $socket "NICK $ident\n";
- while(my $data = <$socket>) {
- if($data =~ m/^PING (.*?)$/gi) {
- $socket->send("PONG $1\n");
- }
- if($data =~ /^:$ident/) {
- $socket->send("JOIN $channel\r\n");
- }
- if($data =~ /^\:(.*?)!(.*?)@(.*?) PRIVMSG (.*?) \:(.*?)/) {
- my ($user, $id, $host, $chan, $msg) = ($_[1], $_[2], $_[3], $_[4], $_[5]);
- $socket->send("PRIVMSG $channel :$user\r\n");
- }
- print $data;
- }
Add Comment
Please, Sign In to add comment