Hello,
I just started using net::aim last week to try to make an aim bot. I haven't really had any problems like that; then again, I haven't tried any suave plugins like you are implementing. I just made a function that parsed for commands and executed them.
My code is not nearly as elegant/cool as yours and I like your idea of plugins. I think that your problem is that your $nick at some point loses it's value.
Perhaps you could trace the value of it in each function/plugin it is being used in by printing it out, and thus see where you are losing it.
Perhaps something like this:
sub main_program{
my($self,$nick,$args) = @_;
print "\$nick = $nick";
my $time = localtime(time);
$self->send_im($nick,"The current time is: $time.");
}
Another thing to consider, aside from your problem, is how you are storing the login info in the configuration file. I think it would be a good idea to use some kind of encryption for your information in the file, and then decrypting it before you use it to log in. Either that or type it in at the command prompt. I don't know your situation, but I think people are in general too loose with their logins/passwords, and that though this is only an aim password, it is still a habit to get into.
~heise2k~
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.