From 600372ca9ea974fd5f0a430fd73ebdb591b59742 Mon Sep 17 00:00:00 2001 From: Egor Date: Thu, 19 Oct 2023 15:57:24 +0300 Subject: [PATCH] readme documentation --- README.md | 47 ++++++++++++++++++++++++++++++++++++++++++++++- help.example.txt | 28 ++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 help.example.txt diff --git a/README.md b/README.md index 9639b30..30057c4 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,48 @@ # patchyIRCD -patchy IRC server????? \ No newline at end of file +patchy IRC server????? + +## How to compile and use +Basic compilation: +``` +cp config.example.mk config.mk +make +``` + +Some things are configurable via compile-time flags. In particular, `-DHAS_TLS` +and some constants defined in `src/config.h`. + +For TLS you gonna need to place your certificate and private key in +`cert.pem` and `key.pem` respectively. + +`ops.txt` `users.txt` and `newusers.txt` contain hashed passwords. `ops.txt` is +used for OPER command, `users.txt` is used for PASS command (which we use for +our bespoke user account system). NEWACC command adds lines to `newusers.txt`. +To verify a registration, simply copy lines from `newusers.txt` to `users.txt`. +You can set password from command line like so `./setpass username file.txt` +(the file must already exist). + +`help.txt` file contains the text for the HELP command. You can use the provided +`help.example.txt` file. + +When the server starts, it reads the `init.txt` file. A fake oper connection +performs the actions specified in the file. This allows initializing permanent +channels. If you specify source (i.e. `:nick!user@host` before the command), +the oper's nick will change accordingly. You can also fake the current unix time +by prefixing the line with `$123` (`$0` sets the time back to real time). Faking +nick and time is useful for JOIN and TOPIC commands. `chanlog.txt` records all +channels changes in this format. + +## Command-line options +Add TCP listeners with `--listenPlain ip port` and `--listenTls ip port`. If +none are specified, the default is: +``` +--listenPlain 0 6667 +--listenPlain :: 6667 +--listenTls 0 6697 +--listenTls :: 6697 +``` +IPv4 and IPv6 must be specified separately. + +With `--autojoin \#ircmoment` clients will automatically join the `#ircmoment` +channel. This option can be specified multiple times. diff --git a/help.example.txt b/help.example.txt new file mode 100644 index 0000000..7034da9 --- /dev/null +++ b/help.example.txt @@ -0,0 +1,28 @@ += Account registration +To use this feature, you connect using TLS on port 6697. +To register an account run /NEWACC [user] [pass] +You might have to use /quote NEWACC if your client is bad. +Registration is verified manually, so contact IRCops to enable your +account. To login, set up the username/password in your client. + +Registering an account has the following benefits: +- You can take over the nickname that equals to your account name using + the /GHOST command. +- Your username won't be prefixed with a ~, and thus: +- You can join registered-only channels (+b *!~*@*) +- You can create secure private channels (+iI *!acc@*) + +Username must be in lowercase, though the corresponding nickname doesn't +have to be. + += User modes +The ones you can set: +i invisible, +w wallops +Other modes: +o ircop, +r registered, +Z tls + += Channel modes +Ban lists: +b ban, +e ban exception, +I invite exception, +q quiet +Channel prefix: +o operator, +v voice, +w auto-op (+w o:mask, +w v:mask) +Other modes: +n no external messages, +t protected topic, +s secret + +m moderated, +i invite only, +k [key], +l [limit] +IrcOp only: +P persist +Additionally you can use MODE #chan +0 to view all ban lists. -- 2.56.0