Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
As a sequal on my previous CUFP, here's a way to reply to private messages... this chunk is ofcourse based on lhoward's node too... (no XML this time, sorry OeufMayo :) )
Update: Tweaked some Monestary related things... Thanks epoptai
#!/usr/bin/perl use LWP::UserAgent; use URI::URL; use HTTP::Cookies; IRC::register("Monk Messenger", "0.1", "", ""); IRC::print "\0035:: Loading Monk Messenger ::\003\n"; IRC::add_command_handler("msgmonk", "msg_monk"); sub msg_monk { my $message = @_[0]; $message = substr($message,0,255); ($user,$message) = split(/ /,$message,2); my $pm_user=''; # Monk alias my $pm_password=''; # Monk password my $WWWAgent = new LWP::UserAgent(); my $co=new HTTP::Cookies(file=>'./cookies.dat',autosave=>1,ignore_ +discard=>1); $WWWAgent->cookie_jar($co); my $url=new URI::URL ''; $url->query_form(op => "login",node_id => "16046",user => $pm_user +,passwd => $pm_password,expires=> "+10y"); my $WWWRequest = new HTTP::Request 'GET', $url->as_string() ; my $WWWResult = $WWWAgent->request($WWWRequest); die "Error logging in $WWWResult->code $WWWResult->message" if(!$W +WWResult->is_success); $url=new URI::URL ''; $url->query_form(op => 'message',node=>"16046", message=>"/msg $us +er $message"); $WWWRequest = new HTTP::Request 'GET', $url->as_string() ; $WWWResult = $WWWAgent->request($WWWRequest); die "Can't load Monk Messanger $WWWResult->code $WWWResult->messag +e" if(!$WWWResult->is_success); IRC::print "you said $message to $user\n"; 1; }
You can put this in your .xchat directory to get automatically loaded on startup...
How this works : /msgmonk <monk> <message> ,like in CB... (Something like "/msgmonk Beatnik hey dude your code sucks" will ofcourse work :-|)

... Quidquid perl dictum sit, altum viditur.

In reply to Send private CB messages through XChat by Beatnik

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

  • 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, 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, 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

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

    How do I use this? | Other CB clients
    Other Users?
    Others making s'mores by the fire in the courtyard of the Monastery: (5)
    As of 2019-11-20 01:42 GMT
    Find Nodes?
      Voting Booth?
      Strict and warnings: which comes first?

      Results (96 votes). Check out past polls.