He's a catboy now

i literally started this fork only so i could call it "catboy" lmao
master
dzwdz 2022-03-24 21:01:49 +00:00
parent 551f22a901
commit d300e5ad03
12 changed files with 56 additions and 55 deletions

2
.gitignore vendored
View File

@ -1,6 +1,6 @@
*.o *.o
*.t *.t
catgirl catboy
chroot.tar chroot.tar
config.mk config.mk
root/ root/

View File

@ -32,9 +32,9 @@ TESTS += edit.t
dev: tags all check dev: tags all check
all: catgirl all: catboy
catgirl: ${OBJS} catboy: ${OBJS}
${CC} ${LDFLAGS} ${OBJS} ${LDLIBS} -o $@ ${CC} ${LDFLAGS} ${OBJS} ${LDLIBS} -o $@
${OBJS}: chat.h ${OBJS}: chat.h
@ -53,20 +53,20 @@ tags: *.[ch]
ctags -w *.[ch] ctags -w *.[ch]
clean: clean:
rm -f catgirl ${OBJS} ${TESTS} tags rm -f catboy ${OBJS} ${TESTS} tags
install: catgirl catgirl.1 install: catboy catgirl.1
install -d ${DESTDIR}${BINDIR} ${DESTDIR}${MANDIR}/man1 install -d ${DESTDIR}${BINDIR} ${DESTDIR}${MANDIR}/man1
install catgirl ${DESTDIR}${BINDIR} install catboy ${DESTDIR}${BINDIR}
install -m 644 catgirl.1 ${DESTDIR}${MANDIR}/man1 install -m 644 catboy.1 ${DESTDIR}${MANDIR}/man1
uninstall: uninstall:
rm -f ${DESTDIR}${BINDIR}/catgirl ${DESTDIR}${MANDIR}/man1/catgirl.1 rm -f ${DESTDIR}${BINDIR}/catboy ${DESTDIR}${MANDIR}/man1/catgirl.1
CHROOT_USER = chat CHROOT_USER = chat
CHROOT_GROUP = ${CHROOT_USER} CHROOT_GROUP = ${CHROOT_USER}
chroot.tar: catgirl catgirl.1 scripts/chroot-prompt.sh scripts/chroot-man.sh chroot.tar: catboy catgirl.1 scripts/chroot-prompt.sh scripts/chroot-man.sh
chroot.tar: scripts/build-chroot.sh chroot.tar: scripts/build-chroot.sh
sh scripts/build-chroot.sh ${CHROOT_USER} ${CHROOT_GROUP} sh scripts/build-chroot.sh ${CHROOT_USER} ${CHROOT_GROUP}

View File

@ -4,12 +4,12 @@
.Os "Causal Agency" .Os "Causal Agency"
. .
.Sh NAME .Sh NAME
.Nm catgirl .Nm catboy
.Nd IRC client .Nd IRC client
. .
.Sh DESCRIPTION .Sh DESCRIPTION
.Xr catgirl 1 .Xr catboy 1
is a TLS-only terminal IRC client. is a terminal IRC client.
. .
.Ss Notable Features .Ss Notable Features
.Bl -bullet .Bl -bullet
@ -234,7 +234,9 @@ configuration for public chroot
.El .El
. .
.Sh CONTRIBUTING .Sh CONTRIBUTING
The upstream URL of this project is The upstream URL of this fork is
.Aq Lk https://git.tilde.town/catboy .
However, you should instead contribute to the original project, which is hosted at
.Aq Lk https://git.causal.agency/catgirl . .Aq Lk https://git.causal.agency/catgirl .
Contributions in any form can be sent to Contributions in any form can be sent to
.Aq Mt list+catgirl@causal.agency . .Aq Mt list+catgirl@causal.agency .
@ -248,7 +250,7 @@ Monetary contributions can be
.Lk https://liberapay.com/june/donate "donated via Liberapay" . .Lk https://liberapay.com/june/donate "donated via Liberapay" .
. .
.Sh SEE ALSO .Sh SEE ALSO
.Xr catgirl 1 .Xr catboy 1
. .
.Pp .Pp
IRC bouncer: IRC bouncer:

View File

@ -1,9 +1,9 @@
.Dd February 22, 2022 .Dd February 22, 2022
.Dt CATGIRL 1 .Dt CATBOY 1
.Os .Os
. .
.Sh NAME .Sh NAME
.Nm catgirl .Nm catboy
.Nd IRC client .Nd IRC client
. .
.Sh SYNOPSIS .Sh SYNOPSIS
@ -68,10 +68,10 @@ and
Options can be loaded from files Options can be loaded from files
listed on the command line. listed on the command line.
Files are searched for in Files are searched for in
.Pa $XDG_CONFIG_DIRS/catgirl .Pa $XDG_CONFIG_DIRS/catboy
.Po .Po
usually usually
.Pa ~/.config/catgirl .Pa ~/.config/catboy
.Pc .Pc
unless the path starts with unless the path starts with
.Ql / , .Ql / ,
@ -309,7 +309,7 @@ as configuration files.
. .
.It Fl l | Cm log .It Fl l | Cm log
Log chat events to files in paths Log chat events to files in paths
.Pa $XDG_DATA_HOME/catgirl/log/network/channel/YYYY-MM-DD.log . .Pa $XDG_DATA_HOME/catboy/log/network/channel/YYYY-MM-DD.log .
. .
.It Fl m Ar mode | Cm mode No = Ar mode .It Fl m Ar mode | Cm mode No = Ar mode
Set the user Set the user
@ -347,7 +347,7 @@ The default realname is the same as the nickname.
Save and load the contents of windows from Save and load the contents of windows from
.Ar name .Ar name
in in
.Pa $XDG_DATA_DIRS/catgirl , .Pa $XDG_DATA_DIRS/catboy ,
or an absolute or relative path if or an absolute or relative path if
.Ar name .Ar name
starts with starts with
@ -393,13 +393,13 @@ blank to prompt for the password.
.It .It
Generate a new TLS client certificate: Generate a new TLS client certificate:
.Bd -literal -offset indent .Bd -literal -offset indent
$ catgirl -g ~/.config/catgirl/example.pem $ catboy -g ~/.config/catboy/example.pem
.Ed .Ed
.It .It
Connect to the server using the certificate: Connect to the server using the certificate:
.Bd -literal -offset indent .Bd -literal -offset indent
cert = example.pem cert = example.pem
# or: $ catgirl -c example.pem # or: $ catboy -c example.pem
.Ed .Ed
.It .It
Identify with services or use Identify with services or use
@ -417,7 +417,7 @@ when connecting
.Bd -literal -offset indent .Bd -literal -offset indent
cert = example.pem cert = example.pem
sasl-external sasl-external
# or: $ catgirl -e -c example.pem # or: $ catboy -e -c example.pem
.Ed .Ed
.El .El
. .
@ -427,7 +427,7 @@ sasl-external
Connect to the server Connect to the server
and write its certificate to a file: and write its certificate to a file:
.Bd -literal -offset indent .Bd -literal -offset indent
$ catgirl -o -h irc.example.org > ~/.config/catgirl/example.pem $ catboy -o -h irc.example.org > ~/.config/catboy/example.pem
.Ed .Ed
.It .It
Configure Configure
@ -435,7 +435,7 @@ Configure
to trust the certificate: to trust the certificate:
.Bd -literal -offset indent .Bd -literal -offset indent
trust = example.pem trust = example.pem
# or: $ catgirl -t example.pem # or: $ catboy -t example.pem
.Ed .Ed
.El .El
. .
@ -890,7 +890,7 @@ The default nickname.
. .
.Sh FILES .Sh FILES
.Bl -tag -width Ds .Bl -tag -width Ds
.It Pa $XDG_CONFIG_DIRS/catgirl .It Pa $XDG_CONFIG_DIRS/catboy
Configuration files are searched for first in Configuration files are searched for first in
.Ev $XDG_CONFIG_HOME , .Ev $XDG_CONFIG_HOME ,
usually usually
@ -899,10 +899,10 @@ followed by the colon-separated list of paths
.Ev $XDG_CONFIG_DIRS , .Ev $XDG_CONFIG_DIRS ,
usually usually
.Pa /etc/xdg . .Pa /etc/xdg .
.It Pa ~/.config/catgirl .It Pa ~/.config/catboy
The most likely location of configuration files. The most likely location of configuration files.
. .
.It Pa $XDG_DATA_DIRS/catgirl .It Pa $XDG_DATA_DIRS/catboy
Save files are searched for first in Save files are searched for first in
.Ev $XDG_DATA_HOME , .Ev $XDG_DATA_HOME ,
usually usually
@ -911,7 +911,7 @@ followed by the colon-separated list of paths
.Ev $XDG_DATA_DIRS , .Ev $XDG_DATA_DIRS ,
usually usually
.Pa /usr/local/share:/usr/share . .Pa /usr/local/share:/usr/share .
.It Pa ~/.local/share/catgirl .It Pa ~/.local/share/catboy
The most likely location of save files. The most likely location of save files.
.El .El
. .
@ -930,11 +930,11 @@ Join
.Li #ascii.town .Li #ascii.town
from the command line: from the command line:
.Bd -literal -offset indent .Bd -literal -offset indent
$ catgirl -h irc.tilde.chat -j '#ascii.town' $ catboy -h irc.tilde.chat -j '#ascii.town'
.Ed .Ed
.Pp .Pp
Create a configuration file in Create a configuration file in
.Pa ~/.config/catgirl/tilde : .Pa ~/.config/catboy/tilde :
.Bd -literal -offset indent .Bd -literal -offset indent
host = irc.tilde.chat host = irc.tilde.chat
join = #ascii.town join = #ascii.town
@ -942,7 +942,7 @@ join = #ascii.town
.Pp .Pp
Load the configuration file: Load the configuration file:
.Bd -literal -offset indent .Bd -literal -offset indent
$ catgirl tilde $ catboy tilde
.Ed .Ed
. .
.Sh STANDARDS .Sh STANDARDS
@ -1135,9 +1135,7 @@ file.
.An June Bug Aq Mt june@causal.agency .An June Bug Aq Mt june@causal.agency
. .
.Sh BUGS .Sh BUGS
Send mail to This is a fork, any bugs are probably the fault of
.Aq Mt list+catgirl@causal.agency .Li dzwdz
or join who can be reached on
.Li #ascii.town
on
.Li irc.tilde.chat . .Li irc.tilde.chat .

5
chat.c
View File

@ -387,8 +387,9 @@ int main(int argc, char *argv[]) {
windowShow(windowFor(Network)); windowShow(windowFor(Network));
uiFormat( uiFormat(
Network, Cold, NULL, Network, Cold, NULL,
"\3%dcatgirl\3\tis GPLv3 fwee softwawe ^w^ " "\3%dcatboy\3\tis GPLv3 fwee softwawe ^w^ "
"code is avaiwable fwom https://git.causal.agency/catgirl", "code is avaiwable fwom https://git.tilde.town/dzwdz/catboy"
" (fowked fwom https://git.causal.agency/catgirl)",
Pink Pink
); );
uiFormat(Network, Cold, NULL, "Traveling..."); uiFormat(Network, Cold, NULL, "Traveling...");

View File

@ -515,7 +515,7 @@ static void commandHelp(uint id, char *params) {
return; return;
} }
if (self.restricted) { if (self.restricted) {
uiFormat(id, Warm, NULL, "See catgirl(1) or /help index"); uiFormat(id, Warm, NULL, "See catboy(1) or /help index");
return; return;
} }
@ -527,7 +527,7 @@ static void commandHelp(uint id, char *params) {
char buf[256]; char buf[256];
snprintf(buf, sizeof(buf), "%sp^COMMANDS$", (getenv("LESS") ?: "")); snprintf(buf, sizeof(buf), "%sp^COMMANDS$", (getenv("LESS") ?: ""));
setenv("LESS", buf, 1); setenv("LESS", buf, 1);
execlp("man", "man", "1", "catgirl", NULL); execlp("man", "man", "1", "catboy", NULL);
dup2(utilPipe[1], STDERR_FILENO); dup2(utilPipe[1], STDERR_FILENO);
warn("man"); warn("man");
_exit(EX_UNAVAILABLE); _exit(EX_UNAVAILABLE);

View File

@ -22,12 +22,12 @@ if [ "$(uname)" = 'OpenBSD' ]; then
cp -fp /usr/libexec/ld.so root/usr/libexec cp -fp /usr/libexec/ld.so root/usr/libexec
export LD_TRACE_LOADED_OBJECTS_FMT1='%p\n' export LD_TRACE_LOADED_OBJECTS_FMT1='%p\n'
export LD_TRACE_LOADED_OBJECTS_FMT2='' export LD_TRACE_LOADED_OBJECTS_FMT2=''
for bin in ./catgirl /usr/bin/mandoc /usr/bin/less; do for bin in ./catboy /usr/bin/mandoc /usr/bin/less; do
LD_TRACE_LOADED_OBJECTS=1 $bin | xargs -t -J % cp -fp % root/usr/lib LD_TRACE_LOADED_OBJECTS=1 $bin | xargs -t -J % cp -fp % root/usr/lib
done done
cp -fp /usr/bin/printf /usr/bin/mandoc /usr/bin/less root/usr/bin cp -fp /usr/bin/printf /usr/bin/mandoc /usr/bin/less root/usr/bin
make install DESTDIR=root PREFIX=/usr MANDIR=/usr/share/man make install DESTDIR=root PREFIX=/usr MANDIR=/usr/share/man
install scripts/chroot-prompt.sh root/usr/bin/catgirl-prompt install scripts/chroot-prompt.sh root/usr/bin/catboy-prompt
install scripts/chroot-man.sh root/usr/bin/man install scripts/chroot-man.sh root/usr/bin/man
cp -fp /etc/hosts /etc/resolv.conf root/etc cp -fp /etc/hosts /etc/resolv.conf root/etc
@ -53,12 +53,12 @@ elif [ "$(uname)" = 'FreeBSD' ]; then
root/home/${CHROOT_USER}/.local/share root/home/${CHROOT_USER}/.local/share
cp -fp /libexec/ld-elf.so.1 root/libexec cp -fp /libexec/ld-elf.so.1 root/libexec
ldd -f '%p\n' catgirl /usr/bin/mandoc /usr/bin/less \ ldd -f '%p\n' catboy /usr/bin/mandoc /usr/bin/less \
| sort -u | xargs -t -J % cp -fp % root/lib | sort -u | xargs -t -J % cp -fp % root/lib
chflags noschg root/libexec/* root/lib/* chflags noschg root/libexec/* root/lib/*
cp -fp /rescue/sh /usr/bin/mandoc /usr/bin/less root/bin cp -fp /rescue/sh /usr/bin/mandoc /usr/bin/less root/bin
make install DESTDIR=root PREFIX=/usr MANDIR=/usr/share/man make install DESTDIR=root PREFIX=/usr MANDIR=/usr/share/man
install scripts/chroot-prompt.sh root/usr/bin/catgirl-prompt install scripts/chroot-prompt.sh root/usr/bin/catboy-prompt
install scripts/chroot-man.sh root/usr/bin/man install scripts/chroot-man.sh root/usr/bin/man
cp -fp /etc/hosts /etc/resolv.conf root/etc cp -fp /etc/hosts /etc/resolv.conf root/etc

View File

@ -4,7 +4,7 @@
new-session -t chat new-session -t chat
# catgirl(1) puts windows at the top # catboy(1) puts windows at the top
set-option -g -- status-position top set-option -g -- status-position top
# intuitive navigation # intuitive navigation
@ -37,9 +37,9 @@ bind-key -n -N 'confirm INTR key' -- C-c \
# one-click version of default `C-b w' (shows preview windows) # one-click version of default `C-b w' (shows preview windows)
bind-key -n -N 'pick chat network' -- F1 choose-tree -Z bind-key -n -N 'pick chat network' -- F1 choose-tree -Z
# catgirl(1) might run in `-R'/`restrict'ed mode, i.e. `/help' is disabled # catboy(1) might run in `-R'/`restrict'ed mode, i.e. `/help' is disabled
bind-key -n -N 'read catgirl help' -- F2 \ bind-key -n -N 'read catboy help' -- F2 \
new-window -S -n help -- man -s 1 -- catgirl new-window -S -n help -- man -s 1 -- catboy
# intuitive refresh, just don't spam it ;-) # intuitive refresh, just don't spam it ;-)
bind-key -n -N 'reconnect network' -- F5 \ bind-key -n -N 'reconnect network' -- F5 \
@ -60,5 +60,5 @@ bind-key -N 'reload configuration' -- R {
## do not double-quote commands to avoid running through "sh -c" ## do not double-quote commands to avoid running through "sh -c"
# IRC # IRC
new-window -d -S -n hackint -- catgirl -- defaults hackint new-window -d -S -n hackint -- catboy -- defaults hackint
new-window -d -S -n efnet -- catgirl -- defaults efnet new-window -d -S -n efnet -- catboy -- defaults efnet

View File

@ -1,2 +1,2 @@
#!/bin/sh #!/bin/sh
exec mandoc /usr/share/man/man1/catgirl.1 | LESSSECURE=1 less exec mandoc /usr/share/man/man1/catboy.1 | LESSSECURE=1 less

View File

@ -4,4 +4,4 @@ set -eu
printf 'Name: ' printf 'Name: '
read -r nick rest read -r nick rest
printf '%s %s\n' "$nick" "$SSH_CLIENT" >>nicks.log printf '%s %s\n' "$nick" "$SSH_CLIENT" >>nicks.log
exec catgirl -K -n "$nick" -s "${nick##*/}" -u "${SSH_CLIENT%% *}" "$@" exec catboy -K -n "$nick" -s "${nick##*/}" -u "${SSH_CLIENT%% *}" "$@"

View File

@ -4,6 +4,6 @@ Match User chat
PasswordAuthentication yes PasswordAuthentication yes
PermitEmptyPasswords yes PermitEmptyPasswords yes
ChrootDirectory /home/chat ChrootDirectory /home/chat
ForceCommand catgirl-prompt ForceCommand catboy-prompt
DisableForwarding yes DisableForwarding yes
MaxSessions 1 MaxSessions 1

2
xdg.c
View File

@ -36,7 +36,7 @@
#include "chat.h" #include "chat.h"
#define SUBDIR "catgirl" #define SUBDIR "catboy"
struct Base { struct Base {
const char *envHome; const char *envHome;