in reply to Re: Interface-clean Infobot
in thread Interface-clean Infobot
So the above loop could be used for an IRC connection, a GAIM plugin, even an FTP client if I wanted one with attitude. The bot itself would be persistent during the connection (it could remember data from line to line), and it wouldn't be hard to have it be persistent from invocation to invocation.use CleanBot; my $cleanbot = CleanBot->new('cleanbot-init.conf'); while($line=<get_data_from_a_source_the_bot_doesn't_care_about>){ my $response = $cleanbot->parse($line); Do_something_the_bot_doesn't_care_about($response) if $response; }
|
---|