# Edbrowse as an IRC client. Edbrowse can participate in irc chat sessions, on multiple servers in parallel. An example is perhaps the best form of documentation. Issue this command to join the edbrowse developers on irc. (This is not guaranteed to be current; we switch servers from time to time.) irc 8 9 irc.libera.chat nickname #edbrowse Use your nickname here; whatever nickname you want for your irc session. If you have established a password, use nickname:password. This is consistent with ftp and other protocols. Use domain:port for a different port; default is 6667. The group is optional. If you don't specify a group on the irc line, You will have to send :j group to the server. Note, these groups are also called channels in the irc world. I may use these terms interchangeably. Sessions 8 and 9 are created or commandeered for this irc chat. Session 9 is readonly; although you can delete lines if you wish. IRC comments are appended to this buffer as they arrive. If you are at the end of buffer, just hit return to see if anything new has come in. Switch to other sessions, do some work, then go back to session 9 and hit return. You may want an instance of edbrowse running in its own console, to manage all your irc sessions. Session 8 is for your input. Create some text, then type w to send. The text will go away as it is sent to the server. Switch to session 9 and you will see your comments, and then any replies from your friends. Switch to session 8 to send more text. etc. If you quit either session, the socket is closed, and the other session is no longer in irc mode. It is simply text. However, q is not allowed in session 8. It is too easy to send some text and then quit by accident, typing w and then q out of habit. I've done it many times. If you wish to quit session 8, and keep session 9, retaining a log of the irc chat, type .w8 from session 9. This blows away session 8, and the irc connection associated with it. If that was the only irc channel feeding into session 9, then it has become a text buffer, and you can quit that session as well. This capability uses sockets directly, and does not go through curl. Thus cookies are not involved, nor proxies, nor other features of curl. Place a * at the start of the port number for secure sockets, i.e. encrypted communications. :* alone uses the default port for secure irc, 6697. Edbrowse recognizes some shorthand colon commands when sending to the server. We already mentioned :j group, which joins a group. The file names of sessions 8 and 9 will change when you join a group. :l leaves a group. This is the opposite of :j. :s group, switches to a different group. It is possible to join multiple groups through the same irc session, on the same irc server. Use :s to switch between these groups, so that your messages go out on the correct channels. The filename will reflect the active group. Type f to see which group you are sending to. :m nickname text, sends a private message to a person on your chat session. Others will not see this message. Functions can establish and monitor your irc sessions. Here are some examples from my config file. function+ebirc { # set up edbrowse irc irc 8 9 irc.libera.chat eklhad #edbrowse } function:ebwho { # who is on edbrowse chat db0 e8 a :names #edbrowse . w e9 sleep 1 + } function+eb1 { # send one message to edbrowse chat db0 e8 a ~0 . w e9 + } function+skirc { # set up speakup irc irc 18 19 irc.oftc.net eklhad:xxx #speakup } function:skwho { # who is on speakup chat e18 a :names #speakup . w e19 sleep 1 + } My nickname on the #speakup channel has a password, my nickname on the #edbrowse channel does not. thus ebirc doesn't need a password. You can connect to many irc servers in parallel; performance will not degrade. In this example I connect to two servers, using sessions 8 and 9, and sessions 18 and 19. I frequent the first group more often, thus the convenient single-digit session numbers. It is possible to multiplex some or all of the output from different irc servers into one window. This has the advantage of watching for irc responses in one place. Just hit return and see if anyone has commented, from any of your groups. However, you have to determine the origin of each comment, and move to the correct send buffer, to respond on the corresponding server. Some people like to multiplex, some people find it confusing. Commands like these will multiplex the output in buffer 9. irc 7 9 foo.bar.org nickname group1 irc 8 9 hork.snork.net nickname group2 The bflist command will include: 7: group1 send 8: group2 send 9: group1 group2 receive You can monitor an irc session while doing other work, or simply listening to music. This script will notify you when messages come in, however, it locks up this instance of edbrowse. That's fine if edbrowse is dedicated to irc. Multiplex all your irc channels into one buffer, so that this script watches them all. function+monirc { # monitor irc, assumes you are in an irc output session db0 $X +p while(?) { sleep 50 +p } H- ebvar- # some shell command that will notify you # alert !echo '\a' ebvar+ # use espeak to output the new message !espeak '. } You must use the internal sleep function here. !sleep 50 won't work at all. It locks up all of edbrowse, and irc messages do not roll in. IRC servers send explicit ping messages periodically, and they expect a pong in return. If they don't get a pong, they drop your connection, and you have to sign in again. that's not a big deal, but is somewhat annoying. These messages can be seen at db4 or higher. This is consistent with other internet traffic, e.g. showing http or imap headers at db4. With this in mind, you should not lock up your edbrowse process for more than a few seconds. I already warned about !sleep 50. This puts edbrowse to sleep, completely, for 50 seconds, and pong is not returned, and the connection drops. Some websites are slow to render, especially if they are javascript intensive. You can browse the web, but it is best to avoid these busy websites. As mentioned before, i have an edbrowse process dedicated to irc, and I don't use it for much else. You can see the channels in a multiplexed buffer by using + on the domain. irc 8 9 hork.snork.net+ nickname group2 Each message from this connection begins with group2, thus identifying the source. This is ideal when the majority of messages come from group1, and you don't want to hear group1 over and over again, but you want to be aware of sparse messages that come from group2. In my case, there are users in both groups, presenting the same nickname, so disambiguation can be helpful. The lst command shows the time of the message of the current line. Occasionally you want to know when a message was sent - but you don't want to see all those time stamps all the time. This is similar to directory mode. Edbrowse has an autolog feature. Set irclog = pathname in your config file. All irc messages are appended to this log, and the log is loaded when irc restarts. The reload preserves the time stamps on each line, so lst still provides the time of each message. There are some caveats on this logging process, that are described in the users guide.