Please reap the node by Anonymous. that was me. i forgot to log in... sorry.
i wrote a script tonight that could probably circumvent most restrictions on connecting to the AIM service from certain places (work, college computer labs, etc).
The script will listen for incoming telnet connections on one port, and make a connection to the AIM service on another (using Net::AIM.pm).
When it hears someone connecting to the telnet port, it'll accept the connection and wait for text. When the user types in "screenname blah blah blah", the script will IM "screenname" with "blah blah blah".
When it hears an incoming IM or ERROR, it'll send the relevant information out to the user connected via telnet.
what you need to have is an existing AIM account (so that the script can connect to AIM), and you need to make a slight modification to the AIM.pm module (so that it doesnt block when waiting for incoming AIM information).
at around line 210-220 in AIM.pm (in the do_one_loop sub), there's a line that looks like
foreach $ev ($sel->can_read($nexttimer)) {. i changed "$nexttimer" to "1" (so that it would wait 1 second for incoming info, then proceed). although that might not have been the best solution, it works.
(you can
download my modified AIM.pm here (it's version 1.15))
i plan to add support for other things in the coming days... such as being able to send people IMs even if they're not online (and it'll hold the IM until they come online, then deliver it), and such things like that...
anyway, the code is a bit long to post here, so i posted it up on my website...
you can get the aimchat.pl source code here.
i apologize in advance for the nasty code, but i hacked it together rather quickly and sacrifised good looks for practicality... i plan to clean up the code and add some new things in the coming days.
hope it interests some of you :)
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.