Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Power Failure Notify via AIM

by mousey (Scribe)
on Aug 17, 2002 at 02:25 UTC ( #190823=CUFP: print w/replies, xml ) Need Help??

If your power starts to fail on you, this will get on AIM and tell you. You need an AIM screenname.
use Net::AIM; $screenname = ''; # the screenname to connect with $password = ''; # the password to connect with $ownersn = ''; # the screenname to have your bot notify $SIG{PWR} = \&PWR_handler; sub PWR_handler { $aim = new Net::AIM; $aim->newconn(Screenname => $screenname, Password => $password) or d +ie 'Can\'t connect to AIM server.\n'; $conn = $aim->getconn(); $aim->start; $conn->send_im($ownersn, 'My power supply is failing. Please come an +d save me!'); exit; }

Replies are listed 'Best First'.
Re: Power Failure Notify via AIM
by BronzeWing (Monk) on Aug 17, 2002 at 10:59 UTC
    That's a great idea! To give this node a constructive purpose, I know from personal experience that it's best to tell these programs to try connecting a few times, just in case it fails because of a fluke or brief downtime. Anyway, ++!

    The Secret to Fortune Cookies in One Line
    print join("... in bed", `fortune fortunes` =~ m/^(.*)(\.|\?|\!)$/), "\n";

Re: Power Failure Notify via AIM
by FoncÚ (Scribe) on Aug 23, 2002 at 08:27 UTC
    That's a really handy little chunk of code! My curiousity was if there were a way to transport this to other IM programmes, such as MSN Messenger (well...Windows Messenger now) and ICQ, maybe even an IRC channel. Just a thought.

    FoncÚ
      Your wish is my command, I am going to do an MSN and IRC version of it.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: CUFP [id://190823]
Approved by blakem
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2023-12-06 01:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?











    Results (29 votes). Check out past polls.

    Notices?