Bot respond to main chat?
Brought to you by:
joohn,
roshansingh
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.|");
}
}
}