Menu

#22 Bot respond to main chat?

open
nobody
None
5
2003-06-18
2003-06-18
Anonymous
No

Hi there,

Im quite new to odch as well as perl..

I have played around with the scripts, and I was
wondering if anyone could tell me how I would be able to
get a bot to respond to something in the main chat
window.. rather than just in a PM to the bot..

I have tried changing the script below.. but I dont know
how to make the not listen / repond in the main chat,

Much Appreciated : )

$botname = "bot";

sub main()
{
odch::register_script_name($botname)
}

sub data_arrival()
{
my($user, $data) = @_;
if($data =~ /\$To: $botname/)
{
if($data =~ /help/)
{
odch::data_to_user($user,
"\$To: $user From: $botname \$<$botname>
help is
on the way.|");
}
}
}

Discussion


Log in to post a comment.