2023

[ To: 2026 2023 ]

NickServ alias for ngIRCd 2023.06.29

The developer of ngIRCd seems to be reluctant to add support for the creation of aliases, as shown in this GitHub Issue.

This is a problem if you provide services such as NickServ, because various IRC clients are hardcoded to use /NICKSERV as an alias for /MSG NickServ, such as Pidgin. If not that, then the alias-based option is the only one that the client provides conveniently in a drop-down menu, as seen in clients like XChat.

It turns out that you should be using /SQUERY NickServ anyway, because that command will refuse to message anything that is not a service, meaning that a malicious user cannot masquerade as the NickServ user.

So, to get the best of both worlds by supporting these IRC clients, I patched ngIRCd to have a /NICKSERV command that uses /SQUERY NickServ behind-the-scenes. It seems to work well in HexChat so far, although I had to add custom command parsing to ngIRCd to treat all the arguments of the command as one argument, because HexChat does not seem to prefix the arguments with a colon (:) internally, meaning the message to the NickServ user will be parsed as if it were a space-delimited list of arguments when it shouldn't be (because it's just a private message, not a real command).

You can find the source code diff I made to patch ngIRCd 26.1 here.

[NetBSD] Cardbus on HP OmniBook XE2 2023.06.15

I wanted to see if NetBSD would work well on my HP OmniBook XE2 today. Everything worked, except the Cardbus slot, which meant I could not use my wireless adapter (Atheros AR5212/5213/2414, see ath(4)).

The errors looked something like this, but I was not able to save the log:

cbb0: bad Vcc request. [...snip...]
cbb0: disabling socket

I was able to fix the problem by applying all of the kernel configuration options described in cbb(4) and recompiling it:

options RBUS_MIN_START="0x20000000"
options RBUS_IO_BASE="0xa00"
options RBUS_IO_SIZE="0x00ff"

options PCI_ADDR_FIXUP
options PCI_BUS_FIXUP
options PCI_INTR_FIXUP

The first one changes the Cardbus memory space to be mapped at 512 MiB. The value needs to be outside of physical memory, but not high enough to require too many address lines. My computer has a maximum of 256 MiB of physical memory, so the provided value was fine.

The last three depend on whether you have ACPI or not. I do not, and I also enabled/uncommented options PCIBIOS too.

I am not sure if RBUS_IO_BASE and RBUS_IO_SIZE are necessary yet, I included them all at once because I needed to avoid compiling the kernel multiple times (it takes about 2 hours to fully compile). I wonder if these options are the reason the wireless adapter works so slowly.