I've checked for private messages from Chanserv. There aren't any.
I've checked the value of $conn->{channel} and $nick using print statements. They are set to the correct values.
Here is the on_join sub:
sub on_join {
my ($conn, $event) = @_;
my $nick = $event->{nick};
if ($nick eq ("xxx" || "yyy")) {
$conn->privmsg("Chanserv", "OP $conn->{channel} $nick");
print "Auto-Op $nick\n";
$conn->privmsg($nick, "You have been Auto-Oped by $mynick");
$conn->me($conn->{channel}, "Auto-Ops $nick");
}
$conn->privmsg($conn->{channel}, "Welcome, $nick!") unless ($ni
+ck eq $mynick);
print "[$mynick] Welcome, $nick!\n" unless ($nick eq $mynick);
}
$mynick is equal to the bot's nick.
xxx and yyy are the nicks of the users to be OPed.