Cbstream FAQ

What is cbstream?

Cbstream is a bidirectional bridge between the perlmonks chatterbox and irc.

Whatever anyone speaks in the chatterbox, cbstream copies to the irc channel #cbstream on the server irc.freenode.net.

Also, it allows you to talk on the chatterbox simply by writing to an irc channel.

How do I use cbstream to read the chatterbox?

Just launch an irc client, connect to the server irc.freenode.net (port 6667), and join the #cbstream channel for the perlmonks chatterbox.

How do I use cbstream to talk on the chatterbox?

First, connect your irc client to the server irc.freenode.net.

Then join both of the channels #cbstream and #cbstream-login .

Then write a message to the #cbstream-login channel saying "login your-perlmonks-username your-perlmonks-password".

After you've done this, you just have to type messages to the #cbstream channel and they will appear in the chatterbox.

You may leave the #cbstream-login channel after you have logged in, but you must remain joined to the #cbstream channel.

Note that the login mechanism has changed to using a dedicated login channel instead of using MemoServ.

What is this perlmonks chatterbox?

Perlmonks is a website http://www.perlmonks.org, a friendly community centered around the topic of the Perl programming language.

The chatterbox is like a little chat room where the perlmonks community discusses various things. It bears more off-topic conversation then the other parts of the site.

Everyone can read the chatterbox, and it's placed in such a way that no visitor of perlmonks can miss it easily. You can see the messages in it near the top of the vertical stripe at the right hand side of the webpage. However, only registered users can write to the chatterbox (registration is free and easy).

You can get more information about the chatterbox from the chatterbox FAQ at http://www.perlmonks.org/.

I'm tired of refreshing the perlmonks page to read the new messages in the chatterbox.

You're not alone. This is the reason why some people have written alternate interfaces to use the perlmonks chatterbox. You can see a list of these on http://www.perlmonks.org/.

Cbstream is one of these interfaces.

Can I use cbstream without installing an IRC client?

Connect using freenode webchat: http://webchat.freenode.net/

This is a javascript-based IRC client that runs in your browser, so it likely will not require you to install any software.

Currently this does not work too well from a mobile phone browser.

I've joined the channel but I don't get any messages. Why?

Most probably, the problem is with cbstream.

Check if the user cbstream is on the channel. If it's not, then cbstream is not running.

Even if it is joined, there may be some problem why cbstream is not working. In this case, you can try to alert the maintainer about the problem.

I tried to talk with cbstream but it doesn't seem to work. Why?

There can be lots of things to go wrong. Here are some possibilities.

The first is that you are still using the old login mechanism involving MemoServ. This may still be available for a short time, but it will be removed eventually, and already has more problems than the new one.

To reiterate, the new method is as follows. Join both the normal channel and the login channel, that is, #cbstream and #cbstream-login . Send a message to #cbstream-login saying "login your-perlmonks-username your-perlmonks-password".

Cbstream might not be running. Check if the user cbstream is on the channel. If it's not, then cbstream is not running. Even if it does, it might have some technical problem.

You must note that you have join the normal channel #cbstream before logging in to cbstream or logging in will fail.

It is possible that you have misspelt something when logging in, like your perlmonks username or password. If you do, you usually get a warning in private message from cbstream when you try to speak, but not when you log in. While cbstream sends a confirmation message when you log in, that does not mean that the perlmonks username and password are valid.

If you have a strange character in your perlmonks username or password, you may have to protect it using the method described in a later question.

Cbstream might have problem accessing the perlmonks server, the irc server, or the whole internet. In this case, you won't get any warning message.

If the perlmonks server is slow or if many messages are sent through cbstream at the same time, it is possible that the messages are delivered but are delayed for a long time. (If you are using cbstream or another such client, it may also delay your receiving the messages even if they're sent immediately.) If cbstream is flooded with lots of messages, it could even drop some of them.

Even if you logged in correctly, it is possible that cbstream has been restarted since and thus forgotten your login. You may be logged out at other events as well, like on an irc netsplit (when some irc servers leave the network for a brief period and later reconnect), or when your irc client reconnects the server or rejoins the channel.

You usually get a warning message the first time you are trying to speak on the channel if you are not logged in, but this doesn't always happen so don't rely on it.

Also note that if cbstream has just started, it may not accept input immediately. Try waiting 15 seconds from when cbstream joins the channels, and resend your login message.

How do I register a user at perlmonks?

For perlmonks, you register using the web form http://www.perlmonks.org/. See instructions there.

The perlmonks username and password can be chosen independently from your nick and username and password on freenode.

How do I make cbstream forget my perlmonks password?

You can make cbstream forget your password by sending it a private message saying "logout" (its nick is cbstream). An alternate method is to send it the logout command via the login channel: join the #cbstream-login channel and say "logout" on it. Either way, you should get a message from cbstream confirming the logout.

Note that you have to send the message to cbstream, not cbupstream, or to the #cbstream-login channel, not the #cbstream channel in the two methods respectively.

Your password is also forgotten whenever you leave the #cbstream channel (this includes normal parting the channel, getting kicked, quitting the irc connection), and also forgotten when you join the channel. This means that with the login command you have to login cbstream every time you connect to irc (and even possibly when there's an irc netsplit). It also means that there's no point to use that command when you've not joined the channel. (The password may or may not be forgotten if you change your irc nick or login to a different NickServ username.)

The password is also always forgotten whenever cbstream restarts for any reason.

Is there a way I can log in to cbstream permanently instead of having to log in every time I reconnect to irc?

Currently no.

One may be implemented the future, where you are identified by logging in to the NickServ service of the irc network.

How do I quote funny characters in my perlmonks username and/or password?

There are two ways to enter a username and password in the login message.

Either you put the name or password in square brackets. (The square brackets aren't enough as a delimiter though, they still have to be followed by a whitespace or the end of message.) In this case, all the characters within the brackets are interpreted literally. This method is ideal if the name or password contains spaces, but may fail when it contains a right square bracket, a star, a meta (non-ascii) character, or certain control characters (eg one of [\x00\x01\x0a\x0d\x10\*\]\x80-\xff]).

The alternate method which should always work is to url-quote the name or password. This means changing all strange characters to a percent sign followed by two hexadecimal digits representing the cp1252 code of the character. In this case, you must not add square brackets and you should escape all whitespace, control characters, meta (non-ascii) characters, pluses, stars, percent signs, and leading opening square brackets (eg any of [\x00\x01\x09-\x0d\x10\ \*\+\%\[\x80-\xff]).

Does my irc nick have to be the same as my perlmonks username?

No.

I'm concerned about my privacy. Why do you need my perlmonks password?

The perlmonks gods decreed that you cannot talk anonymously on the chatterbox, so cbstream can only talk if you give it access to your perlmonks account.

Thus, if you want to use cbstream, this is neccessary, but you can of course choose not to use cbstream at all. You don't need to give the password to just read the chatterbox messages through the channel.

I will not misuse your perlmonks passwords. They don't get stored to the file system and don't get to the debug messages (unless you misspell the word "login"). However, you have no reason to believe this, so if you don't trust me (or the operators of the freenode network or the operators of the university server), don't use cbstream.

There's yet another privacy concern you need to know about if you're talking with cbstream. To make the echo appear faster, cbstream usually reloads the chatterbox contents shortly after you send a message with it. However, cbstream also may keep a public log from which anyone can tell when it's refreshed, so others may be able to tell when someone has talked using cbstream. This log doesn't include who speaks, or what ey says, only when ey talks, but as not too many people are using cbstream now, who could be guessed.

How do I know that cbstream is not impersonated and thus someone else gets my passwords?

The login channel is protected by freenode services (NickServ and ChanServ). The ChanServ allows cbstream to become op on the login channel if it is identified with its freenode password. Unless someone knows the password of the bot, they cannot get op rights on the login channel. Because the login channel has channel modes +mnz, only channel ops can read whatever you say on that channel. Apart from the bot, only perlmonks gods and the maintainer of cbstream get channel op rights for the login channel, and they too don't use it except in emergencies, but these (and the freenode operators) can get your passwords anyway. (Some other people have op rights for the normal #cbstream channels, but not the login channels.)

Do not send your password in a private message directly to cbstream, because that is unprotected and that way someone else logging in with the nick cbstream (when the bot really owning it is down) could steal it. Also, do not send passords to the #cbstream channel instead of the login channel, nor to any other channel or nick.

Why are long messages I try to send with cbstream are trimmed?

The perlmonks chatterbox doesn't allow messages longer than 256 characters, so if you try to send a longer message (which is possible on irc) it gets truncated. Also, if you type a long line that contains mostly non-ascii characters, your line may get truncated by the irc line limit.

(Cbstream should almost never truncate long messages it receives from the chatterbox though, it rather breaks them to two separate irc messages.)

Can I send perlmonks private messages using cbstream?

You can, using the usual chatterbox commands /msg or /tell (see http://www.perlmonks.org/). However, many irc clients would interpret these commands as an irc command by default, so you may have to quote them with another irc command like /say.

Take care however, that other channel operators on the irc channel may see the messages you send this way, so it's not as private as you may want. I may also be seeing the private message from the debugging output of cbstream. If your message is really of confidental kind, you'd better use the perlmonks message inbox interface directly: http://www.perlmonks.com/.

Can I receive perlmonks private messages on irc?

No.

It's possible in theory (im2 has a similar feature) but no-one has implemented it yet.

When I talk on the #cbstream channel, no-one seems to hear me. Why?

Unless you log in to cbstream with your perlmonks username and password, speaking on the channel will not have any effect even though you might not get a warning about this.

The technical reason for this is that the irc channel is set to a mode where no-one but channel operators hear what you speak. (Note however that if you have voice or channel operator on the irc channel, everyone on the channel can hear you, so remove voice or channel operator from yourself before you want to speak with cbstream.) This setting, while important for cbstream, has the unfortunate consequence that when you speak on the channel you get no warning that nothing happens.

If you are trying to talk on the channel without logging in to cbstream, you will probably get a warning from it, but there are various reasons why you might not get this warning (like that cbstream is not running) so don't rely on it.

Is there a client-side alternative to talking with cbstream?

If you use the irssi irc client, try this script by shmem to talk of the chatterbox: http://www.perlmonks.org/.

Cbstream is not running, why?

There are various reasons why it might not be running.

Cbstream might have died (either only one of them, or both): they generally react this way to situations unknown to them. I cannot make cbstream tolerate every kind of problem, but if a problem appears often I'll try to patch them to handle it right.

I might have stopped them for some reason, like when I want to change its code.

Someone else might have killed cbstream because it's done something Bad. In this case, only I can restart it.

Finally, it can be a problem with the university server I'm running cbstream on. You may want to try pinging russell2.math.bme.hu to see if it's up and connected to the net. Even if it's up, if might have gone down and restarted since that, but in that case cbstream doesn't start up automatically.

Finally note that cbupstream shouldn't be running nowdays, because cbstream has taken its functions over.

Is cbstream stable?

No. While it would be possible to make a relatively usable release of it, I'm running only a single instance of cbstream and making live changes of it, so that instance is a "head" version.

Why don't you announce cbstream in a perlmonks discussion thread?

The announcement of cbstream is at http://www.perlmonks.org/, and the announcement of the other direction is at http://www.perlmonks.org/. The announcement of the new login mechanism for cbstream using #cbstream-login is at http://www.perlmonks.org/. The announcement of the security holes found in the plogin feature is at http://www.perlmonks.org/

As these are also discussion threads, you may want to read the replies for information not (or not yet) in this FAQ.

What format is cbstream using to dump the messages to irc?

Cbstream displays a specially parsed format built from the html-formatted output the perlmonks ticker gives. Most html tags are changed to some short textual markup, like /italic/ and *bold*. Code is marked with <c>c tags</c>. Links are always shown with square brackets but the details depend on the type of links. Special characters in the message text (possibly typed as html entities) are handled in different ways: non-control characters are shown unescaped as their real values, control characters are shown as just a space. The special chatterbox command /me is shown as typed. The format isn't completely documented.

When you send messages with cbstream, however, you have to type them in the raw format the pm chatterbox normally accepts.

The irc messages on #cbstream are in the UTF-8 character set, so you may have to type a command like "/charset UTF-8" in your irc client to see some characters in messages correctly. This is also the character set cbstream assumes you use when you send messages to it. As perlmonks only accepts cp1252 characters in chatterbox messages, the bot escapes other characters as html-entities before sending them. Control characters are never shown, nor accepted because many are special on irc.

Recently, perlmonks has changed the character set of their page to cp1252 instead of 8859-1. I have not changed cbstream to take account of this completely, so you may have the following problems. If you type an unescaped character in the channel that's in cp1252 but not in 8859-1, it will likely be sent as a html entity instead of an unescaped character, but that doesn't often cause any problem. If however someone types such a character in the chatterbox, cbstream should show it correctly. Finally, if you type a literal 8859-1 extended control character ([\x80-\x9f]) to cbstream, the effect is undefined. Some or all of these problems may be fixed in the future.

Any other stuff about formatting you want to bore me with?

To avoid unnecessary clutter in the channel, cbstream doesn't append a timestamp to messages. You cannot see what a message with some ampersand-escapes really says, know when exactly a message was posted. You also cannot retrieve messages before you connected to the channel.

You also sometimes cannot click on links, though cbstream tries to do its best to provide you with a URL for some links you may want to follow, and suppress it for brevity in other links.

If you want to do any of this, you have to use some other client.

For recent messages, you can just load the perlmonks page http://www.perlmonks.org and see the chatterbox. For older ones, you can use CB60: http://mini-cb60.flux8.com/.

How can I kill cbstream if it is doing something Bad?

There are four ways cbstream can killed, but all require some kind of permission.

Firstly, you can use the big red cbstream stop button in the control room: http://russell2.math.bme.hu/~ambrus/sc/cbstream/stop. This shuts down cbstream, and requires a password.

Secondly, you can kick the cbstream user from the irc channel. This requires that you have channel operator rights for the respective channel.

Thirdly, the perlmonks gods can make perlmonks give an unexpected html error to the query cbstream does, thus making cbstream die. (This is not easy though, as perlmonks generates a great variety of errors in normal course, so inventing an unexpected error isn't trivial.)

Lastly, me or the administrators of the server where cbstream is running can kill the cbstream process directly. I might do this when I want to change something in cbstream.

How do I start cbstream?

You can't. Once cbstream stops for any reason (including a server downtime), only I can start it.

How can I get a permission to kill cbstream?

I'm handling out channel operator rights to the #cbstream channel. For this, you need a registered nick on the freenode network. Write a perlmonks msg to ambrus with the nick if you want to get channel operator rights.

I'm also handling out passwords to the big red stop button. If you want one, you also have to write me a perlmonks msg, and I'll probably give you one.

Obviously, I can revoke both the admin rights and the passwords for the big red button if you keep misusing them.

If you're not already a perlmonks god or a math.bme.hu system administrator, then there's probably no way you'd become one either.

What's this big red stop button thing?

I always wanted a big red stop button that I could actually push and it actually stopped something. Now that I've written cbstream I've actually created one.

The button does not physically exist of course, it's only on the webpage http://russell2.math.bme.hu/~ambrus/sc/cbstream/stop.

The rest of the page is mostly only for decoration. If you really wanted to understand what the messages mean, and like spoilers, read the source.

Can I get the source of cbstream?

Yes, here's a snapshot of the source.

http://russell2.math.bme.hu/~ambrus/sc/cbstream/cbstream.rb

http://russell2.math.bme.hu/~ambrus/sc/cbstream/bigred.rb

http://russell2.math.bme.hu/~ambrus/sc/cbstream/faq.pod

Do you know of the Robomonk cb-irc bridge?

(This is a previous chatterbox-irc bridge.)

I head Robomonk (http://www.perlmonks.com/) still works, but I've never seen it run. I don't know any details about how it works.

What are some technical details about cbstream?

Cbstream is written in ruby so I can use ruby threads.

Cbstream uses the new xml ticker at http://www.perlmonks.org/ with a fromid parameter. It normally loads this about every 30 seconds. Cbstream doesn't use perlmonks login cookies, it sends the password in the url every time.

Cbstream always uses the irc nick cbstream.

For more details, see the source or ask me.

What was cbupstream?

Cbupstream was the name and irc nick of the irc to chatterbox direction of cbstream. Historically, it was a separate bot, but now both directions are served by cbstream.

What was cbriver?

Cbriver was a bidirectional bridge between the everything2 chatterbox and irc. It is similar to cbstream, but not the same.

Cbriver is not currently working. As nobody seems to be missing it, I'm currently not maintaining it.

Where can I get an up-to-date version of this FAQ?

From http://russell2.math.bme.hu/~ambrus/sc/cbstream/.

This version is from 2012 February.

I have more questions. Where can I contact the author and maintainer?

If you have a perlmonks account, you can send message to ambrus. On everything2, send a message to jonas instead. You can try to contact me on the freenode irc server, where my nick is b_jonas. But the easiest way is sending email to ambrus@@mmaatthh..bbmmee..hhuu, and that's the one that usually reaches me the fastest.