Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
As others have said, Jabber may be a good way to go. What you could do is have your daemon connected to a Jabber server as a client, just like any other client connects to a Jabber server. Connecting to a Jabber server is the same for a non-interactive application like your daemon as it would be for an interactive chat session.

At that point, whenever your daemon wishes to send a message to someone, just have it do a lookup to see if that particular person is online, and what their status is. In Jabber terms, you're checking for that person's "presence". Included with the Net::Jabber module is one called Net::Jabber::Presence which you can use to detect a person's online status. This allows you to not only know if they are online, but you can detect whether they have their client set to something like "Do not Disturb" or "Extended Away". Perhaps, in one or both of those cases, you may wish to send an email versus giving them an IM.

There are already some Jabber clients written in Perl. A few examples are:

http://www.jabbercentral.org/clients/view.php?id=1007327470 - Perl Jabber Bot
http://www.jabbercentral.org/clients/view.php?id=962065957 - Jarl, Perl Jabber Client
http://www.jabbercentral.org/clients/view.php?id=1015797608 - pJab, Perl Console Client

Good luck!
-Eric

In reply to Re: Experiences with IM support? by andreychek
in thread Experiences with IM support? by Mur

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2024-04-19 21:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found