Some people have reported that they had trouble with automating logging in to cbstream with the new login mechanism. Thus, hereby I publish an example that worked for me.

This is a shell command that starts a new connection to the irc server assuming your nick and sending a permanent login message to cbstream. For this reason, you have to run this before connecting with your real irc client, or there'd be a nick clash.

The command is in bash, requires netcat, but it wouldn't be too hard to convert it to a simple perl script as well.

It uses the values of four shell parameters that you should previously set, these must contain your irc nickserv password, irc nick, perlmonks user name, and perlmonks password respectively. If the perlmonks user or password contains strange characters, you have to use a quoted form that cbstream accepts.

echo $'PASS :'"$IRCPASS"$'\nUSER 0 0 0 x\nNICK '"$IRCNICK"$'\nJOIN #cb +stream-login\nPRIVMSG #cbstream-login :plogin '"$PMUSER $PMPASS"$'\nQ +UIT\n' | nc -v irc.freenode.net 6667

In reply to Logging in to cbstream from a script by ambrus

Title:
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, 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:
    & &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.