Feature Addition

0 views
Skip to first unread message

clwaters

unread,
Sep 22, 2008, 3:58:44 PM9/22/08
to perl-net-jabber-bot
A few uninitialized values aside, I have the bot working in regular
chat and group chats. One thing I see as a great feature would be the
ability to add new bot commands without restarting the bot. I am
going to see if I can get this to work by moving the bot commands into
a separate file (commands.pm? or a config file just to define the
commands) that the bot re-reads during the background_activity
checks. Does this seem feasible? Would there be a better way to do
this?

The reason is that during development of my bot, I envision many
requests for additional commands/features of the bot. If I can create
them off line and have the bot dynamically load them, it would be
cleaner as my test group would not see the bot logging in/out every
time I make a change.

Thanks for the input. This whole project looks very promising.

Todd Rinaldo

unread,
Sep 22, 2008, 6:16:35 PM9/22/08
to perl-net-...@googlegroups.com

Hi,

Glad the module could be of help and that you could find your way
through the example.

So you know, the bot is not designed to handle commands, but simply to
call your callback subroutine that will handle the commands. For this
reason it would not be a new feature in the bot. Your idea of
dynamically handling new commands is good, but it's another module or
simply part of the perl script that uses Net::Jabber::Bot.

Please let me know if you have any questions,

Todd

clwaters

unread,
Sep 22, 2008, 7:01:39 PM9/22/08
to perl-net-jabber-bot
Thank you for the reply. I agree that it doesn't really apply to
Net::Jabber::Bot but to the bot that gets created. I am planning on
taking the examplebot and striping it down into a very singular
interface for the commands (callbacks) that get called from my module.
(that's the plan anyway) I am going to try to use Module::Reload for
checking if the package has changed on the disk. If anyone is
interested, when I get it working, I'll post my example.

On Sep 22, 3:16 pm, "Todd Rinaldo" <to...@null.net> wrote:
Reply all
Reply to author
Forward
0 new messages