All pastes #551905 Raw Edit

Mine

public text v1 · immutable
·published 2007-06-09 00:27 UTC
rendered paste body
BOT:
#!/usr/bin/perl -w

use Net::IRC;
use strict;

# create the IRC object
my $IRC = new Net::IRC;

require "WelcomeBot";
require "ChannelBot";

$IRC->start;

WELCOMEBOT:(ChannelBot is just like it for now)
#!/usr/bin/perl -w

# Create a connection object.  You can have more than one "connection" per
# IRC object, but we'll just be working with one.
my $Welcome = $IRC->newconn(
	Server 		=> shift || 'localhost',
	# Note: IRC port is normally 6667, but my firewall won't allow it
	Port		=> shift || '6667',
	Nick		=> 'WelcomeBot',
	Ircname		=> 'WelcomeBot',
	Username	=> 'WelcomeBot'
);

COMMAND LINE:
[Ryan@Linux ~]$ ./bot
Can't call method "newconn" on an undefined value at WelcomeBot line 5.
Compilation failed in require at ./bot line 9.
[Ryan@Linux ~]$