Skip to content
Karl Dahlke edited this page Sep 23, 2022 · 18 revisions

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 q8 from any session other than 8.

This capability uses sockets directly, and does not go through curl. Thus cookies are not involved, nor proxies, nor ssl, nor other features of curl.

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 is a lock command, which I don't understand. (This is open source software that I borrowed.)

:m nickname text, sends a private message to a person on your chat session. Others will not see this message.

:s group, switches to a different group. It is possible to join multiple groups through the same irc session, assuming they are 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.

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
  e9
}

function:ebwho {
# who is on edbrowse chat
  e8
  a
  :names #edbrowse
  .
  w
  e9
}

function+skirc {
# set up skeakup irc
  irc 18 19 irc.oftc.net eklhad:xxx #speakup
  e19
}

function:skwho {
# who is on speakup chat
  e18
  a
  :names #speakup
  .
  w
  e19
}

My nickname on the #speakup channel has a password, my nickname on the #edbrowse channel does not. thus ebirc doesn't need a password.

The ebwho script takes you to the receiving buffer, but since traffic is asynchronous, you have to hit return to see the members on your chat.

You can conect 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
  }
  !some shell command that will notify you
}

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.