Skip to content

Commit

Permalink
Change default network to libera.chat
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronNGi committed May 19, 2021
1 parent 8b9bb9d commit 85f0b5b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
23 changes: 11 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,18 +128,18 @@ Or:
IRC_HOST=irc.rizon.net jjd
```

By default `jjd(1)` connects to irc.freenode.org, using the current user
as nickname and creates the directory "irc.freenode.org" in the current
working directory. Located in that directory will be the various log
files and the named pipe for input. For more information, see [Directory
By default `jjd(1)` connects to irc.libera.chat, using the current user as
nickname and creates the directory "irc.libera.chat" in the current
working directory. Located in that directory will be the various log files
and the named pipe for input. For more information, see [Directory
Structure](#directory-structure) and [Input Commands](#input-commands).

### Printing a Log

To save some typing, change into the directory of that new connection:

```shell
cd irc.freenode.org
cd irc.libera.chat
```

To display the IRC output, the most basic would be to simply run:
Expand Down Expand Up @@ -182,10 +182,9 @@ See [Examples](#examples) for a more elaborate version of that input-loop.
The following shows a typical channel structure tree created by jj irc.

```
irc.freenode.org/
irc.libera.chat/
├── channels/
│ ├── #jj.log
│ ├── freenode-connect.log
│ └── nickserv.log
├── in
├── motd
Expand Down Expand Up @@ -250,7 +249,7 @@ supported by `jjc(1)`.
|----------------|-----------------------------------------------------------------------------------|-------------------------|
| `IRC_CLIENT` | The program spawned as child of `jjd(1)` which handles all user and IRC messages. | `jjc` |
| `IRC_DIR` | Where to store the per-host directories. | `.` (current directory) |
| `IRC_HOST` | The IRC host to connect to. | `irc.freenode.org` |
| `IRC_HOST` | The IRC host to connect to. | `irc.libera.chat` |
| `IRC_NICK` | The Nickname to use. | `$USER` |
| `IRC_PASSWORD` | The server password. | unset |
| `IRC_PORT` | Connect using this port. | `6667` |
Expand Down Expand Up @@ -347,13 +346,13 @@ The following programs are supported:
Using TLS via [s6-networking][s6 networking] utilities

```shell
s6-tlsclient irc.freenode.org 6697 jjd
s6-tlsclient irc.libera.chat 6697 jjd
```

Or using SSL via netcat

```shell
ncat -vv --ssl --ssl-verify -c 'exec 6<&0 7>&1; PROTO=lol jjd </dev/tty >/dev/tty' irc.freenode.org 6697
ncat -vv --ssl --ssl-verify -c 'exec 6<&0 7>&1; PROTO=lol jjd </dev/tty >/dev/tty' irc.libera.chat 6697
```

### Automatic Reconnection
Expand Down Expand Up @@ -396,7 +395,7 @@ fifo=$IRC_DIR/$IRC_HOST/in
[ -p "$fifo" ] && [ -w "$fifo" ] ||
exit 1

if [ "$IRC_HOST" = irc.freenode.org ]; then
if [ "$IRC_HOST" = irc.libera.chat ]; then
printf 'raw PRIVMSG NickServ :IDENTIFY jilles foo\n' >"$fifo"
sleep .5
printf 'join #jj\n' >"$fifo"
Expand All @@ -413,7 +412,7 @@ fi

### IRC

Join `#jj` on irc.freenode.org
Join `#jj` on irc.libera.chat

[ii homepage]: https://tools.suckless.org/ii/
[s6 networking]: https://skarnet.org/software/s6-networking/
Expand Down
2 changes: 1 addition & 1 deletion config.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define DEFAULT_DIR "."

/* Host used when IRC_SERVER var is empty */
#define DEFAULT_HOST "irc.freenode.org"
#define DEFAULT_HOST "irc.libera.chat"

/* Port used when IRC_PORT var is empty */
#define DEFAULT_PORT "6667"
Expand Down
2 changes: 1 addition & 1 deletion extra/jji
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# argument list.

arg0=${0##*/}
fifo=${IRC_DIR:-$HOME/irc}/${IRC_HOST:-irc.freenode.org}/in
fifo=${IRC_DIR:-$HOME/irc}/${IRC_HOST:-irc.libera.chat}/in

! [ "$1" ] && {
printf '%s: missing channel argument\n' "$arg0" >&2
Expand Down

0 comments on commit 85f0b5b

Please sign in to comment.