Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
And here's a client to be used from within irssi...
# (c) shmem use Irssi qw(command_bind); use strict; use vars qw($VERSION %IRSSI); use LWP::UserAgent; use HTTP::Cookies; $VERSION = '0.0.2'; %IRSSI = ( 'authors' => 'shmem', 'contact' => 'gm@@ccrruufftt..ddee', 'name' => 'pm cbtalk', 'description' => 'talks to te perlmonks chatterbox', 'license' => 'Artistic', 'url' => '', 'changed' => '2007-01-27', ); my $pmchat = ''; my $ua = LWP::UserAgent->new; $ua->cookie_jar( HTTP::Cookies->new( file => "pmcookie.txt", autosave => 1, ) ); $ua->agent("cbtalk/0.0 [shmem]"); sub login { my ($msg, undef, $channel) = @_; my ($user,$password) = split /\s+/, $msg; my $req = HTTP::Request->new(POST => $pmchat); $req->content("displaytype=raw&node_id=109&op=login&node_id=109&us +er=$user&passwd=$password&sexisgood=submit"); $ua->request($req); } sub cbtalk { my ($msg, undef, $channel) = @_; $msg =~ s/\W/sprintf"%%%02x",ord$&/ge; my $req = HTTP::Request->new(POST => $pmchat); $req->content_type('application/x-www-form-urlencoded'); $req->content("displaytype=raw&node_id=3193&op=message&message=$ms +g&message_send=talk"); $ua->request($req); } command_bind('cb', 'cbtalk'); command_bind('cblogin','login');

...which allows you to POST to the chatterbox while in #cbstream:

/script load /cblogin shmem ******** /cb [ambrus]++, your cbstream thingy rocks! :-)



update: post #666 - storing usernames and plaintext passwords in a script is eeevil at it's best! :-P

update2:added command to set credentials

_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}

In reply to Re: Cbstream: a chatterbox to irc bridge(irssi client) by shmem
in thread Cbstream: a chatterbox to irc bridge by ambrus

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 a log crumbles through the grate...

    How do I use this? | Other CB clients
    Other Users?
    Others exploiting the Monastery: (9)
    As of 2018-06-25 12:35 GMT
    Find Nodes?
      Voting Booth?
      Should cpanminus be part of the standard Perl release?

      Results (126 votes). Check out past polls.