#!/usr/bin/perl package Monitor; use cybot; # basic idea by CyBeR # turned into a module by Alberto Simões (albie@alfarrabio.di.uminho.pt) register_command("monitor",sub { my ($bot,$chan,$nick,$host, @commands) = @_; my $monichan = $commands[0]; if ($monichan ne 'off'){ $monchan = $monichan; $montochan = $chan; $bot->cjoin($monichan); $bot->message($monichan, "Monitoring this channel to $chan on command of $nick"); } else { $bot->message ($chan, "monitoring off."); undef $montochan; undef $monchan; } },"monitors a channel (monitor ) (monitor off)"); 1;