#!/usr/bin/perl -w

use strict;
use Net::IRC;

my $irc = new Net::IRC;
my $conn = $irc->newconn(
      Nick    => 'bot',
      Server  => 'irc.carnet.hr',
      Port    => 6667,
      Ircname => 'Oh, just little testing a bot Dobrica wrote...');
# Add our handlers here
$conn->add_global_handler(376, &on_connect);
$irc->start;

sub on_connect {
  my $self = shift || die "no self?";
  print "Joining #cniw\n";
  $self->join("#cniw");
  $self->privmsg("#bot, Hi there.");
}
