IRC filesystem based on Suckless' ii
ircfs uses FUSE to map IRC servers to directories on your computer. Each channel appears as a directory under the mountpoint:
freenode
├── #bash
│ ├── send
│ └── receive
├── ##linux
│ ├── send
│ └── receive
├── send
├── receive
└── raw
ircfs -s SERVER -n NICKNAME MOUNTPOINT
Alternatively, a TOML configuration file can be provided and specified with the -c flag. An example ircfs.toml file is provided.
If flags are used in addition to a configuration file, then the flags take precedence.
Messages are sent by writing data to the send file for a channel or user: echo "How do I install Gentoo?" > '##linux/send'
Messages can be read via the corresponding receive file.
Commands are performed by writing to the server's send file. The following commands have been implemented:
/join CHANNELS [KEYS]: Joins the comma-separated list of channels, using the (optional) comma-separated list of keys./msg TARGET [MESSAGE]: Sends a message to the target, whether it's a channel or user. If no message is specified, this creates a directory for the target without sending a message./part TARGETS: Parts the comma-separated list of channels.
The /raw file contains the raw messages sent from the IRC server (along with a timestamp).
ircfs is very much a work-in-progress, and its functionality is therefore very limited at the moment.
The following has been implemented:
- Channels can be joined
- Messages can be sent to and received from channels/users
- Support for connecting via SSL
- Standard IRC commands:
/me,/kick,/part,/quit, etc.
Additionally, ircfs may eventually be modified so that one ircfs instance handles connections to multiple IRC servers.
iiuses a regular file for output. This means that a disk write occurs for every single message from the IRC server. That is in no way optimal.ircfsinstead stores all messages in memory.iiuses a FIFO file for input. This means that messages sent to theinfile are essentially lost; no record of them is kept (aside from your shell's history, perhaps).ircfssaves the data written to theinfiles so that you may read from them if desired.
- Since
ircfsstores message in memory rather than on an actual file, creating permanent logs would need to be done via some external means (such as a cron job copying the file to some other location)