1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-06-25 13:36:37 +02:00

1535 Commits

Author SHA1 Message Date
Bram Matthys 75421c9b66 This is the last commit to 'unreal50', we will use 'unreal52' from now on. 2021-06-02 15:05:16 +02:00
Bram Matthys d9b80d889f Update curlinstall script for ./configure from cURL 7.77.0 and above. 2021-06-02 14:35:37 +02:00
Bram Matthys d360ae7845 Add some markup in release notes
[skip ci]
2021-05-30 19:37:51 +02:00
Bram Matthys 517298007d If no log { } block is present, we used to only log errors to ircd.log.
From now on we simply enable ALL logging to ircd.log, so also connects,
kills, and so on.
2021-05-30 19:35:52 +02:00
Bram Matthys 3eb0bc24ea Add log::flags "flood" to log flood messages 2021-05-30 19:30:36 +02:00
Bram Matthys f8a732747b Get rid of mempool LOG_DBG which is never used 2021-05-30 19:27:35 +02:00
Bram Matthys 6358a2e5ff Remove this check due to clang complaining. Whatever. 2021-05-30 19:11:50 +02:00
Bram Matthys 5acef88ceb All violatons of target-flood, nick-flood, join-flood, away-flood,
invite-flood, knock-flood, max-concurrent-conversations are now
reported to opers with the snomask 'f' (flood).
2021-05-30 19:10:18 +02:00
Bram Matthys cb604d6df0 Update release notes
[skip ci]
2021-05-30 18:49:18 +02:00
Bram Matthys 6f92233919 The set:anti-flood block has been redone so you can have different limits
for "unknown-users" and "known-users".
As a reminder, by default, "known-users" are users who are identified
to services OR are on an IP that has been connected for over 2 hours
in the past X days.
See https://www.unrealircd.org/docs/FAQ#new-anti-flood-block
for more information on the layout of the new block.

NOTE: This actual feature, the relase notes and the documentation
      are all work in progress.
2021-05-30 18:45:27 +02:00
Bram Matthys 3076ed5a98 Make pretty_time_val() output like "2m30s" instead of "2 minutes 30 seconds".
I think people will understand both and it is currently rather long.
And a bit confusing too with all the spaces, easy to overlook something eg
in /STATS S where it is being used.
2021-05-30 14:50:27 +02:00
Bram Matthys 79ded54df1 Make join-flood use the new framework too, well... partially anyway. 2021-05-28 18:08:07 +02:00
Bram Matthys 36b9faa7cd Code cleanup: move flood control to generic system 2021-05-28 17:59:39 +02:00
Bram Matthys 3e1f092afc Rename FLD_* to CHFDL_* in chanmodes/floodprot.c, so it does
not clash with future stuff.
2021-05-28 15:48:54 +02:00
Bram Matthys 191990b881 Code cleanup: at some places "ClientUser" was used instead of "User". 2021-05-28 15:26:58 +02:00
Bram Matthys d9c0397e25 Code cleanup: this zeroing isn't useful as we already memset. 2021-05-28 15:25:10 +02:00
Bram Matthys da519ae04a Get rid of duplicate checks for anti-flood.
Sorry this is too much effort and i think admins should be smart
enough to figure this out themselves.
2021-05-28 14:52:09 +02:00
Bram Matthys e1e718f982 Update release notes
[skip ci]
2021-05-28 10:38:32 +02:00
Bram Matthys 78ca5ecc3e Add "draft/bot" message tag to messages from +B clients.
As mentioned in https://ircv3.net/specs/extensions/bot-mode
2021-05-28 10:36:38 +02:00
Bram Matthys 0bd813733f Fix file header
[skip ci]
2021-05-28 10:07:26 +02:00
Bram Matthys 845a582d76 Add support for +draft/reply and load the module by default.
See https://ircv3.net/specs/client-tags/reply for the draft.

Can be used by clients to indicate to which message they are writing
a reply. This can be especially useful for bots, to indicate that
a response belongs to a user request, eg a !trigger.
2021-05-28 09:14:40 +02:00
Bram Matthys 4db7866676 Update release notes
[skip ci]
2021-05-26 11:27:27 +02:00
Bram Matthys d3ee89ffa5 Fix help.conf 2021-05-26 07:51:43 +02:00
Bram Matthys a85a38e69d Add the ability to SPAMFILTER message-tags.
The new target type is called 'T' and we match against "name=value"
of each message tag (or just "name" if it is without value).

Example: SPAMFILTER ADD -simple T kill 0 this_is_a_test +typing=active
(No this is not a suggestion :D)

This probably won't be used much at all, but it is good to have the
option available in case there is some massive problem,
especially since more message tags may pop up sooner or later.

Caveat: this is actually a bit slow as we may have to check multiple
message tags for a single line.
If there are zero message-tag spamfilters then we will automatically
short-circuit and save all this CPU, which will be the most common case.
2021-05-25 20:31:10 +02:00
Bram Matthys 264ed614fc Implement Sec-WebSocket-Accept from
https://github.com/ircv3/ircv3-specifications/pull/342
2021-05-24 18:33:55 +02:00
Bram Matthys 872aa93635 Move some string helpers to src/misc.c
skip_whitespace() and read_until()
2021-05-24 18:32:57 +02:00
Bram Matthys cd9ac916de Allow setting set::history::channel::playback-on-join::lines to zero
in case you want to disable this feature.

Note that clients that are using CHATHISTORY will already no longer
receive history-on-join ("push") since they REQ a CAP that will inhibit
this and they will "pull" the history instead when they want/need to.

So... this option is really only there if you want to disable it for
non-CHATHISTORY-clients.
2021-05-24 09:59:20 +02:00
Bram Matthys 3ded34b405 Windows: run db tests
[skip ci]
2021-05-24 09:22:17 +02:00
Bram Matthys 2375c35f2b Fix crashreporter to show big warning if you have 3rd party modules
loaded. The code to raise this warning was already present but it
was not being shown in many cases (when it actually should).

It now looks like this, if you run ./unrealircd start and previously
crashed AND have any 3rd party mods loaded:

The IRCd has been started now (and is running), but it did crash 1 seconds ago.
Crash report generated in: /home/ircd/unrealircd/tmp/crash.report.core.1621838267.txt

** IMPORTANT **
Your UnrealIRCd crashed and you have 3rd party modules loaded (modules created
by someone other than the UnrealIRCd team). If you installed new 3rd party
module(s) in the past few weeks we suggest to unload these modules and see if
the crash issue dissapears. If so, that module is probably to blame.
If you keep crashing without any 3rd party modules loaded then please do report
it to the UnrealIRCd team.
The reason we ask you to do this is because MORE THAN 95% OF ALL CRASH ISSUES
ARE CAUSED BY 3RD PARTY MODULES and not by an UnrealIRCd bug.

Shall I send a crash report to the UnrealIRCd developers?
NOTE: If the crash is caused by a 3rd party module then UnrealIRCd devs can't fix that.
2021-05-24 08:38:07 +02:00
Bram Matthys 842e06d7d3 Possibly fix small memory leak. 2021-05-23 13:59:57 +02:00
Bram Matthys 92b9fa07a1 Make history backend non-PERM so it can be upgraded on the fly.
Tested:
* Rehashing and sending messages before after (multiple times)
* Terminating
* Unloading by commenting out
2021-05-23 13:56:03 +02:00
Bram Matthys 88d7829e5b Allow lower set::restrict-commands::xyz::connect-delay values.
Suggested by Le_Coyote in https://bugs.unrealircd.org/view.php?id=5873
2021-05-23 09:46:33 +02:00
Bram Matthys 137cc7f20b Update some URLs
Suggested by westor in https://github.com/unrealircd/unrealircd/pull/136
2021-05-23 09:44:18 +02:00
Bram Matthys 9c0710a9a4 Adjust +H setting if a channel goes -r and had a high setting
that was only allowed for registered channels (+r).
2021-05-23 09:26:38 +02:00
Bram Matthys 7ccbb6ebf1 Update release notes
[skip ci]
2021-05-22 19:29:23 +02:00
Bram Matthys b6626b2b60 Update module coders section in release notes
[skip ci]
2021-05-22 19:06:49 +02:00
Bram Matthys 3ad6878865 Set new maximums for channel mode +H. If the channel is +r then the maximum
is now 5000 lines / 31 days. For unregistered it is 200 lines / 31 days.
Previous setting was 200 lines / 7 days for both.

Admins can tweak these settings, see:
https://www.unrealircd.org/docs/Set_block#set::history

More code to deal with corner issues will follow later.

UnrealIRCd module coders [!]:
This also changes the channel mode API conv_param. You can use
the UNREAL_VERSION_TIME >= 202120 condition to detect this.
Eg:
 #if UNREAL_VERSION_TIME < 202120
 int my_conv_param(char *para, Client *client);
 #else
 int my_conv_param(char *para, Client *client, Channel *channel);
 #endif
2021-05-22 18:15:26 +02:00
Bram Matthys 7a22ec8b6b Announce CHATHISTORY=xx in 005 2021-05-22 15:32:29 +02:00
Bram Matthys d6b64de162 Silence compiler warning by reordering stuff. 2021-05-22 15:14:29 +02:00
Bram Matthys 8431cd43b2 Fix read-after-free 2021-05-22 14:59:54 +02:00
Bram Matthys c0b86c757c Change chanmode +H parameter to show hours and days when needed and
possible if it rounds off nicely, eg +H 100:7d. Note that the
existing syntax is still accepted, eg +H 20:1440 and +H 20:1440m
are both converted to 20:1d.

With potentially higher time values this change makes the mode
parameter a lot more readable.

Support for translating timevalues is already in UnrealIRCd 5.0.2
and higher, so should be fine for nearly everyone.
2021-05-22 14:49:25 +02:00
Bram Matthys c6873292b9 Implement CHATHISTORY TARGETS...
Except that it still needs to order the result by timestamp,
which it does not do at the moment.
2021-05-22 13:36:16 +02:00
Bram Matthys 937cc94940 Add CAP draft/chathistory and don't send history-on-join if this
CAP is enabled by a client.
2021-05-22 12:16:52 +02:00
Bram Matthys abeb222eed Implement CHATHISTORY BETWEEN 2021-05-22 11:50:51 +02:00
Bram Matthys 188dc7792d Fix crash on remote CHATHISTORY cmd (by servers/services). 2021-05-21 07:20:26 +02:00
Bram Matthys 3543bff286 Update list of donators 2021-05-19 19:24:18 +02:00
Bram Matthys cda145b62a Add initial version of CHATHISTORY command
from https://ircv3.net/specs/extensions/chathistory

Current status of the module in UnrealIRCd:
* A significant part of this is done and working
* Currently in modules.optional.conf to get test exposure,
  not yet loaded by default.
* CHATHISTORY subcommands implemented: BEFORE, AFTER, LATEST, AROUND
* It does not implement the subcommand "BETWEEN" yet
* It does not announce or recognize the (draft) CAP's yet
* It does not announce the ISUPPORT token CHATHISTORY=xx yet
* Testcases need to be written to validate everything
* There will be bugs, now, and also while implementing the rest
  in the days to come.
2021-05-19 16:19:41 +02:00
Bram Matthys ad84a5227a Remove version check for curl and libssl. Nowadays they have ABI
guarantees so it should all be OK. (And nowadays they probably
are true too :D)
2021-05-18 20:35:33 +02:00
Bram Matthys 7f0cae0473 Remove warning in release notes on file corruption,
now that things are more tested. [skip ci]
2021-05-17 16:51:49 +02:00
Bram Matthys 9a7f2b0ea2 Update for DB tests, now finished in test framework. 2021-05-17 16:44:21 +02:00
Bram Matthys c916d1d9ef Allow secret::password-file to only exist on-boot, so after booting
the file is allowed to no longer exist. This so you can do things
like only connecting an USB stick during UnrealIRCd boot and then
pull it out once booted.
2021-05-17 15:18:28 +02:00
Bram Matthys 013184533d Add DB writing/reading tests to BuildBot so it is tested on every commit. 2021-05-17 12:45:35 +02:00
Bram Matthys be81152da7 Move hash generation outside cfg() and do it early just to be safe. 2021-05-17 12:38:43 +02:00
Bram Matthys 8c71cd1a65 * Make channeldb write the db on terminate
* Fix channel history issues with writing on terminate
* Change tkldb and reputation to only write the db
  on terminate and not on every REHASH anymore

..all this thanks to the new loop.ircd_terminating, so modules can
see the difference between regular rehash and terminating.
2021-05-17 11:49:28 +02:00
Bram Matthys c79cc6f430 Add ModuleSetOptions(modinfo->handle, MOD_OPT_UNLOAD_PRIORITY, priority);
so modules can indicate if they wish to be unloaded before or after others.
This is used by the channel and history modules so they can save their
databases before the chanmodes modules are unloaded.

Also, made ModuleSetOptions() a void function. I don't think anyone
used the returned value and it now no longer is strictly bitmask add/del
so returning an unsigned int would be a tad confusing.
2021-05-17 11:43:46 +02:00
Bram Matthys 74083d7440 In AddListItemPrio() explicitly set item->priority to prio. 2021-05-17 11:39:45 +02:00
Bram Matthys 4fa468bd4f on DelListItem set prev/next to NULL on the item itself (not the list) 2021-05-17 11:31:55 +02:00
Bram Matthys d7bf35e0d9 Set loop.ircd_terminating when IRCd is terminating (signal 15, /DIE, etc) 2021-05-17 11:08:54 +02:00
Bram Matthys 61e0ed3d03 Give UnrealIRCd 10 seconds to terminate insteads of just 1, now that
we may have more database writing to do on terminate.

Actually 10 seconds would be really long, but 2-3 seconds may be
quite realistic if you have lots of TKLs, permanent channels,
reputation entries (users), etc.

Oh yeah, and I really hate writing PORTABLE shell code...
2021-05-17 09:05:47 +02:00
Bram Matthys 263593634e Flush any dirty history log files to disk on terminate (eg: ./unrealircd stop) 2021-05-17 08:47:39 +02:00
Bram Matthys cb3c0b48ca Don't call hbm_delete_db() if not running in persistent mode. 2021-05-17 08:10:51 +02:00
Bram Matthys ae873ab25a Compile fixes for Windows 2021-05-16 19:15:01 +02:00
Bram Matthys f79fec62f1 Add CAP unrealircd.org/history-backend which declares the policy/
configuration on how history is stored (in memory and/or on disk).
This is similar to other disclosing policies like
unrealircd.org/link-security and unrealircd.org/plaintext-policy.
The reason for this cap (and similarly the other caps) is that
the user can make an informed decision on whether it finds the
policy/safety/privacy of an acceptable level or not.

Fixes for turning persist on/off on the fly (REHASH)

Make release notes a bit more clear.
2021-05-16 17:52:59 +02:00
Bram Matthys e58b22c45d Write some early release notes.
[skip ci]
2021-05-16 17:26:35 +02:00
Bram Matthys 011cc9e1d5 Persistent channel history: prevent mixing of .db files from elsewhere. 2021-05-16 17:25:36 +02:00
Bram Matthys 5e4d9cdc61 Delete persitent history immediately when channel goes -P.
And also handle -P+P.
2021-05-16 17:18:52 +02:00
Bram Matthys 5c8752dfc6 Get rid of various warnings/errors due to recent work. 2021-05-16 16:57:01 +02:00
Bram Matthys 14a99d755e UnrealDB history: Use SHA256 with pre- and post- hashsecret
for the file names, instead of MD5.
2021-05-15 20:55:08 +02:00
Bram Matthys 13f9afeaf4 Add sha256hash() function for convenience. 2021-05-15 20:48:04 +02:00
Bram Matthys 05dd788dab Add support for secret::password-prompt (entering on console)
This is one of the 3 currently supported methods.
Documentation will follow later.
2021-05-15 18:52:01 +02:00
Bram Matthys 1752afee44 Move running_interactively() from crashreport.c to misc.c 2021-05-15 18:28:21 +02:00
Bram Matthys 55b0422dd0 Bail out sooner, otherwise confusing. 2021-05-15 18:28:03 +02:00
Bram Matthys 3bf0c9e653 Add support for persistent channel history, if the channel is +P and +H.
This is not enabled by default and requires additional configuration,
documentation will follow later.
2021-05-15 15:43:07 +02:00
Bram Matthys 95cfafcd51 Include dirent.h by default. 2021-05-15 15:42:34 +02:00
Bram Matthys 73ae7ccbef Mod API: Add CONFIG_SET_HISTORY_CHANNEL so chanmodes/history
can delegate configuration to history_backend_mem.
2021-05-15 15:41:02 +02:00
Bram Matthys ff84f17f72 Move strtolower_safe() from antirandom to support.c 2021-05-15 15:38:57 +02:00
Bram Matthys 7fa0e07487 UnrealDB: Oops, previous commit broke unrealdb_write_str() w/NULL strings. 2021-05-05 19:20:33 +02:00
Bram Matthys 8783280a68 Make UnrealDB big-endian-proof. Rather rare, but you never know
on what hardware people end up running UnrealIRCd.

Also (unrelated) add a check for >64kb strings in unrealdb_write_str()
and return an API error. That too is unlikely to ever happen, but..
better be correct.
2021-05-05 19:04:11 +02:00
Bram Matthys df3bb510a1 Windows: Ignore compiler warning C6029 in unrealdb.c as it is a false positive.
src/unrealdb.c(462): error C2220: warning treated as error - no 'object' file generated
src\unrealdb.c(379) : warning C6029: Possible buffer overrun in call to 'fread':  use of unchecked value 'c'.

[..fread of c->config->saltlen..]
if (c->config->saltlen > 1024)
{
        unrealdb_set_error(c, UNREALDB_ERROR_HEADER, "Header is corrupt (saltlen=%d)", (int)c->config->saltlen);
        goto unrealdb_open_fail; /* Something must be wrong, this makes no sense. */
}
c->config->salt = safe_alloc(c->config->saltlen);
if (fread(c->config->salt, 1, c->config->saltlen, c->fd) != c->config->saltlen)

VS2019 doesn't understand that this is safe.
2021-05-05 13:44:33 +02:00
Bram Matthys 623745d274 Fix Windows BuildBot
[skip ci]
2021-05-05 11:23:42 +02:00
Bram Matthys bd11d06a39 Windows compile fixes for unrealdb and libsodium. 2021-05-05 10:49:15 +02:00
Bram Matthys 214a98addb Add libsodium to Windows build
[skip ci]
2021-05-05 09:48:17 +02:00
Bram Matthys deffc908e3 Document UnrealDB API and get rid of unrealdb_write_data/unrealdb_read_data.
API users must use specific size/type functions instead, otherwise it is
simply too dangerous / too easy to overlook issues.
2021-05-04 11:03:48 +02:00
Bram Matthys cc348701a2 UnrealDB: check for write errors in all conditions (not just some)
And set the error message/code properly. Didn't set it before because of
'c' being freed, but we have unrealdb_get_error_code() and
unrealdb_get_error_string() now that can (and should) still be used
in such cases.
2021-05-04 09:07:37 +02:00
Bram Matthys a349fa2ae4 UnrealDB: Fix for short read / final end of file (for unencrypted files) 2021-05-04 09:01:04 +02:00
Bram Matthys 4f8ac3c6cf UnrealDB: Fix reading final end of file (crypto-side) 2021-05-04 08:55:08 +02:00
Bram Matthys 282162b4aa Various small UnrealDB fixes 2021-05-04 08:36:45 +02:00
Bram Matthys 576f8b1aae Fix bug with unrealdb caching 2021-05-03 18:25:59 +02:00
Bram Matthys 2a29c2f3b3 Update tkldb to use UnrealDB functions 2021-05-03 18:06:05 +02:00
Bram Matthys 2340f14973 Fix unrealdb reading due to last-minute change earlier today 2021-05-03 18:04:56 +02:00
Bram Matthys 1606f28555 Add unrealdb_write_char() / unrealdb_read_char() 2021-05-03 17:48:23 +02:00
Bram Matthys 6860046b20 Make the "UnrealIRCd 4 is no longer supported" section a bit shorter
in the release notes.
[skip ci]
2021-05-03 15:33:41 +02:00
Bram Matthys eb4d7fb3f0 Set version to 5.0.10-git with disclaimer not to use it yet. 2021-05-03 15:27:30 +02:00
Bram Matthys 30d64f2ebe Use UnrealDB functions in channeldb. 2021-05-03 15:15:25 +02:00
Bram Matthys 40ace27e7d Add UnrealDB reading capability to reputation module.
We still write the old format, unless encryption is enabled.
2021-05-03 15:14:56 +02:00
Bram Matthys dde3e0ccb2 Add unrealdb and secrets API. Documentation and more information will
follow in later commits.
2021-05-03 15:07:10 +02:00
Bram Matthys dd33b38264 Fix extended server ban ~a:accname not working for shun and also
not always kicking in on *line either.
We now check for shuns/*lines in user_account_login(), so upon
SASL or NS IDENTIFY etc. This also means that the client could
now be killed in that function, so callers should take extra
care and take that into account. We check for IsDead() in our
calls now (if it's our client anyway).

Hopefully this doesn't break anything.........
2021-04-17 14:42:40 +02:00
Bram Matthys d6b0981433 Module coders: Update HOOKTYPE_LOCAL_NICKCHANGE and HOOKTYPE_REMOTE_NICKCHANGE.
I forgot to include message tags earlier, so this is a breaking change:
-int hooktype_local_nickchange(Client *client, char *newnick);
-int hooktype_remote_nickchange(Client *client, char *newnick);
+int hooktype_local_nickchange(Client *client, MessageTag *mtags, char *newnick);
+int hooktype_remote_nickchange(Client *client, MessageTag *mtags, char *newnick);

Be sure to update your hooks!
You can use something like: #if UNREAL_VERSION_TIME>=202115
2021-04-17 10:38:25 +02:00
Bram Matthys 85d20e8bd5 Optimize libsodium for current CPU (just like libargon2 does)
Is about 5x speed improvement in practice.
2021-04-10 12:38:20 +02:00
Bram Matthys e497feef24 Add c-ares and libsodium version output to boot screen and /VERSION.
OpenSSL, PCRE2 and cURL were already there.
2021-04-09 19:30:53 +02:00
Bram Matthys 5daf7e7ebe Compile with system libsodium, fallback to shipped version.
This library provides easy to use functions for encryption/decryption
among other things. There is some overlap with things that
OpenSSL also provides but not all.
2021-04-09 13:44:31 +02:00
Bram Matthys e596b730af Move channel history sending from one layer to the other.
This so for example history_backend_mem() does not do any sending.
Less efficient but needed for later when things get more complex.
2021-04-07 09:42:18 +02:00
Bram Matthys 4dc999d2b6 Update some API doc 2021-04-07 09:16:52 +02:00
Bram Matthys 5cddc8d212 If a user answers the curl path manually at the final ./Config question
about curl, then verify that it is actually a correct answer by
checking for <prefix>/bin/curl-config.
2021-03-29 19:24:26 +02:00
Bram Matthys f04697ba7c Add disclaimer to config.settings. 2021-03-29 19:09:37 +02:00
Bram Matthys 775c00c096 Add displaying of reputation score in WHOX (if IRCOp).
The new display field is called 'R', use something like:
WHO * %cuhsnfmdaRr

At the moment only "displaying" is available and not "searching"
on reputation. If you need that, you're stuck with the /REPUTATION
command at the moment. Too much hassle to implement that.

About reputation: https://www.unrealircd.org/docs/Reputation_score
2021-03-28 18:23:02 +02:00
Bram Matthys 0ea86fce83 Forbid using extended server bans in ZLINE/GZLINE as they only work on *@IP.
...and give a hint to use KLINE/GLINE instead.
2021-03-27 09:11:15 +01:00
Bram Matthys d9fbb51a33 Fix error message for /ELINE not working with certain types.
Reported by westor in https://bugs.unrealircd.org/view.php?id=5843

This makes the code more generic so it's just adding a 1/0 in
the TKL types table.
2021-03-27 09:10:56 +01:00
Bram Matthys 4725b5547b Mention correct tag names (which also happen to be URLs) for
unrealircd.org/userip and unrealircd.org/userhost.
Reported by Nav|C.
2021-03-26 15:14:25 +01:00
Bram Matthys e31755bc7c *** UnrealIRCd 5.0.9.1 *** (faster build, lower memory requirements during build)
Note: the only change between 5.0.9 and 5.0.9.1 is:
* Build improvements on *NIX (faster compiling and lower memory requirements)
* Windows version is unchanged and still 5.0.9
2021-03-26 08:30:21 +01:00
Bram Matthys ed50c8fb8c Make shipped c-ares build a lot faster (for systems without system c-ares).
Type:           Parallel build:  Non-parallel build:
Before change   92 seconds       304 seconds
After change     7 seconds        21 seconds

All this thanks to a simple --disable-tests being passed to c-ares' configure.
2021-03-22 08:25:59 +01:00
Bram Matthys 1d0ac57bfa Don't try parallel make if less than 750MB memory is available
(that is, MemAvailable, not MemFree). The ./Config script with
all shipped libs compiled actually has a memory peak of 450M
in my tests with -j4, but let's err on the safe side...

Reason for all this:
This helps on shells with limited memory, especially if they
don't have swap.

We actually don't take swapping into account, so even if you
have plenty of swap but "low" on memory then we won't force a
parallel build. That's okay, since in such a case a parallel
build is not so useful anyway with (slow!) swapping.

This code only works on Linux. Let's hope *BSD guys are smart
enough to have a decent system setup.
2021-03-22 08:13:58 +01:00
LeCoyote 00711f905c Actually read security-group::tls from the conf file (fixes #0005836) (#133) 2021-03-21 07:39:49 +01:00
Bram Matthys 80fbef8b5c *** UnrealIRCd 5.0.9 *** 2021-03-19 20:08:21 +01:00
Bram Matthys 022ed9ae71 Remove explicit setting of send/receive buffer as modern OSs don't
need this and it slows things down for servers.

For clients it's not much of an issue, since traffic rates are low.

However, for server-to-server links it is an entirely different matter.
It is (only) noticeable if you have lots of traffic, such as when there
is a lot to sync while linking two servers, and especially when the two
servers are geographically further apart.
Tested with 100,000 G-lines on both sides being synced (20MB traffic):
* 20ms RTT (same country/state): speed up of x3
* 200ms RTT (transpacific): speed up of x6
2021-03-14 16:04:43 +01:00
Bram Matthys a880532ca7 Update ./Config autodetection of 5.0.8. 2021-03-12 17:53:40 +01:00
Bram Matthys 6761cdd66d UnrealIRCd 5.0.9-rc1 2021-03-12 17:50:52 +01:00
Bram Matthys 2765eaac26 Add find_nvplist() 2021-03-10 17:24:38 +01:00
Bram Matthys 57a6dd3600 Fix windows build. Now that we are using c-ares 1.17.1, the include
directory has changed that needs to be specified on Windows.
[skip ci]
2021-03-10 14:37:33 +01:00
Bram Matthys 01bfe5f7a7 Mention that the Windows build now supports TLSv1.3 too.
We moved from LibreSSL 3.1.4 to 3.2.4.
Support for TLSv1.3 was added in LibreSSL 3.2.2 from Oct 2020,
but it had some issues, hopefully by now they are resolved.
[skip ci]
2021-03-08 17:46:40 +01:00
Bram Matthys d42147d56c Update shipped C-ARES lib to 1.17.1 (19-Nov-2020) 2021-03-08 11:10:11 +01:00
Bram Matthys c352dcb8aa Update shipped PCRE2 lib to 10.36 (04-Dec-2020) 2021-03-08 11:07:10 +01:00
Bram Matthys f4b14330a8 Update curl-ca-bundle: Certificate data from Mozilla as of: Tue Jan 19 04:12:04 2021 GMT
https://curl.se/ca/cacert-2021-01-19.pem
[skip ci]
2021-03-08 11:00:33 +01:00
Bram Matthys 82af21639c Fix for -Werror=unused-result 2021-03-08 10:43:36 +01:00
Bram Matthys 1f47cc7824 Support for dated log files such as log "ircd.%Y-%m-%d.log" { }
Suggested by Amiga600 in https://bugs.unrealircd.org/view.php?id=5784

This also fixes a bug with log::maxsize on Windows (cannot overwrite
existing file with .old).

It simplifies the logging code a little and makes it a tad more readable.

And it adds an unreal_strftime() function to make things easy.
2021-03-08 10:37:28 +01:00
Bram Matthys 28bf68f39b More than 100 lines within an if when you can use if ! w/continue.. pff. 2021-03-08 09:53:28 +01:00
Bram Matthys 8a16a7392f Don't stat() the logfile if user has no log::maxsize 2021-03-08 09:51:00 +01:00
Bram Matthys 7b655a5e17 Merge two identical #ifdef's 2021-03-08 09:49:44 +01:00
Bram Matthys 29e8c2c770 Mention './unrealircd genlinkblock' as it should work in 5.0.8+. 2021-03-08 09:45:11 +01:00
Bram Matthys 44f8bea3c4 Minor crash reporter fixes and add command line crash test to test it. 2021-03-08 09:12:53 +01:00
Bram Matthys 636b068062 New option allow::global-maxperip, defaults to allow::maxperip+1.
Suggested by Jobe and PeGaSuS in https://bugs.unrealircd.org/view.php?id=5802
2021-03-07 11:30:02 +01:00
Bram Matthys 4bd0969583 spamfilter { } blocks caused some confusing whitespace in stats for
the spamfilter. Only after a rehash it showed the me::name as the
setter. From now on we just display -config- in the setter field,
like we do for all the other TKLs as well (ELINE, ban xyz, etc).
2021-03-07 10:43:47 +01:00
Bram Matthys 1854bfffd0 ELINE and except ban for type 'F' (spamfilter) were not working.
Reported by armyn in https://bugs.unrealircd.org/view.php?id=5820
2021-03-07 08:46:24 +01:00
Bram Matthys 17bdd6de1e Use different temporary filename. Not really important normally but
if running multiple ircds from the same directory you sometimes get
weird messages otherwise (not that we really support such a thing
but i use it while dev'ing).
2021-03-06 18:55:10 +01:00
Bram Matthys 94fea88319 CR+LF->LF conversion for help.nl.conf.
[skip ci]
2021-02-28 07:54:33 +01:00
Bram Matthys dc40d27cd8 Move set::anti-flood::unknown-flood-* to set::anti-flood::handshake-data-flood
which is a new block, documented at:
https://www.unrealircd.org/docs/Set_block#set::anti-flood::handshake-data-flood
The reason for this is better naming and allowing to tweak ban-action.
2021-02-28 07:52:33 +01:00
Bram Matthys 94b8f6575e Just some code cleanup (variable renaming) in tkldb, nothing more...
Make it consist tkldb/TKLDB instead of still some tkl_db/TKL_DB.
2021-02-11 08:19:33 +01:00
Bram Matthys 9e82f13c54 Fix bug in tkldb if ircd is rehashed every <300 secs it would never save.
Not reported by anyone, but yeah.. who knows there is someone out there
that does this :D.
Also make it work the same like channeldb by spreading the event.
2021-02-11 08:16:03 +01:00
Bram Matthys f1e3b7dcdf Tweak channeldb saving to be further apart from tkldb saving. 2021-02-11 08:02:58 +01:00
Bram Matthys 06d90a9d46 Behave better when multiple HOOKTYPE_RAWPACKET_IN modules are active.
If a module returns 0 ("UnrealIRCd please do not process this packet")
then don't call the next module in line (also because that one might
then change the return value to something different, which is bad).
2021-02-10 14:24:17 +01:00
Bram Matthys 25f8b8e4c7 Remove unnecessary include (was merged in sys.h a while back) 2021-02-10 14:22:30 +01:00
westor eb76ae7c67 Fix nocodes error message: tell user it blocks color also (#131) 2021-02-06 07:45:27 +01:00
k4bek4be b22e1c1a43 Fix call to HOOKTYPE_UMODE_CHANGE in SVSMODE
Was accidentally called with parameter being source (services, often nickserv) instead of the target user
2021-02-06 07:44:31 +01:00
Bram Matthys c71214cefe Rename nvplist functions to match the rest, fix resource leak,
and move the functions to list.c where they belong.
nvplist_add()		-> add_nvplist()
nvplist_add_fmt()	-> add_fmt_nvplist()
(new)			-> free_nvplist
2021-02-02 18:39:17 +01:00
Bram Matthys d4e0ee9431 *NIX: Bump default MAXCONNECTIONS from 8192 to 16384.
That is, when in "auto" mode, which is like for 99% of the users.
NOTE: the sytem may still limit the actual number of FD's to
a lower value, depending on the value of "ulimit -n -H".
2021-02-01 13:27:08 +01:00
Bram Matthys d84c820d5a Some text changes
[skip ci]
2021-01-31 19:47:01 +01:00
Bram Matthys 9d85b112dc Fix typo
[skip ci]
2021-01-31 18:56:18 +01:00
Bram Matthys 1baf5f9f7d Show reputation score and some other info in "Client connecting"
notices to IRCOps and in ircd.log.
See the release notes for more details.

Module coders:
You can use HOOKTYPE_CONNECT_EXTINFO to add your own additional
information as well. See get_connect_extinfo() for inspiration.
Use nvplist_add() or nvplist_add_fmt() to easily add your info
to the list.

Module coders II:
Small note: this moves the sending of the far connect notice
to /under/ HOOKTYPE_REMOTE_CONNECT instead of /above/.
2021-01-31 18:30:49 +01:00
Bram Matthys 82da314cf4 Dev docs: document svid better
[skip ci]
2021-01-29 19:12:51 +01:00
PeGaSuS e90d661e8d Fixed typo in ELINE example flags, from f to F (spamfilter) (#130) 2021-01-29 19:11:36 +01:00
Bram Matthys a6da4a5823 Small text fix on Windows for unrealsvc.exe usage instructions.
The command is 'unrealsvc' and not 'unreal'.
Also update copyright a bit since I have at least been updating
this file since 2006 (e679a6760b).
2021-01-27 17:11:17 +01:00
Bram Matthys b65584226c win_log(): avoid double LF in win_log() caused by previous commit. 2021-01-23 12:27:43 +01:00
Bram Matthys 9204939a7f Windows: improve logging on-boot, especially when running as a service.
When booting no log files are open yet as we have not parsed any log { }
entries yet. On *NIX we log to stderr during that stage.
On Windows it varies: when running in GUI mode we save the log to a
buffer and display it after booting in a dialog.
When running as a service on Windows we previously wrote SOME entries
to service.log, but other entries were not logged or shown anywhere.

This makes both GUI and Service-mode on windows log all ircd_log()
calls with LOG_ERROR, instead of only config_status(), config_warn()
and config_error() messages.

This also removes config_progress() which isn't used by anything.

Oh, and it also fixes a memory leak in the Windows boot code, a leak
that nobody would have noticed anyway, but still.
2021-01-23 12:22:48 +01:00
Bram Matthys 3a922d6ed5 Disable handshake delay for users that are exempt from blacklist checking.
The handshake delay exists so results from DNSBL's can be checked before
the user is fully online. Whenever someone is exempt from DNSBL checking
it serves no purpose, so we mark it that the user has no handshake delay.
This will speed up connecting by up to 2 seconds (by default).
Also updated WebIRC example to suggest this now:
https://www.unrealircd.org/docs/WebIRC_block#UnrealIRCd-side
2021-01-17 08:25:14 +01:00
Bram Matthys cd967a6ea6 Always exempt 127.* from gline, kline, etc.
The exempted ban types are only ones that will affect other connections as well,
such as gline, and/but not policy decissions such as bypassing qlines or maxperip.
Currently the list is: gline, kline, gzline, zline, shun, blacklist,
                       connect-flood, unknown-data-flood.
Suggested by PeGaSuS and others in https://bugs.unrealircd.org/view.php?id=5806
2021-01-17 08:06:23 +01:00
Bram Matthys 5034c2306b Fix "./unrealircd upgrade" so it actually works with GPG.
And if it is actually used/installed then make it a little bit
harder to bypass the case where the digitale signature does not match.
And yes, the bypass option does exist because in the future we
may have a different signing key. Who knows from what old version
people may upgrade years from now, after all.
2021-01-10 18:27:33 +01:00
Bram Matthys 0fd9c2ee6f Add doc/KEYS which contains the public key(s) used to sign UnrealIRCd releases 2021-01-10 16:26:22 +01:00
Bram Matthys 0e125abc36 New: "./unrealircd upgrade" to upgrade to latest UnrealIRCd release. 2021-01-10 16:22:33 +01:00
Bram Matthys 011ebf3ce7 Fix for previous. "Channel joinfloodflood" -> "Channel joinflood" :D 2021-01-10 08:05:53 +01:00
Bram Matthys ebed68f636 Channel mode +f source code cleanup 2021-01-10 07:55:56 +01:00
Bram Matthys f03f5bd974 Bump version to 5.0.9-git 2021-01-10 07:45:44 +01:00
Bram Matthys 380e039d95 *** UnrealIRCd 5.0.8 *** 2021-01-08 15:32:55 +01:00
Bram Matthys d558ea7ef0 Update release notes
[skip ci]
2021-01-08 15:15:44 +01:00
Bram Matthys 315f2ba4a9 Mention the FAQ URL if a link is rejected due to incorrect clock. 2021-01-04 13:23:00 +01:00
Bram Matthys 9377b66754 UnrealIRCd 4 is no longer supported
[skip ci]
2021-01-01 21:05:27 +01:00
Bram Matthys 646bdbb872 Allow ! in extended server bans, such as /GLINE ~G:!tls-users.
Previously it rejected ! for all type of *LINES to avoid users
making the mistake of banning nick!user@host in a *LINE.
Note that for non-extended-server-bans the ! is still forbidden.
2021-01-01 18:43:24 +01:00
Bram Matthys fa15ec1bec Add default security-group "tls-users" and "tls-and-known-users" 2021-01-01 18:42:27 +01:00
Bram Matthys b383197ae6 UnrealIRCd 4 no longer supported. 2020-12-31 14:27:10 +01:00
Bram Matthys 99defea611 ** UnrealIRCd 5.0.8-rc1 ** 2020-12-30 14:14:33 +01:00
Bram Matthys 5e068a2f28 Add symlink 'source' in the installdir to the UnrealIRCd source.
Useful for scripting purposes.
2020-12-30 13:44:50 +01:00
Bram Matthys 2f7b73fe10 Fix Windows build tests
[skip ci]
2020-12-30 13:16:24 +01:00
Bram Matthys 53d23038e5 Support for security groups and new +b ~G:unknown-users:
* There are two security groups by default: known-users and unknown-users.
  See https://www.unrealircd.org/docs/Security-group_block
* New extended ban ~G:securitygroupname, with the typical usage being
  MODE #chan +b ~G:unknown-users, which will ban all users from the
  channel that are not identified to services and have a reputation
  score below 25.
2020-12-30 12:42:56 +01:00
Bram Matthys f45a3a912f Make the binary print out a helpful message pointing to the script,
in case someone does like 'bin/unrealircd mkpasswd' or something.
2020-12-29 15:07:28 +01:00
Bram Matthys 04a45e8b83 Fix targetfloodprot module not exempting U-Lines (only matters if not +o).
It is highly recommended that services pseudo users all have +o since
there are likely many places where ULines don't bypass a restriction while
opers do. But still, this particular issue has been fixed, it caused
unexplained loss of messages which looked rather mysterious.
Reported by severinmueller in https://bugs.unrealircd.org/view.php?id=5799
2020-12-29 12:44:54 +01:00
Bram Matthys fc159fd131 Change set::modes-on-oper in example confs to +xws
Previously it was +xgws which was confusing since we don't have a +g
Reported by PeGaSuS.
2020-12-27 18:39:23 +01:00
Bram Matthys fff989c46e Make windows compile again by dropping const stuff added 2 commits ago
in reputation commit. Not important anyway.
2020-12-16 15:59:30 +01:00
Bram Matthys b2ceb9c825 Fix warning about certificate expiry appearing every 43 seconds
rather than twice a day. Reported by PeGaSuS in
https://bugs.unrealircd.org/view.php?id=5797
2020-12-16 15:40:02 +01:00
Bram Matthys 9d88bb6fe9 Add /REPUTATION #channel and /REPUTATION <NN
The reputation command (IRCOp-only) has been extended to make it
easier to look for potential troublemakers:
* ```REPUTATION Nick``` shows reputation about the nick name
* ```REPUTATION IP``` shows reputation about the IP address
* ```REPUTATION #channel``` lists users in channel with their reputation score
* ```REPUTATION <NN``` lists users with reputation scores below value NN
2020-12-06 16:37:31 +01:00
Bram Matthys fd41806079 Update release notes a bit (interim update only)
[skip ci]
2020-12-06 16:08:09 +01:00
Bram Matthys 4b53b02299 Add set::max-stats-matches which limits output such as '/STATS gline'
to the specified number of lines. This defaults to 1000.
This will prevent IRCOps from being flooded off ("Max SendQ exceeded")
if they list all *LINES and there are thousands.
In the newly introduced error message, after too many matches,
we also kindly point out to use filters like '/STATS gline +m *.nl'
2020-12-06 15:50:28 +01:00
Bram Matthys 8c04036fd8 Send ERR_ALREADYREGISTRED for USER and PASS rather than ERR_NOTFORUSERS.
Reported by Koragg in https://bugs.unrealircd.org/view.php?id=5766
2020-12-06 09:46:12 +01:00
Bram Matthys adc2a9774f Mention Q-line reason in server notices. Suggested by ivanp in
https://bugs.unrealircd.org/view.php?id=5774
2020-12-06 09:19:11 +01:00
Bram Matthys ece2dc9c12 Remove redundant output on './unrealircd version'. 2020-12-05 16:23:45 +01:00
Bram Matthys d573f77b10 API doc tweak
[skip ci]
2020-12-04 10:10:50 +01:00
Bram Matthys 7002139fad Add self-test to module manager for those who rm -rf their source directory. 2020-11-28 11:31:31 +01:00
Bram Matthys 7a3876e7b2 Doxygen U5 API docs: add examples to sendto_one(), sendto_channel()
and sendnumeric().
2020-11-24 19:27:22 +01:00
Bram Matthys f494707a47 Doxygen: document list_for_each_entry with examples and
add 'channels' to the page as well.
2020-11-23 10:25:49 +01:00
Bram Matthys 10e01aee0a Doxygen U5 API docs: document find functions and send API
See https://www.unrealircd.org/api/5/
And more specific: https://www.unrealircd.org/api/5/modules.html
2020-11-23 08:55:45 +01:00
Bram Matthys ca84a5cfc4 Leave 5.0.7 release notes for historic purposes.
Or: whoops.. shouldn't have deleted that.
[skip ci]
2020-11-22 18:40:14 +01:00
Bram Matthys 180653dce5 Set version to 5.0.8-git 2020-11-22 18:37:37 +01:00
Bram Matthys e15ea8f34d Mention EOL date of U4 in SECURITY.md for clarity. 2020-11-22 18:34:31 +01:00
Bram Matthys 836a3000bd Update some comments in ircd.c, nothing fancy. 2020-11-22 18:34:20 +01:00
Bram Matthys f808e56ffb Fix counting clients twice. Reported by Le_Coyote. 2020-11-22 16:03:42 +01:00
Bram Matthys bde91bcc5c Finish Hook API doxygen docs, ~100% done now. 2020-11-22 12:26:30 +01:00
Bram Matthys 6dcecd7866 Update doxygen index
[skip ci]
2020-11-21 19:13:31 +01:00
Bram Matthys fcb1767500 Update module API doxygen docs: the hook docs are now 80% done. 2020-11-21 19:08:17 +01:00
Bram Matthys 8372224c01 Add vertical spacing to function prototypes
[skip ci]
2020-11-21 18:10:29 +01:00
Bram Matthys f8343c2e2a Move s_die definition to h.h. 2020-11-18 07:47:26 +01:00
Bram Matthys 8d7e25e50e Make get_file_time() and get_file_size() available via h.h.
And move those 2 functions plus file_exists() to misc.c.
2020-11-16 18:21:27 +01:00
Bram Matthys 20b2975a2c Hmm.. genlinkblock is not very useful without this. 2020-11-16 18:14:52 +01:00
Bram Matthys ecabef1654 Fix whitespace in ./Config
Indent properly and use tabs, not spaces.
Hopefully not breaking anything in the process....
2020-11-13 19:29:16 +01:00
Bram Matthys e48cf87d52 Some more explanation on certificate generation if you are first installing.
Users who already have an SSL certificate won't be bothered by this,
just like before.
2020-11-13 19:17:54 +01:00
Bram Matthys 8720c846a1 And some more hook documentation... 2020-11-08 18:48:11 +01:00
Bram Matthys 8f7e40a6dc Compile fix for gcc with previous commits. 2020-11-08 16:42:39 +01:00
Bram Matthys c369551721 Commit first 40% of Hook API Documentation in doxygen.
The remaining 60% consists of placeholders at the moment.

Note: if you are running git then don't try to live-reload these
changes, ircd must restart.
2020-11-08 16:16:59 +01:00
Bram Matthys 0ae05dcd60 Remove unused code in secureonly. This isn't used since the +z/+Z split. 2020-11-08 10:02:27 +01:00
Bram Matthys 132b44219d Create SECURITY.md 2020-11-01 14:57:21 +01:00
k4bek4be da6ccb639d Fix a warning typo (#126)
Deprecated warning mentions set::oficial-channels, which should be set::official-channels
2020-10-22 19:37:41 +02:00
James Park-Watt 45fd0625e5 Fixed a typo in Config script (#127)
Config script referenced conf/tls/server.crt.pem in an informational message.
It should be conf/tls/server.cert.pem
2020-10-22 19:36:53 +02:00
Robert Scheck 831737f13e Exit with a successful return code upon receipt of SIGTERM (#125) 2020-10-20 07:26:57 +02:00
Robert Scheck ebe0a43828 Add $(DESTDIR) support for 'make install' (#124)
When packaging UnrealIRCd as RPM, 'make install' needs to install
the files into $RPM_BUILD_ROOT rather into '/'. Just changing the
paths via ./Config or ./configure does not fit, because otherwise
UnrealIRCd is finally looking for $RPM_BUILD_ROOT/etc/unrealircd/
rather /etc/unrealircd/. It's fully backwards-compatible, because
normally $DESTDIR is not being passed.
2020-10-19 17:12:46 +02:00
Bram Matthys 75efe02040 And add config check for X509_get0_notAfter().
For our Ubuntu 16 friends.
2020-10-11 15:56:06 +02:00
Bram Matthys b3510c5da8 Fix for previous commit with OpenSSL <1.1.0 (Debian 8, Ubuntu 16, ..)
Thank you BuildBot.

This means on older OpenSSL's we are not going to have certificate
expiry checks. Those OpenSSL versions were deprecated by the OpenSSL
team itself, so yeah then you will miss out a few things.
2020-10-11 15:39:27 +02:00
Bram Matthys 6778b3e26d Warn when SSL/TLS certificate is expired or expires soon (<7d).
Since an expired certificate usually means that users cannot connect
we will actively warn all IRCOps about this situation twice a day.
2020-10-11 15:00:09 +02:00
Bram Matthys 8619d1e763 Add optional allow::options::reject-on-auth-failure, as requested
by armyn in https://bugs.unrealircd.org/view.php?id=5769.

The default behavior in 5.x is to continue matching:
allow { ip *@*; class clients; maxperip 2; }
allow { ip *@*; password "iwantmore"; class clients; maxperip 10; }
This so users who provide a password get additional rights,
such as a higher maxperip or a different class, etc.
If the user connects without a password then we simply continue
to the next block and use the general block with only 2 maxperip.

However, some people want to use passwords to keep other users out.
That is entirely understandable as it is an 'allow block' after all.
For example:
allow { ip *@*; class clients; maxperip 2; }
allow { ip *@*.nl; password "tehdutch"; class clients; maxperip 2; options { reject-on-auth-failure; } }
In this case anyone without the correct password will be rejected access.
2020-10-11 09:24:11 +02:00
Bram Matthys 00fa88daee Remove special code for '/who nick' and replace it with generic code
if someone searches explicitly on a nick name and that user exists.

This fixes a bug where doing '/who name a' would return only 1 result
if 'name' exists as a nick, even though multiple people with the
same account 'name' are online and visible to the user, as
reported in https://bugs.unrealircd.org/view.php?id=5761 by Koragg.
2020-10-11 08:37:22 +02:00
Bram Matthys 9c85cd5bc6 *** UnrealIRCd 5.0.7 release *** 2020-10-10 15:04:18 +02:00
Stanley 893dd84aaf Added help.nl.conf (Dutch), contribution from Stanley (#121)
Co-authored-by: DjSxX <46792280+DjSxX@users.noreply.github.com>
2020-09-30 17:49:01 +02:00
Bram Matthys f2d49eed04 Reputation used the score of the WEBIRC IP rather than the end-user IP.
This resulted in high reputation scores for all WEBIRC users.
Reported by DeviL.
2020-09-28 17:41:37 +02:00
Bram Matthys 5286edc0ef Make ./Config import settings from 5.0.6. 2020-09-28 10:23:56 +02:00
Bram Matthys 2d90245626 ** UnrealIRCd 5.0.7-rc1 ** 2020-09-28 10:04:06 +02:00
Bram Matthys 35ee1eb28a Some more small release note changes
[skip ci]
2020-09-28 09:13:48 +02:00
Bram Matthys f424a0560a Update release notes 2020-09-28 09:08:17 +02:00
Bram Matthys e62bad9924 Make it "End of /OPERMOTD command" at end of OPERMOTD.
Reported by bitmaster in https://bugs.unrealircd.org/view.php?id=3895
2020-09-27 20:21:55 +02:00
Bram Matthys b4b7908612 Fix '/STATS b' and '/STATS badword' not working.
Reported by CoreDuo in https://bugs.unrealircd.org/view.php?id=4722
2020-09-27 18:20:34 +02:00
Bram Matthys b01cbff3e1 Add message tags (such as server-time) to PONG.
Requested by GaMbiTo- and KiwiIRC authors in
https://bugs.unrealircd.org/view.php?id=5758
2020-09-27 16:57:28 +02:00
Bram Matthys 42da15bb6e Minor release note updates
[skip ci]
2020-09-27 12:27:47 +02:00
Bram Matthys 61e8c8d851 Fix labeled-response causing two lines in one websocket frame.
This goes against our guarantee of 1 IRC line = 1 websocket frame.
Reported by k4be in https://bugs.unrealircd.org/view.php?id=5708
2020-09-27 12:17:02 +02:00
Bram Matthys 9002c92062 Set version to 5.0.7-git and start on some early release notes. 2020-09-26 14:28:41 +02:00
Bram Matthys 57d0efbc58 Recode textbans so voiced users cannot bypass them.
Reported by Adanaran in https://bugs.unrealircd.org/view.php?id=5698

Although voiced users normally bypass bans, it is not really logical
for them to bypass filtering of banned words, since that is normally
a policy decission by channel management. So +v will not bypass it.

1) The problem is that this is enforced at the ban layer API.  The extban
routines, textban in this case, are not called when the user is voiced,
because voiced users bypass bans.  If we would change that in the ban API
then voiced users can also no longer talk through (=bypass) regular +b or
other extended +b such as ~a (account) etc.

2) I figured we would then make +T not use the ban API but the
can_send_to_channel hook instead.  However, then you have to do manual
looping through bans and such, it's rather ugly from a coding point of view,
and you risk "missing" things like ~T stacked with ~t.

3) Then I went back to look if the ban API could be changed by having the
textban module set a flag and then the ban api would call that specific
module still for voiced users.  While starting on that, unfortunately things
(variables, arguments) cascaded quickly into having to change all kinds of
underlying functions that would break the module API.

4) I then went back to option 2 and implemented it, trying to deal
   with all its caveats.
2020-09-26 13:43:46 +02:00
Bram Matthys 5320d54e8e Disallow ~T with any action extban, eg ~n:~T:censor:xyz.
We still allow timed bans though, eg ~t:1:~T:block:*whatever*
2020-09-26 12:49:58 +02:00
Bram Matthys 3701ce9a43 Document existing extended ban options. 2020-09-26 12:49:44 +02:00
Bram Matthys 02f0d059c5 hideserver::disable-links did did not disable /LINKS.
Reported by Apocalypse32 in https://bugs.unrealircd.org/view.php?id=5753
Probably since 5.0.0, due to my mass command api changes.
2020-09-26 12:16:17 +02:00
Bram Matthys a02f94f867 Clean up WHOX a bit and fix WHO hiding yourself if not in any channels,
reported by Koragg in https://bugs.unrealircd.org/view.php?id=5757.

This changes the following in the code of who_global():
1) We initialize all the 'marked' users to zero at the beginning,
   and remove the previously unmarking in the bottom loop that
   shouldn't have anything to do with it. Now there's "no way"
   to screw up initialization of marked users.
2) Check for marked users in the bottom loop.
3) Thanks to #1 and #2 we can now easily add simple logic like
   not skipping when client==acptr.
4) Similarly, we can remove checks for +i/-i in who_common_channel(),
   and as a bonus we will list common channel results altogether
   in the WHO result, rather than first +i on common and then at the
   very end the remaining -i (which may also be in common channels).

All in all, the code is now more like how I would write it, rather
than the original. It's now harder to screw things up if you change
some visibility or searching logic here or there.
2020-09-26 08:43:51 +02:00
Bram Matthys 578f8f248c Warn user when undocumented set::ssl::dh / set::tls::dh is present.
That option specified a Diffie Hellman parameter file. Since
UnrealIRCd 5.0.0 we no longer process this option.
This option has never been documented in the wiki docs.
We prefer and use ECDHE/EECDH with SSL_OP_SINGLE_ECDH_USE since 2015
to provide Forward Secrecy in SSL/TLS. And indeed, by now in 2020,
any properly maintained software uses it and old DH(E) usage has
fallen to less than 1%.

What this patch does is remove the unused code (since Dec 2019) and
show a warning if you have a ::dh config directive, so that at least
you are informed that it is unused/ignored. Since it was undocumented
it probably hardly affects anyone, but still, it is proper to inform.
2020-09-12 09:38:17 +02:00
Bram Matthys fea2522067 Fix memory leak on './unrealircd reloadtls' / '/REHASH -tls'
Reported by NoXPhasma in https://bugs.unrealircd.org/view.php?id=5745
2020-08-29 15:05:41 +02:00
Bram Matthys 8bed1cb42e Channel mode +l is now limited between 1 and 1 billion, so positive
numbers only. This makes things more logical for end-users.
This fixes https://bugs.unrealircd.org/view.php?id=5746,
bug reported by KindOne.
The same issue was also fixed by previous commit, but still:
it is better to limit things to a narrower range, this so you
don't get different behavior depending on the CPU a server uses.
2020-08-29 14:40:09 +02:00
Bram Matthys 10ecbffcaa Fix irc*printf handling of certain negative numbers 2020-08-29 14:13:58 +02:00
Moses f5132176b7 Baltics nickchars support (#119)
This adds support for latvian-utf8, estonian-utf8 and lithuanian-utf8
in set::allowed-nickchars. Patch from moseslecce.

Co-authored-by: David Lecce <3292014+davidlecce@users.noreply.github.com>
2020-08-26 07:17:07 +02:00
Bram Matthys db79823578 If no set::modes-on-connect is present we now default to +ixw.
This should be rare, since modes-on-connect is in the example
configuration file with +ixw since 2003, but still... just in
case someone completely misses the modes-on-connect configuration
item, then make sure that we have a safe and good default.
2020-07-25 19:22:50 +02:00
Bram Matthys 13fff82a56 Update version in Windows manifest 2020-07-15 19:55:19 +02:00
Bram Matthys 145ffb6d37 Fix "HISTORY" before 5.0.6 release. 2020-07-15 14:05:27 +02:00
Bram Matthys 422244a2e5 ** UnrealIRCd 5.0.6 ** 2020-07-15 13:47:49 +02:00
Bram Matthys f9e8df1972 Update release notes, add header.
[skip ci]
2020-07-15 13:44:47 +02:00
Bram Matthys dd57e08b18 UnrealIRCd 5.0.6 release notes
[skip ci]
2020-07-15 13:42:21 +02:00
Bram Matthys 1a349d041d Start writing release notes
[skip ci]
2020-07-15 08:52:41 +02:00
Bram Matthys 24e90c8955 History playback on join was not limited.
set::history::channel::playback-on-join::lines and
set::history::channel::playback-on-join::time were ignored,
the limit in the +H channel mode was used instead.
Reported by k4be in https://bugs.unrealircd.org/view.php?id=5707
2020-07-15 08:24:45 +02:00
k4bek4be c81b4b9d9e Call HOOKTYPE_ACCOUNT_LOGIN on UID message too (#112)
Module coders: this will also fire on server-syncs. If you want to skip
such events then check for IsSynched(client->srvptr)
2020-07-14 19:51:46 +02:00
Bram Matthys 5c566053d4 Merge branch 'unreal50' of github.com:unrealircd/unrealircd into unreal50 2020-07-14 19:33:52 +02:00
Bram Matthys 3894aeba97 Fix double batch on HISTORY #channel.
Reported by k4be in https://bugs.unrealircd.org/view.php?id=5709
2020-07-14 19:25:07 +02:00
k4bek4be 812d5bcc73 Fix sending RPL_LOGGEDIN on logout. (#111)
Move all client login notifications into a single place (the SASL module).
Reported by westor in https://bugs.unrealircd.org/view.php?id=5688
2020-07-14 18:39:10 +02:00
Bram Matthys 70496acfbe Fix spamfilter with tempshun action: was not blocking the message.
The tempshun was applied, but the 'trigger' message was let through.
Reported by armyn in https://bugs.unrealircd.org/view.php?id=5723
2020-07-14 08:30:29 +02:00
Bram Matthys ca6630a2fb Fix "called a function you should not call" server linking error that
happens if all of the following are true:
1) You use link::outgoing::tls-options (or ssl-options)
2) You do a REHASH -tls (or REHASH -ssl)
3) You do NOT do a regular REHASH
4) You try to link to the server in such a link block (outgoing!)

In other words: the problem may happen if you try to link after
a Let's Encrypt cert renewal, unless there has been a regular
REHASH between that and the outgoing linking attempt.

Reported by k4be and Le_Coyoto in https://bugs.unrealircd.org/view.php?id=5607
2020-06-26 15:11:01 +02:00
Bram Matthys faeb644b82 Require set::who-limit to be 1 or higher.
Confusion reported by armyn in https://bugs.unrealircd.org/view.php?id=5717
2020-06-26 07:23:47 +02:00
Bram Matthys b23e64cb2e Fix crash if configuration file contains empty set::cloak-method. 2020-06-25 07:29:05 +02:00
Bram Matthys 7901d61e92 Add Spanish help.conf (conf/help/help.es.conf). 2020-06-12 12:10:52 +02:00
Bram Matthys dcb89f933e Fix problem with simultaneous use of websocket and labeled-response,
depending on the module load order. Reported by k4be.
Changes:
* Websocket hooks:
  * Input should be run first
  * Output should be run last
* Labeled-response also had various hook priorities wrong
  * Pre command should be run near-first
  * Post command should be run near-last
  * Close connection (does the flush) should be run near-last
  * Packet should be run near-last
2020-06-10 08:21:20 +02:00
Bram Matthys 53bc8fdf5b Add BOT=B to 005 to indicate the bot user mode.
Suggested in https://github.com/ircv3/ircv3-ideas/issues/43
2020-06-08 08:49:17 +02:00
westor 0e3cfc68bb Fix to display the TLSversion correct on connect (#113)
Previously it didn't display correctly on server notice the TLSv* version on local connection.
Before: TLS_CHACHA20_POLY1305_SHA256
After: TLSv1.3-TLS_CHACHA20_POLY1305_SHA256
2020-06-07 16:13:26 +02:00
Bram Matthys d1d0237f2d ** UnrealIRCd 5.0.5.1 ** 2020-05-29 08:38:20 +02:00
Bram Matthys 3be50cb8d4 Temp quick fix for minor issue as well (#5688).
Proper PR from k4be will be done post-5.0.5.1.
2020-05-29 08:35:10 +02:00
Bram Matthys d2efe01d9b Revert "UTF8 support in spamfilter. We now ship with PCRE2 10.34 and require this"
This reverts commit bc70882bd3.
2020-05-29 08:25:47 +02:00
Bram Matthys 7b211efeb7 Fix NICK change showing up twice with SVSNICK.
Reported by westor in https://bugs.unrealircd.org/view.php?id=5687
2020-05-28 00:31:59 +02:00
Bram Matthys 8213eca7d6 Update release notes 2020-05-26 17:50:48 +02:00
Bram Matthys 9c42c20b3c *** UnrealIRCd 5.0.5 *** (will be published tomorrow) 2020-05-26 17:45:53 +02:00
Bram Matthys df5fd4e537 Adjust default set::anti-flood::target-flood rates to:
set {
    anti-flood {
        target-flood {
            channel-privmsg 45:5;
            channel-notice 15:5;
            channel-tagmsg 15:5;
            private-privmsg 30:5;
            private-notice 10:5;
            private-tagmsg 10:5;
        };
    };
};

Max 45 messages in 5 seconds means max 540 messages per minute,
with a peak of (surprise) 45 messages per 5 seconds...
That should be sufficient for every legit channel, right?
How can you chat if you get more than 9msgs/sec for 5 seconds straight?
Maybe I am even too liberal with these limits?

NOTICE and TAGMSG get lower limits because they are far less used
and have other concerns (eg: ringing a bell for NOTICE).

The default limits may be changed in later versions of UnrealIRCd
based on feedback and more insight in (big) channel rates.
2020-05-25 17:03:36 +02:00
Bram Matthys f56ac9384b Fix for previous... -grin-
Fix for 640caf09a1
2020-05-25 15:09:59 +02:00
Bram Matthys 640caf09a1 Fix silly bug in +f if you lowered the :seconds then it always became :7.
Eg: +f [5m]:30 and then a while later +f [5m]:20 always became [5m]:7.
This due to re-using the same counter in a loop.
2020-05-25 15:00:16 +02:00
Bram Matthys 3acf71458d Module coders: Add CAP_INVERT option. Patch from k4be. 2020-05-25 14:17:22 +02:00
Bram Matthys 15a5905d1b Hardening: add -fcf-protection (Control Flow Enforcement)
This provides ROP hardening, which is actually quite nice.
However, it requires CPU hardware support, which is pretty
non existant at the moment. So, right now, on most systems
this option will do nothing.
2020-05-25 08:21:42 +02:00
Bram Matthys e50b599b2e Hardening: add -fstack-clash-protection
This hardening option is likely not very useful but shouldn't hurt either.
2020-05-25 07:41:39 +02:00
Bram Matthys bf104160d6 Update Windows build to use newest LibreSSL.
[skip ci]
2020-05-24 19:35:42 +02:00
Bram Matthys dff71b9901 Fix Windows build. Yeah, slashes are important. 2020-05-24 19:28:25 +02:00
Bram Matthys efe4fab8a3 Revert "Update PCRE2 to 10.35 (09-May-2020)."
This reverts commit a8e3b2fe59
due to compile issues on Ubuntu 20.04. Bug filed upstream as
https://bugs.exim.org/show_bug.cgi?id=2578
2020-05-24 19:10:58 +02:00
Bram Matthys 740b74df0c Properly export mtaghandlers for clienttagdeny.
[skip ci]
2020-05-24 18:39:02 +02:00
Bram Matthys 60f143acfb Update curl-ca-bundle to Wed Jan 1 04:12:10 2020 GMT
[skip ci]
2020-05-24 17:37:16 +02:00
Bram Matthys a8e3b2fe59 Update PCRE2 to 10.35 (09-May-2020).
The minimum version required is kept at 10.34.
2020-05-24 17:31:59 +02:00
Bram Matthys 30acfcc8c5 UnrealIRCd 5.0.5-rc1 (internal RC, will not be published on site) 2020-05-18 19:28:28 +02:00
Bram Matthys 3bb044dc1c Update a comment
[skip ci]
2020-05-18 15:49:39 +02:00
Bram Matthys af51f6e2b2 Fix ELINE helpop docs regarding antimixedutf8. 2020-05-18 15:29:08 +02:00
Bram Matthys c98eb7c54e Get rid of }; in example and other shipped .conf files.
This is 1,5 years after 459a55245a
and we're on a new series too (5.0), so it was about time.

And YES you may still use }; if you want to. There are no
plans to deprecate or warn about it.
We simply ship with } in the shipped configs because it is
more logical that both { and } don't require a ; rather
than only { not requiring it.
2020-05-18 14:06:57 +02:00
Bram Matthys 5712f0f5d6 Use example.org domain everywhere in example*.conf and help*.conf.
And similarly, use ExampleNET instead of MYNet.
2020-05-18 13:44:52 +02:00
Bram Matthys e7725a3bf2 Reorder things a bit in draft release notes.
[skip ci]
2020-05-17 18:40:12 +02:00
Bram Matthys 528783a2fd Now that we have clienttags, fix this FIXME.
Also, remove unnecessary comment about calling lr_post_command() with
the last two arguments being NULL. We don't use these two variables
inside lr_post_command() after this change anyway.
2020-05-17 08:49:58 +02:00
k4bek4be 0aa5fb6e7c Add CLIENTTAGDENY module. (#108)
It implements the current version of CLIENTTAGDENY isupport token, as defined by IRCv3.
2020-05-16 10:04:33 +02:00
k4bek4be d533483a43 Support both +typing and +draft/typing mtags. (#109) 2020-05-16 09:57:23 +02:00
Bram Matthys 81c7e6ca05 Merge branch 'unreal50' of github.com:unrealircd/unrealircd into unreal50 2020-05-14 09:15:24 +02:00
Bram Matthys 941b745be2 Give an error when trying to place an *LINE that already exists.
Then the oper may decide if the original entry should indeed be
removed and re-added, or if (s)he should not touch it. These are
usually done by mistake anyway.
Updating existing entries by end-users was never intended and did
not work properly anyway (see bug comments). Issue reported by
Le_Coyote and armyn in https://bugs.unrealircd.org/view.php?id=5603
2020-05-14 09:13:49 +02:00
k4bek4be ec39d3c15b Remove unused message tag handlers on rehash (#106) 2020-05-13 19:19:06 +02:00
Bram Matthys 7a4832d337 Fix missing ERROR when using a @label, reported by k4be.
This had to do with the queued packet (in the labeled-response module)
not being sent because the client was freed before the
post packet hook was called.
2020-05-11 19:18:41 +02:00
Bram Matthys 893cc2db99 Update draft release notes a bit with the changes of past few days.
[skip ci]
2020-05-09 12:20:50 +02:00
Bram Matthys 8d2e05f5ef Fix crash when combining +P with a 3rd party module, or actually
any parameter channel mode module loaded after channeldb.
Reported by GaMbiTo, with help from PeGaSuS, Gottem and k4be
in https://bugs.unrealircd.org/view.php?id=5669

It is not safe to call channel mode parameter functions when
unloading modules. Makes sense I think.

We now no longer write the db on rehash, which is something i
didn't like anyway (wasted CPU cycles). The problem was that
one could not just scratch the write db call, as otherwise if
someone rehashes every minute would cause the db never to
be saved. This is because on each rehash the event to write
the db gets rescheduled to +5 minutes in the future.
We now work around that in the same way as connthrottle does.
Obviously it would be better to make the event system itself
deal with this, but that is (way) too much for now.
2020-05-09 11:58:26 +02:00
Bram Matthys 4832559642 LoadPersistentLong() called the wrong function, always raising a warning/error. 2020-05-09 11:51:59 +02:00
Bram Matthys 606a35bed0 Fix crash when using deny link::rule with oversized argument.
Reported by moody in https://bugs.unrealircd.org/view.php?id=5667
2020-05-08 14:58:49 +02:00
Bram Matthys 6a3a2530b1 Fix echo-message not working for TAGMSG. Reported by k4be. 2020-05-08 11:12:48 +02:00
Bram Matthys ae9f06ebae Fix TAGMSG in the user-to-user case being delivered to clients with
an argument too many (" :"). Reported by k4be.
2020-05-08 11:09:31 +02:00
Bram Matthys 666d5631fe Send TAGMSG only to message-tags people. Duh. 2020-05-07 10:54:38 +02:00
Bram Matthys a80364f55a Use https:// rather than http:// in an example. 2020-05-06 18:08:28 +02:00
Bram Matthys 45624ff2ab Set TARGMAX= for TAGMSG to 1 (same setting as we have for NOTICE). 2020-05-06 16:51:05 +02:00
LeCoyote 8c2df61725 Improve antimixedutf8: detect CJK and other scripts (#105) 2020-05-06 12:39:00 +02:00
Bram Matthys 98930785e5 Copy-paste error which turned NOTICEs into PRIVMSGs. -grin- 2020-05-06 11:26:39 +02:00
Bram Matthys cf2eecb0d1 Add set::anti-flood::target-flood and +draft/typing to release notes.
Again, these are still early release notes drafts.
2020-05-06 11:12:46 +02:00
Bram Matthys bf0d00c2b9 Update makefile for Windows build 2020-05-06 11:11:04 +02:00
Bram Matthys 90485453b7 Load typing-indicator module by default (IRCv3 +draft/typing) 2020-05-06 10:56:03 +02:00
Bram Matthys 31d3af22e2 Don't make channel mode +f 't' and 'm' act on TAGMSG...
otherwise people get kicked just for typing :D

We may add a new +f type later on, if there is a need for it.
2020-05-06 10:53:13 +02:00
Bram Matthys a259227424 New feature set::anti-flood::target-flood, provided by targetfloodprot module.
This limits X per Y messages for targets, regardless of sender. See docs:
https://www.unrealircd.org/docs/Set_block#set%3A%3Aanti-flood%3A%3Atarget-flood
2020-05-06 10:43:26 +02:00
Bram Matthys 2a093bb150 Moved CheckNull() to individual set::anti-flood::xx tests and
HOOK_CONFIGTEST with CONFIG_SET_ANTI_FLOOD, rather than a generic
one before processing these. Needed for set::anti-flood::target-limit.
2020-05-06 10:28:37 +02:00
Bram Matthys b8d4cf7763 Actually call moddata_free_channel(channel);
This was a FIXME item that should have been addressed earlier.
We didn't use any MODDATATYPE_CHANNEL in the core up to now so
this was overlooked. We do use it from now on, though, and it
may very well have been used in 3rd party modules already.
2020-05-06 09:04:43 +02:00
Bram Matthys 4e3817b4d5 Initial version of set::anti-flood::target-flood 2020-05-05 20:27:53 +02:00
Bram Matthys 57f524cbed Support for +draft/typing
This is the work from May 3rd.. need to commit it so i can merge the
flood protection that is related to this...
The final implementation will still need tweaking before pushed.
[skip ci]
2020-05-05 20:16:56 +02:00
k4bek4be 331134649f Add Polish translation for help.conf and update the English one (#104)
In English helpop add ELINE and extended server bans, fix some typo's....
2020-05-03 13:33:04 +02:00
Bram Matthys 166a772951 Fix except ban without type not exempting gline due to wrong character
being used ('g' instead of 'G'). Reported by DeviL.
https://bugs.unrealircd.org/view.php?id=5555
2020-05-03 09:41:32 +02:00
Bram Matthys aba3c8e53f Fix set::who-limit documentation and make IRCOps exempt from this limit.
reported by patphobos in https://bugs.unrealircd.org/view.php?id=5657
2020-04-29 16:30:24 +02:00
Bram Matthys 9c10bca2a2 Some more release note updates.
[skip ci]
2020-04-26 16:13:18 +02:00
Bram Matthys 2c703eba6e Make it possible to restrict a command to identified users only, with
no connect-delay restriction. Also remove the 'disable' option since
it is unneeded. You now simply use:
set {
    restrict-commands {
        somecommand {
        }
    }
}
...and the command is disabled.
And you add exempt-identified or exempt-reputation-score if needed.

See https://www.unrealircd.org/docs/Set_block#set%3A%3Arestrict-commands

Note that this also changes some command blocking logic, so I hope
I made no mistake there... only testing will tell.
2020-04-26 16:04:26 +02:00
Bram Matthys f5b3328103 Some more release note updates
[skip ci]
2020-04-26 15:33:05 +02:00
Bram Matthys 616820e5d8 Merge branch 'unreal50' of github.com:unrealircd/unrealircd into unreal50 2020-04-26 15:29:48 +02:00
Bram Matthys a4345d6091 Write some early release notes for 5.0.5 (won't be released soon)
[skip ci]
2020-04-26 15:29:02 +02:00
delthas 0c3b8e5d28 Fix trailing space in RPL_NAMREPLY (#100) 2020-04-26 09:00:09 +02:00
Bram Matthys ef5df81917 Merge branch 'unreal50' of github.com:unrealircd/unrealircd into unreal50 2020-04-26 08:48:56 +02:00
Bram Matthys 097903a246 Anope aliases: remove helpserv. Reported by k4be. 2020-04-26 08:47:42 +02:00
LeCoyote 275dffcd6b French helpop: add missing chmode +D (#102) 2020-04-26 08:45:38 +02:00
Bram Matthys 12ad8003bb Update shipped lib to c-ares 1.16.0 (released 2020-03-13) 2020-04-25 18:39:52 +02:00
Bram Matthys edb0f16942 Make /INVITE bypass ~f:#forward:*!*@* bans. Suggested by Balthazar
in https://bugs.unrealircd.org/view.php?id=5634
2020-04-25 17:06:01 +02:00
Bram Matthys ca2ba56d82 Add is_invited(client, channel) function. 2020-04-25 17:01:41 +02:00
Bram Matthys 0902ed7a99 Fix channel mode +L redirecting even if joining with correct channel key.
Reported by Balthazar in https://bugs.unrealircd.org/view.php?id=5644
2020-04-25 16:43:32 +02:00
Bram Matthys 07d2a92acd Fix build tests. 2020-04-25 09:48:58 +02:00
Bram Matthys 7b7e1a6158 Skip TLS tests on 32 bit due to cipherscan issue (not important to
run on ubuntu 18.04 32-bit anyway since we run these tests on
ubuntu 18.04 64-bit already as well).
2020-04-25 09:41:09 +02:00
Bram Matthys 0c080b3982 Fix crash in tkldb on 32 bit systems. Reported by k4be.
Also, get rid of compiler warnings (we can use C99 types now).
2020-04-25 09:27:31 +02:00
Bram Matthys 29b691f9b6 At least do some parallel compiling by default (make -j4)
if there is no MAKE nor MAKEFLAGS already set.
2020-04-19 19:41:45 +02:00
Bram Matthys bc70882bd3 UTF8 support in spamfilter. We now ship with PCRE2 10.34 and require this
version or newer on the sytem, otherwise we fall back to shipped version.

This fixes https://bugs.unrealircd.org/view.php?id=5187 among others.
It means:
* Case insensitive matches work better in UTF8 now, such as extended Latin.
  For example, a spamfilter on "ę" now also matches "Ę", while previously
  it did not catch this.
* Other PCRE2 features such as https://www.pcre.org/current/doc/html/pcre2syntax.html#SEC5
  are now available. For example you can now set a spamfilter with the regex
  \p{Arabic} to block all Arabic script, or
  \p{Cyrillic} to block all Cyrillic script (such as Russian)
  Use these new tools with care, of course. Blocking an entire language,
  or script, is quite a drastic measure.

All of this was possible because of the new PCRE2_MATCH_INVALID_UTF
compile time option which was introduced in PCRE2 10.34.
This also means we now require at least that PCRE2 version so
everyone can benefit from this new spamfilter UTF8 feature.
Many systems come with older PCRE2 versions so this means we will
fall back to the shipped PCRE2 version in UnrealIRCd. This means
./Config will take a little longer to compile things.

Although there is no indication as of now, but if this feature would
break things heavily then it might get reverted or configurable.
This is also why it was added just after 5.0.4 release and not right
before it, it needs some heavy testing.
2020-04-19 17:45:38 +02:00
Bram Matthys 4d85e162aa Bump git version to 5.0.5-dev. 2020-04-19 17:42:43 +02:00
Bram Matthys a8a8196147 *** UnrealIRCd 5.0.4 *** 2020-04-19 14:14:03 +02:00
Bram Matthys 6b2d0c4b4b Update release notes a bit
[skip ci]
2020-04-19 09:31:47 +02:00
Bram Matthys 775fa47197 Fix crash of currently running IRCd when you are running ./Config.
Reported by k4be and others.
For the crash to occur a few specific things had to happen:
1) The system is missing the argon2 dev library (or it is too old)
   causing us to use the UnrealIRCd-shipped argon2 library.
2) You ran ./Config while there is an existing IRCd running
3) Now some argon2 hash is being checked (eg due to an OPER attempt)
4) Crash

A very similar crash happens (to a LOT more people) when you
run './unrealircd restart' to do the actual upgrade. In such
a case, the old IRCd crashed (the one that was actually supposed
to die anyway). The annoying thing was that the crash reporter
would kick in to report such a crash which was actually quite
harmless. This is actually the same crash as described earlier
so should be fixed as well now.
This variant was reported by Shillos and others.
2020-04-18 16:50:24 +02:00
Bram Matthys 5dda640864 Cipherscan profile for Ubuntu 16.04: uses slightly different order. 2020-04-18 14:46:24 +02:00
Bram Matthys f419a61f94 Ubuntu 20.04 needs this change in order to still allow you to enable
TLSv1.0 or TLSv1.1. Otherwise it is impossible to enable by the application.

We are still going to turn off TLSv1.0 and TLSv1.1 by the end of this year
by default. Ubuntu 20.04 is just a couple of months too early. See also
the various browsers who postponed disabling TLSv1.0/TLSv1.1.

Also, regardless of the above, we want the admins running the IRC server
be able to control this and not having such a breaking change be dependant
on some distro default settings.
2020-04-18 12:40:45 +02:00
Bram Matthys 498f65aaad Improve the error a little bit if unrealircd.conf is missing.
Remove the talk about 3.2.x and and give a bit more context before
providing the link to the docs (which was already there, but still).
2020-04-18 10:22:47 +02:00
Bram Matthys 54a2fad8e3 In configure, swap the order of compiler and make check.
This results in a more general error message that is easy to google.
Also fix the gmake error to complain about make/gmake since it
may also indicate missing make.
2020-04-18 10:06:33 +02:00
Bram Matthys 6d74e64b22 Remove ./Config -clean which was only confusing as it did not clean much. 2020-04-18 08:06:57 +02:00
Bram Matthys e6f34ef22b Remove ./Config -nocache, you can just rm config.settings instead. 2020-04-18 08:05:17 +02:00
Bram Matthys 49d595f60c On *LINE removal it showed the wrong person in the notice sent to IRCOps
(on remote servers). It showed the originally setter and not the remover.
Reported by k4be in https://bugs.unrealircd.org/view.php?id=5629
2020-04-17 09:30:59 +02:00
k4bek4be 26c58dce47 Don't suggest old "posix" spamfilter to opers. (#101) 2020-04-16 19:18:37 +02:00
Bram Matthys a3784479a1 UnrealIRCd 5.0.4-rc1 (internal release candidate) 2020-04-15 17:45:17 +02:00
Bram Matthys bc6079c540 Update release notes
[skip ci]
2020-04-15 09:10:40 +02:00
k4bek4be 1b7c03df94 Send RPL_LOGGEDIN numeric to the user on post-registration SASL too (#97) 2020-04-15 09:04:31 +02:00
Ryan Allen 0b350be64c Removing duplicate line in conf prog header (#98) 2020-04-15 09:02:54 +02:00
LeCoyote cd059839c5 Update of the French help text. Quite a few items were pretty outdated (#99)
Fixed a couple of typos too.
2020-04-15 09:01:37 +02:00
Bram Matthys 68642a4e68 Make ./Config auto-import settings from 5.0.3 / 5.0.3.1. 2020-04-15 08:57:49 +02:00
Bram Matthys 9fab197021 Bump version to 5.0.4-dev. 2020-04-15 08:56:57 +02:00
Bram Matthys 682f9598d4 Add section header wrt upgrade from u4
[skip ci]
2020-04-15 08:49:10 +02:00
Bram Matthys abd0d3c04c Add initial version of release notes for 5.0.4
[skip ci]
2020-04-15 08:47:49 +02:00
Bram Matthys 349ee964cc Make the whox module use ModData. 2020-04-15 08:22:55 +02:00
Bram Matthys a6e6e44103 Set default permission for hide-idle-time back to IRCOps only for now.
We will extend the option later in UnrealIRCd 5.0.5.
This purely has to do with keeping the changes for 5.0.4 small and
contained since that will be mostly a bug fix release.
Since 5.0.5 will have more configurable options for hide-idle-time, I
have already renamed the single option that is exposed in 5.0.4
to set::hide-idle-time::policy since set::hide-idle-time is a
configuration block now, see docs at:
https://www.unrealircd.org/docs/Set_block#set%3A%3Ahide-idle-time
2020-04-15 08:17:53 +02:00
Bram Matthys f437593b8d Rewrite and expand notices+logging with regards to server linking / lost link.
When connecting, use slightly different wording (and use it consistently):
"Trying to activate link with server xyz"

When the connection is lost before synced:
"Unable to link with server xyz"

When the connection is lost after fully synced (eg: minutes later):
"Lost server link to xyz"

Important small changes (other than text):
* Log ERRORs from remote servers to the log (previously only shown to ircops)
* Some link errors could have been previously suppressed due to
  old code assuming other parts of the code would send or log the error
  (this would be the case for an error when calling SSL/TLS write functions)
* More?
2020-04-13 13:36:58 +02:00
Bram Matthys 177d017b06 Tiny code cleanup in conf to use allowed_channelchars_strtoval() 2020-04-13 10:06:11 +02:00
Bram Matthys d25f6f6759 Make set::hide-idle-time 'usermode' the default (regular users can set +I).
I think nowadays, with more attention to privacy, we should make this
option settable by users.

See previous commit for more information, or just visit the doc page at
https://www.unrealircd.org/docs/Set_block#set%3A%3Ahide-idle-time
if you want to use a different setting.
2020-04-13 10:02:05 +02:00
Bram Matthys 5dc1502119 New option set::hide-idle-time which configures when/if idle time should
be hidden. The options are: never, always, usermode, oper-usermode.
See https://www.unrealircd.org/docs/Set_block#set::hide-idle-time for
full documentation.

Suggested by Koragg, via https://bugs.unrealircd.org/view.php?id=5355

Module coders: before disclosing idle time, please call this function:
int hide_idle_time(Client *client, Client *target);
In UnrealIRCd we use it from WHOIS and WHO.
2020-04-13 10:00:27 +02:00
Bram Matthys 55ecfee0a4 Show in /WHOIS if a user is currently shunned. Only works for locally
connected users for technical reasons, so you will have to use double
whois to see it for remotes (/WHOIS Nick Nick) just like with idle time.

Suggested in https://bugs.unrealircd.org/view.php?id=5519
2020-04-13 08:50:18 +02:00
Bram Matthys c5ba66fbf6 UnrealIRCd was ignoring set::ident::read-timeout and using
set::ident::connect-timeout for the read timeout also.
This could lead to failed ident lookups on higher latency connections
because it only gave 3 seconds for the entire ident lookup rather than
the (max) 10 seconds that was intended.
Now both values are properly obeyed (3 for connect, 7 for read
timeouts, by default).
2020-04-12 17:46:23 +02:00
Bram Matthys a992b30a6a Fix for previous commit... -grin- 2020-04-12 17:08:33 +02:00
Bram Matthys 9887ef6955 Fix possible crash when unloading a module with moddata.
This only happens in some circumstances.

From now on EventDel() will simply mark the event as deleted.
The actual freeing is started in DoEvents() after the event loop.
This makes it safe to use EventDel() everywhere.

The previous attempt to fix that issue was
d29a55a8db but it introduced a
new crash issue for a slightly different case, as mentioned in
https://bugs.unrealircd.org/view.php?id=5553
2020-04-12 16:52:43 +02:00
Bram Matthys cf53797121 Fix crash if an authenticated server advertises a wrong hop count,
eg due to self-written services / toying around.
2020-04-12 15:49:11 +02:00
Bram Matthys 016dd20e16 Fix /TEMPSHUN -Nick not removing temporary shun on remote users.
Reported by k4be in https://bugs.unrealircd.org/view.php?id=5580
2020-04-12 15:10:01 +02:00
Bram Matthys 051fd4aebd Fix message tags (such as msgid) missing for JOIN 0 and SAJOIN 0. 2020-04-10 19:28:50 +02:00
Bram Matthys 891435e811 Fix SAJOIN to 0 (part all channels) resulting in a possible desync
when used on a multi-server network. This was due to the PART event
inadvertently not being sent towards the SAJOIN direction.
Bug reported by Cheiron in https://bugs.unrealircd.org/view.php?id=5616
2020-04-10 19:27:39 +02:00
Bram Matthys afb10be770 Channeldb was not properly restoring all channel modes, such as +P,
after a restart. Possibly depending on the module load order.
2020-03-29 08:42:08 +02:00
Bram Matthys 32170b81e3 Mention https://www.unrealircd.org/docs/FAQ#oper-requires-tls on OPER attempt
form an insecure connection. There we explain a bit on the why and how to
configure some random IRC clients.
This also silently adds support for multi-line messages in
set::plaintext-policy::user-message (for warn) and
set::plaintext-policy::oper-message (for warn and deny).
2020-03-06 08:58:55 +01:00
Bram Matthys 6224efdaf3 src/random.c: remove unused variable and reorder struct on Windows. 2020-02-18 14:55:57 +01:00
Bram Matthys 401fcf14aa Fix forced nick change not showing if you were not in any channels.
Eg with anope with the KILL option turned ON, a minute after taking
a registered a nick.
Very similar to c9b88343e2 which was
fixed in 5.0.0-beta1 for non-forced nick changes.
2020-02-12 00:55:29 +01:00
Bram Matthys 30ed989113 *** UnrealIRCd 5.0.3.1 *** 2020-02-11 18:36:52 +01:00
Bram Matthys a807cf026c Use the damn mod handle, what were you thinking!?? 2020-02-11 18:31:49 +01:00
Bram Matthys f585e895a2 Crash reporter: was missing many crashes due to search for core
files that end in .core, while on many systems it is just 'core'
without the dot. Reverted back to U4-style core file finding now.
Thanks to DeviL for helping to trace this issue.
2020-02-11 17:46:03 +01:00
Bram Matthys 8c0a2a1f96 Fix bug in hook prototype for FREE_USER. In most cases you are better
off not using this and you'll want to use the three other hooks anyway:
* HOOKTYPE_LOCAL_QUIT - for local quits of registered clients
* HOOKTYPE_REMOTE_QUIT - for remote quits of registered clients
* HOOKTYPE_UNKUSER_QUIT - for local quits of unregistered clients
  (that is, before they have completed NICK+USER etc)
2020-02-09 14:53:43 +01:00
Bram Matthys b7e2cbea0f Split off existing account-notify functionality to account-notify module
now that we have a hook, so the functionality of it is nicely contained
in a separate module.
2020-02-09 10:48:23 +01:00
k4bek4be 19e672ac22 Module coders: add ACCOUNT_LOGIN hook (#94) 2020-02-09 10:34:06 +01:00
Bram Matthys a283a1cf51 Add link to original UnrealIRCd 5 announcement, for easier navigation.
[skip ci]
2020-02-08 09:03:32 +01:00
Bram Matthys 88b13fed26 Move general comment about UnrealIRCd 5 up in release notes. 2020-02-08 08:44:26 +01:00
Bram Matthys 3febf6bc90 *** UnrealIRCd 5.0.3 *** 2020-02-08 08:39:15 +01:00
Bram Matthys febc4a45f3 Updated labeled-response: drop the draft/ prefix now that the specification
is ratified and also fix a serious flood bug in the implementation.
Oh, and move the loadmodule line to the correct place in modules.default.conf.
2020-02-08 08:09:53 +01:00
Bram Matthys de44549996 Import settings from 5.0.2. 2020-02-05 08:26:38 +01:00
Bram Matthys e0d70f577b Update release notes a bit
[skip ci]
2020-02-03 14:49:16 +01:00
Bram Matthys 50f916fcd8 Windows compile fixes 2020-02-02 19:34:44 +01:00
Bram Matthys 9211e105eb Add unrealircd.org/userhost message tag. Similar to previous, so IRCOps
can see the real host of a user in each message.
2020-02-02 18:12:07 +01:00
Bram Matthys 65a5943e97 userip tag: inherit from remote servers, if able. 2020-02-02 16:46:51 +01:00
Bram Matthys a05c187a56 Fixes for HISTORY command: default value not working and error if +H is
not set on the channel. Reported by westor.
2020-02-02 16:17:02 +01:00
Bram Matthys ed6a2cf3e3 Add new message tag "unrealircd.org/userip" which will communicate
the user@ip of users to IRCOps if the message-tags capability is
enabled. Idea from westor. This is work in progress.
2020-02-02 15:49:21 +01:00
Bram Matthys 63b61d456b Update wiki link
[skip ci]
2020-02-02 13:12:13 +01:00
Bram Matthys a56e3bee8f Fix double free due to recent changes, now that HOOKTYPE_LOCAL_CHANMODE
and HOOKTYPE_REMOTE_CHANMODE are called from the SJOIN code.
We now set the samode argument to -1 if it is an SJOIN server sync,
so chanmodes/permanent won't destroy the channel while processing
the SJOIN. The SJOIN code already takes care of destroying at the end.
2020-02-02 12:57:10 +01:00
Bram Matthys 43a9e74662 Set version to 5.0.3-git and write some early release notes. 2020-02-02 12:33:46 +01:00
Bram Matthys 1ea8443551 Mark history as official module 2020-02-02 12:23:26 +01:00
Bram Matthys 7a38f485ad It helps if you can compile in non-DEBUGMODE 2020-02-02 12:18:09 +01:00
Bram Matthys a8c191b291 Add new command: HISTORY #chan [lines]. This is meant for end-users
so they can fetch more history than the standard on-join history.

In the future we are also likely to implement IRCv3 CHATHISTORY
once that becomes an official specification. However, until it is
specified and until most major clients support it, several years
are likely to pass. It would be a shame to withhold channel
history to many end-users in the meantime when it takes so little
effort from us to provide an easy command.

See also
https://www.unrealircd.org/docs/Channel_history
And in particular the new section:
https://www.unrealircd.org/docs/Channel_history#Playback_frontends
which explains the relationship between on-join playback,
HISTORY and CHATHISTORY.
2020-02-02 11:57:51 +01:00
Bram Matthys b5a205f4f3 Fix /SQUIT for server 2 hops away not working correctly.
Reported by k4be in https://bugs.unrealircd.org/view.php?id=5539
2020-01-31 12:15:36 +01:00
Bram Matthys 63cf5e3d52 Make channeldb/tkldb write errors more uniform.
Use local macro and sendto_realops_and_log()
2020-01-29 09:28:43 +01:00
Bram Matthys 0302ef9733 Operclass permission change: immune:target-limit is now called
immune:max-concurrent-conversations since it bypasses
set::anti-flood::max-concurrent-conversations.
Indirectly reported by westor.
2020-01-29 09:01:25 +01:00
Bram Matthys ead0ad0aa6 Duh.. (fix for previous fixes)
[skip ci]
2020-01-26 10:41:04 +01:00
Bram Matthys 1dc08afa71 Add warning to EventMod() for low every_msec as well. Also, mention the name
of the event to ease debugging.
2020-01-26 10:35:14 +01:00
Bram Matthys eede8d3ff6 Fix warning regarding low ms_every in case of delayed module unloading. 2020-01-26 10:26:07 +01:00
Bram Matthys d482760c6f Fix warning about EventAdd with 2msec value.
Reported by ivanp in https://bugs.unrealircd.org/view.php?id=5540

This cleans things up a bit as well (remove duplicate code).
2020-01-26 10:22:28 +01:00
Bram Matthys 1b07f706bc Remove old STATS Z from stats help. Reported by Lord255 in
https://bugs.unrealircd.org/view.php?id=5541
2020-01-26 10:00:58 +01:00
Bram Matthys c9feaa0b15 Fix : at beginning of gecos being dropped off in intra-WHOIS.
This does NOT "fix" https://bugs.unrealircd.org/view.php?id=5538:
WHOIS nick
:localserver.example.com 311 test nick ident host * :realname
WHOIS nick nick
:remoteserver.example.com 311 test nick ident host * realname
.. because your IRC protocol parser should not care about a :
or a lack of :. For text not containing spaces nor :-prefix there
is no difference in meaning and it should parse to the same.

However, this DOES fix an issue if the realname itself started
with a colon, such as "USER x x x ::something":
WHOIS nick
:localserver.example.com 311 test nick ident host * ::something
WHOIS nick nick
:remoteserver.example.com 311 test nick ident host * :something
.. because that does not have the same meaning and is a real
incorrect drop of a character.
Yeah, I took into account spaces, but not a word starting with :, my bad.
2020-01-26 09:54:54 +01:00
Bram Matthys 6fa7dd8b88 Fix (SA)PART and KICK not being shown to chanops in +D channels for invisible
users (users that have not talked or been otherwise exposed).
Reported by PeGaSuS and LesterClayton in
https://bugs.unrealircd.org/view.php?id=5521 and
https://bugs.unrealircd.org/view.php?id=5542

Bug was due to use of 'CHFL_CHANOP' instead of 'PREFIX_OP' in
the 'prefix' argument of sendto_channel().... fun.
2020-01-26 09:35:04 +01:00
Bram Matthys 21278d2549 ** UnrealIRCd 5.0.2 release ** 2020-01-22 07:11:26 +01:00
Bram Matthys 65afb71111 Fix channel history using the wrong time unit. It is really +H lines:minutes
Release notes:
+* [Channel history](https://www.unrealircd.org/docs/Channel_history) used
+incorrect time internally, resulting in messages expiring too soon.
+The syntax is now really ```/MODE #chan +H lines:time-in-minutes```.
+To make clear that the time is in minutes, an 'm' will be added
+automatically by the server (eg ```+H 15:1440m```).

Bug reported by k4be.
2020-01-21 13:44:51 +01:00
Bram Matthys b5c9ee8ec5 Fix screwing up nearly everything 2020-01-20 18:03:16 +01:00
Bram Matthys 8a6968c933 UnrealIRCd 5.0.2 2020-01-20 17:28:56 +01:00
Bram Matthys fde678aacc Fix clash of CHFL_* flags. Found after bug report from k4be. 2020-01-20 16:00:33 +01:00
Bram Matthys d30f7e006d Specifying multiple channels ("#one,#two") in set::auto-join,
set::oper-auto-join or tld::channel was broken. It worked for the
very first user since boot or rehash, but after that only the
first channel was joined. Reported by PeGaSuS in
https://bugs.unrealircd.org/view.php?id=5535
2020-01-20 15:41:12 +01:00
Bram Matthys f3019f89a1 Fix github hate regarding <>
[skip ci]
2020-01-20 14:13:03 +01:00
Bram Matthys 9aa7b7e52f Update release notes
[skip ci]
2020-01-20 14:12:01 +01:00
Bram Matthys 83db4e07db Always fun that markdown has URI links in reverse order compared to wiki syntax.
[skip ci]
2020-01-20 14:07:29 +01:00
Bram Matthys ce94746898 More release notes updates
[skip ci]
2020-01-20 13:52:06 +01:00
Bram Matthys c65f7101f9 Update ./unrealircd genlinkblock output 2020-01-20 13:46:59 +01:00
Bram Matthys 5b8eba750f Make set::tls::outdated-protocols and set::tls::outdated-ciphers work
again. This ports change 96ee7083c8
from UnrealIRCd 4.x to 5.x. Reported by HeXiLeD.
2020-01-20 13:26:37 +01:00
Bram Matthys 70973ec18b Start writing release notes for 5.0.2. 2020-01-20 13:05:25 +01:00
Bram Matthys 870057d4f3 Add "./unrealircd genlinkblock" which spits out a link { } block. Hmm...
we'll see later if this is a good idea or not.. it has pros and cons.
2020-01-19 19:34:11 +01:00
Bram Matthys ffd0acf5d5 Add ./unrealircd <hot-patch|cold-patch> <nameofpatch> which will be
useful in the future. This would download a specific patch from
the unrealircd.org site, apply it, recompile, and then:
if it's a hot-patch it would rehash
if it's a cold-patch it would print a message that you should restart
the irc server.
2020-01-19 18:16:47 +01:00
Bram Matthys ca22b6282e Fix bounce modes raising a warning to ircops (Unknown channel mode +& from ..)
reported by k4be.
2020-01-18 16:52:01 +01:00
westor 48faed6938 Add information about type on spamfilter add (#90)
On spamfilter add, add  [type: simple] or [type: regex] in the snomask notice and log.
2020-01-17 07:19:13 +01:00
westor abeb5f50d0 Fixes two wrong /ELINE examples bantype (#92)
This should be 'G' and not 'g' :) :D
2020-01-17 07:16:18 +01:00
Bram Matthys e9d8341efd Mention the IRCOp guide in HELPOP OPERCMDS
( https://www.unrealircd.org/docs/IRCOp_guide )
2020-01-12 14:43:21 +01:00
Bram Matthys 094c444250 1) Fix incorrect ELINE documentation for types: gline (G, not g),
spamfilter (F, not f) and qline (Q, not q).
2) Error out when invalid ban exception types are given, so such errors
   don't go undetected anymore. Eg it will now print:
   "ERROR: bantype 'f' is unrecognized (in 'fgkz'). Note that the bantypes are case sensitive. Type /ELINE to see a list of all possible bantypes."
Reported by westor and Mi_01 in https://bugs.unrealircd.org/view.php?id=5528

Also, when at it:
3) Remove type 't' from ELINE syntax docs, which is in fact 'c'
   (which is already present in the list)
2020-01-12 13:19:37 +01:00
Bram Matthys 3456a5f90e Make /ELINE use set::manual-ban-target as well.
(just like KLINE GLINE etc)
2020-01-10 16:16:29 +01:00
Bram Matthys ef9506b95f Add set::manual-ban-target as well (affects /KLINE nick, etc).
Requested by marco500 in https://bugs.unrealircd.org/view.php?id=5029
For more information, see:
https://www.unrealircd.org/docs/Set_block#set::manual-ban-target
2020-01-10 15:54:04 +01:00
Bram Matthys 639c96cc84 https://www.unrealircd.org/docs/Set_block#set::automatic-ban-target
Remove old option set::ban-include-username and replace it with a more
generic option which defines what target a ban should apply to.

Also add some parts of set::manual-ban-target which will follow soon.
2020-01-10 15:43:23 +01:00
Bram Matthys 75eb509344 Make the new extended server bans feature also work in configuration file
Eg:
except ban {
        mask ~S:1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef;
};
And also in ban user { }

For more information see commit 596cf8e7de
and https://www.unrealircd.org/docs/Extended_server_bans
2020-01-10 13:09:16 +01:00
Bram Matthys bfed0893a9 Nothing important: in eline_type_requires_ip() add 'd'.
Although not entirely true, exempting a user from 'd' when using
an extended server ban or IP or ident is not recommended.
The information needed to exempt the user may not be available
at the time of the flood. Better to reject it than have it partially work.
2020-01-10 11:57:34 +01:00
Bram Matthys 596cf8e7de New: extended server bans: exempt by certificate fingerprint and SASL account.
See https://www.unrealircd.org/docs/Extended_server_bans

Examples with ELINE:
/ELINE ~a:TrustedAccount kg 0 This user can bypass kline/gline when using SASL
/ELINE ~S:1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef kgf 0 Trusted user with this certificate fingerprint
It also works with bans, although this would be less common:
/GLINE ~a:EvilAccount
A more useful purpose would be to use ~r (realname):
/GLINE ~r:*some*stupid*real*name*
(Although you could already ban realnames via spamfilter 'u')

For third party module coders:
If you have an extban in group 3 (a "matcher"-extban) then you
can opt-in to support this. You do so at extban registration time:
req.options = EXTBOPT_TKL;
or, if you already had another flag set, like for +I, then:
req.options = EXTBOPT_INVEX|EXTBOPT_TKL;
In any case, you set the .options before you call ExtbanAdd().

Note that if you do indicate support then your is_ok function
will be called like:
extban->is_ok(client, NULL, mask, EXBCHK_PARAM, MODE_ADD, EXBTYPE_TKL);
Important here is the NULL channel (since there is none)

Similarly your is_banned function will be called with BANCHK_CONNECT:
extban->is_banned(client, NULL, banstr, BANCHK_JOIN, &msg, &errmsg);
Here too, it is important to note that channel is NULL.
2020-01-10 11:45:25 +01:00
Bram Matthys 92c5f06e7e Fix incorrect spacing in HELPOP EXTBANS
[skip ci]
2020-01-10 09:06:28 +01:00
Bram Matthys d4826bd5c0 except throttle { } was not working, reported by LesterClayton in
https://bugs.unrealircd.org/view.php?id=5524

On a side note, the new method did work OK:
except ban { mask 127.0.0.1; type connect-flood; }
2020-01-09 18:23:27 +01:00
Bram Matthys edb4bd8cf2 Fix incorrect calls to HOOKTYPE_TKL_DEL causing crashes in modules
that use the parameters of this hook. Reported by Gottem.
2020-01-07 12:34:43 +01:00
westor 11ff177558 Add new option set::connthrottle::webirc-bypass
When set to 'yes' then when ConnThrottle detects a flood it will still
allow WEBIRC users in. The default is 'no'.
Suggested in https://bugs.unrealircd.org/view.php?id=5506
2020-01-05 17:27:11 +01:00
Bram Matthys 07753d112e Update for previous commit. See https://github.com/unrealircd/unrealircd/pull/87 2020-01-05 10:00:34 +01:00
k4bek4be cdea885b32 For ./unrealircd module parse-c-file use real line counts within the C file instead of within the special block 2020-01-05 09:57:29 +01:00
westor 2fa0edf599 Add support for "exempt-webirc" (#88)
Add new config option "exempt-webirc yes;" in set::restrict-commands::<commandname> in order to give exceptions in all WEBIRC user. This closes one of the 3 suggestions in https://bugs.unrealircd.org/view.php?id=5506
2020-01-04 17:39:38 +01:00
Bram Matthys d29a55a8db Update DoEvents() so it is safe to call EventDel() from within
an event handler. Until now it was NOT safe. Now it is.
2020-01-04 16:54:48 +01:00
Bram Matthys bb82138466 UnrealIRCd 5.0.1 2020-01-03 09:38:28 +01:00
Bram Matthys 672153cc4d Last update of release notes for 5.0.1?
[skip ci]
2020-01-03 09:22:12 +01:00
Bram Matthys a2d0194d94 More release note updates
[skip ci]
2020-01-03 09:14:50 +01:00
Bram Matthys 739caa5b88 Some more release note updates
[skip ci]
2020-01-03 09:05:26 +01:00
Bram Matthys ecaec0f062 Update release notes for upcoming 5.0.1 (first part)
[skip ci]
2020-01-03 08:48:09 +01:00
Bram Matthys 27ae0fa340 Fix "ERROR renaming 'data/reputation.db.tmp'" on Windows.
Reported by hc2995, notipa and floffy.
2020-01-02 16:35:24 +01:00
Bram Matthys eca761fcb9 Remove some unused vars in cmd_nick_remote and cmd_nick_local 2020-01-02 15:47:23 +01:00
Bram Matthys d7d673faf2 Multiple fixes related to ban actions:
1) Fix issue if HOOKTYPE_IS_HANDSHAKE_FINISHED rejects the user
2) Fix authprompt issue. We now allow adding the TKL in
   place_ban_host() for soft-kline/etc. Previously all the
   soft-kline/gline/zline/gzline acted like soft-kill.
3) The blacklist module did not allow clients in with action 'warn',
   reported by westor in https://bugs.unrealircd.org/view.php?id=5501
2020-01-02 15:36:42 +01:00
Bram Matthys 7278c9c8f4 @if causes miscounting of line numbers shown in config errors.
Reported by Gottem in https://bugs.unrealircd.org/view.php?id=5509
2020-01-02 13:05:26 +01:00
Bram Matthys b4fb4568fc Possibly fix a hang issue. Reported by westor. 2020-01-02 12:46:37 +01:00
Bram Matthys f8c6996edd Fix SID being shown (eg: 001) when services set the TOPIC. Reported by westor. 2019-12-31 13:26:31 +01:00
Bram Matthys a6b5f17656 Fix WHOX 'm', this should be an AND operation, eg: 'WHO +zo m' lists
IRC Operators (+o) that have +z set.
Similarly, 'WHO +o-z m' lists IRCOps (+o) which are -z.
Issue found while writing the HELPOP WHO documentation.
2019-12-31 13:22:35 +01:00
Bram Matthys 410148ea91 Document the WHOX syntax in /HELPOP WHO 2019-12-31 13:22:01 +01:00
Bram Matthys 77e859459a Add )
[skip ci]
2019-12-31 09:44:33 +01:00
Bram Matthys 114ef14a31 Log who (client) or what (signal) requested a config file /REHASH. 2019-12-31 09:41:19 +01:00
Bram Matthys ca576944e6 Don't test w/services on FreeBSD since it errors mysteriously atm. 2019-12-30 19:06:41 +01:00
Bram Matthys 2c23d4299c Send a better error when JOIN is used for a channel without hash mark (#).
Reported by k4be in https://bugs.unrealircd.org/view.php?id=5514
2019-12-30 19:02:20 +01:00
Bram Matthys fccb3b2f5b Add /ELINE exception type 'm' to bypass allow::maxperip.
In the configuration item you can now achieve the same via:
except ban { mask 1.2.3.4; type maxperip; }
Or even:
except ban { mask { 1.2.3.4; 8.8.8.8; }; type maxperip; }
etc.

Suggested by The_Myth in https://bugs.unrealircd.org/view.php?id=5507

Also, fixed an issue where the IRCd was counting servers as
clients for maxperip, which doesn't make much sense in practice,
so it only counts users now.
2019-12-30 18:23:55 +01:00
Bram Matthys e4d9e001d8 Merge branch 'unreal50' of github.com:unrealircd/unrealircd into unreal50 2019-12-30 17:54:40 +01:00
Bram Matthys c789ac6abe Add channel:override:mlock operclass permission which allows overriding
MLOCK restrictions when services are down (set::services-server).
Suggested by westor in https://bugs.unrealircd.org/view.php?id=5273
By default all opers with the *-with-override privilege have this,
which sounds OK to me.
2019-12-30 17:52:22 +01:00
GottemHams c2e3c8c8b1 Fix antirandom incorrectly defining its own BAN_ACT_WARN -- which is different from the one defined in include/struct.h and used in banact_stringtoval() -- resulting in kills instead of warns 2019-12-30 12:21:15 +01:00
Bram Matthys c215a3621a Use SNI in modulemanager. Not needed for the default one, but if you add
custom ones you might need it.
2019-12-28 18:50:03 +01:00
Bram Matthys 910f2ad383 Module manager: more error details when it fails to fetch a repository. 2019-12-28 18:05:22 +01:00
Bram Matthys aa7b199a8a Fix crash when reading configuration file with a password that is in
the old and unsupported unrealircd-specific md5/sha1 style.
2019-12-28 15:10:34 +01:00
Bram Matthys 63b77796ed sendto_server(&me, -> sendto_server(NULL,
Not sure where the &me originally came from, but it is used in a few places
and is only confusing since it has no meaning... nowadays anyway.
2019-12-27 17:23:24 +01:00
Bram Matthys 4a547a766e Remove HOOKTYPE_LOCAL_NICKPASS (now useless), see previous commit. 2019-12-23 16:42:10 +01:00
Bram Matthys c9cf74a735 Drop support for sending server pass (PASS xx) to nickserv. Use SASL!
It wasn't working anyway in 5.0.0 and this behavior was non-standard.
2019-12-23 16:40:06 +01:00
Bram Matthys e3b806ec60 Fix command override priorities again. Lowest value is called first,
just like hooks now. Yeah we've messed up a few times by now.
Seems only Gottem uses them :D
So now it would call for example: prio -10, prio 0, 10, 20, cmd.
This matches the behavior of hook priorities (and swhois etc.)
2019-12-23 13:10:33 +01:00
Bram Matthys 595e448239 If do_cmd() is called with NULL mtags then we now generate message tags,
run the command, and free them again right before return.
2019-12-23 10:56:25 +01:00
GottemHams 3a55dd8422 TKL exceptions (E-Lines) were missing an expiration notification =] 2019-12-22 21:33:35 +01:00
GottemHams a1ae90cd16 Fixed incorrect order in which command overrides were processed 2019-12-22 19:01:53 +01:00
Bram Matthys bf379526e1 Test framework: don't run with ASan on Debian 8 due to false positives
[skip ci]
2019-12-22 14:58:02 +01:00
GottemHams fac16fe1c0 match_* functions actually return 1 on match and not 0 :D 2019-12-22 14:48:04 +01:00
GottemHams 35d6e9a067 Fixed mismatch in config variable naming for require-module 2019-12-22 14:47:07 +01:00
Bram Matthys f1b30be34e Print a better error message for users answering the wrong directory in
the first ./Config question.
2019-12-21 10:32:24 +01:00
Bram Matthys d8af0c170b sys/resource.h must be included earlier, otherwise ulimit (the fd limit)
is left unchanged at 1024.
2019-12-14 05:23:10 +01:00
Bram Matthys 4c255ccbd5 Remove some old "release candidate" references in the docs. 2019-12-13 09:15:18 +01:00
Bram Matthys eac9cdc319 UnrealIRCd 5.0.0 release 2019-12-13 08:38:42 +01:00
Bram Matthys 25bc2b7923 Fix crash on nick change. 2019-12-12 16:58:26 +01:00
Bram Matthys a46a2e050d ./Config: import settings from rc2/rc1. 2019-12-12 16:57:51 +01:00
Bram Matthys f118f95ffa Some minor release notes updates (need to quote some stuff) 2019-12-11 19:54:30 +01:00
Bram Matthys 9fc508483f webredir module should not depend on curl (fix symbol not found error) 2019-12-11 19:54:17 +01:00
Bram Matthys 9a96c32706 Release notes: update text since --enable-asan is no longer on by default
[skip ci]
2019-12-11 18:05:13 +01:00
Bram Matthys f3e538170e Minor update in release notes 2019-12-11 17:21:38 +01:00
Bram Matthys 3a4d2d907a Fix tkldb/channeldb causing a 'File exists' error every 5 minutes. 2019-12-11 13:10:26 +01:00
Bram Matthys a078a5d659 Print a warning that upgrade-conf is for 3.2.x to 4.x, and not for 4.x to 5.x
since there are no mandatory changes. For more information why this is
unnecessary, see commit 32ca956e77.
2019-12-11 12:23:43 +01:00
Bram Matthys bc358e7b35 Bump UnrealProtocol to 5000 so I don't forget to do it later ;) 2019-12-08 18:47:51 +01:00
Bram Matthys b9729a4f29 Fix bug in syncing spamfilters: ban act char vs string. Didn't always matter,
but for example 'gzline' became 'gline' on the other link.
Also replace 'unsigned short action' -> 'BanAction action'
2019-12-08 13:45:59 +01:00
Bram Matthys 32ca956e77 There were only 2 breaking changes in 4.x -> 5.x confs. Now there are 0.
Turning these errors into warnings instead should be fine and makes
the upgrade process (and instructions) easier.
* set::oper-only-stats is now a warning
* except tkl is auto-transformed into except ban and is now a warning
Both warnings contain clear instructions on what to do to get rid of
the warning message.
2019-12-08 09:33:38 +01:00
Bram Matthys cad664e749 Fix invalid parameter in jumpserver module 2019-12-07 18:05:50 +01:00
Bram Matthys 4bfdd84712 Document send.c a bit more. 2019-12-07 16:00:03 +01:00
Bram Matthys 55cad6fe05 Fix SASL authentication not working properly on servers 2+ hops away
from services. Reported by Koragg and The_Myth in
https://bugs.unrealircd.org/view.php?id=5485
The test framework has been updated to test these cases better.
2019-12-07 10:08:27 +01:00
Bram Matthys c1b6bebbf4 Add doc/doxygen/ to .gitignore
[skip ci]
2019-12-06 11:00:35 +01:00
Bram Matthys 9e652b95c7 Tweak doxygen output a bit. Drop -rc2 suffix. Make more clear that this
is for developers / module coders only.
[skip ci]
2019-12-06 09:01:21 +01:00
Bram Matthys 7764358eb7 Remove some old URL reference / old deprecation notice for set::scan. 2019-12-06 08:44:51 +01:00
Bram Matthys d7301f1b11 Convert some http:// to https:// that were not previously updated it seems
[skip ci]
2019-12-06 08:43:37 +01:00
Bram Matthys 0bbb935a32 Rename CHECKPROTO() to CHECKSERVERPROTO() to avoid mixing up server caps
and client caps in the future.
2019-12-06 08:32:36 +01:00
Bram Matthys a0b0526556 CAP LIST wasn't outputting anything. Reported by Koragg in
https://bugs.unrealircd.org/view.php?id=5483
2019-12-06 08:29:53 +01:00
Bram Matthys d9166bd62d Disable address sanitizer (ASan) now that we are preparing for 5.0.0 stable.
This can still be enabled during ./Config by answering to the last question:
--with-asan
But it is no longer enabled by default since it causes a slowdown of X and
increases memory by a factor Y.
2019-12-05 20:16:44 +01:00
Bram Matthys bf61973a6d Print a warning when changin me::name that this change is not effective
until you restart the server.
Yeah it's really too much hassle atm to make that particular setting
/rehash'able, this will probably never change.
Fortunately changing that is rather rare. At least printing the
warning should help those users doing it.
2019-12-01 19:06:22 +01:00
Bram Matthys 12af48a433 Typo in release notes, reported by Koragg 2019-12-01 15:02:40 +01:00
Bram Matthys 28539d41e0 Fix incorrect prototype for HOOKTYPE_TOPIC, has mtags. 2019-11-29 12:23:13 +01:00
Bram Matthys 35dd6c66b1 Fix doxygen documentation for sendto_channel 2019-11-29 12:21:58 +01:00
Bram Matthys e5f9061636 Update Config.header a bit and release UnrealIRCd 5.0.0-rc2. 2019-11-29 08:18:50 +01:00
Bram Matthys 0f7f872a97 Update release notes and set version to 5.0.0-rc2. The actual public
release will probably be on Friday, though.
2019-11-27 19:37:38 +01:00
Bram Matthys 7869c31ea5 Add the extras/doxygen directory.
Command to generate is: doxygen extras/doxygen/Doxyfile
Will publish this "soon"... of course it's not 100% complete but it's quite good.
2019-11-27 16:53:49 +01:00
Bram Matthys 1576f8df23 Warn on some limitations of the @if stuff:
* Cannot use include within an @if
  ..but you can just use an include and then within that file use
  an if, to work around it.
* Cannot use loadmodule within an @if

For both this is because include & loadmodule are processed before
the rest. I think most people will be fine with those restrictions,
though.
2019-11-27 16:45:39 +01:00
Bram Matthys 540e7552f9 Fix crash when using conditional configuration (@if $var == ....)
reported in https://bugs.unrealircd.org/view.php?id=5281
It was not removing parts properly if an if didn't match,
leading to a use-after-free bug on-boot (or on rehash).

In the process I renamed config_entry_free to config_entry_free_all
since that is what it does. And I created a new config_entry_free(ce)
to free only 'ce' stuff... which is what we want from the
preprocessor.
2019-11-27 15:44:48 +01:00
Bram Matthys 1a1b9ddada If you changed listen::ip and rehashed it would not apply those changes
if you were switching from a IP-specific listener to a * (all) listener.
Reported by vectr0n in https://bugs.unrealircd.org/view.php?id=5235
2019-11-27 13:25:30 +01:00
Bram Matthys 7fe3407508 Clean up whitespace 2019-11-27 13:10:06 +01:00
Bram Matthys 05f0968ccd Test the various set::tls (and ::tls-options) files for existence
so we properly error and exit/fail when booting.
Reported in https://bugs.unrealircd.org/view.php?id=5350
2019-11-27 13:06:02 +01:00
Bram Matthys 1e3d726df7 Setting user mode +q now requires the self:unkickablemode permission.
This is included in the *-with-override operclasses.
2019-11-27 12:35:58 +01:00
Bram Matthys f6515131aa Handle timed bans in combination with forward, eg: +b ~t:10:~f:#chan:*!*@host 2019-11-27 12:11:26 +01:00
Bram Matthys 0b8d435232 +L can now be set by +o (or higher) instead of requiring +q (channel owner).
Also, update helpop on the new meaning of +L: if unable to join, then
the user is forwarded to the specified channel.
2019-11-27 12:00:57 +01:00
Bram Matthys ae30978680 Fix numeric 470, is now:
:irc.test.net 470 nickname #originalchannel #redirect :[Link] Cannot join channel #originalchannel (you are banned) -- transferring you to #redirect

Previously this was completely incorrect:
:irc.test.net 470 nickname [Link] Cannot join channel ..etc...
(yeah even lacking a colon)
2019-11-27 11:38:48 +01:00
Bram Matthys 332ca4898c Don't send CANNOTSENDTOCHAN (404) twice for dropped repeats in +f. 2019-11-27 10:33:51 +01:00
Bram Matthys a8534a6063 Add new function kick_user() for use by modules. This so KICKs are
done in a consistent way.
2019-11-27 10:33:08 +01:00
Bram Matthys 5d4c474472 Clean up KICK a bit, necessary for next commit which is a bug fix 2019-11-27 10:01:21 +01:00
Bram Matthys 1c3eff4232 Update KNOCK to be sent across servers. This will cause double notices
if you are running a mixed U4 and U5 network, but it solves the situation
where a knock-flood is only detected locally. Since KNOCK usage isn't
that common and flooding is worse than double notices during the
transition period, I went with this change..
2019-11-27 09:56:39 +01:00
Bram Matthys a0a8b6b4eb Fix alias type channel not working properly. Note that the channel needs
to exist and needs to be -n now.
Previously the logic was the wrong way around which made it message
through +n channels and not work if you were actually in the channel.
Fun.
2019-11-24 20:23:34 +01:00
Bram Matthys 72e0f1a8fb Don't send CANNOTSENDTOCHAN (404) if KICK'ed by floodprot 2019-11-22 12:03:38 +01:00
Bram Matthys 48802cd9f3 Fix no error shown on PRIVMSG to +n channel (message is blocked, though) 2019-11-22 10:48:51 +01:00
Bram Matthys 58bb93174c Fix memory leak on 'DNS c' (clear DNS cache) 2019-11-20 16:09:59 +01:00
Bram Matthys 43edef1ad0 Free all set options, some were missing before
(now follows struct order)
2019-11-20 16:07:07 +01:00
Bram Matthys e16064a2a5 Add anope to automated tests (we now have anope & atheme) 2019-11-20 09:51:04 +01:00
Bram Matthys ab42e12002 Make SVSLOGIN a broadcast, so all servers have the same svid information
for the user. Otherwise with post-connect SASL authentication you will
have different login information on server X compared to server Y
(the server with the user on it was always correct, though).

Also, add a function called user_account_login() which is used by both
SVSMODE/SVS2MODE and SVSLOGIN to send ACCOUNT messages to the channel.
This too was missing for SVSLOGIN (post-authentication SASL).

For this fix to be 100% effective, you need 100% UnrealIRCd 5.
2019-11-18 15:39:18 +01:00
Bram Matthys 54513307ec Fix ident check not working with some (most?) clients. Reported by
The_Myth in https://bugs.unrealircd.org/view.php?id=5462.
Now the code is much more generic/liberal. And more ugly.
2019-11-18 15:02:55 +01:00
Bram Matthys 2daa187114 At the end of the automated tests, kill more processes (services) 2019-11-18 10:38:58 +01:00
Bram Matthys 27bc208853 Update tests script to test services (1/2) 2019-11-18 10:14:28 +01:00
Bram Matthys 1930179079 In do_numeric(), don't send UID to local users. 2019-11-18 09:46:34 +01:00
Bram Matthys 22394e8cb3 And another SASL fix on our side for atheme 2019-11-18 09:38:56 +01:00
Bram Matthys bf3ee74659 Fix SASL with atheme 2019-11-18 09:26:51 +01:00
Bram Matthys 99d3d8e450 Fix another direction problem, this one had a clear FIXME :) 2019-11-18 08:43:14 +01:00
Bram Matthys 1b710bc101 Merge branch 'unreal50' of github.com:unrealircd/unrealircd into unreal50 2019-11-18 08:17:48 +01:00
Bram Matthys b88c8ec804 Fix sending PRIVMSG back to original sender. This made atheme go
in a sending loop if you used a services logging channel.
Reported by The_Myth in https://bugs.unrealircd.org/view.php?id=5469
The same bug was reported and seemingly fixed before, but wasn't
actually.
2019-11-18 08:16:23 +01:00
westor 1a28750fb6 Fixed a typo in servicebot module description (#83) 2019-11-17 19:21:35 +01:00
Vitor Luis 7fadb0667b Update help.conf (#86)
Added the new floodtype 'r' to the list of types and added the 'd' action to the floodtypes 'm' and 't' (not sure about the type 'c').
2019-11-17 19:20:59 +01:00
Bram Matthys 39530ab840 Fix warning on "make pem": Can't load tls.rnd into RNG. Reported by PeGaSuS. 2019-11-17 19:16:17 +01:00
Bram Matthys 74bbc92cf0 Make configure exit when no GNU Make is present (eg no 'gmake' on *BSD).
https://bugs.unrealircd.org/view.php?id=5310
2019-11-17 15:46:45 +01:00
Bram Matthys 84f59226ba Print a clear error if you try to use remote includes without enabling
remote includes support. This rather than "no such file or directory".
2019-11-15 14:41:23 +01:00
Bram Matthys abbc55741a UnrealIRCd 5.0.0-rc1 release 2019-11-15 11:04:39 +01:00
Bram Matthys 0899a734c0 Fix LINKS not showing ourselves. 2019-11-15 09:24:38 +01:00
Bram Matthys 840995d994 Fix bug in Windows crash reporter, was sometimes missing crashes
as it always ignored the first core file.
2019-11-15 09:06:27 +01:00
Bram Matthys 564cf26d56 Comment out some Windows GUI shit that can crash the IRCd.
This is just "About UnrealIRCd" and such, not really important.
2019-11-15 08:07:54 +01:00
Bram Matthys dd38165cb0 Set version to 5.0.0-rc1 and update release notes. NOT RELEASED yet..
there will likely be more fixes within a few hours before -rc1 release.
2019-11-15 07:07:29 +01:00
Bram Matthys 4c4fe038c0 Update warning regarding anope in Config.header too. 2019-11-14 17:38:13 +01:00
Bram Matthys b487b92ac5 Run ./unrealircd module install third/dumpcmds during tests. 2019-11-14 17:37:30 +01:00
Bram Matthys 8c95a8f119 Don't forget to mention ./unrealircd module uninstall... 2019-11-14 17:34:19 +01:00
Bram Matthys ee1e01bec8 Fix small memory leak on config error 2019-11-11 17:27:52 +01:00
Bram Matthys 77e308783f Fix extra whitespace in USERHOST/USERIP (minor) 2019-11-11 14:17:44 +01:00
Bram Matthys 6710e5c047 Fix SILENCE -xyz output (return value error) 2019-11-11 13:42:26 +01:00
Bram Matthys 56bc6f3939 Fix numeric 271 output which has own nick twice. This bug is also
present in UnrealIRCd 4, and possibly in 3.2.x as well.

This changes:
SILENCE
:irc1.test.net 271 self self evilperson!*@*
To:
SILENCE
:irc1.test.net 271 self evilperson!*@*
2019-11-11 13:31:50 +01:00
Bram Matthys 864b15c0d6 Fix another numeric error in MOTD and use ISO date format (Y-m-d). 2019-11-11 12:21:17 +01:00
Bram Matthys a34bb40da4 Fix format of various numerics that use sendnumericfmt(). 2019-11-11 11:31:42 +01:00
Bram Matthys e1163c8734 Windows installer: reindent .iss and fix some end -> end;
[skip ci]
2019-11-11 11:12:40 +01:00
Bram Matthys 788cdd2956 On Windows, if you choose to run UnrealIRCd 5 as a service, it now runs
under the NetworkService account, rather than LocalSystem (SYSTEM).

Something along those lines was suggested long ago in:
https://bugs.unrealircd.org/view.php?id=2330 with a patch
from BuHHunyx.

The more recent pull request from AlexandraBryant suggested to use
the NetworkService account and also fixed the (major) problem with the
original patch that caused UnrealIRCd to hang for 15 seconds when
UnrealIRCd was started in GUI mode (non-services mode).

The installer was changed to automatically set the appropriate
permissions on the UnrealIRCd 5 folder if "Install as a service"
was selected. This so NetworkService can write, otherwise it would
be unable to copy modules to tmp\, write to log files, etc. etc.

We print a clear warning if you manually install the service at
a later stage, suggesting to run the installer instead or to
manually change the permissions.

Better error checking and reporting was added when running 'unrealsvc'
and when we are unable to connect to the service manager. This is
much more common nowadays as you need elevated admin permissions.
2019-11-11 09:44:31 +01:00
Bram Matthys 52dbfc38b7 Fix service on Windows not working in UnrealIRCd 5 now that we
have the bin\ directory.
2019-11-11 09:43:39 +01:00
GottemHams 39fc55dca3 require-module now SQUITs on explicitly required/denied modules (by config), also change version check to require a minimum version (require module::version config directive) 2019-11-07 22:03:02 +01:00
Bram Matthys 8fb125f588 Add some connect and read timeouts to the module manager when
checking repositories and downloading C files (this was a TODO item).

Give a clear hard error if ALL repositories failed
(failed to connect, download or parse).

Make a few commands work regardless of repository status.
In fact, these don't connect to repositories at all since they
don't need to. Thus, these commands are always available:
./unrealircd module [uninstall|generate-repository|parse-c-file]
of which only 'uninstall' is of importance for end-users.

Finally, make parse-c-file print a better error in case the file
could not be opened. Note that this command is only there for
module developers and repository managers, not end-users.
2019-11-04 10:52:51 +01:00
Bram Matthys 31edd45223 Update release notes: require anope 2.0.7 (if using anope, that is) 2019-11-03 16:50:42 +01:00
Bram Matthys 1a6343bff3 Fix missing cloak module on Windows (:D), just in time for 5.0.0-beta1. 2019-11-02 09:13:20 +01:00
Bram Matthys 449f69485f Fix some memory leaks in ./unrealircd module.
Not terribly important at the moment, but still...
2019-11-02 08:14:25 +01:00
Bram Matthys 078c6696af Update release notes a bit
[skip ci]
2019-11-01 21:29:52 +01:00
Bram Matthys 6bb83dc5bc Bump version to 5.0.0-beta1 2019-11-01 20:05:05 +01:00
Bram Matthys 42d4d4a680 Compile fixes for Windows 2019-11-01 19:46:07 +01:00
Bram Matthys 7bf51f36a6 Fix column alignment in './unrealircd module list' 2019-11-01 17:25:36 +01:00
Bram Matthys 6402dfd2fe send_multinotice() -> sendnotice_multiline() 2019-11-01 13:12:40 +01:00
Bram Matthys dfa83aa6e5 Add module manager. See https://www.unrealircd.org/docs/Module_manager
Also update release notes and some unrelated changes.
BIG commits. Lots of work. Requires more testing.
2019-11-01 12:57:12 +01:00
Bram Matthys 801d359ad1 Allow importing build settings from UnrealIRCd 4.x, but don't copy 3rd party
modules as they wouldn't compile anyway.
2019-10-28 13:12:51 +01:00
Bram Matthys c105e6958c Update curl-ca-bundle to version of Wed Oct 16 03:12:09 2019 GMT
from https://curl.haxx.se/docs/caextract.html
2019-10-27 10:23:12 +01:00
Bram Matthys bcfa6389c2 Update shipped PCRE2 library from 10.32 to 10.33 (16 Apr 2019) 2019-10-27 10:18:14 +01:00
Bram Matthys 86ce42103a Make the 'silence' module optional. Suggested by westor in
https://bugs.unrealircd.org/view.php?id=5415
Technically we now provide 3 default efunc handlers that always return 0.
2019-10-27 09:40:55 +01:00
Bram Matthys 8bb5bda47a Pass correct modinfo argument to MOD_UNLOAD(). This fixes a crash
on SavePersistentPointer().
2019-10-27 09:33:37 +01:00
Bram Matthys e1e815bb2f Fix crash if 2+ REHASHes right after each other when also unloading
a channel mode module with parameters or a module with moddata.
2019-10-27 09:18:29 +01:00
Bram Matthys 72d71e30ce Fix unloading of chanmode modules crashing the server. Reported by westor
in https://bugs.unrealircd.org/view.php?id=5412
2019-10-27 09:07:43 +01:00
Bram Matthys 03cdf5043f Fix +f not detecting repeats in case of 1st message, REHASH, 2nd message.
This due to a missing SavePersistentPointer() on the siphash key.
[skip ci]
2019-10-27 08:52:07 +01:00
Bram Matthys be68a72b42 Hostile server: reject nicks that start with a digit in do_remote_nick_name() 2019-10-27 08:44:28 +01:00
Bram Matthys 5d7bd995fa Show correct idle time when a fresh user connects.
Reported by The_Myth in https://bugs.unrealircd.org/view.php?id=5454
2019-10-26 19:18:24 +02:00
Bram Matthys 298e9f2ea6 Advertise 'configtest' in './unrealircd' usage/help.
[skip ci]
2019-10-26 19:02:45 +02:00
Bram Matthys fb8055c6ef Add './unrealircd configtest' which tests the configuration but does
not actually start the server. Any warnings and errors are printed
only to the console.
Suggested in https://bugs.unrealircd.org/view.php?id=5219
2019-10-26 18:55:26 +02:00
Bram Matthys 52c8ef3815 get_sno_str -> get_snomask_string, get_mode_str -> get_usermode_string,
get_snostr -> get_snomask_string_raw, get_modestr -> get_usermode_string_raw
2019-10-26 11:42:05 +02:00
Bram Matthys 9b15c758cd make_virthost() -> make_cloakedhost() and change parameters:
/** Calculate the cloaked host for a client.
 * @param client        The client
 * @param curr          The real host or real IP
 * @param buf           Buffer to store the new cloaked host in
 * @param buflen        Length of the buffer (should be HOSTLEN+1)
 */
void make_cloakedhost(Client *client, char *curr, char *buf, size_t buflen)
2019-10-26 11:38:53 +02:00
Bram Matthys 21ef90e503 Document channel mode api and two other files. 2019-10-26 11:22:10 +02:00
Bram Matthys da5aefaad7 Get rid of class.h 2019-10-26 10:02:00 +02:00
Bram Matthys ab7a4af46a find_command(char *cmd, int flags) / find_command_simple(char *cmd) 2019-10-26 10:00:04 +02:00
Bram Matthys 9aff820d1a Find_* -> find_*, eg Find_alias -> find_alias. 2019-10-26 09:57:15 +02:00
Bram Matthys 64342a0d16 Document api-command.c and command API page. Change find_Command.
(more in next commit)
2019-10-26 09:56:18 +02:00
Bram Matthys 24c60fd85e Fix some doxygen tags (eg @notes to @note) 2019-10-26 09:33:09 +02:00
Bram Matthys 9c79ca6655 Document all functions in src/channel.c 2019-10-26 09:11:09 +02:00
Bram Matthys 9050011300 Document all functions in src/serv.c.
Also remove the DALINFO command.
2019-10-25 19:49:34 +02:00
Bram Matthys 86d15804a8 Document all functions in src/tls.c 2019-10-25 19:31:30 +02:00
Bram Matthys e9ab8fd45e Document all functions in src/support.c
And replace atime(str) with config_checkval(str, CFG_TIME)
2019-10-25 19:30:50 +02:00
Bram Matthys c45181d07f Document (doxygen) src/misc.c entirely 2019-10-25 14:29:14 +02:00
Bram Matthys 845f9ca8ed Uniform spelling: seetle on sync/synced/desync/desynced, rather than
synch/synched/desynch/desynched.
2019-10-25 14:07:58 +02:00
Bram Matthys c0f2e6be6a Remove src/extra.c and move the last function, ircd_log, to src/misc.c 2019-10-25 13:59:59 +02:00
Bram Matthys 47affa7f31 Move some DCCALLOW functions 2019-10-25 13:57:33 +02:00
Bram Matthys 51b0a7a373 Update HOOKTYPE_STATS: will now be called for unknown flags and for
all known flags as well. So you can now add stats via modules.
Only the stats help is currently missing if you do so.
=> Moved dccdeny stats to dccdeny
2019-10-25 13:51:22 +02:00
Bram Matthys 09854abade Move the dcc deny stuff into the dccdeny module, that is:
functions from extra.c, entire undccdeny and svsfline,
large functions that were in message.c and conf.c
2019-10-25 13:39:24 +02:00
Bram Matthys 88f45020d8 Remove outdated STATS Z and STATS R information. 2019-10-25 11:31:06 +02:00
Bram Matthys ec1b2c60f2 Remove src/cloak.c, integrate the function in src/user.c
(also move the related one from src/misc.c to the same place)
2019-10-25 11:26:08 +02:00
Bram Matthys 75fa6a25b8 Remove src/uid.c, integrate those two functions in src/user.c 2019-10-25 11:23:07 +02:00
Bram Matthys 84918ac68f Remove src/md5.c, integrate those two functions in src/misc.c 2019-10-25 11:19:18 +02:00
Bram Matthys 2fca0f9cc3 Remove src/kline.c, integrate these 15 lines in src/serv.c 2019-10-25 11:16:02 +02:00
Bram Matthys 6ffcf62272 Rename src/err.c to src/numeric.c 2019-10-25 11:10:12 +02:00
Bram Matthys cb4d2f9cf0 Get rid of set::new-linking-protocol and __PANGPANG__ stuff for
compatibility with old 3.2.x servers.
2019-10-25 10:58:04 +02:00
Bram Matthys 00aee86b66 Clean up and document all functions in src/socket.c. Also,
remove calls to and the finish_auth() function, which did nothing.
2019-10-25 10:51:18 +02:00
Bram Matthys 599f83cbd4 Move some #define's out of the way, some re-indenting, .. 2019-10-25 09:47:52 +02:00
Bram Matthys 13b5ccda4f Merge bsd.c into socket.c (delete src/bsd.c). 2019-10-25 09:38:27 +02:00
Bram Matthys db85de54ca Remove packet.c, now that it is empty. 2019-10-25 09:33:42 +02:00
Bram Matthys e6c7fcda7d Move "real command" stuff to src/api-command.c and move dopacket() to
src/parse.c. Also re-order functions in parse.c so they appear in
logical order (1->2->3->4) rather than various helper functions first
and some random order.
2019-10-25 09:32:30 +02:00
Bram Matthys 910477c94a Don't apply fake lag to servers 2019-10-25 09:13:05 +02:00
Bram Matthys fb0842216f Remove old bullet point in release notes that is now mentioned
a few lines up. [skip ci]
2019-10-19 18:32:54 +02:00
Bram Matthys 8e3ba03752 Convert remaining GLOBOPS to sendto_umode_global().
Yeah, don't worry, the GLOBOPS command will stay too, this is just
an internal cleanup.
2019-10-19 11:50:35 +02:00
Bram Matthys e0533c5f80 Use client id in SAJOIN and SAPART.
This will break logging and oper notices on U4, but we'll deal with that
later in some U4 release.
2019-10-19 11:45:08 +02:00
Bram Matthys 5960c76102 Fix SETNAME not working, reported by s and The_Myth in
https://bugs.unrealircd.org/view.php?id=5453
It had the match_spamfilter() logic reversed. I audited all other
calls to the function as well and they are fine.

Also, CHGHOST CHGIDENT CHGNAME SETHOST SETIDENT SETNAME are now
tested by the test framework.
2019-10-19 08:52:59 +02:00
Bram Matthys 04171f7f20 Clean up m_message a bit 2019-10-18 15:00:52 +02:00
Bram Matthys a72482bbb2 Fix PRIVMSG/NOTICE showing send UID/SID to end-user due to change from
a few days ago. Reported by westor.
2019-10-18 14:10:01 +02:00
Bram Matthys 5cd7134cc2 Reject invalid SID from PROTOCTL. 2019-10-18 14:00:46 +02:00
Bram Matthys 9171d58ad0 Some unimportant changes
[skip ci]
2019-10-18 13:54:40 +02:00
Bram Matthys b9d432820b Update ./Config and the more/less screen, now that release notes are
online (or in markdown format, anyway) we can skip some stuff.
2019-10-18 08:42:06 +02:00
Bram Matthys 6dffe38bd3 Update release notes a bit
[skip ci]
2019-10-18 08:36:01 +02:00
Bram Matthys e2158e3608 Fix possible lack of string termination (NUL) in buildvarstring() 2019-10-17 21:01:55 +02:00
Bram Matthys 3a3c5b9c55 Remove an abort() 2019-10-17 07:44:43 +02:00
Bram Matthys ff067cd826 More kill path stuff gone now. 2019-10-17 07:32:45 +02:00
Bram Matthys 49c2f7c2c3 Get rid of this whole kill path nonsense. 2019-10-16 11:11:46 +02:00
Bram Matthys bed8a0ca2b Remove set::oper-only-stats from config. Don't mention set::allow-user-stats
there since that is a niche feature that 99% is unlikely to use.
2019-10-14 18:50:24 +02:00
Bram Matthys d0b9b02d05 We no longer use a blacklist for stats (set::oper-only-stats) but
have a whitelist now instead (set::allow-user-stats).
Suggested by tabrisnet, The_Myth and Jobe in
https://bugs.unrealircd.org/view.php?id=3375 and
https://bugs.unrealircd.org/view.php?id=5109
2019-10-14 18:46:14 +02:00
Bram Matthys 63298af6b2 Get rid of BREPORT_xx mess. 2019-10-14 17:36:04 +02:00
Bram Matthys 87406d752b Fix crash on set::official-channels and deprecate it's use. Use +P channels
instead now that all settings are preserved accross restarts.
2019-10-14 16:10:27 +02:00
Bram Matthys 446f9a89c3 Assume password is sent when allow::password is cert/certfp and client
has a SSL/TLS fingerprint. Reported by Stealth in:
https://bugs.unrealircd.org/view.php?id=3372
2019-10-14 15:08:37 +02:00
Bram Matthys 43593d12cb netinfo.c & server.c: use sendto_umode_global() rather than 2 functions. 2019-10-14 12:23:09 +02:00
Bram Matthys e1b0b0bc8e Make tracing bugs easier if you used AddListItem twice - or at least
detect some cases of it (it will not detect the case where it is
a single-item list).
2019-10-14 08:53:05 +02:00
Bram Matthys f9ec129bbd Make hunt_server() use SID/UID for sender and destination.
Hopefully this doesn't break anything...
2019-10-14 08:34:16 +02:00
Bram Matthys 1a1ce5716e Move hunt_server from user.c to serv.c (makes sense). 2019-10-14 08:33:12 +02:00
Bram Matthys cc36b34f93 Remove unnecessary (void) casts everywhere.
Only use (void) for system/library calls that you want to ignore
explicitly, eg (void)close, if the return value is irrelevant.
2019-10-14 08:23:30 +02:00
Bram Matthys c60bd2e441 Try to use more me.id where possible (rather than me.name) 2019-10-14 08:09:57 +02:00
Bram Matthys d724bdc492 Finish up changes from yesterday. 2019-10-14 07:49:23 +02:00
Bram Matthys f40c9f3c88 Change various client->name to client->id in S2S traffic. More to
follow tomorrow, including me.name to me.id changes (though these
are far less important) and send.c + non-sendto_server hunts...
2019-10-13 20:41:13 +02:00
Bram Matthys 44f9423e13 Remove ID() macro as client->id always contains a proper UID now. 2019-10-13 20:11:58 +02:00
Bram Matthys 1dde1721ad Reorder functions in nick.c in a more logical way. No actual code changes.
[skip ci]
2019-10-13 19:47:26 +02:00
Bram Matthys b9a0f938c0 Cleanup cmd_user since it's now client-only and move the server-bits into cmd_uid. 2019-10-13 19:43:41 +02:00
Bram Matthys a970e5ed9b Fix far connect notice to IRCOps being in incorrect format. 2019-10-13 18:48:56 +02:00
Bram Matthys 2c337dc58b Split off cmd_nick in cmd_nick_local and cmd_nick_remote and clean it up.
Also, partially cleanup cmd_uid, but still work to be done there (the
last part).
2019-10-13 18:39:10 +02:00
Bram Matthys 746ea5b558 Clean up cmd_server / cmd_sid now that 100% of the network is SID. 2019-10-13 16:22:56 +02:00
Bram Matthys 154aab6ec4 No need for clear functions since PROTOCTL does not allow it. 2019-10-13 09:42:29 +02:00
Bram Matthys bcfd2ab529 Rip out support for servers lacking TKLEXT/TKLEXT2 (always send TKLEXT2 format) 2019-10-13 09:39:00 +02:00
Bram Matthys 560b73b6f7 Similar to previous commits, but for UMODE2. Actually no change, though,
since lack of UMODE2 was not supported in U4 anyway (maybe even 3.2.x).
2019-10-13 09:35:31 +02:00
Bram Matthys a9890448d8 Rip out support for servers lacking SJ3 2019-10-13 09:33:39 +02:00
Bram Matthys 545c2560e6 Rip out support for servers lacking SIDs/UIDs.
More cleanups will follow later for this one.
2019-10-13 09:24:26 +02:00
Bram Matthys 930ede1c86 Rip out support for servers lacking SJOIN/SJOIN2 2019-10-13 09:09:59 +02:00
Bram Matthys 0670bfffb9 Rip out support for servers lacking NICKIP 2019-10-13 08:59:26 +02:00
Bram Matthys fb4d994f40 Rip out support for servers lacking NOQUIT. 2019-10-13 08:56:05 +02:00
Bram Matthys 8d5f896790 Rip out support for servers lacking NICKv2 2019-10-13 08:54:16 +02:00
Bram Matthys c9b88343e2 Fix not seeing own nick change if not in any channels. Reported by westor. 2019-10-12 17:26:29 +02:00
Bram Matthys bbf2cd3a3e Fix incorrect relaying of numeric replies from remote servers (eg WHOIS nick nick). 2019-10-12 17:18:12 +02:00
Bram Matthys 8383b714ce Fix crash on SASL. Reported by westor. 2019-10-12 15:41:58 +02:00
Bram Matthys 742e27802e Fix 100% CPU issue with message-tags after REHASH. (this fix is in alpha4) 2019-10-12 09:12:17 +02:00
Bram Matthys f5137678ff Update 5.0.0-alpha4 release notes a bit. 2019-10-12 08:42:40 +02:00
Bram Matthys d55eb642e5 Fix 421 in restrict-commands, again. 2019-10-11 20:42:05 +02:00
Bram Matthys 139e5faae6 UnrealIRCd 5.0.0-alpha4 (release tomorrow) 2019-10-11 20:31:15 +02:00
Bram Matthys 03645750f1 Protect against services that don't reply to SASL: time out the SASL
session after a 15 seconds timeout. The exact timeout value can be
changed by adjusting set::sasl-timeout, which should be (quite a bit)
less than set::handshake-timeout by the way. 15<30 now, so fine.
2019-10-11 19:17:59 +02:00
Bram Matthys 3c4d14ca58 Warn about the necessity of an anope patch, which is pending since February... 2019-10-11 18:55:01 +02:00
Bram Matthys 96509f6802 except tkl { } -> except ban { } in example*conf
[skip ci]
2019-10-11 17:57:33 +02:00
Bram Matthys 9f2530fdb7 Fix 421 numeric syntax if command is blocked (commit from yesterday).
Reported by westor.
2019-10-11 17:07:28 +02:00
Bram Matthys ff5f2d97a0 Some release notes markdown changes (always fun when 3 markdown editors
show the output in 3 different ways, and github is even different)
[skip ci]
2019-10-11 16:24:24 +02:00
Bram Matthys 62352c2b70 Update release notes, refer to web/github or the .md file. 2019-10-11 16:19:54 +02:00
Bram Matthys a5e6fb4a12 Convert release notes to markdown (add many links)
[skip ci]
2019-10-11 15:58:55 +02:00
Bram Matthys 65f6b97ea7 Advertise as "draft/labeled-response-0.2" rather than "draft/labeled-response".
[skip ci]
2019-10-11 15:58:23 +02:00
Bram Matthys 98f1974c8f Don't fall through (fix for previous commit). 2019-10-11 15:01:19 +02:00
Bram Matthys 77bee69951 Fix Windows build 2019-10-11 14:46:13 +02:00
Bram Matthys 394168c288 Style fixes: "char* " -> "char *" etc. 2019-10-11 12:23:45 +02:00
Bram Matthys ccaec871bb And some fixes, to previous commits and older issues. 2019-10-11 12:19:04 +02:00
Bram Matthys aec54db360 Add is_extended_ban() which does a quick check for "~x:". This, rather
than scattered checks - which are sometimes different - everywhere in
the source code.
Also extban handler "is_ok" was being called with EXBTYPE_EXCEPT
rather than EXBTYPE_INVEX for +I. (Not reported by anyone)
2019-10-11 11:17:50 +02:00
Bram Matthys 33c176e59e Juse in case pcre2_get_error_message() fails... 2019-10-11 11:17:29 +02:00
Bram Matthys 1d0fa3278f Protect against flawed S2S traffic: more checks for bad base64
encoded IP addresses.
2019-10-11 11:16:16 +02:00
Bram Matthys 3d81c7101c Merge branch 'unreal50' of github.com:unrealircd/unrealircd into unreal50 2019-10-10 19:51:56 +02:00
Bram Matthys f7a35bd77e Fix for change from yesterday in JOIN: parv[1] would point to
a stack buffer in do_join but it goes out of scope after a return
from that function, still pointing to invalid data. Duh.
2019-10-10 19:46:08 +02:00
GottemHams be571f81c6 Changed snotice to numeric 421 for commands disabled/restricted by the restrict-commands module 2019-10-09 21:00:41 +02:00
Bram Matthys 80353cd7d3 Win......
[skip ci]
2019-10-09 19:24:09 +02:00
Bram Matthys e1fdba7931 Windows....................... 2019-10-09 19:16:34 +02:00
Bram Matthys 62110778dd Silence Windows compiler warning 2019-10-09 18:55:04 +02:00
Bram Matthys 04334f022e Fixes for Windows build 2019-10-09 18:20:06 +02:00
Bram Matthys 22dec96f9a No clean_channelname() anymore but a valid_channelname() function. Also,
deal with servers with different set::allowed-channelchars settings:
* We reject the link if set::allowed-channelchars settings differ between
  UnrealIRCd 5 servers.
* For the case where you have a mixed network consisting of UnrealIRCd 4.x
  and UnrealIRCd 5.x servers we try not to desync, BUT will not allow
  anyone to join the invalid channels locally. For IRCOps a message is
  printed with additional information on such a failed JOIN attempt.
See https://www.unrealircd.org/docs/Set_block#set::allowed-channelchars
for the different settings, which are best and U4<->U5 advice.
2019-10-09 18:11:02 +02:00
Bram Matthys fbbd915403 Reject link if set::allowed-channelchars differ. 2019-10-09 15:59:59 +02:00
Bram Matthys 798b223ee3 Convert some more stuff to enums (config preprocessor mostly). 2019-10-06 07:54:46 +02:00
Bram Matthys d2a93c3a03 websocket module will now only disable show-connect-info on the ports
that have listen::options::websocket. It will no longer disable it
on all ports.
2019-10-06 07:37:55 +02:00
Bram Matthys ba7ff01e0f Remove some unnecessary checks 2019-10-06 07:25:31 +02:00
Bram Matthys 24f73d8c4f Crash fixes for can_send_to_user / can_send_to_channel from earlier. 2019-10-05 18:31:29 +02:00
Bram Matthys c399aab016 Support for labeled-response in LIST (I really wanted this) 2019-10-05 18:21:47 +02:00
Bram Matthys f992a0c1c0 Finish up labeled-response implementation. Load by default to get the
thing tested. Will do at least 1 other commit soon related to this.
2019-10-05 17:33:22 +02:00
Bram Matthys b3947c7a14 Use proper HOOK_* return types in HOOKTYPE_PRE_LOCAL_CONNECT, fixes crashes. 2019-10-05 15:19:40 +02:00
Bram Matthys 9a8fd43873 ISON response was incorrect 2019-10-05 15:04:54 +02:00
Bram Matthys b2705089ce Clean up floodprot_*nickchange now that the prototypes are the same
for local and remote. Suggested by westor.
2019-10-05 13:00:18 +02:00
Bram Matthys 2eecf4f2da Use generic numeric 531 (ERR_CANTSENDTOUSER) for all such cases and use hook
CAN_SEND_TO_USER rather than HOOKTYPE_PRE_USERMSG (which is now removed).

As for the numeric change: this makes it much easier for client devs.
You rarely need to differentiate in the client code between the various
causes. One only cares about detecting that the message was not sent and
that the user needs to be informed.
This replaces various NOTICEs, ERR_NOCTCP, ERR_NONONREG etc. with just the
new numeric 531, which is taken from InspIRCd. The syntax is:
:server 531 yourname targetname :reason for the block
This makes it similar to numeric 404 (ERR_CANNOTSENDTOCHAN) that is used to
indicate that a channel message was blocked.

For module devs, the new hook CAN_SEND_TO_USER prototype is:
int hooktype_can_send_to_user(Client *client, Client *target, char **text, char **errmsg, int notice);
You can replace the text via this, by setting *text in your function.
You can block the message, by returning HOOK_DENY. If doing so, then
you must also set *errmsg to an appropriate value.
Do not send any error message to the user! UnrealIRCd will take care of
sending the error message for you, if you set *errmsg.
Only if you need something special you could violate this rule, but
preferably not!

As you can see, CAN_SEND_TO_USER works just like CAN_SEND_TO_CHANNEL.
2019-10-05 12:53:41 +02:00
Bram Matthys 4a59e66af2 Fix for previous 2019-10-05 09:55:28 +02:00
Bram Matthys df71812707 HOOKTYPE_CAN_SEND and HOOKTYPE_PRE_USERMSG changes:
1) HOOKTYPE_CAN_SEND is now called HOOKTYPE_CAN_SEND_TO_CHANNEL
   The arguments and return values are unchanged
2) similarly can_send() is now called can_send_to_channel()
3) If you want to block or alter a message you must now
   use HOOKTYPE_CAN_SEND_TO_CHANNEL and return HOOK_DENY from
   there with an appropriate *errmsg filled (see nocolor and
   many other modules for an example)
4) You CANNOT use HOOKTYPE_PRE_USERMSG anymore to block a message.
   I actually wanted to rip this hooktype out entirely, but
   delayjoin needs it. HOOKTYPE_PRE_USERMSG is only useful for
   notification that a message is going to be sent BEFORE it is
   actually sent (which is exactly what delayjoin needs, so it
   can send a JOIN if the user is currently invisible).
5) This is all to make things more clean:
   * HOOKTYPE_PRE_USERMSG is only for delayjoin
   * HOOKTYPE_CAN_SEND_TO_CHANNEL is used for exactly what the
     name implies. You can also change the message text there,
     such as for +G, +S, etc.
2019-10-05 09:48:33 +02:00
Bram Matthys 798f502875 Mass change (at least this one could be fully automated): 'chptr' -> 'channel'
to be consistent with the 'sptr' -> 'client' rename earlier.
2019-10-05 08:49:10 +02:00
Bram Matthys c2d7da6e35 Rename channel list to 'channels', for next commit. 2019-10-05 08:47:24 +02:00
Bram Matthys 858debdd01 Protect against duplicate PROTOCTL EAUTH (possible memleak) 2019-10-05 07:49:54 +02:00
Bram Matthys 3a64077f51 Use 'client' everywhere (if there is no confusion) instead of 'sptr' or 'cptr'.
This so I - and others - don't constantly have to wonder whether the client
is called sptr, cptr or acptr in a simple routine.
Insane --> 212 files changed, 6814 insertions(+), 6945 deletions(-)
Couldn't just mass-replace of course since there are places where there
are multiple clients involved. So had to check each function.
Also renamed some 'acptr' to 'target' and such.

I will write a page with new style rules later.. but in short if there is
only 1 client involved it will now be called 'client'.
2019-10-04 15:25:35 +02:00
Bram Matthys 40cd6aa639 Get rid of reference counting in User, which was unused. 2019-10-04 13:25:56 +02:00
Bram Matthys 9d98e6b411 do_join: int -> void 2019-10-04 13:22:53 +02:00
Bram Matthys e8c17e3aed Get rid of pseudo ID's. This also means that SASL with anope won't work
anymore if you run latest anope 2.0.6. You need the fix from Feb 9, 2019:
https://github.com/anope/anope/commit/da6e2730c259d6d6356a0a948e85730ae34663ab
(.. which also fixes SASL problems with anope + UnrealIRCd 4 by the way)
or just run anope latest git (2.0 branch).

Not sure about atheme... should test this.

Technical details: we used a pseudo ID / sasl cookie until recently,
this has always been planned to be phased out when we got UID's.
I didn't phase it out in U4 (but could have done so) but just did now in U5.
This simplifies everything as now you can just refer from the services
side to the user with the UID/SID. This also makes it so services can now
target the user in other functions as well, like NOTICE.
(Feel free to request other functions if something isn't working)
2019-10-04 13:13:46 +02:00
Bram Matthys 999fde8fee Update release notes (the module coders section) on the recent changes. 2019-10-04 12:38:01 +02:00
Bram Matthys 3d5e49e701 Get rid of FLUSH_BUFFER, since we no longer signal things that way.
Merge check_init and AllowClient into one single AllowClient()
and make it use the more logic 1 and 0 return values for allow / deny.
Similarly, use logic 1 / 0 return values for verify_link.

Module coders:
HOOKTYPE_CHECK_INIT and HOOKTYPE_PRE_LOCAL_CONNECT, changed the
return value, you should now use HOOK_*, eg HOOK_DENY to stop
processing (eg client killed).
2019-10-04 12:30:51 +02:00
Bram Matthys 3f18cf5ea1 find_shun() return value change, simply 1 / 0 now. 2019-10-04 11:41:12 +02:00
Bram Matthys 9e4dbf8c89 dead_link() -> dead_socket() since that is more descriptive 2019-10-04 11:36:34 +02:00
Bram Matthys cbe20e1d5a check_unknowns -> handshake_timeout, check_tkls -> match_tkls and inversion
of the return value.
2019-10-04 11:35:51 +02:00
Bram Matthys 92df36a87f Return values of various functions changed, in particular the ones
that deal with finding TKL's or spamfilters etc.
More will likely follow, to make things more logical.
Also, run_spamfilter -> match_spamfilter
place_host_ban, can_privmsg, check_dcc, find_tkline_match all impacted.
2019-10-04 11:30:27 +02:00
Bram Matthys 3126a3fae4 BIG changes internally that will break all modules and required many
code changes in UnrealIRCd itself:
1) Clients are no longer freed directly by exit_client. Most fields
   are freed, but 'sptr' itself is not, so you can use IsDead() on it.
2) exit_client now returns void rather than int
3) ALL command functions return void rather than int.
   Of course this also affects do_cmd, command overrides, etc.

This is a direct consequence of the removal of 'cptr' earlier, as that
was used to signal certain things that are now no longer possible
(and it raises the question if things were always correctly signaled
in the first place, so may fix some bugs).
It also makes the code more resillient against cases where you forgot
to check if the client was freed. Still, you are encouraged to do an
IsDead(sptr) if you are calling functions that may kill clients,
such as command functions or things that may use spamfilter.

More changes will follow, such as the removal of FLUSH_BUFFER.
2019-10-04 10:28:41 +02:00
Bram Matthys ea6651fb26 More Windows fixes
[skip ci]
2019-10-02 15:00:35 +02:00
Bram Matthys 0092263fee Possibly fix Windows build 2019-10-02 14:55:15 +02:00
Bram Matthys ab3feff7c2 exit_client() now takes 3 parameters rather than 5:
** Exit this IRC client, and all the dependents (users, servers) if this is a server.
* @param sptr        The client to exit.
* @param recv_mtags  Message tags to use as a base (if any).
* @param comment     The (s)quit message
* @returns FLUSH_BUFFER is returned if a local client disconnects,
*          otherwise 0 is returned. This so it can be used from
*          command functions like: return exit_client(sptr, ....);
2019-10-02 14:54:09 +02:00
Bram Matthys 1c746afdf1 Fix broken build by last minute change 2019-10-02 14:45:25 +02:00
Bram Matthys 4ac8015f84 Remove 'cptr' from all commands, hooks, etc. It only confuses people and
'sptr' is sufficient and in most cases the only one you should care about.
Should you need it, you can access sptr->direction in cases where you
need the old information (usually only for some sendto_* functions
and some protoctl checks), so 'cptr' was redundant too.

[!] This change likely introduces some bugs. This was many hours of work.
I only cut some corners in 4 functions, which will be fixed at a later
stage..... yes, more major changes to come.

On the plus side, I likely fixed some bugs in the process. Situations
where cptr vs sptr usage was incorrect. Eg using cptr->name (near server)
when sptr->name should be used (the actual source server), etc....
2019-10-02 14:25:40 +02:00
Bram Matthys 396ae3f218 Module coders: rename M_* to CMD_*, eg M_SERVER -> CMD_SERVER.
Also add more doxygen documentation.
2019-09-30 10:25:26 +02:00
Bram Matthys 9d7cf312cf Cleanup main line parsing code, move do_numeric() to parse.c.
Add complete doxygen documentation for parse.c.
2019-09-30 08:56:21 +02:00
Bram Matthys d7ef752888 Detect combination of non-UTF8 nickchars in use and websocket type text.
In such a case we refuse to run since the consequences are too big.
(Actually I may change the non-UTF8 channel warning to an error as well,
 right now it isn't.. simply because I cannot read a certain setting)

From both the non-UTF8 channel and user warning/error, we now refer to:
https://www.unrealircd.org/docs/WebSocket_support#websockets-and-non-utf8
which contains a bit more detailed information as to the WHY.
2019-09-23 10:20:38 +02:00
Bram Matthys 9669e32447 test set { } settings before all the rest 2019-09-23 09:33:57 +02:00
Bram Matthys 0b5a4bf51d Compile fix for Windows 2019-09-23 08:29:46 +02:00
Bram Matthys 3f5ea851cb Do a better job at detecting ASan 2019-09-23 08:14:41 +02:00
Bram Matthys 4ae374477f Add websocket support for 'text' instead of current 'binary'. And change
how you use websockets in the configuration file:
In addition to loading the websocket module you now ALSO have to mark
specific listen blocks with listen::options::websocket, and you have
to specify a type as well. Example:
listen {
	ip *;
	port 1234;
	options {
		websocket { type binary; }
	}
}
The type 'text' is compatible with kiwi although this is currently
completely untested. Also I should add something to the release notes
about this change. Tomorrow...
2019-09-22 20:49:37 +02:00
Bram Matthys d9e8206b80 Fix memory leak in modules.c 2019-09-22 20:20:25 +02:00
Bram Matthys 5a57eec4c7 Channel names must now be valid UTF8 by default.
We actually have 3 possible settings of set::allowed-channelchars:
utf8:  Channel must be valid UTF8, this is the new default
ascii: A very strict setting, for example in use at freenode,
       the channel name may not contain high ascii or UTF8
any:   A very loose setting, which allows almost all characters
       in the channel name. This was the OLD default, up to and
       including UnrealIRCd 4. It is no longer recommended.
For most networks this new default setting of utf8 will be fine, since
by far most IRC clients use UTF8 for many years already.
If you have a network that has a significant portion of chatters
that are on old non-UTF8 clients that use a specific character set
then you may want to use set { allowed-nickchars any; }
Some Russian and Ukrainian networks are known to need this.

Devs: src/utf8.c has been added which will be used by this and
by other functionality later.
2019-09-22 18:42:21 +02:00
Bram Matthys cd713369b1 Update Windows makefile, was missing ident_lookup.
[skip ci]
2019-09-22 15:25:56 +02:00
Bram Matthys 6687591bb0 Fix for build without DEBUGMODE. 2019-09-22 15:06:47 +02:00
Bram Matthys 5b8f393a8f * EventAdd() changed the order of parameters and expects every_msec now
which specifies the time in milliseconds rather than seconds. This
  allows for additional precision, or at least multiple calls per second.
  The minimum allowed every_msec value is 100 at this time.
  The prototype is now: EventAdd(Module *module, char *name,
  vFP event, void *data, long every_msec, int count);
2019-09-22 15:05:00 +02:00
Bram Matthys 4d277ccef8 Clean up and comment SocketLoop. Also preparations for later. 2019-09-22 14:20:22 +02:00
Bram Matthys b17deb7517 Fix for previous commit. See also the notes there :D 2019-09-22 13:35:17 +02:00
Bram Matthys 117a87dd8e I/O engine performance improvements (and fixes)
This is work in progress. The work was already done but the patch was
postponed until after alpha3 since it's not sufficiently stable yet.
2019-09-22 08:43:27 +02:00
Bram Matthys 784ba625ec Fix crash shortly after THROTTLE RESET. Bug was introduced yesterday
with commit b4636f183c
2019-09-22 08:24:05 +02:00
Bram Matthys 97cf32c941 Compile fix for Windows 2019-09-21 18:31:49 +02:00
Bram Matthys e846596b37 UnrealIRCd 5.0.0-alpha3 2019-09-21 18:19:33 +02:00
Bram Matthys c3f250750b Add support for storing ELINEs in tkl.db. Reported by westor in
https://bugs.unrealircd.org/view.php?id=5418
2019-09-21 18:12:20 +02:00
Bram Matthys 953cb774ad ASan: log to tmp/unrealircd_asan.<pid> and attach this if the IRCd
crashes (has a core file) to the crash bug report.
Also, disable leak detection since this is too noisy and would cause
a core dump each time + bothering the user to submit a crash report
+ send this crashreport etc. We still enable this in our own tests
though, but not for end-users.
2019-09-21 18:04:30 +02:00
Bram Matthys 4ecd7cca4c Fix memory leak when unloading an ISupport module. 2019-09-21 16:52:27 +02:00
Bram Matthys b4636f183c connthrottle: use SavePersistentPointer/LoadPersistentPointer rather
than temporary file to dump and read current settings (the old method).
2019-09-21 16:41:23 +02:00
Bram Matthys 330cf9ed24 Remove confusing information regarding /TSCTL. 2019-09-21 16:29:53 +02:00
Bram Matthys 83492a613d Fix memory leak in modules codes. 2019-09-21 16:07:44 +02:00
Bram Matthys dd536b4a92 Fix memory leak with conditional config.
And remove the comment which predicted this memory leak (:D)
2019-09-21 16:05:15 +02:00
Bram Matthys f88f30c815 Mark delayjoin module as perm, as we don't support dynamic unloading this,
which would be too much coding effort for such an unusual event.
(Reloading is fine though, for eg upgrading-on-the-fly)

Issue reported by westor in https://bugs.unrealircd.org/view.php?id=5416
2019-09-21 15:31:46 +02:00
Bram Matthys 4426cdacc9 Disable the warning from 95f9c56a16
that was not supposed to be committed :D
It would also warn about if'd out blocks, which is confusing,
so best to disable the warning altogether for now.
2019-09-18 20:09:10 +02:00
Bram Matthys b24fe0f336 Just in case someone uses a set::anti-flood::connection-flood of X:1... 2019-09-18 19:37:08 +02:00
Bram Matthys 95f9c56a16 Add warning if an unknown $VAR is encountered (without @define).
Also, you can escape a $VAR to $$VAR if you really just mean $VAR literally.
Such usage would be very rare though.
Note that the parser is smart enough to know that $var is never a
global variable, it only warns for valid variable names like $VAR and
even then only if it's at the end or has whitespace/dot/comma/etc.
So... false positives should be extremely low...
2019-09-18 09:43:45 +02:00
Bram Matthys 2c9be4eb97 Conditional conf: syntax is now always @define $VAR "xyz". Also restrict
the variable names to UPPERCASE, digits and underscores (A-Z0-9_).
This makes them easily distinguishable from other items in the conf,
so they don't clash with for example $ip in blacklist::reason.

The @define confusion was reported by Gottem and westor.
2019-09-18 08:49:27 +02:00
Bram Matthys 41f2b5f884 Fix some more numerics with incorrect arguments in U5: WATCH and failed
to JOIN reasons, such as when banned.
2019-09-17 18:53:35 +02:00
Bram Matthys 66345246ef Fix incorrect /ADMIN output, reported by westor. 2019-09-17 18:29:09 +02:00
Bram Matthys b2cfc6de69 Fix double free in AWAY due to changes of past week. 2019-09-16 07:41:33 +02:00
Bram Matthys 70a8985d43 Compile with -fno-common 2019-09-15 16:57:45 +02:00
Bram Matthys 54cb647925 Fix odd looking remote /REHASH message to globops. 2019-09-15 15:47:56 +02:00
Bram Matthys f3ec97ee23 floodprot (+f): fix issue where 't' was kicking innocent users due to
flooding. The 't' action was activated in if no 'r' type was present
because the counter was not reset.
https://bugs.unrealircd.org/view.php?id=5401
2019-09-15 15:33:30 +02:00
Bram Matthys c7c3fbdfa8 struct stats *ircstp; -> IRCStatistics ircstats; (for statistics, /STATS) 2019-09-15 14:48:45 +02:00
Bram Matthys bea2564e5d IRCStatistics ircstats; -> IRCCounts irccounts; (this is used for LUSERS) 2019-09-15 14:39:51 +02:00
Bram Matthys 677afe9ca4 Don't use memory pools when using ASan, since it would miss things.
-> See my comment in src/mempool.c
2019-09-15 14:37:59 +02:00
Bram Matthys f81f221b13 Use memory pool for Client and LocalClient. Also reorder struct a bit. 2019-09-15 12:28:50 +02:00
Bram Matthys 1a24a634e5 Make Link functions (make_link, free_link) use memory pool code.
Also clean up a bit.
2019-09-15 11:33:17 +02:00
Bram Matthys edb199841a Move all the (remaining) LIST stuff to modules/list and use ModData. 2019-09-15 11:07:15 +02:00
Bram Matthys 085c0f0c4e Move jointhrottle data from moddata_client to moddata_local_client
since we only count for local users.
2019-09-15 09:50:27 +02:00
Bram Matthys ffe5abe30b ModData: moddata_localvar -> moddata_local_variable,
moddata_globalvar -> moddata_global_variable,
and the just-added moddata_localclient -> moddata_local_client
..all this so it's more consistent
2019-09-15 09:47:54 +02:00
Bram Matthys b2f32c1746 Add moddata_localclient(), which is for locally connected clients only.
Make the silence module use this.
2019-09-15 09:26:54 +02:00
Bram Matthys 654919f2c4 Make modules/silence use ModData and remove more out of the core.
It uses a Silence struct now, rather than Link.
Also, SILENCE is handled only for local clients now (different
cost/benefit tradeoff nowadays).
2019-09-15 09:03:30 +02:00
Bram Matthys 6cc94b4b11 Move add_silence and del_silence out of the core to modules/silence 2019-09-15 07:52:04 +02:00
Bram Matthys 2b2fb8906e Zero memory in make_link() - needed since memory changes of today. 2019-09-14 21:03:12 +02:00
Bram Matthys 7c9a188cb7 Done. New rule: use safe_alloc, safe_free, safe_strdup,
do NOT use malloc/calloc/free.
2019-09-14 17:26:55 +02:00
Bram Matthys f2e3712d62 Remove various if's and such that are now unneeded
This is part 5 of the memory function / caller changes.
2019-09-14 17:23:07 +02:00
Bram Matthys a75d10d3e4 Some remaining malloc() calls -> safe_alloc()
Unimportant, but this way 100% of those is done.
This is step 4 of X of the memory function / caller changes.
2019-09-14 17:15:15 +02:00
Bram Matthys 950fc5001e Update memory allocation calls, step 3 of X
This changes free() calls to safe_free().
This mass change could be automated and unaudited, fortunately.
2019-09-14 17:12:37 +02:00
Bram Matthys 9fc1e758ab Mass change of dst = strdup(str) to safe_strdup(dst,str) but with a manual
audit since 'dst' must now be initialized memory.
There's still a raw_strdup() if you insist.

This is step 2 of X of memory allocation changes
2019-09-14 16:58:01 +02:00
Bram Matthys de87b439b7 Update memory allocation routines. Step 1 of X. 2019-09-14 16:52:53 +02:00
Bram Matthys 7c6358024c Add 'natural order' string comparison to core: strnatcmp and strnatcasecmp
extern int strnatcmp(char const *a, char const *b);
extern int strnatcasecmp(char const *a, char const *b);
This will be handy for version comparisons. For example they will
return -1 (=lower) for things like ("1.4.9", "1.4.10"), unlike strcmp.

Also, some loosely related spelling fixes elsewhere.
2019-09-14 08:12:47 +02:00
Bram Matthys f1f0acdd25 ident_lookup: reject spaces and control characters early.
...even though in m_nick there is code so it never gets into
sptr->user->username.
2019-09-13 19:37:28 +02:00
Bram Matthys 9b14970c2a Move ident lookups to module 'ident_lookup' and rewrite the code
to be a bit less ugly. The module is loaded by default so you can
still use set::options::identd-check like before, even though I
hate ident... it's old shit... still, other's seem to like it.

More changes will follow later. There is still some ident stuff
in the core at the moment and the module is currently PERM, which
largely (but not entirely) defeats the purpose of being a module.
That will be fixed at a later time as well.
2019-09-13 19:21:29 +02:00
Bram Matthys 3592d8db3a Update name in first few lines of .c files.
Eg: src/modules/m_away.c is src/modules/away.c nowadays.
2019-09-13 15:46:20 +02:00
Bram Matthys baf02e8980 Rename all m_* functions to cmd_* functions. 2019-09-13 15:45:19 +02:00
Bram Matthys bb1bb35f50 MOD_LOAD(xyz) is now just MOD_LOAD(), same for MOD_TEST, MOD_INIT,
MOD_UNLOAD. And MOD_HEADER(xyz) is now MOD_HEADER even without ()
since this isn't a function, really.
To make things understandable I added the following to the
developer section of the release notes:

* The module header is now as follows:
  ModuleHeader MOD_HEADER
    = {
          "nameofmodule",
          "5.0",
          "Some description",
          "Name of Author",
          "unrealircd-5",
      };
  There's a new author field, the version must start with a digit,
  and also the name of the module must match the loadmodule name.
  So for example third/funmod must also be named third/funmod.
* The MOD_TEST, MOD_INIT, MOD_LOAD and MOD_UNLOAD functions no longer
  take a name argument. So: MOD_INIT(mymod) is now MOD_INIT()
2019-09-13 15:27:40 +02:00
Bram Matthys 9114c0ed85 The name of the module must now match the relative path, e.g.
the chanmodes/delayjoin module must be named chanmodes/delayjoin
in the module header.
This because currently we have two module names for each module,
one is the name from the MOD_HEADER and the other is the
relative path, such as used by loadmodule and is_module_loaded().

This commit also (not entirely, but practically) breaks loading
of modules outside the regular modules path. I don't think that's
a problem, although it could use a bit more documentation.
2019-09-13 15:09:07 +02:00
Bram Matthys b40981f0ab Prevent a dlopen() if module is already loaded (instead of ~50 lines
further down). This is in case you have two loadmodule lines, which
isn't particularly unusual. Saves some CPU too....
2019-09-13 14:52:57 +02:00
Bram Matthys 5c209bf6ca require-module: CONFIG_RUN: only return 1 for settings that are for us. 2019-09-13 09:46:41 +02:00
GottemHams 43b03e75a6 Fixed some now-outdated comments in require-module, also send deny module notices globally instead of locally and change the default message for this 2019-09-12 21:45:33 +02:00
GottemHams 4a85e4cd8b Load require-module by default [skip-ci] 2019-09-12 20:54:09 +02:00
GottemHams ab7cdbf2a7 Fix a couple of bugs recently introduced in require-module, also delay SQUITting until after the current SMOD command has been parsed 2019-09-12 19:48:33 +02:00
Bram Matthys 70410b3f33 Remove unused variables (67 files done, will do rest another time). 2019-09-12 17:57:01 +02:00
Bram Matthys 8d2dad4796 chanmodes/floodprot: remove old +f 1:1 conversion code, cleanup a bit
and remove unused variables (unused now, that is).
2019-09-12 16:49:20 +02:00
Bram Matthys c3f7bbd9c0 require-mode: account for a little bit more room in S2S command
(not just hostname but also the command "SMOD" etc.. let's just say
16 bytes for now)
..and some minor cleanups of variables that are not needed.
2019-09-12 07:55:34 +02:00
Bram Matthys cafe3cfd6d Some S2S command changes to new require-modules module:
REQMODS Gmodname:version ....
to:
SMOD G:modname:version ....
Also, call the module require-module to be consistent with the
naming of the configuration directive.
Not sure yet of the set name, but call it set::require-module for
now as well.
2019-09-12 07:38:55 +02:00
Bram Matthys 88cbc38ff2 Do some more syntax checking, even for servers.
This fixes a crash in case of incorrect server to server traffic.
2019-09-12 07:16:18 +02:00
GottemHams 3948c3a74b Forgot to remove a lil' comment :D [skip-ci] 2019-09-11 22:26:53 +02:00
GottemHams 358a31eaee First draft of require-modules module (require modules globally or deny them) 2019-09-11 22:18:03 +02:00
GottemHams daa2441c1c Stray tab in rmtkl :D 2019-09-11 22:14:03 +02:00
Bram Matthys c833ac2082 And some final cleanups of today, nothing important. 2019-09-11 20:07:47 +02:00
Bram Matthys 482c85de44 Get rid of this sptr->serv->user, as we already have sptr->serv->by
to track who initiated the connect. It also didn't seem to be displayed
anywhere but in /TRACE.
2019-09-11 19:46:52 +02:00
Bram Matthys 5659a2b177 Document more core structs.
[skip ci]
2019-09-11 19:44:10 +02:00
Bram Matthys 9b113c27e4 Document some more structs and group them in a logical place. 2019-09-11 19:07:11 +02:00
Bram Matthys c72d848b61 Get rid of MembershipL since there's no difference anymore between
local membership structs (MembershipL) and remote ones (Membership),
so they are now all called... Membership.
2019-09-11 17:53:29 +02:00
Bram Matthys bf2c5110db IsPerson() -> IsUser(), MyClient() -> MyUser(), etc.
This so we have a few simple concepts:
Client: this can be a user, server, or something unknown yet
Then the type of clients:
User: this is a user, someone with a nick name.
Server: this is a server
Etc.
2019-09-11 17:43:17 +02:00
Bram Matthys fcf0ff4e3c Document client statuses (cptr->status) and some more renames. 2019-09-11 16:52:11 +02:00
Bram Matthys 2df5326615 Overhaul of all client flag macros (mass renaming, always use getters/setters/checkers) 2019-09-11 16:00:47 +02:00
Bram Matthys e372e9118d Move cptr->count to cptr->local->identbufcnt since this only used by
the ident reading code nowadays, which obviously only happens for
locally connected users.
2019-09-11 14:36:12 +02:00
Bram Matthys d80e601760 Rename sptr->username to sptr->ident, since that is what it is.
[skip ci]
2019-09-11 14:31:14 +02:00
Bram Matthys c69bdbe175 ->status is now an enum of ClientStatus and STAT_xx -> CLIENT_STATUS_xx 2019-09-11 14:27:32 +02:00
Bram Matthys 792709bf4f Move cptr->fd to cptr->local->fd. This may cause some crashes while
the rest of the code is audited / checked ;)
2019-09-11 14:21:07 +02:00
Bram Matthys 68b7368305 Document Client struct
[skip ci]
2019-09-11 14:14:09 +02:00
Bram Matthys cb236eea88 Rename cptr->from to cptr->direction, since the 'from' is rather misleading
as cptr->from is NOT (necessarily) the server where cptr is connected to.
So we now call it cptr->direction since it indicates the directly connected
server (or &me)... in other words: the direction of the client path.
2019-09-11 14:03:27 +02:00
Bram Matthys 6a019d6188 Let's allow user connections.
*sigh*
(at least we have automated tests for this)
2019-09-11 13:44:55 +02:00
Bram Matthys 628aab3a76 Duh, check NULL pointer properly in Auth_Check() in case of NULL structs.
Fixes crash-on-connect due to an earlier commit last hour.
2019-09-11 13:38:49 +02:00
Bram Matthys 1e6a3bdd55 Bump PASSWDLEN to something "large enough for everyone" (256) rather than current (48). 2019-09-11 13:27:45 +02:00
Bram Matthys 786054e6b7 Remove 'md5', 'sha1' and 'ripemd160' from auth code. These are insecure and
old authentication types that are already deprecated in UnrealIRCd 4.x.
They don't contain any rounds which means they can be cracked at a rate of
millions per second. Use the secure hashing type 'argon2' instead
(or, if you must, use the less secure 'bcrypt' type).
2019-09-11 13:17:28 +02:00
Bram Matthys 04607f5b1a Various auth cleanups: Auth_Check() now returns 1 on allow and 0 on deny (!)
to keep things simple, rather than having 4 different return values
(yes.. FOUR!).
[skip ci]
2019-09-11 13:10:15 +02:00
Bram Matthys 05e776fb71 More cleanups: now mostly auth-related: use better names and use enums
for authentication types. Rename Auth_Make to Auth_Hash. Add docs. etc.
2019-09-11 12:37:34 +02:00
Bram Matthys e8d53ffe8e And more type changes to make things consistent and more readable. 2019-09-11 11:04:31 +02:00
Bram Matthys 2a5ea10453 Lots of changes again. Most notable: Cmdoverride -> CommandOverride,
including things like CallCmdoverride() to CallCommandOverride().
Type changes like aTKline -> TKL and many more (in particular
aSomething to Something etc. such as aWatch to Watch) but these are
less used by 3rd party module coders.
2019-09-11 10:20:00 +02:00
Bram Matthys f55682cbaa More (typedef) struct name changes. Mostly configuration but also
aCommand to RealCommand. Although not sure if this latter makes
things a lot more descriptive :D. Can revisit later.
(more to follow)
2019-09-11 10:04:47 +02:00
Bram Matthys 23116d344a Give structs the same name as the typedefs. Rename aClient to Client,
aChannel to Channel, and some more. Third party module coders will
love this. But.. it makes things more logical and the doxygen output
will look more clean and logical as well.
(More changes will follow)
2019-09-11 09:48:00 +02:00
GottemHams fbd7ff1f5a Implemented set::min-nick-length (default 0 aka no minimum required) and added a line for it to /stats S, as a bonus my editor strips trailing whitespace :D 2019-09-09 20:33:38 +02:00
GottemHams a0db737408 hideserver module still used old-style version string [skip-ci] 2019-09-09 19:46:46 +02:00
Bram Matthys 5b361e69bb Get rid of configure check for strtoul and the src/strtoul.c file. 2019-09-09 17:49:10 +02:00
Bram Matthys ec2fdb82e0 Get rid of configure check for strerror() 2019-09-09 17:45:24 +02:00
Bram Matthys 80bc15c6d3 Apparently our strtoken() is special, don't bother then. Still, get rid of
the configure check.
2019-09-09 17:32:59 +02:00
Bram Matthys 1cdbbe043f Make strtoken() use strtok_r / strtok_s.
And get rid of the config check, as strtoken() never existed anyway.
2019-09-09 17:19:25 +02:00
Bram Matthys e5f73fdbcd Don't use custom inet_pton{4,6} functions
[skip ci]
2019-09-09 17:08:25 +02:00
Bram Matthys 078cfa88ea Get rid of configure check for strtok()
[skip ci]
2019-09-09 16:58:44 +02:00
Bram Matthys 36cb2226cc Get rid of checking inet_pton/net_ntop. Should be available on IPv6-capable
operating systems. And we require IPv6-capable since UnrealIRCd 4 already,
so.. ;)
2019-09-09 16:51:31 +02:00
Bram Matthys c86d03dcca Windows build fixes 2019-09-09 16:46:57 +02:00
Bram Matthys 5f9e919b18 Remove more configure checks: malloc.h, AC_FUNC_SETPGRP, AC_FUNC_SETVBUF_REVERSED
[skip ci]
2019-09-09 16:38:24 +02:00
Bram Matthys 5e4c481d93 Yes, strcasecmp is always available, configure. 2019-09-09 16:30:02 +02:00
Bram Matthys ca2239827e Get rid of NICK_GB2312/NICK_GBK/NICK_GBK_JAP in config.h. I am not aware
of anyone actually using these. So running with this was rather untested
(if it worked at all, which I doubt).
2019-09-09 16:20:26 +02:00
Bram Matthys 7d4b7c2fed Get rid of stricmp/strnicmp (use strcasecmp/strncasecmp) 2019-09-09 16:13:32 +02:00
Bram Matthys 9636f83a2b Always assume POSIX signals (on non-Windows, that is). 2019-09-09 16:08:18 +02:00
Bram Matthys 05af50d1fc Remove some HPUX stuff. We don't support or test this so leaving
this in the source gives a false impression. Also some ULTRIX
stuff (from 1995???).
2019-09-09 15:53:44 +02:00
Bram Matthys 1183e88077 Remove old SunOS / Solaris / AIX code.
And some other outdated things for non-POSIX systems...
2019-09-09 15:46:19 +02:00
Bram Matthys 8d453ffc40 Get rid of index() and some useless casts 2019-09-09 14:54:49 +02:00
Bram Matthys 3f690ec1df Get rid of configure checks for inet_addr and inet_ntoa. 2019-09-09 14:47:42 +02:00
Bram Matthys d434cf948b Get rid of bcmp/bcopy/bzero. 2019-09-09 14:41:40 +02:00
Bram Matthys e34888802a Move check for C99 compiler to the beginning and print some meaningful
hint to the user if it cannot be found.
2019-09-09 14:09:58 +02:00
Bram Matthys 2276185939 Get rid of more ./configure checks.
(Let's see if Windows complains again...)
2019-09-09 13:56:37 +02:00
Bram Matthys a0aec38df2 Get rid of DISABLE_USERMOD, since you can achieve the same in U5 via
the restrict-commands module in a dynamic way (with more options too).
2019-09-09 13:27:25 +02:00
Bram Matthys 5141e3cdfe Fix for Windows due to previous
[skip ci]
2019-09-09 13:16:31 +02:00
Bram Matthys a9e0655650 Remove more old stuff from ./configure 2019-09-09 13:11:30 +02:00
Bram Matthys 90d39d4665 tkldb module: Turn a few config_error() into config_warn() since
we continue, while errors mean we would fail to boot (or fail to rehash)
which is not the case.
2019-09-08 20:50:55 +02:00
Bram Matthys c423f9c8f7 Remove some more ./configure checks that are likely unneeded. 2019-09-08 20:22:45 +02:00
Bram Matthys 7be894bcda Let's see if we can drop unreal_CHECK_TYPE_SIZES in configure.ac.
Saves some ./configure CPU time.
2019-09-08 20:14:35 +02:00
Bram Matthys 0c4502bf79 Define and use SIPHASH_KEY_LENGTH rather than some magic value. 2019-09-08 14:15:23 +02:00
Bram Matthys ebd9c738f2 Some cleanup/rewrites of 'r' (repeat) in the floodprot module (+f).
Use a more simple hashing algorithm and one that uses 64 bits,
don't allocate any memory dynamically, just use an int64_t.
Also, only do the hashing if 'r' is actually enabled in +f
on the channel, as otherwise it's pointless.
2019-09-08 14:06:40 +02:00
Bram Matthys 9fe82e4a9f Fix read-after-free in HOOKTYPE_LOCAL_PART hook. 2019-09-08 08:41:58 +02:00
Bram Matthys e9847a2279 Fix OOB read due to last commit (62c7f67f7a) 2019-09-08 08:38:13 +02:00
Bram Matthys 62c7f67f7a Make StripControlCodes() filter out zero width space as well (U+200B). 2019-09-07 18:32:21 +02:00
Bram Matthys 08a4c489f6 Update HELPOP SPAMFILTER. The syntax was OK but the explanation under it
was confusing since it was explaining the fields in a different order.
2019-09-07 18:00:58 +02:00
Bram Matthys ec5a66ba80 UnrealIRCd 5.0.0-alpha2 release 2019-09-07 15:54:15 +02:00
Bram Matthys 7eb9ed90cb Cleanup sub1_from_channel. Don't kick insecure users on +z channels when we
are merging (equal TS), only kick our users when we are on the losing side
(=if there is a different TS, IOTW: the channel was recreated later).
2019-09-07 14:45:47 +02:00
Bram Matthys ab0608a98c Don't send OperOverride notice if &me (server)
[skip ci]
2019-09-07 11:06:04 +02:00
Bram Matthys c6cfc2f5c8 Fix receiving "+i must be set" twice (for users) or more (for opers)
[skip ci]
2019-09-07 10:52:38 +02:00
Bram Matthys b9e2f1c5fb Fix crash in RMTKL (only possible with rogue server traffic)
[skip ci]
2019-09-07 10:25:36 +02:00
Bram Matthys 62dc1181ba Protect against late bogus PROTOCTL SID=xxx (from authenticated servers) 2019-09-07 10:16:46 +02:00
Bram Matthys d3db771a1b Add some tracing code until a certain RMTKL bug is found. 2019-09-07 09:35:50 +02:00
Bram Matthys 7c9325d8d1 Move get_mode_bitbychar() and get_extmode_bitbychar() to the core
rather than helper functions in floodprot. (I need them)
2019-09-07 09:24:26 +02:00
Bram Matthys 62c0edde12 Partially rewrite SVSMODE #chan code to fix a crash from hostile servers.
Also get rid of the TS parameter in there, which nobody uses anyway.
It didn't even refer to the channel TS.. quite confusing..
it used user->since... so it seems it was against crossing users
(nick changes)... well, we have UID for that now.
2019-09-07 08:02:07 +02:00
Bram Matthys 579c4bd884 Compile with -O1 in ASan mode, rather than -O0. 2019-09-06 20:58:32 +02:00
Bram Matthys dc5fd50a54 Fix potential issues if msgbypass extban module is not loaded.
[skip ci]
2019-09-06 20:55:42 +02:00
Bram Matthys a3e911a174 Make issecure (+Z/-Z) use the same msgids network-wide. 2019-09-06 15:18:45 +02:00
Bram Matthys cf873d826a Add MessageTag *mtags argument to various (channel related) hooks, in case
they need access to those. For more information, see:
https://bugs.unrealircd.org/view.php?id=5343
2019-09-06 14:30:16 +02:00
Bram Matthys 4a6f56e967 Fix list modes not being restored properly from channeldb. 2019-09-06 13:06:53 +02:00
Bram Matthys 758dc74315 Fix memory leak in new ban exception code. 2019-09-06 09:15:27 +02:00
Bram Matthys 9b1fa66434 Duh, I meant, NOREMOVETMP.
[skip ci]
2019-09-06 09:13:19 +02:00
Bram Matthys 46486310dc Obey #define REMOVETMP (for testing) 2019-09-06 09:02:17 +02:00
Bram Matthys 73d320f553 Use enum for BAN_ACT_* and silence a (stupid) clang warning. 2019-09-05 20:54:31 +02:00
Bram Matthys 868895c70a Add except ban type 'all'. For a full list of options, see
https://www.unrealircd.org/docs/Except_ban_block#UnrealIRCd_5
Also, fix shun (s) not being available as an exempt option (bug).
2019-09-04 19:38:23 +02:00
Bram Matthys 750479aa2c Add more /ELINE options to bypass the following types: unknown data flood,
antirandom, antimixedutf8 and ban version. Just type /ELINE to see the
options / syntax. (TODO: more testing)
2019-09-04 18:43:06 +02:00
Bram Matthys 72664fc3df Deal with hostile servers in msgid code 2019-09-02 20:45:58 +02:00
Bram Matthys 0724c0ce13 stfu compiler, you are wrong 2019-09-02 20:16:46 +02:00
Bram Matthys 7ff78b4cf6 Make config test for except ban::type. Also use 'connect-flood'
rather than throttling, since that's the term we use everywhere
in our documentation and for config options.
2019-09-02 20:14:48 +02:00
Bram Matthys a006a9aea9 Recode tkl type table. '/STATS except' works now (lists ELINEs and
except ban in config).
If you want to play with exceptions, type /ELINE for information.
For the configuration file it is important to know that 'except tkl'
is now called 'except ban'.
Also if you do not specify an except ban::type we now default to
exempt from all regular server ban types (but not qline, spamfilters,
blacklist or throttling)
2019-09-02 19:30:23 +02:00
Bram Matthys 58618bf2b6 Add support for ban exceptions, via /ELINE and via the config file.
Still need to fix some FIXME/TODO items and things haven't been
fully tested yet, so server sync issues or crashes are still possible.
Release notes will be updated another day as well..
2019-09-01 20:49:14 +02:00
Bram Matthys 76b1655f9b Add TKL exception type handling (phase 2 of X) 2019-09-01 10:58:29 +02:00
Bram Matthys cdcac52d81 It helps if I git add src/api-efunctions.c... 2019-09-01 09:40:44 +02:00
Bram Matthys 3fcd25b542 Split off efunctions to src/api-efunctions.c, use enums and
a different style of initializing the efunctions table which
is less error-prone.
2019-09-01 09:38:55 +02:00
Bram Matthys 2483376796 Fix crash on adding QLINE (reported by The_Myth) and 'STATS bannick'
should really show QLINEs as well. Up to now it only showed (local)
config banned nicks.
Fixes https://bugs.unrealircd.org/view.php?id=5387
2019-09-01 08:31:03 +02:00
Bram Matthys 8a6c84876e Rewrite/cleanup huge portion of TKL handling (16 files updated, but
src/modules/tkl.c is the main one).
Also move DB writing/reading functions to src/misc.c so they can be
removed out of channeldb and tkldb.

Important note to current tkldb users:
Unfortunately due to the major cleanup I had to remove upgrading
for previously saved tkl db files. That seemed not worth the effort
for maybe <15 current users or so. It also makes the tkldb code
a lot more cleaner. Otherwise it would be a huge mess.

Currently a FIXME item: spamfilter support in RMTKL.
2019-08-31 15:29:04 +02:00
Bram Matthys 0116c4f0d6 Partial TKL recode - (pre) phase 1 2019-08-28 20:21:04 +02:00
Bram Matthys e6c321c7dc Some cleanups / comments added, but no real code changes. 2019-08-28 18:08:38 +02:00
Bram Matthys c1babb7411 Fix reading unitialized memory due to one of the commits from yesterday
(in the crash reporter)
2019-08-28 07:13:31 +02:00
Bram Matthys 19a0d205e6 Enable core dumps if using ASan (applies to alpha/beta and dev builds) 2019-08-27 16:27:56 +02:00
Bram Matthys d477e4930e Crash reporter: include libc for better debugging. 2019-08-27 16:05:32 +02:00
Bram Matthys 308ac85bba UnrealIRCd crash reporter: require TLSv1.2 or later 2019-08-27 14:24:27 +02:00
Bram Matthys 083953ca00 Release notes: Developers: mention ModuleHeader changes.
[skip ci]
2019-08-27 14:15:44 +02:00
Bram Matthys 17c6b5976d Update output of MODULE command (MODULE -all) to include the author,
slightly change the output and use RPL_TXT rather than NOTICE.
2019-08-27 14:12:00 +02:00
Bram Matthys fc69c5300e Windows buildbot fixes
[skip ci]
2019-08-27 12:47:30 +02:00
Bram Matthys fa29e22ea2 Windows build: attempt build tests
[skip ci]
2019-08-27 08:46:54 +02:00
Bram Matthys 10faaf91ba Bump module header version to "unrealircd-5", add author field
and remove old dependency field (never used, was always NULL,
broken since 3.2.x)
I'll add some constraints later on things like names and versions.
IOTW: more changes to follow, don't mass update your own mods yet.
2019-08-26 20:29:47 +02:00
Bram Matthys 526e5e09a4 Fix for commit from an hour ago. One was unable to remove the
+nt modes by f.e. setting set::modes-on-join to "+";
2019-08-26 19:35:40 +02:00
Bram Matthys a72e4f39f2 Fix both duplicate channel messages (reported by The_Myth) and
set::broadcast-channel-messages not having any effect (reported
by FwdInTime). Yes, both fixes from earlier were incomplete.
2019-08-26 19:21:14 +02:00
Bram Matthys 890e4c9acd Set set::modes-on-join to +nt by default and also put it in the
example.conf. Leaving it empty by default is strange and contrasts
with our "secure by default" principle.
2019-08-26 18:22:12 +02:00
Bram Matthys d331f22dbc Windows buildbot updates 2019-08-25 19:00:26 +02:00
Bram Matthys 8d2ac9c50e Fix set::broadcast-channel-messages configuration item not working.
Reported by FwdInTime in https://bugs.unrealircd.org/view.php?id=5367
2019-08-25 18:52:39 +02:00
Bram Matthys e0b941739c Fix problem with PRIVMSG echoing back in S2S. Reported by The_Myth. 2019-08-25 18:49:10 +02:00
Bram Matthys 4e1768d9ed Windows: Blah 2019-08-25 18:41:36 +02:00
Bram Matthys 0e529f75f8 Windows: attempt build tests
[skip ci]
2019-08-25 18:02:50 +02:00
Bram Matthys ebaac5a6b8 Get rid of various never used config options and also port
the U4 fix for Windows where it says "Too many connections"
way too quickly. (Sorry for mixing both in 1 commit..)
2019-08-25 17:48:32 +02:00
Bram Matthys 38b55fb3c5 Not ready for release yet, but bump git version to alpha2 already now that
the Windows build is working (5.0.0-alpha1 had no Windows build).
2019-08-25 14:38:02 +02:00
Bram Matthys 6ead10f42d Windows: build with /WX (equivalent to -Werror) and turn on
/analyze again. Not sure how long I can bear that last one though
as now compilation takes about 15 minutes rather than a few.
2019-08-25 14:03:11 +02:00
Bram Matthys 8484511296 Make Windows build compile without warnings with /W3
Disable these warnings, though:
C4267: downgrade of size_t to int and such. pointless...
C4101: unreferenced local variable
C4018: signed/unsigned mismatch
C4244: implicit conversions with "possible loss of data".
       there are 75+ of them and they are likely all harmless
       and/or intentional (usually plain obvious too)
C4996: fixme! warnings about deprecated functions, currently only for GetVersion..
2019-08-25 13:00:31 +02:00
Bram Matthys 6f884a6f60 Windows build: cannot pass by reference directly.
Solves:
warning C4133: 'function': incompatible types - from 'long *' to 'const time_t *const '
2019-08-25 10:36:17 +02:00
Bram Matthys c7a057cab1 Fix for previous commit (windows makefile etc..). 2019-08-25 10:23:25 +02:00
Bram Matthys 33dc939a6d Windows build: remove more warnings. Update Makefile.windows. 2019-08-25 10:04:57 +02:00
Bram Matthys dea31523e3 Add some (redundant) information regarding the last ./Config question.
[skip ci]
2019-08-24 20:02:47 +02:00
Bram Matthys d357ef8957 More config.h cleanups. Lower kill chase time limit from 90 to 30
which seems more reasonable to me.
2019-08-24 19:57:40 +02:00
Bram Matthys 153e38be10 Get rid of "max sendq" ./Config question, which actually was only
setting the default class::sendq that pretty much everyone overrides
in class (isn't this even required? ;D).
Rename to DEFAULT_SENDQ since we have DEFAULT_RECVQ too.
2019-08-24 19:50:39 +02:00
Bram Matthys d19b4e70ad Remove old and broken option SHOW_INVISIBLE_LUSERS 2019-08-24 19:45:26 +02:00
Bram Matthys d06715d9ee REMOTEINC_SPECIALCACHE is no longer optional 2019-08-24 19:41:14 +02:00
Bram Matthys 9e02ca2b3c More FORMAT_STRING() checking, get rid of old (non-)USE_VARARGS stuff.
Fix some more bugs (type differences) when compiling in DEBUGMODE.
2019-08-24 19:37:25 +02:00
Bram Matthys a3b5f29626 Mass change of time_t in printf-like functions to %lld with an
explicit cast to (long long). On *NIX we could get away with
lazily assuming time_t is of the same length as long (and use %ld),
even though the specification says nothing about it.
Unfortunately on Windows things are not that simple:
'time_t' is 'long long' (64 bits) and both 'int' and 'long'
are 32 bits, even when compiling in 64 bit mode.

This problem could be 'fixed' in multiple ways:
One way would be to minimize the usage of time_t and use 'long long'
or 'uint64_t' everywhere for variables to minimize casting later.
I, however, chose to maintain 'time_t' for most of time grabbing
and time calculations (eg: delta), and do the explicit cast in
any printf-like functions that may be there.
Both solutions work. I mostly like the explicit time_t look, so one
can immediately recognize a variable relates to time.
2019-08-24 18:33:52 +02:00
Bram Matthys 85b3b91b19 Windows build: Add format string verification during build.
(Will be used to hunt and fix those time_t integer type mismatches)
2019-08-24 17:10:44 +02:00
Bram Matthys 1f99b282b0 Similarly, get rid of DISABLE_STACKED_EXTBANS ./Config question since
that define no longer exists...
2019-08-23 20:39:27 +02:00
Bram Matthys 444c4f4381 Get rid of some old/rarely used ./Config shit 2019-08-23 20:37:27 +02:00
Bram Matthys a6eac922ea Remove unused function create_snomask() 2019-08-23 20:28:48 +02:00
Bram Matthys ccf80d16f2 SnomaskAdd(): remove 3rd argument (unset_on_deoper), as all snomasks
are IRCOp-only now, they will always be removed on deoper.

-extern Snomask *SnomaskAdd(Module *module, char ch, int unset_on_deoper, int (*allowed)(aClient *sptr, int what), long *mode);
+extern Snomask *SnomaskAdd(Module *module, char ch, int (*allowed)(aClient *sptr, int what), long *mode);
2019-08-23 20:23:54 +02:00
Bram Matthys e889a07849 Updates to ircvsnprintf(): add %lld and remove special handling of %lu.
And some re-indenting when we're at it...
2019-08-23 08:41:47 +02:00
Bram Matthys 9a562dea24 Windows: Move the uninstaller to bin\uninstaller
Windows: Use generic docs URL for documentation
2019-08-22 20:15:46 +02:00
Bram Matthys d6faa00ae8 Use generic includes 2019-08-22 19:15:16 +02:00
Bram Matthys 02a4bbc348 Get rid of this stupid 'TS' type, just use 'time_t'. 2019-08-22 18:39:28 +02:00
Bram Matthys e65f96a9e0 Windows build: 'clean' should really cleanup..
[skip ci]
2019-08-22 18:07:53 +02:00
Bram Matthys 8c70769bef Windows: Use W7 API (or later) so we have inet_pton/inet_ntop. 2019-08-22 18:01:59 +02:00
Bram Matthys 8007a83020 Get rid of include/inet.h and use system headers properly. 2019-08-22 17:48:39 +02:00
Bram Matthys a1920d7733 Windows installer: require Windows 7 or newer (bye XP/Vista)
[skip ci]
2019-08-22 17:34:41 +02:00
Bram Matthys 1c52557c92 Update makecert.bat for Windows with new paths
[skip ci]
2019-08-22 17:10:09 +02:00
Bram Matthys 02d3364373 More Windows fixes... 2019-08-22 16:43:05 +02:00
Bram Matthys d8f080de67 Drop support for systems without snprintf() and vsnprintf()
Those are in POSIX.1-2001. Even Windows has them nowadays...
"Our" implementation doesn't even work properly under Win64.
2019-08-22 16:41:39 +02:00
Bram Matthys f5168b6323 Buildbot: U5: curl-ssl -> curl (always SSL/TLS after all...) 2019-08-22 15:40:03 +02:00
Bram Matthys b8c6e2e88b Updates for BuildBot on Windows:
32 to 64 bit transition, visual studio 2019 and some directory name
updates as we now put all the shit in c:\dev\unrealircd-5-libs,
or c:\projects\unrealircd-5-libs in case of buildbot..
2019-08-22 15:34:05 +02:00
Bram Matthys 87b8d27648 Windows: move *.exe and libraries to bin\ directory, move LICENSE.txt
and Donation.txt to doc\
2019-08-22 15:08:16 +02:00
Bram Matthys bcceea9065 Windows: build fixes and it is now a 64 bit application.
See https://bugs.unrealircd.org/view.php?id=5320
Expect several more major fixes/changes to follow...
2019-08-22 14:43:19 +02:00
Bram Matthys b87b4dd61a Windows: Fix path in makecert.bat 2019-08-22 14:37:49 +02:00
Bram Matthys 5e0ed6d626 UnrealIRCd 5.0.0-alpha1 2019-08-20 19:39:04 +02:00
Bram Matthys 71935d6d48 Use +f in +f examples (duh)
[skip ci]
2019-08-19 16:41:11 +02:00
Bram Matthys 142289c2de Let's just call it a database rather than persistent storage file.
Also, fix a small memory leak if the database was corrupted.
2019-08-19 16:38:57 +02:00
Bram Matthys 86f7d8c5cc Document new 'r' (repeat) flood type and 'd' (drop) action in release notes.
[skip ci]
2019-08-19 16:28:41 +02:00
Bram Matthys 5a8d231c6d Floodprot changes (floodprot.c):
1) Clean up check_for_chan_flood()
2) Make the new repeat action kick by default (instead of forcing 'b'
   if no action is specified)
3) Also make repeat work with timed bans
2019-08-19 16:12:51 +02:00
Bram Matthys dd5d93ae77 Mostly cleanups / unimportant stuff. 2019-08-19 15:27:03 +02:00
Bram Matthys 7cda4eab53 Fix memory leaks in the new tkldb and channeldb modules. 2019-08-19 15:26:15 +02:00
Bram Matthys cbea57fefe Fix read after free in module API code when unloading channel mode,
client capability, history backend or message tag for good.
2019-08-19 15:25:12 +02:00
Bram Matthys 6f87314bbf Funny mistake :D 2019-08-19 10:10:47 +02:00
Bram Matthys e72845bddf link::options::tls was not working (an alias for link::options::ssl) 2019-08-18 19:25:42 +02:00
Bram Matthys fc0c06621b AppArmor: use a more generic rule for data/ now that we have all these
databases, and who knows what else the user has (think: 3rd party modules).
2019-08-18 18:42:33 +02:00
Bram Matthys d8e121fbc5 Another test commit for buildbot. 2019-08-18 16:51:34 +02:00
Bram Matthys fac5036d5f Test commit 2019-08-18 16:40:38 +02:00
Bram Matthys c27e7fa0dd Some small README updates. 2019-08-18 11:19:18 +02:00
Bram Matthys b312a88b0a Update test framework location 2019-08-18 11:18:52 +02:00
Bram Matthys fdabc7e5ad Fix memory leak on server sync. 2019-08-18 09:40:31 +02:00
Bram Matthys 33fcc5b550 Enough updates on labeled-response and echo-message for today.
Note that the labeled-response implementation currently requires
'batch' and will always start a BATCH if there is any response.
Later on we can implement a simple queue so we don't have to
start a batch for 1-line responses (which works, but looks a bit
silly if you look at raw server traffic). That may be after alpha1,
though, as there are more (important) things to work on right now.
2019-08-18 09:24:43 +02:00
Bram Matthys 4ccb290dac Fix two TODO's. 2019-08-18 08:27:43 +02:00
Bram Matthys bdcee3fcfa Send BATCH even if client is lacking message-tags CAP. 2019-08-18 08:27:07 +02:00
Bram Matthys 1a305b0b45 Remove this old code in hunt_server() or we end up sending message
tags twice. (This code was there before sendto_one() got it's
extra MessageTag * parameter)
2019-08-18 08:06:08 +02:00
Bram Matthys d9694a4644 Fix for history module if 'batch' is negotiated but 'server-time' is
not. Previously this would result in receiving an empty BATCH (with
no history content, that is), which is confusing.
2019-08-18 07:25:26 +02:00
Bram Matthys 448ee87ed4 More and more and more
[skip ci]
2019-08-17 15:45:37 +02:00
Bram Matthys 5bc91a02f9 Some minor text changes in release notes.
[skip ci]
2019-08-17 15:44:49 +02:00
Bram Matthys 52aed93707 Add preliminary release notes for UnrealIRCd 5 2019-08-17 15:41:03 +02:00
Bram Matthys e1822997b8 Make 'webredir' module work if 'websocket' module is loaded,
which is quite likely even.
2019-08-17 13:00:33 +02:00
Bram Matthys 15254470a7 Do some minimal checks on the provided set::webredir::url
[skip ci]
2019-08-17 13:00:09 +02:00
Bram Matthys 9fbd7f33fc The set::webredir block should be commented out by default.
[skip ci]
2019-08-17 12:48:30 +02:00
Bram Matthys c941c529c3 Load 'reputation' and 'connthrottle' by default. Add to example.conf. 2019-08-17 12:46:43 +02:00
Bram Matthys 143d747e66 Rename 'cmdrestrict' to 'restrict-commands'. Load the module by default
so you can use set::restrict-commands without having to loadmodule.
Restrict the LIST and INVITE commands in the example.conf, which is
often a good idea. Finally, document the configuration/usage at:
https://www.unrealircd.org/docs/Set_block#set::restrict-commands
2019-08-17 12:34:14 +02:00
Bram Matthys 6c02c896d9 add +H to HELPOP CHMODES 2019-08-17 12:06:05 +02:00
Bram Matthys 8ae9e85a9a Channel history: set default playback on join lines to 15. 2019-08-17 12:05:23 +02:00
Bram Matthys 5f99586982 And another fix for 0d2d4d5bca. 2019-08-17 09:36:29 +02:00
Bram Matthys f10ec9aebc Fix for previous commit (0d2d4d5bca) 2019-08-17 09:31:58 +02:00
Bram Matthys 0d2d4d5bca Rename match() and _match() to match_simple() -AND- invert the return value
of match_simple() and match_esc(). So, developers, be aware, this is how
you should use the function in a correct way:
if (match_simple("*fun*", str))
    printf("It was fun\n");

Rationale:
I've always been annoyed by the inversed logic, even though it was similar
to strcmp. So I've reverted it.
I could have chosen to maintain match() rather than this match_simple()
name, but this way I force (3rd party module) devs to update their function,
while otherwise everything would mysteriously fail due to the inverted logic.
2019-08-17 09:20:49 +02:00
Bram Matthys e1fcc3a667 Rename match() and _match() both to match_simple()
and get rid of the "bahamut optimized version".
Stage 1 of 2.
2019-08-17 09:15:34 +02:00
Bram Matthys c01c9248f5 Revert e428c77c47 (only to try again later) 2019-08-17 09:05:09 +02:00
Bram Matthys e428c77c47 match() -> match_nuh() and _match -> match_simple() 2019-08-17 08:56:18 +02:00
Bram Matthys 870f10b8a5 Extban ~T:block:something is now auto-converted to ~T:block:*something*
since this is pretty much always what you want. Otherwise it's just
too confusing that things don't match.
2019-08-17 08:36:59 +02:00
Bram Matthys 29a3994d24 Fix some logic in add_listmode_ex(). Probably not terribly important
but theoretically one could have seen a "ban list full" error message
multiple times in rare cases.
2019-08-16 20:16:11 +02:00
Bram Matthys 0f7a172c30 Rename who to who_old, since whox is now loaded by default and
loading who_old should only be done if you want the classic old WHO.
2019-08-16 18:14:30 +02:00
Bram Matthys ccb534c3e9 res.{c,h} -> dns.{c,h} and moddata.c -> api-moddata.c 2019-08-16 18:09:25 +02:00
Bram Matthys dfcd465103 Rename some api-*.c files to be more descriptive. 2019-08-16 18:00:26 +02:00
Bram Matthys fffd459bf9 src/extbans.c -> src/api-extbans.c, and the same for extcmodes and umodes.
I suppose what is and what is not an API can be considered a bit arbitrary
but for us it is the stuff we expose via the module api. We now have:
api-clicap
api-command
api-event
api-extbans
api-extcmodes
api-history-backend
api-isupport
api-mtag
api-umodes
2019-08-16 17:52:49 +02:00
Bram Matthys fd37f050b8 Rename src/events.c to src/api-event.c for consistency. 2019-08-16 17:47:07 +02:00
Bram Matthys 4e0f1f5ffa Re-indent events.c and remove ancient event system locking routines. 2019-08-16 17:45:35 +02:00
Bram Matthys 41051cf3c7 Remove some unused variables
[skip ci]
2019-08-16 17:37:36 +02:00
Bram Matthys a408b61f32 For some unknown reason del_ListItem() iterated the entire list. Weird. 2019-08-16 17:36:15 +02:00
Bram Matthys 08b4844050 Update credits for UnrealIRCd 5. 2019-08-16 15:18:58 +02:00
Bram Matthys 3a454e3eb3 free_mtags() -> free_message_tags() 2019-08-16 14:54:28 +02:00
Bram Matthys 887cf24fd7 Add channeldb module (loaded by default): this saves all channel settings
such as name, creationtime, modes, topic, bans/exempts/invex to a database
and restores it on-boot. It only does this for +P (persistent) channels.
2019-08-16 14:42:25 +02:00
Bram Matthys d8f839ed44 floodprot (source code): use proper variable names. Not sure why I
didn't do this back in 2003... ah well, that was 16 years ago,
I forgive myself :D
2019-08-15 18:56:08 +02:00
Bram Matthys 7193600a08 Force buildbot.. 2019-08-15 12:09:21 +02:00
Bram Matthys e22000ed48 Buildbot test... 2019-08-15 12:02:11 +02:00
Bram Matthys d91f21a687 Update more old references to U4.. 2019-08-15 11:55:18 +02:00
Bram Matthys 9e1556a6f7 Dumdeedum 2019-08-15 11:44:20 +02:00
Bram Matthys 6dc7aac372 Update some unrealircd-4 references to unrealircd-5.
.. or actually I just want to test buildbot :D
2019-08-15 11:26:20 +02:00
Bram Matthys 16f3b797e4 Use different OpenSSL functions that are more of a hassle but
also exist in older versions such as 1.0.1.
2019-08-15 09:02:42 +02:00
Bram Matthys ced8b0935d Check for and refuse to run with <2048 bits RSA keys. I hope nobody is
using 1024 bit RSA keys in 2019, but always better to check and inform
the admin about such a big mistake.
2019-08-15 08:52:28 +02:00
Bram Matthys f58fff47d4 Small text change
[skip ci]
2019-08-14 09:28:14 +02:00
Bram Matthys 2127a36f61 Remove ~R extban as it is redundant now that we have ~a.
All services should have account names by now.
2019-08-13 21:08:22 +02:00
Bram Matthys a32e285d63 Document ~f extban in helpop.
[skip ci]
2019-08-13 21:01:49 +02:00
Bram Matthys e5b40f13df Change the new extban from ~L to ~f:#forward:*!*@*.
... this just to annoy Gottem.
2019-08-13 20:56:38 +02:00
Bram Matthys 4d74ca9d9a Take out labeled-response until it is unbroken (as in: don't load
by default for now). Not a high priority item at the moment.
2019-08-13 18:49:18 +02:00
Bram Matthys 4f4a867b58 Update prototype of HOOKTYPE_CHANMSG to include sendflags, prefix and target.
I needed the target for echo-message, and also in the history module we no
longer save to the history any @#channel messages, since otherwise they
could be played back to people we shouldn't see them ;)
2019-08-13 18:45:38 +02:00
Bram Matthys 4c8fe6e8d9 Add CAP echo-message. 2019-08-13 18:36:25 +02:00
Bram Matthys 912eea52d7 More NULs are always a good thing.
[skip ci]
2019-08-13 18:13:01 +02:00
Bram Matthys 5279212b30 More SSL to TLS changes 2019-08-13 13:09:49 +02:00
Bram Matthys 39bb0299f1 /REHASH -ssl -> /REHASH -tls 2019-08-13 12:59:56 +02:00
Bram Matthys 135b4808d0 Update example configs to use tls instead of ssl 2019-08-13 12:58:10 +02:00
Bram Matthys c4b276d2d8 Windows: another conf\ssl to conf\tls instance (in the installer)
[skip ci]
2019-08-12 14:54:50 +02:00
Bram Matthys 7fa2b8be05 More ssl -> tls moves. Also recommend to use 'certfp' rather than
the longer 'sslcertfp' or 'tlscertfp', we already support this since
4.0 so... updated the documentation as well.
2019-08-12 14:53:29 +02:00
Bram Matthys 8ff6ad17ee Part 4 of ssl/tls rename (not important)
[skip ci]
2019-08-12 14:44:14 +02:00
Bram Matthys b6c786d2c0 gplplusssl.rtf should mention LibreSSL, not OpenSSL.
[skip ci]
2019-08-12 14:43:10 +02:00
Bram Matthys ef739331b0 Rename ssl_antidos to tls_antidos. 2019-08-12 14:40:11 +02:00
Bram Matthys 2b0afacdf0 Rename of "ssl" to "tls" part 2 2019-08-12 14:35:32 +02:00
Bram Matthys 09cf485d6c Mass rename of "ssl" to "tls" everywhere. Including conf/ssl to
conf/tls. If you are upgrading then conf/ssl will be renamed to
conf/tls and a symlink will be added (so certbot etc won't fail).
This is part 1...
2019-08-12 14:26:31 +02:00
Bram Matthys 86844c3c2b Replace UnrealIRCd 4 -> UnrealIRCd 5 2019-08-12 13:49:35 +02:00
Bram Matthys 684baf9e59 Add a note to ./autogen.sh that this is only for devs, not end-users.
[skip ci]
2019-08-12 13:44:45 +02:00
Bram Matthys 2976c488b0 Delete appveyor.yml, as we are now using buildbot.
[skip ci]
2019-08-12 13:43:11 +02:00
Bram Matthys e44f572725 Rename makefile.windows -> Makefile.windows, consistent with Makefile.in
[skip ci]
2019-08-12 13:41:55 +02:00
Bram Matthys 7f903b422c Strip m_ prefix in modules (part II). Bump reported module version
of each module to 5.0 (or the ones that previously were 4.2, anyway).
2019-08-12 13:36:03 +02:00
Bram Matthys fc5569408d Drop the m_ prefix from modules.
So rename src/modules/m_*.c to src/modules/*.c and update makefiles
and modules.default.conf. Also remove m_ at various places in the
source files, but not the CMD_FUNC(), just the module name.
2019-08-12 13:32:58 +02:00
Bram Matthys 5701fbed20 Update installer script to reflect new windows paths
[skip ci]
2019-08-11 18:16:27 +02:00
Bram Matthys 4488819e69 Oops...
[skip ci]
2019-08-11 18:09:06 +02:00
Bram Matthys 61cf5f16d3 Ok.. I get it.
[skip ci]
2019-08-11 18:02:13 +02:00
Bram Matthys 63cfdb4b68 src/windows/win.h -> include/windows/win.h
and update the include name
@skipci
2019-08-11 17:58:53 +02:00
Bram Matthys 3d7117ea77 Whatever this is, I'm not leaving it alone :D
@skipci
2019-08-11 17:56:38 +02:00
Bram Matthys c68b0e9ab4 Rename windows.{c,h} -> win.{c,h} to avoid confusion 2019-08-11 17:51:48 +02:00
Bram Matthys 645989e602 Rename makefile.win32 to makefile.windows, among several other changes.
(Would surprise me if this compiles without failure, tho)
@skipci
2019-08-11 17:46:12 +02:00
Bram Matthys 1498f1e716 Rename directories from 'win32' to 'windows' 2019-08-11 17:40:08 +02:00
Bram Matthys 3a29677c79 Windows build fix, just rename the damn file. 2019-08-11 17:35:44 +02:00
Bram Matthys 6c398c58fc Windows makefile: you are weird. 2019-08-11 17:21:17 +02:00
Bram Matthys a53316d256 Rename src/s_svs.c to src/aliases.c, since that is what it contains. 2019-08-11 17:19:42 +02:00
Bram Matthys 03e095cd92 Rename src/s_*.c files: drop the useless s_ prefix. 2019-08-11 17:15:14 +02:00
Bram Matthys 0cd6b9bea1 Integrate s_auth.c into s_bsd.c (only 200 lines and the place fits well) 2019-08-11 17:09:22 +02:00
Bram Matthys 25687c2bed New efuncs: tkl_ip_hash() and tkl_ip_hash_type(), for the rmtkl module. 2019-08-11 14:48:07 +02:00
GottemHams ae8c0af51c Ported rmtkl (remove TKLs in bulk) while waiting for Syzop to implement some changes (compiles with a warning at the moment) 2019-08-10 21:55:34 +02:00
GottemHams f6df735291 floodprot: Floodtype 'r' for handling per-user repeated PRIVMSGs (CTCP/notice/ACTION/regular message) + action 'd' for dropping stuff for floodtypes 't' (per-user text) and 'r' 2019-08-10 19:25:51 +02:00
Bram Matthys 3c47e22b75 These TODO/FIXME's can be removed (well, except 1)
@skipci
2019-08-10 14:14:54 +02:00
Bram Matthys 5af31c4a30 These FIXME's can be removed.
@skipci
2019-08-10 14:12:29 +02:00
Bram Matthys c50f65c5bf Update two small FIXME's (nothing worth mentioning) 2019-08-10 14:09:00 +02:00
Bram Matthys 1cbfc85352 This FIXME was resolved AFAICT. In message-tags.c we do:
if (m->clicap_handler && (acptr->local->caps & m->clicap_handler->cap))
 return 1;
... so if messagetaghandler->clicap_handler is NULL then this won't be 1.
2019-08-10 13:34:01 +02:00
Bram Matthys 4d105afcf2 Update comments (duplicate words, blah)
@skipci
2019-08-10 13:29:14 +02:00
Bram Matthys a185e341e6 Update client_accepts_tag() to use the mtags API rather than
hardcoded if() statements.
2019-08-10 13:21:04 +02:00
Bram Matthys bcf21c9d7e Add fix for "bug" caught by fuzzer (incorrect @time in S2S traffic). 2019-08-07 17:33:11 +02:00
GottemHams 2c8f909759 Ported a major chunk of m_forward's functionality to chanmodes/link, with a bunch of improvements =] 2019-07-27 21:10:13 +02:00
GottemHams af2ef7d186 Updated cmdrestrict example configuration to reflect recent changes 2019-07-27 14:02:15 +02:00
GottemHams 3a1ae06345 cmdrestrict should be able to override any command, also couple of minor improvements 2019-07-27 13:56:30 +02:00
i 8c11ebd0e7 Make allow {} block always continue when there were no password or wrong password was specified. 2019-07-18 18:47:05 +03:00
i c9908a55c9 Added HOOKTYPE_CONFIGPOSTTEST for webredir module, to check if there is no set::webredir. 2019-07-16 01:18:41 +03:00
i e30de7b7a6 Removed default url for webredir module and refuse to load without url. 2019-07-15 21:59:41 +03:00
GottemHams 1079cded02 Nested comment blocks don't work anymore :D 2019-07-15 18:36:15 +02:00
GottemHams 19aad17d4e cfgstruct is not necessary for cmdrestrict :D 2019-07-14 23:08:42 +02:00
GottemHams 655027f5db Merge branch 'unreal50' of github.com:syzop/unrealircd-next into unreal50 2019-07-14 23:05:08 +02:00
GottemHams e5cfc5d798 cmdrestrict v1.0: Restrict specific commands until certain conditions have been met =] 2019-07-14 23:04:15 +02:00
i 53146f252c New module webredir (do 301 redirect for HEAD/GET/POST/PUT commands to the specified URL). 2019-07-14 22:37:55 +03:00
Bram Matthys 2894c16638 Lower set::ident::read-timeout to 7 seconds, which should be plenty
on the Internet of today.
2019-07-14 19:22:36 +02:00
Bram Matthys 1c5c501dc1 Remove m_nopost module as it is no longer useful.
UnrealIRCd already protects (for maaaany years) with ping cookies against
this attack. Making the m_nopost redundant.
Also, another module may be more useful (more on this soon...).
2019-07-14 19:07:32 +02:00
i d22a2a20f0 Make usermode +T block channel CTCP's as well. 2019-07-14 19:01:31 +03:00
Bram Matthys d9bd18c483 Remove TODO comment, now that it has been done [skip ci] 2019-07-13 16:00:49 +02:00
Bram Matthys c2445fa9c6 Add history_backend_null, which can be useful on servers where you
explicitly do not want to remember any channel history, such as on
a hub server to save memory.
Also, on Windows, ensure to compile all history_backend_*.c
2019-07-13 15:53:23 +02:00
Bram Matthys 3b67e83275 Add some FIXME's to labeled-response. Not going to work on that right now,
since there is more important things to do...
[skip ci]
2019-07-13 15:40:58 +02:00
Bram Matthys 806256e9c2 Move generate_batch_id() to core. Use chathistory BATCH type, if supported. 2019-07-13 15:25:56 +02:00
Bram Matthys ccfeac6eae Don't re-order mtags on history playback
Strictly, this is not a problem, but.. for our test framework it is better
and it looks cleaner too.
2019-07-13 08:20:12 +02:00
Bram Matthys 65b5e21464 Fix double 'time' mtag on history playback 2019-07-13 08:18:53 +02:00
Bram Matthys 0cda60301d Add set::broadcast-channel-messages [auto|always|never]:
This determines when UnrealIRCd will use broadcast instead of multicast
for delivering channel messages to servers.
The default is 'auto' which uses multicast but switches to broadcast
when channel mode +H is set. This is what people should normally use.
If you set it to 'never' then +H will not work properly if there are
servers with 0 users on them.
2019-07-13 07:59:12 +02:00
i 006b7e5a7c Hide serveropts from normal users. 2019-07-12 01:09:33 +03:00
i ca094f0a75 New set::ping-warning option (how fast the server should reply to PING before sending a warning to opers). 2019-07-11 16:47:02 +03:00
i 876758b73e Fix Custom OpenSSL binary path was ignored. 2019-07-11 14:20:01 +03:00
i a601f565e1 Do not override all libs. 2019-07-11 03:06:28 +03:00
i 57f6718086 Update configure script for previous commit. 2019-07-11 02:36:51 +03:00
i 4feba3edd5 Check whether linking with OpenSSL functions requires -ldl or -lpthread or both 2019-07-11 02:33:11 +03:00
i dbbcc6918a Fix Custom OpenSSL library path was ignored 2019-07-11 00:53:41 +03:00
i 60ebc1375e Support channel status prefixes for SAJOIN. 2019-07-10 17:42:46 +03:00
Bram Matthys 769955eab5 Require at least one SSL/TLS port to be open. In other words, change
https://www.unrealircd.org/docs/FAQ#Your_server_is_not_listening_on_any_SSL_ports
from a warning to an error.
2019-07-10 06:53:01 +02:00
Bram Matthys 3cff80ad8d Use SSL_CTX_set_min_proto_version() in a more inteligent way.
It shouldn't matter now, but if OpenSSL some day deprecates the old
way then at least it won't have silent disastrous effects.
2019-07-09 20:24:00 +02:00
Bram Matthys dc2c2c3f89 Re-indent ssl.c 2019-07-09 20:13:02 +02:00
Bram Matthys d09b9d53a4 Make SSL/TLS mandatory for UnrealIRCd to run. Previously you could get
around this by simply having no certs etc. I doubt anyone used it and
that was not a recommended configuration.
(More to come)
2019-07-09 20:06:11 +02:00
Bram Matthys 657985bf53 Make Debian 10 compile with -Werror. Add -Wno-cast-function-type 2019-07-07 18:17:32 +02:00
Bram Matthys efe73de70d -Wno-unused-but-set-parameter
[skip ci]
2019-07-07 18:11:54 +02:00
Bram Matthys 79bd78c0f3 Make it so UnrealIRCd has full control over the SSL/TLS versions in use
and not just the operating system.
This makes us use SSL_CTX_set_min_proto_version(), which unfortunately is
a less fine-grained control for disabling specific SSL/TLS versions.
However, after that we use SSL_CTX_set_options with SSL_OP_NO_xxx.
The latter is deprecated though. Will revisit this change before U5 release..
2019-07-07 10:22:29 +02:00
Bram Matthys 73bbf10170 Build tests: --enable-werror 2019-07-07 09:54:40 +02:00
Bram Matthys fa39bafe99 tls-tests: Check not only against baseline but against all
[skip ci]
2019-07-07 09:34:30 +02:00
Bram Matthys 6a44b002da Add cipherscan profile for openssl 1.0.1, as used by Debian 8 (jessie).
Main difference is that the curve used for ECDHE is fixed at prime256v1
rather than a list of multiple choices (this due to an openssl 1.0.1
limitation).
[skip ci]
2019-07-07 09:27:57 +02:00
Bram Matthys 0235c6f233 Remove 2 cipherscan profiles (only to reintroduce them later)
[skip ci]
2019-07-07 09:24:33 +02:00
Bram Matthys 3b3f63b990 Add HAVE_EXPLICIT_BZERO. Fix compile problems on Debian and other older
systems without explicit_bzero. Current usage is only in the PRNG which
is not very important anyway. We can re-visit later by attempting to
provide a fallback portable version, but from what I've seen this is
pretty ugly.
2019-07-07 09:18:34 +02:00
Bram Matthys 7ac11973d0 Fix crash in TOPIC with certain remote server traffic.
And make sure we don't change topic text if it comes from a remote link.
2019-07-06 17:48:44 +02:00
Bram Matthys 74325280dd Due to new defaults, the baseline for the SSL/TLS changed as well. 2019-07-01 07:45:48 +02:00
Bram Matthys 74cf811759 Failed to initialize a variable in changes last week.
Not caught by tests due to lack of -O2, we should add a buildbot for that..
2019-07-01 07:40:49 +02:00
Bram Matthys fea09b6659 Switch from RSA 4096 to ECC secp384r1 2019-06-30 10:53:58 +02:00
Bram Matthys d3d9b499a7 Move src/ssl.cnf -> extras/ssl.cnf
[skip ci]
2019-06-30 10:25:19 +02:00
Bram Matthys e90f6e0446 Remove 'make encpem'. Nobody uses this as it would mean you always need
to enter the private key password when UnrealIRCd is (re)started.
Similarly, remove all references to it on Windows as well, where people
thought clicking "Encrypt private key" was a good idea. Can't blame them,
it sounds good on first sight :D
[skip ci]
2019-06-30 10:23:15 +02:00
Bram Matthys 696c06b6a6 Load authprompt module by default. 2019-06-29 19:17:52 +02:00
Bram Matthys f0f69bfe48 Change set::ident::read-timeout from 30 to 15 seconds since otherwise
it exceeds set::handshake-timeout which would be very unfortunate for
those (few) poor users that are affected by this.
2019-06-29 18:51:02 +02:00
Bram Matthys 60a89b8c3f Change set::outdated-tls-policy::server and ::oper to deny.
Both servers and IRCOps must not use outdated SSL/TLS protocols or ciphers.
2019-06-29 18:34:27 +02:00
Bram Matthys 94faf02c70 Change set::plaintext-policy::oper to deny. IRCOps really must use SSL/TLS. 2019-06-29 18:31:37 +02:00
Bram Matthys 375b03c132 Fix (just created) bug in extcmode unloading (with param).
Update slot/param mapping. Now unloading should work well...
otherwise it crashed after destroying the channel.
2019-06-29 09:51:23 +02:00
Bram Matthys bbbdba1083 Make chanmodes/link module un-PERM. Thanks due to previous change. 2019-06-29 09:11:20 +02:00
Bram Matthys b605b7fd86 Use delayed module unloading not only for modules with moddata but also
for modules which have extended channelmodes with parameters,
since they have the same problem.
2019-06-29 09:10:18 +02:00
Bram Matthys 96ad3e8f71 Nothing special. Add a comment to blacklist module, in case someone
things it would be wise to make it unPERM ;)
[skip ci]
2019-06-29 08:55:36 +02:00
Bram Matthys 5d6f0a79ad Make jumpserver module non-PERM, thanks to LoadPersistentPointer etc. 2019-06-29 08:52:52 +02:00
Bram Matthys fbf4946777 Update tkldb to use new LoadPersistentInt/SavePersistentInt functions.
And before that, I fixed these functions so they actually work :D
2019-06-29 08:44:12 +02:00
i e03fa760ef update makefile.win32 for extbans/partmsg 2019-06-29 00:53:41 +03:00
i 780d9e95a2 extbans/partmsg: remove unused leftovers 2019-06-29 00:41:23 +03:00
i 7c4bd691fe fix modules.default loadmodule directive for partmsg 2019-06-29 00:39:23 +03:00
i cf3d01da06 extban ~p for hiding part/quit message 2019-06-29 00:30:10 +03:00
Bram Matthys 5182c664d1 Easier API for just-commited persistent variables. Example:
LoadPersistentPointer(modinfo, removefld_list, floodprot_free_removefld_list);
SavePersistentPointer(modinfo, removefld_list);

The above example was for a pointer, there are also functions for int and long,
which are even more simple:
LoadPersistentInt(modinfo, somevar)
SavePersistentInt(modinfo, somevar)
and
LoadPersistentLong(modinfo, somevar)
SavePersistentLong(modinfo, somevar)
both are untested, but will be tested soon...
2019-06-28 22:08:45 +02:00
Bram Matthys 0920967cc4 New module_load_variable / module_save_variable functions
and made floodprot to use these functions.
TODO: 1) Different functions for pointer/int/long, 2) macro?
2019-06-28 21:02:29 +02:00
Bram Matthys c720417487 MOD_UNLOAD() was always called with an invalid modinfo argument. 2019-06-28 21:01:43 +02:00
Bram Matthys 7fe1848340 Make floodprot no longer PERM so it can be reloaded. Useful if we ever
make a mistake in the module so we can upgrade it on-the-fly.
Or if someone wants to get rid of it.
TODO: consider abstracting the saving/restoring of vars.
2019-06-28 20:14:32 +02:00
Bram Matthys 8686bf978e Support for unloading channel modes with parameters (w/o MOD_OPT_PERM) 2019-06-28 20:07:21 +02:00
Bram Matthys 1757abf31a Duh.. 2019-06-28 19:16:21 +02:00
Bram Matthys 1f5acd852b Update tkldb to use (new) MODDATATYPE_LOCALVAR. 2019-06-28 19:11:34 +02:00
Bram Matthys 2a7fc8042d Add new moddata types: MODDATA_LOCALVAR and MODDATA_GLOBALVAR. Untested.
Code using it will soon follow (and then it will be tested :D)
2019-06-28 18:35:37 +02:00
Bram Matthys 38e9c100d4 Get rid of include/threads.h (unused) 2019-06-26 17:27:45 +02:00
Bram Matthys a2510a5dca Delete sock.h, isn't even used anymore.
[skip ci]
2019-06-26 17:25:34 +02:00
Bram Matthys 70cca778cd Test compile w/o sock.h 2019-06-26 17:19:10 +02:00
Bram Matthys c673e5bbc6 Get rid of now meaningless include/hash.h 2019-06-26 17:17:20 +02:00
Bram Matthys 8e44d4d5ab Get rid of weird NullChn, which is now just NULL :D 2019-06-26 17:13:45 +02:00
Bram Matthys ded4a65a60 u_int16_t -> uint16_t and u_int32_t -> uint32_t, remove typedefs for
these types and others, that should no longer be needed thanks to
stdint.h.
2019-06-26 17:06:46 +02:00
Bram Matthys e8f336622a u_int64_t -> uint64_t 2019-06-26 17:03:07 +02:00
Bram Matthys 709c84fff9 Remove stupid hash table layer for channels that only eats 256k+ extra
memory and causes unnecessary slowdown. Stupid ->hits and ->links.
And get rid of "return (xyz)", must be "return xyz" :D
2019-06-26 16:56:17 +02:00
Bram Matthys f1b0b6b76e Make throttling code (connect-flood) use SipHash and increase the
hash table size from 1019 to 8192 to have fewer collisions.
2019-06-26 16:46:28 +02:00
Bram Matthys d5395848b7 Double the size of hash tables to reduce collisions. 2019-06-26 16:16:56 +02:00
Bram Matthys c75a1ebb25 Make src/modules/history_backend_mem.c use SipHash. And also,
make the module permanent.. which is probably a good idea :D
2019-06-26 15:49:54 +02:00
Bram Matthys d2f4f53a4a Document functions in src/random.c 2019-06-26 15:41:47 +02:00
Bram Matthys 000fa08aee Remove FIXME. As there's no need to fix that.
[skip ci]
2019-06-26 15:38:57 +02:00
Bram Matthys 12511940d6 src/random.c: remove rs_stir_pid, since we don't fork anyway.
(or at least not in a way that matters...)
2019-06-26 15:12:43 +02:00
Bram Matthys a843567b70 Update src/random.c to use the ChaCha based random generator. 2019-06-26 15:02:25 +02:00
Bram Matthys 0d7f9e219e Update reputation module to use SipHash 2019-06-26 14:13:12 +02:00
Bram Matthys eafd929e24 Update DNS code to use SipHash 2019-06-26 14:08:03 +02:00
Bram Matthys 703be7eb29 Move some functions from parse.c to hash.c and add documentation
for various functions, such as find_person, find_client, etc.
2019-06-26 13:57:06 +02:00
Bram Matthys f6eac29592 hash_nick_name -> hash_client_name, hash_find_nickserver -> hash_find_nickatserver
Both were confusing :)
2019-06-26 13:45:55 +02:00
Bram Matthys d5b643ceee Rewrite hash table code to use SipHash (more to follow) 2019-06-26 13:24:02 +02:00
Bram Matthys df7bcc1326 Remove temporary FreeBSD workaround.
(reverts adf56ad8fd)
2019-06-26 07:14:35 +02:00
Bram Matthys 2894681c4f Cleanup m_topic. Handle the if's in a smart way rather than indenting X levels. 2019-06-26 06:55:01 +02:00
Bram Matthys e17ba624c7 Fix crash in new get_access(). This crash happens in case of
(malicious) server traffic.
Also seems we have a behvior change here: has_voice and such returned
1 for servers, now it returns 0. I can live with that, but may cause
more issues.
2019-06-24 16:24:01 +02:00
Bram Matthys 849d57be40 Fix msgid inconsistency in KICK. Thank you, new test framework :] 2019-06-24 14:00:47 +02:00
Bram Matthys 4213ca9ab1 Add MyClient() call in QUIT for set::part-instead-of-quit-on-comment-change
handling. Since we shouldn't PART remote users.. ;)
2019-06-23 17:14:35 +02:00
Bram Matthys 6fab82124a Call is_banned with BANCHK_LEAVE_MSG from both PART and QUIT.
The latter only if iConf.part_instead_of_quit_on_comment_change.
2019-06-23 17:10:41 +02:00
Bram Matthys c507db9005 Get rid of Windows compile warning regarding abort(). 2019-06-23 08:57:39 +02:00
Bram Matthys 7875fc9d7d Compile fixes for Windows due to cleanup from yesterday. 2019-06-23 08:03:33 +02:00
Bram Matthys 7161f33311 Code cleanup: make src/*.c use the generic #include "unrealircd.h" file
(with only a few exceptions)
Now, we'll find out later if Windows still compiles, I guess ;)
2019-06-22 21:18:08 +02:00
Bram Matthys e8ff5d77c7 Remove weird option set::snomask-on-connect. Doubt anyone uses it. 2019-06-22 19:36:54 +02:00
Bram Matthys 74586e7ecd Make all snomasks oper only (was just one: +s +k).
Maybe an API change later?
2019-06-22 19:34:04 +02:00
Bram Matthys f9b589d0c6 Remove almost 1000 lines, all functions that are (now) unused.
Also, drop support for snomasks to non-ircops (TODO: more)
2019-06-22 19:32:11 +02:00
Bram Matthys b8d033f11e The blacklist module is missing a call to blacklist_quit. Bug? 2019-06-22 19:11:16 +02:00
Bram Matthys f0f0a93cc5 Makefile: makes no sense to create modules/cap only to remove it later
[skip ci]
2019-06-22 17:57:42 +02:00
Bram Matthys e03c8135a9 CHFL_CHANPROT -> CHFL_CHANADMIN, is_chanprot -> is_chanadmin
These are just remnants of the past, when +a was called channel protection.
It is called channel admin since as long as I can remember, and in 90%
of the code and documentation it is called that way.
2019-06-22 17:32:57 +02:00
Bram Matthys cf29aa8feb Replace various 90% identical functions with some macro's instead. 2019-06-22 17:29:03 +02:00
Bram Matthys 19af2c6b5c Fix return value in can_send() and add tracing for modules that don't behave. 2019-06-22 17:21:57 +02:00
Bram Matthys 05202dd2a4 Move can_send() function from core to m_message. 2019-06-22 16:03:06 +02:00
Bram Matthys bf4d96e991 can_send() now returns 0 (false) or 1 (true), rather than magic values.
Also, the HOOKTYPE_CAN_SEND prototype changed so you can communicate
the error message in a flexible way, similar to what I just did
with extbans.
2019-06-22 15:57:32 +02:00
Bram Matthys f08557f2fd Propagate is_banned() errmsg to m_message layer. 2019-06-22 15:36:21 +02:00
Bram Matthys 7fd794c563 Make /VERSION send 005 properly. 2019-06-22 15:16:16 +02:00
Bram Matthys be49ef0bb8 More extban API changes... fun... 2019-06-22 15:11:16 +02:00
Bram Matthys 383f54a6c9 Fix bug caused last few weeks where user would receive a privmsg with
a SID/UID rather than server-/nickname.
2019-06-22 14:21:07 +02:00
Bram Matthys 086d370704 Change extban API: pass 'msg' in BANCHK_MSG and (new) BANCHK_LEAVE_MSG. 2019-06-17 20:19:34 +02:00
Bram Matthys 1cfebcf05e Add new set::part_instead_of_quit_on_comment_change to convert QUIT to PART
in case of a change in the quit comment, such as color stripping / blocking.
The default is 'no', but some users may like this to be 'yes' so things like
+S only affect the channel and not the quit for all channels.
This hereby also lays the groundwork for some next commits of 'i' :)
The configuration item name may still change if I think of a better one....
2019-06-17 08:20:42 +02:00
Bram Matthys b8cdb21754 Fix crash on "TKL" command without parameters. Due to rewrites from yesterday. 2019-06-17 07:46:32 +02:00
Bram Matthys c2ba6b40b8 Silently force a 'make clean' as otherwise part (or whole) of the
compiled source could be using different settings than the user
just requested when re-running ./Config.
2019-06-16 10:13:57 +02:00
Bram Matthys 7b42c252ea Some documentation updates, nothing important
[skip ci]
2019-06-16 10:08:50 +02:00
Bram Matthys 1d046b6f61 Move ban [nick|user|ip] { } block parsing to m_tkl. 2019-06-16 09:33:30 +02:00
Bram Matthys d106609d89 Move all spamfilter { } block parsing to m_tkl. 2019-06-16 09:21:39 +02:00
Bram Matthys 36808a60ac Remove all tk->flags & TKL_FLAG_CONFIG entries on rehash.
Make local spamfilter blocks use this too. Already did so for
ban xxx types that will cause kline/gline/zline and qline.
This also simplifies handling in the tkldb module.
2019-06-16 09:09:09 +02:00
Bram Matthys d0d454f696 Fix 100% CPU loop problem on REHASH due to bug in history backend (deja-vu). 2019-06-16 08:44:57 +02:00
Bram Matthys bd785a9309 Some initial work for the upcoming TKL 'e'/'E'/TKL_EXCEPT type. 2019-06-16 08:42:41 +02:00
Bram Matthys 18ae7b8925 Document *ALL* functions in m_tkl and remove efuncs that are no longer
needed: tkl_expire and tkl_check_expire, which are now self-contained
in the m_tkl module.
2019-06-16 08:35:56 +02:00
Bram Matthys b102e79f8e Use check_banned() from s_bsd too, less duplicate code. 2019-06-15 18:44:33 +02:00
Bram Matthys 24726d533d Make the require authentication { } block use the TKL layer.
Remove CONF_BAN_UNAUTHENTICATED.
2019-06-15 18:31:06 +02:00
Bram Matthys 8c2ce9a7d5 [tkldb] skip if (tkl->flags & TKL_FLAG_CONFIG) 2019-06-15 18:27:43 +02:00
Bram Matthys 8e6302d003 Rip out CONF_BAN_NICK, CONF_BAN_IP, CONF_BAN_USER, now that they are moved
to the TKL layer.
2019-06-15 18:18:19 +02:00
Bram Matthys 97fc19591c Add support for tkline->flag TKL_FLAG_CONFIG: item from configuration
file that cannot be deleted via commands such as /KLINE -...
And transform some ban XX entries to use the TKL system
TODO: test & rip out the old stuff
2019-06-15 18:08:43 +02:00
Bram Matthys a40cd9fae4 Rename dospamfilter() to run_spamfilter(), which is more meaningful. 2019-06-15 17:43:34 +02:00
Bram Matthys 630ab8f869 Fix some indentation 2019-06-15 17:37:02 +02:00
Bram Matthys 060502aedd Remove unused variables and some shadow... 2019-06-15 17:27:54 +02:00
Bram Matthys 4f4cda7f7d Cleanup part 2 of m_tkl. Splitting up in m_tkl_add / m_tkl_del and
various whitespace / indenting fixes.
2019-06-15 17:18:48 +02:00
Bram Matthys 876fda63ec Export tkl_type_string via efuncs (actually, the name may change...) 2019-06-15 17:06:41 +02:00
Bram Matthys 7542cdeaca Cleanup of m_tkl part 1. New tkl_chartotype (the reverse of tkl_typetochar).
Move stripcrlf() to core instead of at 3 places, rename calls of iCstrip()
to that. Hopefully I didn't break anything.. :D
2019-06-15 16:56:34 +02:00
Bram Matthys 41ba282ed6 Obey MAXMODEPARA under all circumstances. 2019-06-15 15:17:24 +02:00
Bram Matthys ca9b04a0fa Module API: EventAddEx() -> EventAdd() 2019-06-12 19:09:33 +02:00
Bram Matthys e3013ae067 Commit current work of history API and channel history mode (+H count:time)
Note: there are still some TODO items
2019-06-12 18:59:12 +02:00
Bram Matthys ed4bc8e8c5 Prevent running ./Config as root and print out a clear instruction.
Since UnrealIRCd 4 (and probably before) our instructions always mentioned
that you should not build or run UnrealIRCd as root.

Even system integrators are unlikely to build as root, but just in
case, the safety the check is in ./Config and not in ./configure.
2019-06-12 13:16:58 +02:00
Bram Matthys bfebfa1f00 Slightly better wording 2019-06-12 13:11:21 +02:00
Bram Matthys 3b7e959dd7 Merge branch 'unreal50' of github.com:syzop/unrealircd-next into unreal50 2019-06-12 13:09:40 +02:00
Bram Matthys 148dfc53a4 Make clear the user should not compile or run as root. Seems some
people miss this when they only read the README and not the
installation instructions from the wiki
( https://www.unrealircd.org/docs/Installing_from_source )
2019-06-12 13:08:22 +02:00
GottemHams bb4bd4dffc [tkldb] Forgot a check for local Q-Lines, also bail early when reading local spamfilters/Q-Lines 2019-06-11 15:54:53 +02:00
Bram Matthys 66be5a2ca6 Re-indent the FLAGS_* stuff in include/struct.h
And remove FLAGS_PING which was unused.
2019-06-10 18:50:05 +02:00
Bram Matthys fce0253b5a Remove unused FLAGS_CHKACCESS / SetAccess / ClearAccess.
Also, DoAccess() was already commented out in UnrealIRCd 4 or something.
This results in an empty finish_auth() function but that should be OK,
as ident checking takes place before parsing any other input IIRC.
2019-06-10 18:39:03 +02:00
Bram Matthys e5e260eaa1 Remove FLAGS_NONL / NoNewLine(), which isn't used since 4.0.0 or so.
And add a FIXME, or at least a TODO-investigate-this item ;)
2019-06-10 18:33:46 +02:00
Bram Matthys ac19f91eb8 Turns out it's not that easy.. ;) 2019-06-08 16:49:46 +02:00
Bram Matthys 573a601127 Nothing important, just a silly m_dummy :D 2019-06-08 14:37:22 +02:00
Bram Matthys 12dbbca15e Rip out support for changing offsets via TSCTL and tune file. Use NTP!!
Adjustments via TSCTL are never accurate enough.
2019-06-08 09:26:55 +02:00
Bram Matthys 3749f8d674 Remove timesync support. Use your OS time synchronization instead!
Timesync was previously disabled by default in March 2018.
2019-06-08 09:11:46 +02:00
Bram Matthys d796247ddf Re-indent 2019-06-07 15:08:23 +02:00
Bram Matthys a2ee5d67f3 Update a few hooks to include mtags, more will follow later.
This fixes inconsistent mtags accross server links with delayjoin.
2019-06-07 15:05:10 +02:00
Bram Matthys 1f2bb0d89b Delayjoin: if kicking invisible user we used to clear the invisibility
status of the victim (JOIN+KICK). That seems unnecessary to me, since
there is already code in place to handle this -- hopefully it works too.
2019-06-07 14:41:01 +02:00
Bram Matthys 61b4a6ea29 Add mtags in non-chan PRIVMSG. Remove sendto_message_one since you can
just use sendto_prefix_one. Actually it was only used at 1 place (m_message).
2019-06-07 14:25:28 +02:00
Bram Matthys 0e68265e12 Remove sock.h old compatibility code. Shouldn't be needed anymore.
(This provided FD_ZERO and such if the OS/libc did not provide it)
2019-06-07 12:42:28 +02:00
Bram Matthys 5ad0278f9e No longer check for big enough FD_SETSIZE. We all use poll/kqueue/epoll/etc now. 2019-06-07 12:39:39 +02:00
Bram Matthys de89de9558 Fix MODE not sending message tags across servers 2019-06-07 12:34:22 +02:00
Bram Matthys 13f3356963 Merge branch 'unreal50' of github.com:syzop/unrealircd-next into unreal50 2019-06-07 12:24:41 +02:00
Bram Matthys adf56ad8fd Re-enable FreeBSD workaround for mysterious test failures. 2019-06-07 12:24:25 +02:00
GottemHams d292d2ee9c Forgot to change a couple X:Line things to X-Line 2019-06-05 19:27:00 +02:00
GottemHams 8846506292 Might be a good idea to also skip local Q:Lines (ban nick {} blocks) :D 2019-06-05 19:19:03 +02:00
Bram Matthys e423f69082 [tkldb] Add some extra check for trailing DB data.
If everything goes correctly then after reading all TKL entries we
should be at the end of file. If there is still data after that,
something went wrong... quite wrong.. :D
2019-06-05 09:39:59 +02:00
Bram Matthys 673779eab9 Write string lengths as 16-bit rather than 64-bit: saves about 34% space
of the database file, with possible some small speed improvement as well.
2019-06-05 09:35:43 +02:00
Bram Matthys ec5811dc3b [tkldb] Save every 5 minutes now that writing is fast enough :)
And mention the benchmark figures in the .c file.
2019-06-05 09:01:04 +02:00
Bram Matthys eaa1b213b9 [tkldb] Use buffered I/O. Writing the DB is now 29 times faster.
Saving 100k zlines now takes 72ms instead of 2100ms
Loading 100k zlines now takes 510ms instead of 1300ms
2019-06-05 08:53:30 +02:00
Bram Matthys 1f6bb6d3cc Some benchmarking 2019-06-05 08:45:48 +02:00
Bram Matthys 498f728cbb [tkldb] If DB is corrupt then rename to .corrupt and start a new one.
This, rather than having the module not loaded at all, which could mean,
especially if missed the warning on boot, that you run for weeks or
months without having your TKL's stored, which would be a shame ;)
Also a failure to rename() is not fatal, as it likely means that we
don't have permissions, in such a case you will see a repeated error
every X minutes due to the write, which is good.
2019-06-05 08:22:22 +02:00
Bram Matthys 21f24cc596 Fix for NICK+USER order. Should be correct? Should check identd.. 2019-06-04 20:05:27 +02:00
Bram Matthys 5f8dd67051 if( -> if ( :D
[skip ci]
2019-06-04 20:04:22 +02:00
Bram Matthys e9da2eb3cb [tkldb] "skipped".. why? "expired" :D
And don't bother users too much about this, unless in DEBUGMODE.
2019-06-04 20:00:15 +02:00
Bram Matthys 6b1af917fc Do it the other way around than previous commit. Force 32 bit type.
So it's compatible with machines where int is 64bit (ILP64),
mostly for the future I guess.
2019-06-04 19:52:59 +02:00
Bram Matthys 628f367849 tkldb: version field should also be forced 64 bit or you'll have the same
problem with porting 32 to 64 again...
2019-06-04 19:34:37 +02:00
GottemHams 52b39acf78 Fixed return values/checks for helper functions/macros, return empty string instead of NULL when reading zero length strings, discard tkl->subtype and store spamf as a char instead of unsigned int, remove rewriting after DB read, also renamed TKLines/TKLs/etc to *-Lines for uniformity with other code 2019-06-03 20:45:56 +02:00
Bram Matthys bb91ac1c56 Update this a bit. Will take a look again later.
[skip ci]
2019-06-03 18:48:18 +02:00
Bram Matthys 9f64711113 Remove FreeBSD 12 workaround 2019-06-03 15:17:02 +02:00
Bram Matthys 597186d9c3 BuildBot: Fix run-tests on FreeBSD 12 2019-06-03 14:45:56 +02:00
Bram Matthys 253df2c8db BuildBot: -j3 -> -j4
[skip ci]
2019-06-03 13:31:58 +02:00
Bram Matthys 55757a5605 Remove references to old test framework.
[skip ci]
2019-06-03 13:30:15 +02:00
Bram Matthys 73cea64c9f Updates for IRC test framework: changed port to 5901 of irc1 2019-06-03 13:03:43 +02:00
Bram Matthys bc8e4a5c47 Updates for new IRC test framework 2019-06-03 12:59:22 +02:00
Bram Matthys 321cf75fb7 Resolve resolve merge conflict :D
[skip ci]
2019-06-01 08:57:19 +02:00
Bram Matthys 13f96b0a57 Small adjustments to tkldb: convert some to safefree(),
get rid of sizeof(char) - which is guaranteed to be 1 by C99 and
on any decent compiler and always use MyMallocEx even when it's not
necessary :D.
2019-06-01 08:53:17 +02:00
Bram Matthys e78e303314 Re-indent tkldb, sorry could not resist :D 2019-06-01 08:46:22 +02:00
Bram Matthys 2556ae9d70 [tkldb] Allow boot without existing database. Change return values to 1/0 (true/false). 2019-06-01 08:39:32 +02:00
Bram Matthys b8e65a2f7f Buildbot: *NIX build test: add -DNOREMOVETMP to make valgrind do a better
job at printing module information (I hope).
2019-06-01 08:24:31 +02:00
Bram Matthys 7c32e4d63f Windows build: fix makefile.win32 2019-06-01 08:23:33 +02:00
GottemHams 4dbe8a8238 Resolve merge conflict :D 2019-05-31 22:39:27 +02:00
GottemHams c697e2ea99 Renamed m_storetkl to just tkldb 2019-05-31 22:25:18 +02:00
GottemHams bf6f885b98 Storetkl now also supports the hashed *@IP Z:Line thingy, also added errno calls to all error output 2019-05-31 22:06:59 +02:00
GottemHams c43a1b15af Store TS types in a uint64_t before DB writing to prepare the module for a Year 2038 fix, also upgraded num/rewrite ints to 64 bit since they *might* be as big as tklcount 2019-05-31 21:23:19 +02:00
Bram Matthys c6389270f9 Remove a few useless #define's (And final test of buildbot today :D) 2019-05-30 21:02:27 +02:00
Bram Matthys c3add3b41c Windows build: Randomly remove some slashes, for no reason.
[skip ci]
2019-05-30 20:12:25 +02:00
Bram Matthys 7d7d736df3 More windows build fixes
[skip ci]
2019-05-30 20:03:50 +02:00
Bram Matthys 858b63e1d5 Windows: remove .CHANGES.NEW
[skip ci]
2019-05-30 19:56:54 +02:00
Bram Matthys 9af24a56f9 Buildbot: makefile.win32 updates
[skip ci]
2019-05-30 19:42:17 +02:00
Bram Matthys 57e06a7070 Windows: add api-mtag to makefile.win32 2019-05-30 19:36:15 +02:00
Bram Matthys f0a773ee59 Windows: Add conf_preprocessor to makefile.win32 2019-05-30 19:33:21 +02:00
Bram Matthys a2a7acc4bd Buildbot: more windows updates 2019-05-30 19:30:20 +02:00
Bram Matthys e8e113a8c0 Buildbot: ............................. 2019-05-30 19:23:15 +02:00
Bram Matthys 120ec5cea3 ............. 2019-05-30 19:22:14 +02:00
Bram Matthys d02b4de5d3 Buildbot: updates for windows 2019-05-30 19:20:15 +02:00
Bram Matthys 2682d7bc6d Buildbot: Updates for windows 2019-05-30 19:08:33 +02:00
Bram Matthys 9530006e70 BB: Terminate unrealircd at end of test (otherwise it may hang buildbot) 2019-05-30 16:48:05 +02:00
Bram Matthys 03fbc35fb7 Buildbot: Run cipherscan not on FreeBSD for now, so we can test the rest. 2019-05-30 16:14:06 +02:00
Bram Matthys 3f723323d0 BuildBot: Use gmake on FreeBSD and temporarily disable select-config. 2019-05-30 16:08:54 +02:00
Bram Matthys ecac3f9d4a Mention U5 in ./Config -quick restriction 2019-05-30 08:52:08 +02:00
Bram Matthys 1b0a7cb9b8 Fix build tests due to previous change. 2019-05-30 08:51:05 +02:00
Bram Matthys 195cd17d02 Rename LIBDIR to PRIVATELIBDIR in config.settings to avoid confusion. 2019-05-30 08:46:13 +02:00
GottemHams 4004152a7a Updated m_storetkl's descriptions for added clarity 2019-05-28 21:44:27 +02:00
GottemHams 0f97c03487 Probably a good idea to add storetkl stuff to Windows makefile too huh 2019-05-28 21:38:38 +02:00
GottemHams d8ff67d088 Added m_storetkl to modules.default.conf 2019-05-28 21:35:37 +02:00
GottemHams 35600fdfa0 Updated storetkl: write DB on a timer instead of hooking TKL_ADD/DEL, better DB format for improved compatibility with future Unreal versions, configurable .db path, support for softbans, write DB to a tempfile first to prevent corruption of existing DB, also applied some misc optimisations/portability improvements 2019-05-28 21:34:11 +02:00
Bram Matthys 6cf386ee87 ... 2019-05-27 19:22:04 +02:00
Bram Matthys 9e87f92c64 Fix small memory leak in SJOIN. 2019-05-27 19:20:25 +02:00
Bram Matthys f046482761 Freeing memory is usually a good idea (duh) 2019-05-27 07:43:44 +02:00
Bram Matthys 55a183bde4 Add "PROTOCTL MTAGS" to indicate message-tags & big buffer support.
This so we can link to UnrealIRCd 4.x....
2019-05-26 13:56:09 +02:00
Bram Matthys 57fd5f4f2b Add HOOKTYPE_IS_HANDSHAKE_FINISHED: if a module returns 0 then register_user()
will not be called. This is used, for example, by m_cap when the CAP LS
handshake is still in progress. Modules can add their own requirements
as they see fit.
Note that, as for (CAP) functionality, this adds nothing new, it just
implements it in a cleaner way, rather than all over the place,
like in UnrealIRCd 4.x.
2019-05-26 12:07:44 +02:00
Bram Matthys dde1cf3194 Fix some mtag FIXME's. 2019-05-26 11:45:58 +02:00
Bram Matthys 622cb43a48 Manual audit of exit_client() done, for mtags. 2019-05-26 11:36:40 +02:00
Bram Matthys 61b15d9f4d Mass update (automatic) of exit_client().
Next step is manual audit...
2019-05-26 10:45:54 +02:00
Bram Matthys be4ef2e7e3 Add message tags support in exit_client(). Yay.. another API change! 2019-05-26 10:36:39 +02:00
Bram Matthys 9f54a19801 New unified function for common: sendto_local_common_channels()
and make this support mtags so it now works for NICK, ACCOUNT, AWAY.
Still to do: exit client for QUIT.
2019-05-26 10:08:02 +02:00
Bram Matthys 39cd11f504 Fix OOB read due to message tag with trailing backslash. 2019-05-25 15:48:33 +02:00
Bram Matthys b63a67dea0 More parse/parse2 fixes like 6e219cd834.
This fixes an OOB write (NUL byte write) due to trusting 'length'.
It is now removed and renamed to bytes, it's only for adding lag.
2019-05-25 15:40:18 +02:00
Bram Matthys 39af766ced Add a FIXME 2019-05-25 15:40:10 +02:00
Bram Matthys a74bae0447 Some cleaning in m_sajoin. Whitespace and if() order. 2019-05-25 12:32:18 +02:00
Bram Matthys f320e32b7e Clean up compiler flag checker.
(Since we don't need the C++ check, we use C only)
2019-05-25 11:36:13 +02:00
Bram Matthys e0c2ccd99b Remove unused configure checks: HAVE_C99_VARLEN_ARRAY, HAVE_RAND_EGD,
and an AC_SUBST for MKPASSWDLIBS.
2019-05-25 11:27:53 +02:00
Bram Matthys 05e3ed63a0 Default to --with-system-pcre2. Now all shipped libs default to system libs. 2019-05-25 11:01:11 +02:00
Bram Matthys 5513b21936 Remove old extras/regex 2019-05-25 10:50:01 +02:00
Bram Matthys 1108b58951 Remove old TRE regex engine. Hasn't been maintained since 2010
and has various outstanding crash and 100% CPU issues.
We have been encouraging the PCRE2 engine since the start of
UnrealIRCd 4 already.
TRE is being phased out of U4 by the end of the year, so we can
safely remove it in U5 already.
2019-05-25 10:42:46 +02:00
Bram Matthys 185b4e05c0 Whoops, this #comment in 'make install' showed up to end-users. 2019-05-25 10:19:33 +02:00
Bram Matthys 4b45555edd Fix issue if compiling without TRE but with shipped argon2 (or other
combinations). Need to create libdir in ./Config ;)
2019-05-25 10:17:33 +02:00
Bram Matthys 6e219cd834 Remove confusing 'bufend' variable from parse and parse2 functions.
Such a variable suggests that we will never read past that, but that
is not the case, since we (correctly) assume that the buffer is
NUL terminated, which is ensured by dbuf_getmsg().
The 'length' is still available for informational purposes, to avoid
strlen()'s at various places.
Hm, I guess length can cause the same confusion as bufend, but still..
I like it better :D
2019-05-25 09:50:36 +02:00
Bram Matthys a2f37722ae Fix unitialized variable issues in message-tags handling. 2019-05-25 09:08:43 +02:00
Bram Matthys 8b1cd80700 Make labeled-response work again after API change.
TODO: handle both draft/ and without draft/, maybe upstream?
2019-05-25 09:08:26 +02:00
Bram Matthys 427885681d Make account-tag not inherit. I don't think there's a bug right now,
but it's not logical and makes it too easy to make a mistake.
2019-05-25 08:05:26 +02:00
Bram Matthys daab5abc92 Manual audit of sendto_one(): add mtags support where necessary. 2019-05-24 21:09:55 +02:00
Bram Matthys 6e5df1a4c0 Add mtags argument to sendto_one(). Phase 1 (automated), next is manual
audit of all sendto_one's. Also it doesn't work yet...
2019-05-24 17:38:48 +02:00
Bram Matthys c307d6c61b Make WHOX the default. Warn if you try to load both modules.
Now uses CommandAdd() instead of an override, which was just an
interim solution earlier.
2019-05-23 19:08:49 +02:00
i c528b22cdd CIDR support for /WHOX ip matching. 2019-05-22 23:01:55 +03:00
Bram Matthys 418b42e5bf More sendnumeric() and sendnumericfmt() conversions. 2019-05-22 17:09:12 +02:00
Bram Matthys 4a11309344 Transform sendto_one's to sendnumericfmt() - stage 1 2019-05-22 16:39:06 +02:00
Bram Matthys f8bee4941a Some fixes due to the sendnumeric() migration (see previous commits). 2019-05-22 12:58:38 +02:00
Bram Matthys 39029555cb A few more sendnumeric() conversions, putting numerics in main file. 2019-05-22 12:39:01 +02:00
Bram Matthys 7e4bfbc7c3 Move more to sendtxtnumeric()... and some sendnumeric() leftovers. 2019-05-22 12:10:57 +02:00
Bram Matthys 1a4cbb7023 sendnumeric() - phase 2 2019-05-22 11:41:46 +02:00
Bram Matthys c27bb26abc sendnumeric() - stage 1 2019-05-22 10:43:07 +02:00
Bram Matthys 5fb9b12d5e Mass-replace sending of notices with sendnotice(), which exists for quite a while now ;) 2019-05-22 09:34:34 +02:00
Bram Matthys a320bec089 More message tags support in the API. sendto_server() now has mtags
and sendto_match_butone as well.
Still about 15 FIXME's that need to be resolved, but committing early.
2019-05-21 19:00:35 +02:00
Bram Matthys 6d1d3de620 Move .CHANGES.NEW -> doc/Config.header 2019-05-19 16:30:27 +02:00
Bram Matthys f08e662878 Update and document modules.default.conf wrt IRCv3 features (CAPs etc). 2019-05-19 16:06:06 +02:00
Bram Matthys c3a929646c Move src/modules/cap/* to src/modules/ as the meaning got blurred.
For example, msgid / message-ids is not a CAP, while server-time is.
There mere fact of something being in CAP or not shouldn't cause
something to be in different directories ;).
2019-05-19 15:58:34 +02:00
Bram Matthys da31011b30 Move most of the message-tags stuff to the message-tags module. 2019-05-19 15:41:24 +02:00
Bram Matthys 13c59febbf Support for optional efunctions, with a default handler. 2019-05-19 09:49:53 +02:00
Bram Matthys 4e17f85fe6 1) New function new_message() which should be called when a new message is
sent, or at least for channel events.
2) Move adding of msgid/time/account tags to modules,
   which is their proper place.
2019-05-19 09:24:38 +02:00
Bram Matthys 10dcacdb0a @define, @if, @endif are all working.
You can do something like:
@define $SERVERIP "1.2.3.4"
listen {
    ip $SERVERIP;
    port 6667;
}

Supported @if types:
@if $VARIABLE == "something"
@if $VARIABLE != "something"
@if defined($VARIABLE)
@if !defined($VARIABLE)
@if module-loaded("somename")
@if !module-loaded("somename")
2019-05-18 16:06:28 +02:00
Bram Matthys 35fa6cedac Convert some alloc+strlcpy to safestrldup in config code.
-curce->ce_vardata = MyMallocEx(ptr-start+1);
-    strlcpy(curce->ce_vardata, start, ptr-start+1);
+safestrldup(curce->ce_vardata, start, ptr-start+1);
2019-05-18 14:32:36 +02:00
Bram Matthys 1adb02b56b Move new preprocessor from yesterday to it's own file (src/conf_preprocessor.c) 2019-05-18 13:58:27 +02:00
Bram Matthys fad8c35847 Initial support for dynamic configuration, $define, $if, $endif.
Early commit, still cleaning up to do.
But what works is:

$define SERVER      "hub.example.org"

$if SERVER == "hub.example.org"
link .... {
....
}
$endif

$if defined(SERVER)
....
$endif

And also we have mod-loaded() which even works half-way in a block
such as in helpop:
help Chmodes {
[..]
$if module-loaded("chanmodes/stripcolor")
        " c = Block messages containing mIRC color codes [o]";
$endif
$if module-loaded("chanmodes/noctcp")
        " C = No CTCPs allowed in the channel [h]";
$endif
};

As said, still need to cleanups and there are some limitations.
Also the idea is to be able to use defined values in variable names/values
but that has not yet been implemented.
2019-05-17 20:43:36 +02:00
Bram Matthys 7204f156c2 Store relative path and is_module_loaded() now has a small behavior change.
You now call it with a path like is_module_loaded("extbans/timedban").
This, among other reasons, so you can differentiate between modules with
the same name, such as "usermodes/noctcp" and "chanmodes/noctcp".
2019-05-17 18:48:37 +02:00
Bram Matthys 330e4018c3 Comment out hideserver by default 2019-05-17 18:46:52 +02:00
Bram Matthys 83991ae2a7 Fixed issue where REHASH caused 100% CPU loop. 2019-05-17 13:40:01 +02:00
GottemHams 6e5aa1fd93 Added m_storetkl for persisting TKLines across IRCd restarts 2019-05-14 20:48:12 +02:00
Bram Matthys 4ace26ec3f Another test commit 2019-05-13 17:03:50 +02:00
Bram Matthys d9380ce3bc Test commit 2019-05-13 16:09:50 +02:00
Bram Matthys 605c2addcf Update documentation URL already (no it will not exist for the
next couple of months, probably)
2019-05-13 15:44:15 +02:00
Bram Matthys e6d474adae Temporarily remove .travis.yml to make clear that we do not use it
at the moment. Also, write a long multi-line comment. No this has
nothing to do with testing an IRC bot of any kind...
2019-05-13 15:43:01 +02:00
Bram Matthys a81ebd6632 Dumdeedum 2019-05-13 15:03:20 +02:00
Bram Matthys 7aa6c6e167 Test framework: add run-tests.bbwrapper 2019-05-13 13:41:13 +02:00
Bram Matthys cf57b3d09c Revert workaround bac365ef12 from 2 commits ago 2019-05-13 13:13:23 +02:00
Bram Matthys f2a5a143b7 Changes for buildbot infrastructure 2019-05-13 13:07:37 +02:00
Bram Matthys bac365ef12 Turn this off so I can run tests 2019-05-13 12:45:39 +02:00
Bram Matthys aff3c16c08 Provide --enable-asan and --disable-asan to toggle address sanitizer.
Since we are currently pre-alpha I decided to enable it by default
so we as devs don't forget to do so :)
2019-05-12 15:25:11 +02:00
Bram Matthys 5ebd096f16 Initial implementation of message-tags from May 5, 2019.
This also includes buffer modifications to have a larger read buffer
and IRCv3 implementations (partial or not) for:
labeled-response, msgid, server-time, batch and account-tag.

As said, it is the initial and partial implementation.
There are still various FIXME's and TODO's, the API of various
functions may still change (actually that is true for the next
months, even) and some stuff is currently in the core that will
be moved to modules.
2019-05-12 13:46:44 +02:00
Bram Matthys a87d54355a Update version to 5.0.0-dev
I'm sure there will be many other U4 references still...
2019-05-12 13:29:40 +02:00
Bram Matthys 4981bf472c Bump reputation version from 1.0.1 to 1.2 2019-05-11 14:17:45 +02:00
Bram Matthys 3a0d8fc06c Fix another reputation issue: reputation not showing in WHOIS when
a remote user has just connected (could take up to 5 minutes) and
a fix required for previous commit for connthrottle.
2019-05-11 14:15:52 +02:00
Bram Matthys 7a7266bc2f Bump connthrottle version from 1.1 to 1.2 2019-05-11 14:02:42 +02:00
Bram Matthys 64c8096361 Fix connthrottle module counting non-local connecting registered users
always as new users (regardless of reputation), causing the protection
to kick in too quickly for the poor new users. This was noticeable
after for example one server died and new users reconnecting massively
to the remaining servers. Reported by Lord.
2019-05-11 13:58:07 +02:00
Bram Matthys 9f8e73dca7 Make CAP commands case sensitive.
Suggested by Koragg in https://bugs.unrealircd.org/view.php?id=5263
2019-05-10 08:57:16 +02:00
Bram Matthys 872ebca6fa Don't forward PASS to services if the user is already logged in via SASL.
Reported by westor in https://bugs.unrealircd.org/view.php?id=5264
2019-05-10 08:49:40 +02:00
Vitor Luis 92ceb129da Helpop update (#81)
Update help.conf with soft actions and changed *:Lines to be *-Lines which goes more accordingly with the new rewording in UnrealIRCd IRC messages.
2019-05-04 14:45:33 +02:00
Bram Matthys b0d3476176 HELPOP: Update MKPASSWD documentation 2019-05-04 13:47:07 +02:00
Bram Matthys 09d31d8ded Enhance WHOX->WHO auto-conversion for +s serv.er.name, reported by k4be. 2019-05-03 13:15:17 +02:00
Bram Matthys 8a6cbfaaf0 Show linking error messages if these happen during the handshake and we
have already fully authenticated the server (but when it technically is
not fully linked as a server yet, eg post-EAUTH but pre-SERVER).

Also, send ERRORs to junk snomask from untrusted sources. After all,
the junk snomask is precisely there to enable briefly to debug issues.
In case of link errors we always advice to check BOTH sides of the link
as an IRCOp, and this advice still stands. This may just help a little
for people who do not follow our advice.
2019-05-02 09:30:15 +02:00
Bram Matthys 5b63d28e2a Improve error messages in case of failed server linking due to mixed
password types (eg: plaintext on one side, spkifp on the other side).
Refer to https://www.unrealircd.org/docs/FAQ#auth-fail-mixed

Also, unrelated to the above, don't say "Bad password?" if the
password type is not of type plaintext, since it would be confusing.
2019-05-02 08:55:22 +02:00
Bram Matthys 377fa25244 UnrealIRCd 4.2.3 2019-04-30 09:23:44 +02:00
Bram Matthys f9bbeaa6ca [nopost] Send these harmless kill messages to the junk snomask.
Nowadays these are pretty much never proxy attacks. Only scanners and
crawlers trying HTTP commands on IRC connections.. which isn't even that
weird anymore since people tend to open up port 443 for SSL/TLS IRC
to bypass firewall restrictions.
2019-04-28 12:12:53 +02:00
Bram Matthys d3f061bbd9 Updates to example.tr.conf and help.tr.conf by Serkan
[skip ci]
2019-04-28 11:48:11 +02:00
Bram Matthys 8bbc136a66 Updates to help.tr.conf by Serkan 2019-04-27 12:51:27 +02:00
Bram Matthys cc15cd63de [reputation] Disable benchmark, config error should be warning. 2019-04-25 09:56:35 +02:00
Bram Matthys 9bd4f25af5 Handle FLUSH_BUFFER gracefully (only matters in rare cases, such
as in the case of malformed server traffic).
2019-04-22 14:37:37 +02:00
Bram Matthys 15ea9a9347 UnrealIRCd 4.2.3-rc1 2019-04-22 08:25:26 +02:00
Bram Matthys d6e285bdfc AppVeyor: replace wget with curl, since wget mysteriously fails.
[skip travis]
2019-04-22 07:42:04 +02:00
Bram Matthys b1944284bd Trace appveyor issue...
[skip travis]
2019-04-22 07:33:16 +02:00
Bram Matthys 1ada6c09f1 Make clang happy 2019-04-22 07:28:05 +02:00
Bram Matthys 4234400e22 Add 'reputation' and 'connthrottle' modules to fight drones.
See https://www.unrealircd.org/docs/Connthrottle
2019-04-22 07:11:25 +02:00
Bram Matthys 81e2099f7b We already checked for the openssl library but if the openssl binary was
not found then this was not treated as a fatal error. Now it is, since
you will fail later in the installation process when a certificate file
is being made (resulting in mysterious 'req: command not found' errors).
Also, improve the error message both for the missing openssl library
and openssl binary case.
2019-04-15 18:56:11 +02:00
Bram Matthys f3bd95fa42 Create some preliminary release notes.
[skip ci]
2019-04-14 14:12:06 +02:00
Bram Matthys 2ba65ed35c Move previous release notes to doc/RELEASE-NOTES.old
[skip ci]
2019-04-14 13:47:11 +02:00
Bram Matthys 11c6604aeb Print out clear warning/error if using an old spamfilter.conf.
For example for Windows users, or for *NIX users where the automated
patching of the spamfilter.conf did not work.
I've tried to make the error message as clear and big as possible
and the wiki article as clear as possible as to what the user needs
to do. Not much more I can do.... :)
2019-04-14 13:45:11 +02:00
Bram Matthys 4e75af79fa 'make install' will now upgrade the spamfilter.conf examples from
'posix' to 'regex' if the user is using the exact same spamfilter.conf
that shipped with UnrealIRCd 4.x until now. Otherwise, we do not
update anything. Also, custom spamfilters in this file are not touched.
Let's hope this will apply to most of our users to ensure that they
will have no or less issues with the 'posix' to 'regex' conversion
process.
2019-04-14 13:01:31 +02:00
Bram Matthys 3ba5153362 Abort when using list functions on structs with incorrect order.
This is mostly to guard 3rd party module writers against making
such a mistake. Up to now such a mistake would silently corrupt
memory without warning or error. That is, until you crashed :D.
2019-04-14 11:01:20 +02:00
Bram Matthys 570c59b2b2 Bump UNREAL_VERSION_TIME.
[skip ci]
2019-04-12 11:01:15 +02:00
Bram Matthys 3aa5048300 Improve error message if someone uses set::something literally in the
configuration file.
Also, make (global)'unknown directive' errors fatal, as they should be.
2019-04-07 17:09:12 +02:00
Bram Matthys 9d7354147d Add two blacklist blocks in example conf: DroneBL and EFnet RBL. 2019-04-05 21:06:50 +02:00
Bram Matthys 5c30d1af6d * Badword blocks now use PCRE2 if using regex at all (rare,
usually the fast badwords system is used instead)
* Code deduplication in src/modules/{chanmodes,usermodes}/censor.c
  to src/match.c -- which may be moved later again to efuncs.
* Add --without-tre:
  This means USE_TRE will be enabled by default right now
  but if using --without-tre it will be undef'ed. This so we
  can prepare for the TRE phase-out in 2020.
* Remove include/badwords.h, put contents in include/struct.h
2019-04-05 18:19:23 +02:00
Bram Matthys 9e69cd722d Remove unused regex support in antirandom 2019-04-05 16:27:07 +02:00
Bram Matthys 422f76a723 Fix very minor memleak introduced about 2-3 weeks ago. 2019-04-04 19:24:23 +02:00
Bram Matthys f111b5c1ad Update spamfilter.conf: convert some to 'simple' matchers and make clear
that these are just old examples from the year 2005.
Also, no longer include spamfilter.conf from the example*conf by
default as they do not contain any useful spamfilters nowadays.
2019-04-04 18:31:59 +02:00
Bram Matthys 05c4cb5e8f Replace match-type 'posix' with 'regex' in example spamfilter.conf.
Note that I should probably check if they still work now.. ;)
2019-04-02 21:04:40 +02:00
Bram Matthys 83372cc2c8 Bump example.conf server sendq from 5M to 20M. 2019-04-02 20:34:39 +02:00
Bram Matthys bd05cf8e58 Stop accepting /SPAMFILTER add -posix. You should really use PCRE2 by now.
Similarly, raise a warning for spamfilter { } blocks in the configuration
with match-type 'posix'.
See: https://www.unrealircd.org/docs/FAQ#spamfilter-posix-deprecated
2019-04-02 20:33:03 +02:00
Bram Matthys ee342d9b84 Re-indent set_mode and use new paracount_for_chanmode(). 2019-03-27 16:59:42 +01:00
Bram Matthys 8b222a1ed2 -Wno-empty-body 2019-03-27 14:00:35 +01:00
Bram Matthys b2307af8ec Get rid of "unknown option -Wno-invalid-source-encoding" warning when there
is another warning being triggered.
-copy paste comment from configure.ac-
We check for the -Woption even though we are going to use -Wno-option.
This is due to the following (odd) gcc behavior:
"When an unrecognized warning option is requested (e.g.,
 -Wunknown-warning), GCC emits a diagnostic stating that the option is not
 recognized.  However, if the -Wno- form is used, the behavior is slightly
 different: no diagnostic is produced for -Wno-unknown-warning unless
 other diagnostics are being produced.  This allows the use of new -Wno-
 options with old compilers, but if something goes wrong, the compiler
 warns that an unrecognized option is present."
Since we don't want to use any unrecognized -Wno-option, we test for
-Woption instead.
2019-03-27 13:44:29 +01:00
Bram Matthys e7de6cf3a4 Fix compile issue and report error when unable to write to pid file
(data/unrealircd.pid by default).
2019-03-27 13:26:30 +01:00
Bram Matthys dd2af3b31c Enable additional compiler warnings. Update code to conform to these
new standards, possible to compile with -Werror with them.
2019-03-27 09:03:30 +01:00
Bram Matthys 5a38d8ed75 Fix misleading indentation. 2019-03-25 18:37:05 +01:00
Bram Matthys 6d3a98653e The maximum number of clients (MAXCONNECTIONS) no longer defaults to 1024.
The new question in ./Config now defaults to 'auto' (both for new installs
and for upgrades). You can still specify a manual limit but it is no longer
recommended.
A MAXCONNECTIONS of 'auto' means - at present - that UnrealIRCd will try
to set a limit of 8192. This is quite a bump from the original 1024.
On systems where this is not possible we will simply use the highest amount
possible, such as 4096 on many systems, or 1024.
In fact, we now no longer error when MAXCONNECTIONS is higher than the
'ulimit -n' limit but will adjust ourselves to the limit.
Only if the effective limit is below 100 we will print out a fatal error
since running in such a scenario is highly discouraged.
The reason for this change is that nowadays with drone attacks we may need
to be able to handle more concurrent sockets. Also, many Linux distro's
have a default setting of unlimited or 4096 nowadays, out of the box.

For people packaging UnrealIRCd (not end-users):
The ./configure --with-fd-setsize=xx option was removed and the
optional(!!) --with-maxconnections=xx option has been added.
We recommend you NOT to pass this option. Not passing it means that
the previously mentioned 'auto' mode will be used, which is likely
best for most users.

Module coders:
Although it is unlikely you accessed the 'MAXCLIENTS' variable,
if you did, it is now called 'maxclients' (lowercase) since it is
adjusted at runtime and no longer a macro.
2019-03-25 15:43:26 +01:00
Bram Matthys ad173cc5d0 Ignore join flood check in channel mode +f when the server just booted.
This new option is called set::modef-boot-delay (default: 75 seconds).
See https://www.unrealircd.org/docs/Set_block#set::modef-boot-delay
2019-03-25 13:27:28 +01:00
Bram Matthys 5b20716e9b [cleanup] floodprot: move set::modef-* handling from core to module. 2019-03-25 13:10:03 +01:00
Bram Matthys 6c837d3ce4 Cleanup _test_operclass config code. 2019-03-25 09:33:59 +01:00
Bram Matthys 9ca53369e7 Lots of config code checks for "if (!cep->ce_varname)" however this is a
condition that will never happen, as it is already handled by the parser.
2019-03-25 09:21:15 +01:00
Bram Matthys 15d77298fe Empty blacklist::dns::type could lead to a crash (config file error).
All the rest are things that "will never happen" or dead code.
2019-03-25 09:04:31 +01:00
Bram Matthys 4490b8744e Use HAVE_RLIMIT instead of FORCE_CORE. And get rid of error message. 2019-03-24 15:50:56 +01:00
Bram Matthys a9b3e05b0c Brain damage 2019-03-24 15:22:02 +01:00
Bram Matthys b3e9d391d8 More updates to api-command, remove old functions such as del_Command(). 2019-03-24 15:18:41 +01:00
Bram Matthys e19639a1bd Fix compile problem #ifndef DEBUGMODE 2019-03-24 15:13:34 +01:00
Bram Matthys 59e3a42304 For the function declaration of command overrides, module coders are now
encouraged to use CMD_OVERRIDE_FUNC(override_xyz) rather than declaring
the function themselves. This works similar to CMD_FUNC(somecmd).
Example:
/* Forward declaration */
CMD_OVERRIDE_FUNC(override_xyz);
[..]
MOD_LOAD(somemodule)
{
	CmdoverrideAdd(modinfo->module, "XYZ", override_xyz);
[..]
CMD_OVERRIDE_FUNC(override_xyz)
{
	/* Do something useful here */
2019-03-24 08:27:26 +01:00
Bram Matthys 60952328f0 Add function type checking in CommandAdd()
And, for aliases, now use AliasAdd(), CommandAdd() is no longer permitted
for it. Do any modules use this?
2019-03-24 08:16:45 +01:00
Bram Matthys f9db29b768 Smart.. moving code to a separate function resulting in the use
of sizeof() on a char *...
2019-03-24 07:48:08 +01:00
Bram Matthys cb60bf286d Get rid of this useless DLLFUNC junk. This is only needed for symbols
that need to be visible from the outside of the .DLL (symbol export).
Long story short: you never need to use this yourself in a module.
Where needed it is already handled by UnrealIRCd.
2019-03-23 19:53:12 +01:00
Bram Matthys edfc832aa8 Some minor code cleanups, use CMD_FUNC() where possible. 2019-03-23 19:45:34 +01:00
Bram Matthys 7bcf419eda Add references to the technical S2S documentation
@skip-ci
2019-03-23 19:39:56 +01:00
Bram Matthys e4ddc80c2a Code cleanup: m_protoctl. Has always been ugly, just was never bothered
enough to clean it up. Also, remove PROTOCTL -<option> support, which is
not used by anything and was only supported on a handful of options
anyway. Also remove some debugging and PROTOCTL_MADNESS.
Finally, add a reference to the technical documentation.
2019-03-23 19:23:10 +01:00
Bram Matthys a11ee2b1a2 Skip * in PROTOCTL SERVERS=. This probably caused a bug which could be
triggered by doing quick server connects (crossing requests), something
that the PROTOCTL SERVERS= code is supposed to prevent (it should be
safe to connect to X servers at the same time, even every second).
2019-03-23 19:04:59 +01:00
Bram Matthys 5992a759f7 return 0.. 2019-03-23 18:44:00 +01:00
Bram Matthys ab50bf2afc Communicate server featureset (and changes) across server links.
Previously various information was only available for directly attached
servers, since it is communicated via PROTOCTL.
Now, we will also communicate information about leafs behind us.
IRCOps can use the /SINFO command to see these server features.
Services codes don't need to do anything, or at least are not expected
to do anything. They can still receive the information and do something
with it, of course...
Read the following technical documentation for full information,
as it will outline very specific rules for using the command S2S:
https://www.unrealircd.org/docs/Server_protocol:SINFO_command
2019-03-23 17:56:59 +01:00
Bram Matthys 335a7569bb Bugs like this can keep you occupied for a while:
safestrdup(somevar, s+10);
..always caused somevar to be NULL :D.
2019-03-17 20:16:21 +01:00
Bram Matthys 7ad6b15e92 It would be nice if expired TKL's actually get removed (duh).
Caused by fac1e30b91 from March 3, 2019.
2019-03-15 16:34:30 +01:00
Bram Matthys 761ae02935 Change assert() to if..!...abort() so it produces proper core dumps.
Yeah, that's how it works, unfortunately.
2019-03-15 16:03:48 +01:00
Bram Matthys fd73739847 Handle SSL_ERROR_WANT_READ in a better way. 2019-03-10 15:00:45 +01:00
Bram Matthys 872830bdf2 I give up. Test framework will no longer run on Travis-CI, ruby is broken. 2019-03-09 15:38:08 +01:00
Bram Matthys b396dc3c20 .. 2019-03-09 15:33:31 +01:00
Bram Matthys f47dc78418 . 2019-03-09 15:31:48 +01:00
Bram Matthys 2c114d458e ............................... 2019-03-09 15:27:46 +01:00
Bram Matthys f039e08f0b Travis-CI + ruby = .... 2019-03-09 15:17:31 +01:00
Bram Matthys e0a4e7fe71 Travis-CI: :/ 2019-03-09 15:05:47 +01:00
Bram Matthys 2e79c34c11 Travis-CI: more diagnostics 2019-03-09 11:59:33 +01:00
Bram Matthys 99b379fca8 Travis-CI: :( 2019-03-09 11:47:18 +01:00
Bram Matthys 584f3e9d6d Travis-CI: argh argh 2019-03-09 11:32:27 +01:00
Bram Matthys 20550981f8 Travis-CI: argh! 2019-03-09 11:12:55 +01:00
Bram Matthys 5d69fe9d93 Missing return NULL in find_tkline_match_zap_matcher (due to commit from
a few days ago)
2019-03-09 10:23:19 +01:00
Bram Matthys ad063ba36a Fix ./unrealircd spkifp complaining that it could not find the certificate
file if you specified a relative path. Until now only absolute paths worked.
Bug reported by CrazyCat.
2019-03-08 09:32:05 +01:00
Bram Matthys fac1e30b91 Major TKL speed improvements. 2019-03-03 20:25:05 +01:00
Bram Matthys 87c81e7e9f This fsync() call slows things down too much at high connection rates. 2019-03-03 19:03:05 +01:00
Bram Matthys 41c1f01011 Bump version to 4.2.3-dev to make clear that this git version is under development. 2019-03-03 17:14:09 +01:00
Bram Matthys 16659de0b2 Changing set::anti-flood::invite-flood had no effect. It was always 4:60.
Reported by Betaman2k in https://bugs.unrealircd.org/view.php?id=5222
2019-03-03 14:16:49 +01:00
Bram Matthys 766055d5c0 Fix set::ban-setter and set::topic-setter being set to nick-user-host
out of the blue. The classic C mistake where = instead of == was written
in an if statement... duh.
2019-03-02 08:49:47 +01:00
Bram Matthys de1548de73 UnrealIRCd 4.2.2. 2019-03-01 14:38:44 +01:00
Bram Matthys f599ea02cb WHO(X) auto-conversion bug regarding 'a' and 'c' which no longer exist
in WHOX.
2019-03-01 14:34:43 +01:00
Bram Matthys d068cd41ca Fix crash in websocket module. 2019-03-01 14:10:06 +01:00
Bram Matthys d7e5ff82f0 Update curl-ca-bundle.crt (Wed Jan 23 04:12:09 2019 GMT) 2019-03-01 13:57:35 +01:00
Bram Matthys e16e2b36d8 UnrealIRCd 4.2.2-rc2 2019-02-11 09:19:38 +01:00
Bram Matthys c6f01aa3f1 Protect 2 more commands against rogue server to server traffic. 2019-02-11 08:47:51 +01:00
Bram Matthys 294560f944 KILL: Not sure if this fixes anything but at least it's less cryptic. 2019-02-10 17:30:39 +01:00
Bram Matthys 9a0bd31cf8 Fix unlikely crash if you had a spamfilter targetting away that was
only local (so in .conf) and it hit a remote user.
Also, re-indent this monster...
2019-02-10 17:09:48 +01:00
Bram Matthys 1dbef111fb Fix crash if receiving malformed server to server traffic (from an
authenticated server): TKL deleting a spamfilter with insufficient
parameters.
2019-02-10 17:08:47 +01:00
Bram Matthys 1f03dbdd05 CHGNAME and SETNAME: if a remote user used a realname that was banned
on this server then we could possibly crash. (Fortunately most networks
use the same ban realname blocks on all their servers)
2019-02-10 14:54:28 +01:00
Bram Matthys 3712fad891 When a server does not use SID's, set empty id as before.
This bug was post-rc1, caused by dde8f914fb.
2019-02-10 14:48:29 +01:00
Bram Matthys 7e444d3b9f Fix SJOIN bug in rc1: was using an incorrect buffer when SJSBY was
not used, such as in a mixed version scenario.
2019-02-10 14:43:34 +01:00
Bram Matthys 77d3e844dc Fix a bunch of REHASH memory leaks. 2019-02-10 10:36:20 +01:00
Bram Matthys 7d5c3a1b68 Fix hang/crash due to commit from yesterday, reported by k4be.
(cause: dde8f914fb)
2019-02-10 09:56:53 +01:00
Bram Matthys c7f00edd9d Quicker handshake when using many CAP requests and/or AUTHENTICATE.
I was wondering why the handshake took 4 seconds for a client which
authenticates using SASL. Turns out that fake lag was kicking in due
to the many "CAP req" commands combined with the other handshake stuff.
Now the first 15 (or so) "CAP" requests are "free", without fake lag.
2019-02-09 16:47:24 +01:00
Bram Matthys 78cd122a05 Allow SASL post-registration. Unfortunately the anope unreal4 protocol
module also requires an update to support this.
2019-02-09 14:39:34 +01:00
Bram Matthys dde8f914fb Internal: make UID available early (pre-auth). 2019-02-09 14:35:48 +01:00
Bram Matthys a740570710 Fix crash bug (in rc1 only) if ::ssl-options are being used and the
outdated SSL protocols/ciphers are being checked.
2019-02-08 12:02:52 +01:00
Bram Matthys 9c0f1f3505 Fix OOB read in m_whox.
Strange order for a compare, first the 2nd byte, then the 1st byte ;)
Anyway, this issue can only be triggered since rc1, no big issue.
2019-02-06 19:31:10 +01:00
Bram Matthys e443182573 UnrealIRCd 4.2.2-rc1 2019-02-06 16:00:38 +01:00
Bram Matthys 988f64e3b3 Fix crash when linking (caused by commit from 4 days ago). 2019-02-06 12:54:37 +01:00
Bram Matthys f92a6fec79 Release notes: clarify flood limit in older versions
@skip-ci
2019-02-06 12:17:47 +01:00
Bram Matthys 70a9a6f6b2 Added INVITE and KNOCK flood protection (command rate limiting).
set::anti-flood::invite-flood defaults to 4 per 60 seconds.
set::anti-flood::knock-flood defaults to 4 per 120 seconds.
2019-02-06 12:00:51 +01:00
Bram Matthys 57f97a5a43 Removed a debugging message and fixed TARGMAX being broken after a REHASH. 2019-02-06 09:24:31 +01:00
Bram Matthys 1e1f750b44 New set::max-targets-per-command which configures the maximum number
of targets accepted for a command, eg /MSG nick1,nick2,nick3,nick4 hi.
Also changed the following defaults (previously hardcoded):
* PRIVMSG from 20 to 4 targets, to counter /amsg spam
* NOTICE from 20 to 1 target, to counter /anotice spam
* KICK from 1 to 4 targets, to make it easier for channel operators
  to quickly kick a large amount of spambots
See https://www.unrealircd.org/docs/Set_block#set::max-targets-per-command

(actually still need to write the documentation)
2019-02-04 17:51:09 +01:00
Bram Matthys 1e6d8ea536 Fix compile problem due to previous commit. 2019-02-04 14:42:17 +01:00
Bram Matthys 9f4296d648 New set::anti-flood::max-concurrent-conversations which configures the
maximum number of conversations a user can have with other users at the
same time. Until now this was hardcoded at limiting /MSG and /INVITE to
20 different users in a 15 second period. The new default is 10 users,
which serves as a protection measure against spambots.
See https://www.unrealircd.org/docs/Set_block#maxcc for more details.
2019-02-04 09:52:08 +01:00
Bram Matthys 7153468081 UnrealIRCd will now warn if your ulines { } are matching UnrealIRCd servers.
See https://www.unrealircd.org/docs/FAQ#WARNING:_Bad_ulines
2019-02-02 08:44:14 +01:00
Bram Matthys be50ef4a1e Get rid of warning on-boot "Channel modes changed at runtime" 2019-02-02 07:53:07 +01:00
Bram Matthys f9415e1a91 m_whox: now accept and transform most classic UnrealIRCd WHO requests
such as "WHO +s serv.er.name" to "WHO serv.er.name s".
It also does advanced transformation such as "WHO -m z" to "WHO -z m"
**copy paste from comment in code**
Flag a: user is away                                            << no longer exists
Flag c <channel>: user is on <channel>                          << no longer exists
Flag g <gcos/realname>: user has string <gcos> in his/her GCOS  << now called 'r'
Flag h <host>: user has string <host> in his/her hostname       << no change
Flag i <ip>: user has string <ip> in his/her IP address         << no change
Flag m <usermodes>: user has <usermodes> set                    << behavior change
Flag n <nick>: user has string <nick> in his/her nickname       << no change
Flag s <server>: user is on server <server>                     << no change
Flag u <user>: user has string <user> in his/her username       << no change
Behavior flags:
Flag M: check for user in channels I am a member of             << no longer exists
Flag R: show users' real hostnames                              << no change (re-added)
Flag I: show users' IP addresses                                << no change (re-added)
**end of paste**
Of course we cannot convert 100% from classic UnrealIRCd WHO to WHOX-style
because things like "WHO +m r" could mean either "search for +m in realname" (WHOX)
or "search for +r in modes" (classic). In cases like this we assume WHOX, so to not
break any WHOX compatibility.

Added matchers: 'R' (show real host) and 'I' (show IP)

This code will need more testing, both by classic WHO and by WHOX users...
2019-02-01 17:46:59 +01:00
Bram Matthys eecd29bdc8 WHOX: adaptions for UnrealIRCd part 1:
* No longer require a ! prefix for ircops to see users
* "WHO *" is no longer different than the rest
  (previously in m_whox would only list users on 1st channel)
Neither is part of the WHOX specs.
2019-02-01 15:21:53 +01:00
Bram Matthys 52e72c2ed9 Update reference to RELEASE-NOTES.old (link used wrong branch) 2019-02-01 14:27:07 +01:00
Bram Matthys 1790efd05d The message sent to users upon *LINE can now be adjusted completely via
set::reject-message::kline and set::reject-message::gline.
See https://www.unrealircd.org/docs/Set_block#set::reject-message
Suggested by k4be in https://bugs.unrealircd.org/view.php?id=5198
2019-02-01 14:25:52 +01:00
Bram Matthys ff9ca3c8ef Add 005 token DEAF=d 2019-01-31 17:47:06 +01:00
Bram Matthys a999b305a5 Remove 005 CMDS= token, which was an unnecessary abstraction and was
not picked up by any other IRCd. The 005 tokens KNOCK MAP USERIP are
now used instead. We do not announce STARTTLS in 005 anymore as this
is way too late (post-handshake, sensitive info already sent and/or
received). Not to mention STARTTLS is not the preferred method to
setup a secure connection in the first place.
Module coders: this means CommandAdd() with M_ANNOUNCE should no
longer be used. If a 3rd party module does use it, then UnrealIRCd
will now raise a warning. In a later UnrealIRCd version the flag
is likely to be removed completely so would cause a compile error.
(I doubt any module uses this anyway... but still..)
2019-01-31 17:34:07 +01:00
Bram Matthys 6cbd2744d7 * The default maximum topic length has been increased from 307 to 360.
* You can now set more custom limits. The default settings are shown below:
  set {
      topic-length 360; /* maximum: 360 */
      away-length 307; /* maximum: 360 */
      quit-length 307; /* maximum: 395 */
      kick-length 307; /* maximum: 360 */
  };
* A new 005 token has been added: QUITLEN. Works similar to KICKLEN.

The ability to adjust the topic length in the configuration file was
requested by Amiga600 in https://bugs.unrealircd.org/view.php?id=4692
At that place is also additional information on why there is a
"maximum" for topic length.
2019-01-30 17:50:17 +01:00
Bram Matthys 41239119f8 Update release notes a bit. 2019-01-30 16:54:56 +01:00
Bram Matthys 88030c63fb 1) Simplify dealing with isupport (numeric 005) stuff from the config code.
There's now no longer a difference between a rehash or boot.
2) Other cleanups in s_conf.c as well. Looks better now.
3) Sort the 005 tokens alphabetically. Enforcing some other 'logical order'
   was futile and this makes things consistent between rehashes.

For module coders this adds some new functions, such as IsupportSet,
IsupportSetFmt and IsupportDelByName. I'll document them later.
2019-01-30 16:42:19 +01:00
Bram Matthys 98fca7979f Code cleanup: internally rename iConf.nicklen to .nick_length to match the
convention that set::some-name is called iConf.some_name
2019-01-30 10:49:44 +01:00
Bram Matthys 5eaa711969 Update release notes to reflect current state. 2019-01-28 16:06:59 +01:00
Bram Matthys d085fb09c1 Three new config items to make topic and ban setter nick!user@host and
to control synchronization of the +beI setter across server links
(that is, the feature just introduced one commit ago):
set {
     topic-setter [nick|nick-user-host]; /* nick = default */
     ban-setter [nick|nick-user-host]; /* nick = default */
     ban-setter-sync [yes|no]; /* yes = default */
};
This also means that --with-topicisnuhost / TOPIC_NICK_IS_NUHOST
is now removed, since this now goes via set::topic-setter.

Also, moved the "first" PROTOCTL from include/common.h to send_proto()
in src/s_serv.c so the bunch of PROTOCTL lines is all in one place
(and so I could conditionally send SJSBY).
Ok, it's not entirely all in one place, PROTOCTL EAUTH is still sent
at another place (early, duh), but still..
2019-01-28 15:41:44 +01:00
Bram Matthys 874d99e0eb For +beI lists the 'set by' and 'set at' information is now synchronized
when servers link. Thus, you can see the real setter and time also after
a netsplit (/mode #channel b). This, unlike before, when setby was
name.of.server and time was the time of the synch.
This requires the entire network to run UnrealIRCd 4.2.2 or later.
Suggested by k4be in https://bugs.unrealircd.org/view.php?id=5183
Technical details: the PROTOCTL token to enable this is "SJSBY" and see
https://www.unrealircd.org/docs/Server_protocol:SJOIN_command for more
information, in particular the last section there.
2019-01-28 14:36:41 +01:00
Bram Matthys 4aa2d47deb Run test framework with a hub in-between to test command propagation. 2019-01-28 09:29:44 +01:00
Bram Matthys ed1f47f80a Can't stand http:// URLs... 2019-01-25 20:50:05 +01:00
Bram Matthys 2a3dd0e350 what is this 'return 0' doing here... 2019-01-23 16:36:42 +01:00
Bram Matthys ac9463a83f Rename hook HOOKTYPE_CAN_SEND_SECURE to HOOKTYPE_SEND_CHANNEL, which is
more descriptive and AFAICT nobody uses this hook in a public 3rd party
module anyway.
2019-01-21 17:02:14 +01:00
Bram Matthys 083826ee94 modules/usermodes/noctcp (+T): 1) only block CTCP's and not CTCP REPLIES,
2) allow IRCOps to bypass user mode +T restrictions. Reported by St3Nl3y,
HeXiLeD and Koragg in https://bugs.unrealircd.org/view.php?id=5166
2019-01-21 16:55:29 +01:00
Bram Matthys ee20160bc3 Add another type for HOOKTYPE_CONFIGTEST and HOOKTYPE_CONFIGRUN
for CONFIG_LISTEN. This so a module can have custom options in
the listen block. Like all other CONFIG_* options you are supposed
to return 1 if your module handles this option and 0 if not.
From HOOKTYPE_CONFIGTEST you can also return -1 to indicate error
for an option that is handled by the module.
Note that 'cep' is passed, that is the option for the variable
that is being checked, and not the 'ce', the parent of the listen
block. If you want to access the parent, then use ce->ce_prevlevel.
2019-01-21 13:55:20 +01:00
Bram Matthys 7a3ba05c03 Similar to previous commit, fix resolving of temporary modules (.so files)
in crash reports as well... and make them in English, regardless of the
users' locale... better for us ;)
2019-01-21 13:37:52 +01:00
Bram Matthys 6fcacdf148 Fix './unrealircd backtrace' not working correctly in non-English environments.
The script symlinks any missing tmp/xxxx.so's to the real module name but
depends on English statements (ugly, yeah, but it works). With a non-English
locale this did previously not work so the backtrace was screwed.
2019-01-21 13:30:15 +01:00
Bram Matthys 41e6d5b7e9 Fix for strangely formatted 'creation date' if compiled with certain locales.
Reported by k4be.
2019-01-21 13:26:22 +01:00
Bram Matthys bcb667c59e New hook HOOKTYPE_WELCOME (aClient *acptr, int after_numeric): allows you
to send a message at very specific places during the initial welcome
https://www.unrealircd.org/docs/Dev:Hook_API#HOOKTYPE_WELCOME
2019-01-21 10:12:46 +01:00
Bram Matthys 25ede84a04 This makes more sense. Also testing announcement bot :D 2019-01-21 10:10:51 +01:00
Bram Matthys c726df5758 Travis-CI: The job exceeded the maximum log length, and has been terminated.
Fantastic. https://github.com/travis-ci/travis-ci/issues/1382
2019-01-18 15:31:14 +01:00
Bram Matthys 013dd06aee Travis-CI: End of argh. 2019-01-18 14:45:55 +01:00
Bram Matthys 3bacb28555 Travis-CI: no comment 2019-01-18 14:24:19 +01:00
Bram Matthys 8a9971618f Travis-CI: ..or without sudo..
I really love this..
2019-01-18 14:05:45 +01:00
Bram Matthys 3e3da94a41 Travis-CI: new image, have to install bundler again. 2019-01-18 14:00:00 +01:00
Bram Matthys 4d5e627b27 Update release notes: * New set::outdated-tls-policy which describes what to
do with clients that use outdated SSL/TLS protocols (eg: TLSv1.0) and
ciphers.  The default settings are to warn in all cases: users connecting,
opers
/OPER'ing up and servers linking in.  The user will see a message telling
them to upgrade their IRC client.  This should help with migrating such
users, since in the future, say one or two years from now, we would want to
change the default to only allow TSLv1.2+ with ciphers that provide Forward
Secrecy.  Instead of rejecting clients without any error message, this
provides a way to warn them and give them some time to upgrade their
outdated IRC client.
https://www.unrealircd.org/docs/Set_block#set::outdated-tls-policy
2019-01-18 13:38:14 +01:00
Bram Matthys 425571a8d2 Update UnrealIRCd version to 4.2.2-dev 2019-01-18 13:22:58 +01:00
Bram Matthys e82dbdce1a Update doc/RELEASE-NOTES.old. Now contains 4.2.0 and 4.2.1 release notes,
I forgot the 4.2.0 one earlier..
2019-01-18 13:20:28 +01:00
Bram Matthys 4681603c52 Fix bug where "link-security" was downgraded to level 1 if using 'spkifp'. 2019-01-18 13:10:51 +01:00
Bram Matthys 778be86c66 Update HELPOP EXTBANS on ~t (timed bans), ~m (msgbypass) and ~T (textban)
since these are loaded by default since UnrealIRCd 4.2.0.
2019-01-14 15:10:23 +01:00
Bram Matthys f4b432ae94 Add RC4 and 3DES to set::ssl::outdated-ciphers, in case anyone uses some
insecure custom ::ciphers setting, this so RC4 and 3DES still get flagged.
2019-01-12 11:29:16 +01:00
Bram Matthys 67d691fce9 * New set::outdated-tls-policy which describes what to do with clients
that use outdated SSL/TLS protocols (eg: TLSv1.0) and ciphers.
  The default settings are to warn in all cases: users connecting,
  opers /OPER'ing up and servers linking in. The user will see a message
  telling them to upgrade their IRC client.
  This should help with migrating such users since in the future, say one
  or two years from now, we would want to change the default to only allow
  TSLv1.2+ with ciphers that provide Forward Secrecy. Instead of rejecting
  clients without any error message, this provides a way to warn them and
  give them some time to upgrade their outdated IRC client.
  https://www.unrealircd.org/docs/Set_block#set::outdated-tls-policy
2019-01-12 11:08:18 +01:00
Bram Matthys 8e7a085474 AppArmor profile in extras/security/apparmor: no changes but make it
clear that this has been tested on Ubuntu 16.04 and Ubuntu 18.04.
2019-01-12 10:52:05 +01:00
Bram Matthys 5fd673d059 Rename PLAINTEXT_POLICY_* to POLICY_ (and similarly, the struct, etc) 2019-01-11 13:27:29 +01:00
Bram Matthys a1d2698ead Provide get_ssl_options_for_client() to get the SSLOptions * for a client. 2019-01-11 13:16:09 +01:00
Bram Matthys b0c8629284 Travis-CI: remove TLS test for libressl-25 (no longer supported)
[skip ci]
2019-01-11 12:34:43 +01:00
Bram Matthys 72a3a445ee Travis-CI: Update OpenSSL and LibreSSL versions
* Remove LibreSSL versions that are no longer supported (2.5.x and 2.6.x).
* Add LibreSSL 2.8.x (current stable) and 2.9.x (current dev)
* OpenSSL releases only had updates in their 'letter suffixes'
2019-01-11 11:54:13 +01:00
Bram Matthys 9668aaaade Travis-CI: Rename .txt files to match $BUILDCONFIG 2019-01-11 11:42:36 +01:00
Bram Matthys dbeb5af2ea Updates to SSL/TLS tests. 2019-01-11 11:30:40 +01:00
Bram Matthys 227abacdb5 Hm? 2019-01-11 10:52:16 +01:00
Bram Matthys 8e1af5f304 Update SSL/TLS tests and put them in extras/tests/tls 2019-01-11 10:45:20 +01:00
Bram Matthys 9873382e6b Add SSL/TLS tests. 2019-01-11 10:06:21 +01:00
Bram Matthys 7d68ea0570 Update default ciphers, or actually only the ones not providing PFS, by
preferring AES-256 over AES-128 (in contrast to the Mozilla "intermediate"
profile which prefers AES-128). Again, this only affects non-PFS cases, as
all modern clients with PFS already had CHACHA20 and AES-256 negotiated.
The portion of non-PFS clients should only be few percent, if any.
I was actually considering removing non-PFS ciphersuites but it seems a bit
early to do so, at least not without more research on affected clients.
2019-01-11 09:19:44 +01:00
Bram Matthys dbbe6e7248 Travis-CI: another attempt 2019-01-10 20:29:11 +01:00
Bram Matthys 981a5d44b2 Travis-CI: install specific bundler (wtf?) 2019-01-06 20:34:16 +01:00
Bram Matthys 2a9b20369b Travis-CI: use Ubuntu 16.04 instead of 14.04
...since 14.04 seems to fail due to an outdated ruby.
2019-01-06 20:14:04 +01:00
Bram Matthys 8c9e4b8668 Poison unused parv[] elements that code should never access.
The last parv[] array element will be NULL. Accessing any elements after
that is undefined, similar to reading past the nul byte of a string.
This poison will help catch such bugs. Without this poison your code
will also crash, now it just crashes more consistently.
2019-01-06 19:21:59 +01:00
Bram Matthys dbf7aeb386 UnrealIRCd 4.2.1.1: compile fix for Debian stretch if you have a version of
libargon2 installed that does not provide Argon2id.
2019-01-03 08:57:59 +01:00
Bram Matthys 4965fc6741 Fix for systems with libargon2 that don't have Argon2id (Debian 9.6).
Apparently Debian stretch has 20160821's version which just falls short.
20161029 already has it included. We'll now use shipped libargon2 for
versions below 20161029. Thanks to vectr0n for reporting the issue.
2019-01-02 19:20:42 +01:00
Bram Matthys c173b17064 Fix SAJOIN, SAPART and SAMODE not working due to operclass.default.conf
using the 'sacmds' permission, when it should actually be 'sacmd'.
Reported by Stanley.
2018-12-28 17:55:32 +01:00
Bram Matthys 5da3ef8889 UnrealIRCd 4.2.1 (will publish tomorrow) 2018-12-26 23:06:33 +01:00
Bram Matthys 8b0cad3845 Fix for 'require authentication' (duh)
.. yeah I and others were still using 'require sasl' :D
2018-12-22 10:36:48 +01:00
Bram Matthys 56568f4033 Update release notes. This may be final for 4.2.1-rc1. 2018-12-22 10:12:53 +01:00
Bram Matthys 43de2dd747 Update release notes 2018-12-21 18:05:06 +01:00
Bram Matthys 73502ca4b6 Update help.conf with new WHO status flag 's' (secure) 2018-12-21 18:03:57 +01:00
Bram Matthys bb7bc90612 Forgot to update c-ares version in extras/curlinstall.... 2018-12-21 15:59:51 +01:00
Bram Matthys ad9a1b0b94 Import settings from UnrealIRCd 4.2.0
[skip ci]
2018-12-21 15:57:08 +01:00
Bram Matthys e30712f3d4 Update Windows libraries and the Windows build command for build tests.
[skip travis ci]
2018-12-21 15:42:32 +01:00
Bram Matthys f3f397b066 Update shipped libs: c-ares to 1.15.0 and PCRE2 to 10.32 2018-12-21 15:32:23 +01:00
Bram Matthys f1844e40a5 Set version to 4.2.1-rc1. The release notes are still likely to change. 2018-12-21 15:24:12 +01:00
Bram Matthys 54c17aa65d Indicate 's' in WHO reply flags if the user is secure (SSL/TLS). 2018-12-21 14:21:19 +01:00
Bram Matthys bb0530f694 In the authprompt documentation point the user to (possibly) tweaking
the set::handshake-timeout setting as well.
2018-12-21 13:24:25 +01:00
Bram Matthys 7755d10829 [authprompt] Suggest /QUOTE AUTH .. instead of /AUTH .. 2018-12-21 07:58:38 +01:00
Bram Matthys 62e30ec342 Fix typo in config warning. 2018-12-21 07:58:12 +01:00
Bram Matthys 267c2f3e56 Make authprompt work for soft KLINE/GLINE and soft-xx ban actions
(in registration phase anyway), as promised earlier in the documentation.
2018-12-19 17:42:13 +01:00
Bram Matthys 7f8172faef Bump fakelag on failed authentication attempt (SASL, real or emulated) 2018-12-19 17:41:28 +01:00
Bram Matthys 7aaf5e9a42 Update release notes regarding a fix from today.
[skip ci]
2018-12-19 17:13:39 +01:00
Bram Matthys 88fadc134d Fix build issue on Windows
[skip travis ci]
2018-12-19 13:58:44 +01:00
Bram Matthys 0ac56e4444 Fix line number in error messages being off, as reported in
https://bugs.unrealircd.org/view.php?id=5169
caused by commit 51ed51dff1
2018-12-19 13:50:09 +01:00
Bram Matthys 56a964bba1 Hide remote includes auth information in error messages. Reported by Jellis
in https://bugs.unrealircd.org/view.php?id=5172
2018-12-19 13:02:36 +01:00
Bram Matthys 6b089dfcd6 The new module is now called authprompt. Also wrote an article:
https://www.unrealircd.org/docs/Authentication
And "require sasl" is now "require authentication"
(the old name will only raise a warning, not cause an error)

Note that authprompt currently only does the "require authentication"
stuff and not yet the soft-xx actions. That will be something for
later this week, but I've already documented it as such (here and
there anyway).
2018-12-17 17:32:43 +01:00
Bram Matthys b1e1b6d9d5 quick fix for build tests, will fix later. 2018-12-16 16:40:35 +01:00
Bram Matthys ce4aeff63f Add saslemulation to Windows makefile.
[skip travis ci]
2018-12-16 15:53:12 +01:00
Bram Matthys 2ed958f2ee Fix typo in modules.optional.conf. 2018-12-16 15:52:04 +01:00
Bram Matthys 9f3e060a3d This is a better one line description. 2018-12-16 13:56:17 +01:00
Bram Matthys 0254894368 Authentication prompt for non-SASL users:
We previously introduced the "require sasl" block which allows you to
force users from certain IP addresses to authenticate with their nickname
and password via SASL. We now offer a new experimental module called
'saslemulation' which will help non-SASL users by showing a notice and
asking them to authenticate to their account via /AUTH <user>:<pass>.
See https://www.unrealircd.org/docs/Set_block#set::sasl-emulation

Note that this is work in progress, although the functionality of
already works. Still need to do some cleaning and expand the scope.
And more testing...
2018-12-16 13:51:22 +01:00
k4bek4be c124f65027 fix IPv6 DNS blacklist (#78)
Fix IPv6 blacklist checking (DNSBL). Patch from k4be.
2018-12-15 19:53:33 +01:00
Bram Matthys 3774e5661f Fix for *-with-override operclasses. 2018-12-14 18:10:14 +01:00
Bram Matthys a0167c35c0 Major reorganization of operclass privileges:
* The operclass privileges have been redone. Since there were 50+ changes
  to the 100+ privileges it makes little sense to list the changes here.
  If, like 99% of the users, you use default operclasses such as "globop"
  and "admin-with-override" then you don't need to do anything.
  However, if you have custom operclass { } blocks then the privileges
  will have to be redone. For more information on the conversion process,
  see https://www.unrealircd.org/docs/FAQ#New_operclass_permissions
  For the new list of permissions, with much better naming and grouping:
  https://www.unrealircd.org/docs/Operclass_permissions
The inconsistency in the privileges was initially reported by webczat in
https://bugs.unrealircd.org/view.php?id=4771
The subsequent reorganization took two full days, so.. hopefully the
people who are using - or plan to use - custom operclasses will like the
new layout... except that they need to redo their work of course ;)
2018-12-14 17:05:32 +01:00
Bram Matthys e470541a8b Windows............ whatever. 2018-12-10 18:28:13 +01:00
Bram Matthys 267f6adc54 Tadah. Fix vs2017, reported by Gottem. 2018-12-10 18:15:22 +01:00
Bram Matthys 7dcb5a5bb1 The authentication types 'md5', 'sha1' and 'ripemd160' have been
deprecated because they can be cracked at high speeds. They still
work, but a warning will be shown on boot and on rehash.
Please use 'bcrypt' or (even better) the new 'argon2' type instead:
"./unrealircd mkpasswd argon2" or "/mkpasswd argon2 passwd" on IRC.

Also, not in release notes because it would take up too much text:
Unix crypt is a bit more complicated: most types are outright 'bad',
while other types have reasonable security similar to 'bcrypt'.
To be honest these people should probably use 'argon2' since it's
a lot better. Then again, warning about this when it's still such
a common hashing method (now, in 2018) may be a bit overzealous.
So: not warning about crypt types $5/$6 which use SHA256/SHA512
with normally at least 5000 rounds (unless deliberately weakened
by the user), but we do warn about other crypt() usage.

Also, mkpasswd support for those deprecated types has been removed since
there's no good reason to generate new password hashes with these.
2018-12-10 15:46:11 +01:00
Bram Matthys 02184fe3a0 Write release notes (reflecting current state, anyway).
[skip ci]
2018-12-10 09:00:35 +01:00
Bram Matthys b335f8c284 Remove -lrt and -ldl for systems lacking pkg-config and building with
system libargon2.
2018-12-10 08:49:30 +01:00
Bram Matthys 8bbcd94071 Set UnrealIRCd version to 4.2.1-dev 2018-12-10 08:24:57 +01:00
Bram Matthys 9fdd93f0e4 Fix libargon2 autodetection (system lib). 2018-12-10 08:19:41 +01:00
Bram Matthys 942da806dd Make build test compile with Argon2 lib 2018-12-09 17:56:04 +01:00
Bram Matthys a852b480d5 Add support for Argon2 password hashes (argon2id).
Also, make this the default for './unrealircd mkpasswd'.
The Windows version also works.. I just need to create a new library
package, will be done later today or tomorrow.
https://bugs.unrealircd.org/view.php?id=5116
2018-12-09 17:22:12 +01:00
Bram Matthys 459a55245a No longer require "};" in config files, from now on "}" will suffice.
Note that both }; and } forms are accepted now, even mixed, and this
will not raise a warning or error.
I've always found it odd that we required a ; after }. In a language
like C for typedef structs it has some meaning since there could be
an alias between the } and the ;, but in UnrealIRCd there's no such
thing.
2018-12-08 16:03:58 +01:00
Bram Matthys 51ed51dff1 Remove non-standard 'nested comments' features, also known as
"comments within comments are not ignored".
Reported by bekarfel in https://bugs.unrealircd.org/view.php?id=4075
FAQ entry: https://www.unrealircd.org/docs/FAQ#Nesting_comments
2018-12-08 15:51:50 +01:00
Bram Matthys 7cd0bbbcb9 On second thought, for m_whox the priority is not important,
so set it to zero (0).
2018-12-08 15:29:02 +01:00
Bram Matthys 9cfff2d07d In 4.2.0 we added support for priorities in CmdoverrideAddEx(),
however it turns out they were accidentally reversed.
This is now corrected: highest number = highest prioty.
Reported by Gottem in https://bugs.unrealircd.org/view.php?id=5162
2018-12-08 15:23:42 +01:00
Bram Matthys 8d1047d4e9 Remove old function is_irc_banned(). Ahhh, WebTV times.. 2018-12-08 13:06:41 +01:00
Bram Matthys 84686f02bb Fix checking for target nick bans (cannot change to a nick that is banned).
This was and still is the default, set::check-target-nick-bans 'yes', however
the feature was broken since UnrealIRCd 4.0.0 (-betaX) by commit
709c7e890e. Reported by PeGaSuS and St3Nl3y.
2018-12-08 13:01:27 +01:00
Bram Matthys 4bef3a5238 Nothing important. Update comments of place_host_ban() and add an explicit
'case BAN_ACT_SOFT_KILL', even though it is already handled by 'case default'.
2018-11-21 14:26:35 +01:00
Bram Matthys 4a0dcc5f13 Load antimixedutf8 from modules.optional.conf 2018-11-21 12:35:25 +01:00
Bram Matthys 9d5e46c43c Set default score to 10. Prevents innocent Russians from getting caught :D 2018-11-18 20:07:09 +01:00
Bram Matthys 9f7b8997f2 Fix stupid bug for <4.2.0, reported by PeGaSuS 2018-11-18 19:52:54 +01:00
Bram Matthys 112c5d922e Fixes for Cyrillic (false positives when speaking Russian, etc...) 2018-11-18 19:39:39 +01:00
Bram Matthys b89bd719a7 Compatibility... 2018-11-18 18:50:45 +01:00
Bram Matthys d0799a0f04 Build antimixedutf8 2018-11-18 18:28:28 +01:00
Vitor 6f3ef8e3a7 Update help.conf (#76)
Update help.conf with +Z and +D
2018-11-18 18:21:34 +01:00
Vitor 4b5e950ffd Update antimixedutf8.c (#77)
Fix credits in antimixedutf8.
2018-11-18 17:00:55 +01:00
Bram Matthys 793e827218 Add "anti mixed utf8" module (antimixedutf8):
This module will detect and stop spam containing of characters of
mixed "scripts", where some characters are in Latin script and other
characters are in Cyrillic.
This unusual behavior can be detected easily and action can be taken.

loadmodule "antimixedutf8"; /* or third/antimixedutf8 */
set {
        antimixedutf8 {
                score 5;
                ban-action block;
                ban-reason "Possible mixed character spam";
                ban-time 4h; // For other types
        };
};
2018-11-18 15:19:11 +01:00
Bram Matthys d11b3228e6 ** UnrealIRCd 4.2.0 ** 2018-09-29 21:31:35 +02:00
Bram Matthys 98a33f7485 Windows: modules.optional.conf missing 2018-09-29 20:08:26 +02:00
Bram Matthys 02d69e7d83 Update release notes / version 2018-09-28 15:32:31 +02:00
Bram Matthys 2509482e02 Update UnrealIRCd version 2018-09-28 09:31:35 +02:00
Bram Matthys 6acfa3404b UnrealIRCd version updates 2018-09-28 09:26:40 +02:00
459 changed files with 85767 additions and 66828 deletions
+4 -3
View File
@@ -6,9 +6,7 @@ conftest.*
config.settings
extras/pcre2*
extras/c-ares*
extras/regexp*
config.status
extras/tre*
extras/ircdcron/ircd.cron
extras/ircdcron/ircdchk
src/modules/snomasks/Makefile
@@ -33,7 +31,7 @@ tags
server.cert.pem
server.key.pem
server.req.pem
ssl.rnd
tls.rnd
# Ignores for platform stuff
.DS_Store
@@ -72,3 +70,6 @@ xcuserdata
src/macosx/build/
DerivedData
src/macosx/pods/
# Doxygen generated files
doc/doxygen/
-6
View File
@@ -1,6 +0,0 @@
[submodule "extras/tests/ircfly"]
path = extras/tests/ircfly
url = https://github.com/unrealircd/ircfly.git
[submodule "extras/tests/functional-tests"]
path = extras/tests/functional-tests
url = https://github.com/unrealircd/unrealircd-tests.git
-28
View File
@@ -1,28 +0,0 @@
language: c
os:
- linux
compiler:
- clang
- gcc
script: extras/build-tests/nix/build $BUILDCONFIG
env:
- BUILDCONFIG=""
- BUILDCONFIG="system-cares"
- BUILDCONFIG="system-cares system-curl"
- BUILDCONFIG="local-curl"
matrix:
include:
- os: osx
env: BUILDCONFIG=""
- os: osx
env: BUILDCONFIG="system-cares"
- os: osx
env: BUILDCONFIG="system-cares system-curl"
- os: osx
env: BUILDCONFIG="local-curl"
- env: BUILDCONFIG="libressl-25"
- env: BUILDCONFIG="libressl-26"
- env: BUILDCONFIG="libressl-27"
- env: BUILDCONFIG="openssl-102"
- env: BUILDCONFIG="openssl-110"
- env: BUILDCONFIG="openssl-111"
+417 -511
View File
File diff suppressed because it is too large Load Diff
+81 -89
View File
@@ -34,11 +34,11 @@ FROMDOS=/home/cmunk/bin/4dos
#
#XCFLAGS=-O -g -export-dynamic
IRCDLIBS=@IRCDLIBS@ @TRE_LIBS@ @PCRE2_LIBS@ @CARES_LIBS@ @PTHREAD_LIBS@
IRCDLIBS=@IRCDLIBS@ @PCRE2_LIBS@ @ARGON2_LIBS@ @CARES_LIBS@ @SODIUM_LIBS@ @PTHREAD_LIBS@
CRYPTOLIB=@CRYPTOLIB@
OPENSSLINCLUDES=
XCFLAGS=@PTHREAD_CFLAGS@ @TRE_CFLAGS@ @PCRE2_CFLAGS@ @CARES_CFLAGS@ @CFLAGS@ @HARDEN_CFLAGS@ @CPPFLAGS@
XCFLAGS=@PTHREAD_CFLAGS@ @PCRE2_CFLAGS@ @ARGON2_CFLAGS@ @CARES_CFLAGS@ @SODIUM_CFLAGS@ @CFLAGS@ @HARDEN_CFLAGS@ @CPPFLAGS@
#
# use the following on MIPS:
#CFLAGS= -systype bsd43 -DSYSTYPE_BSD43 -I$(INCLUDEDIR)
@@ -91,25 +91,12 @@ IRCDMODE = 711
URL=@URL@
# [CHANGEME]
# If you get a link-time error dealing with strtoul, comment out
# this line.
# STRTOUL= strtoul.o
STRTOUL=@STRTOUL@
# [CHANGEME]
# If you get crashes around a specific number of clients, and that
# client load comes close or a little over the system-defined value of
# FD_SETSIZE, override it here and see what happens. You may override
# the system FD_SETSIZE by setting the FD_SETSIZE Makefile variable to
# -DFD_SETSIZE=<some number>.
FD_SETSIZE=@FD_SETSIZE@
# Where is your openssl binary
OPENSSLPATH=@OPENSSLPATH@
CFLAGS=-I$(INCLUDEDIR) $(XCFLAGS) $(FD_SETSIZE)
LDFLAGS=@LDFLAGS_PRIVATELIBS@ @HARDEN_LDFLAGS@
CFLAGS=-I$(INCLUDEDIR) $(XCFLAGS)
XLDFLAGS=@LDFLAGS_PRIVATELIBS@ @HARDEN_LDFLAGS@ @LDFLAGS@
LDFLAGS=$(XLDFLAGS)
SHELL=/bin/sh
SUBDIRS=src
@@ -126,7 +113,7 @@ MAKEARGS = 'CFLAGS=${CFLAGS}' 'CC=${CC}' 'IRCDLIBS=${IRCDLIBS}' \
'RES=${RES}' 'BINDIR=${BINDIR}' 'INSTALL=${INSTALL}' \
'INCLUDEDIR=${INCLUDEDIR}' \
'RM=${RM}' 'CP=${CP}' 'TOUCH=${TOUCH}' \
'SHELL=${SHELL}' 'STRTOUL=${STRTOUL}' \
'SHELL=${SHELL}' \
'CRYPTOLIB=${CRYPTOLIB}' \
'CRYPTOINCLUDES=${CRYPTOINCLUDES}' \
'URL=${URL}'
@@ -165,7 +152,7 @@ cleandir: clean
rm -rf include/setup.h Makefile Settings
distclean: cleandir
rm -rf extras/*.bak extras/regexp extras/*.tar extras/c-ares
rm -rf extras/*.bak extras/*.tar extras/c-ares
rm -rf extras/c-ares-* extras/tre-*
rm -rf config.log config.settings *.pem ircd.* unrealircd
rm -rf Makefile config.status
@@ -177,57 +164,75 @@ depend:
done
install: all
$(INSTALL) -m 0700 -d @BINDIR@
$(INSTALL) -m 0700 src/ircd @BINDIR@/unrealircd
$(INSTALL) -m 0700 -d @DOCDIR@
$(INSTALL) -m 0600 doc/Authors doc/coding-guidelines doc/tao.of.irc @DOCDIR@
$(INSTALL) -m 0700 -d @CONFDIR@
$(INSTALL) -m 0600 doc/conf/*.default.conf @CONFDIR@
$(INSTALL) -m 0600 doc/conf/*.optional.conf @CONFDIR@
-@if [ ! -f "@CONFDIR@/spamfilter.conf" ] ; then \
$(INSTALL) -m 0600 doc/conf/spamfilter.conf @CONFDIR@ ; \
$(INSTALL) -m 0700 -d $(DESTDIR)@BINDIR@
$(INSTALL) -m 0700 src/ircd $(DESTDIR)@BINDIR@/unrealircd
$(INSTALL) -m 0700 extras/unrealircd-upgrade-script $(DESTDIR)@BINDIR@/unrealircd-upgrade-script
$(INSTALL) -m 0700 -d $(DESTDIR)@DOCDIR@
$(INSTALL) -m 0600 doc/Authors doc/coding-guidelines doc/tao.of.irc doc/KEYS doc/RELEASE-NOTES.md $(DESTDIR)@DOCDIR@
$(INSTALL) -m 0700 -d $(DESTDIR)@CONFDIR@
$(INSTALL) -m 0600 doc/conf/*.default.conf $(DESTDIR)@CONFDIR@
$(INSTALL) -m 0600 doc/conf/*.optional.conf $(DESTDIR)@CONFDIR@
-@if [ ! -f "$(DESTDIR)@CONFDIR@/modules.sources.list" ] ; then \
$(INSTALL) -m 0600 doc/conf/modules.sources.list $(DESTDIR)@CONFDIR@ ; \
fi
-@if [ ! -f "@CONFDIR@/badwords.conf" ] ; then \
$(INSTALL) -m 0600 doc/conf/badwords.conf @CONFDIR@ ; \
-@if [ ! -f "$(DESTDIR)@CONFDIR@/spamfilter.conf" ] ; then \
$(INSTALL) -m 0600 doc/conf/spamfilter.conf $(DESTDIR)@CONFDIR@ ; \
fi
-@if [ ! -f "@CONFDIR@/dccallow.conf" ] ; then \
$(INSTALL) -m 0600 doc/conf/dccallow.conf @CONFDIR@ ; \
-@extras/patches/patch_spamfilter_conf "$(DESTDIR)@CONFDIR@"
-@if [ ! -f "$(DESTDIR)@CONFDIR@/badwords.conf" ] ; then \
$(INSTALL) -m 0600 doc/conf/badwords.conf $(DESTDIR)@CONFDIR@ ; \
fi
$(INSTALL) -m 0700 -d @CONFDIR@/aliases
$(INSTALL) -m 0600 doc/conf/aliases/*.conf @CONFDIR@/aliases
$(INSTALL) -m 0700 -d @CONFDIR@/help
$(INSTALL) -m 0600 doc/conf/help/*.conf @CONFDIR@/help
$(INSTALL) -m 0700 -d @CONFDIR@/examples
$(INSTALL) -m 0600 doc/conf/examples/*.conf @CONFDIR@/examples
$(INSTALL) -m 0700 -d @CONFDIR@/ssl
$(INSTALL) -m 0600 doc/conf/ssl/curl-ca-bundle.crt @CONFDIR@/ssl
$(INSTALL) -m 0700 unrealircd @SCRIPTDIR@
$(INSTALL) -m 0700 -d @MODULESDIR@
$(INSTALL) -m 0700 src/modules/*.so @MODULESDIR@
$(INSTALL) -m 0700 -d @MODULESDIR@/usermodes
$(INSTALL) -m 0700 src/modules/usermodes/*.so @MODULESDIR@/usermodes
$(INSTALL) -m 0700 -d @MODULESDIR@/chanmodes
$(INSTALL) -m 0700 src/modules/chanmodes/*.so @MODULESDIR@/chanmodes
$(INSTALL) -m 0700 -d @MODULESDIR@/snomasks
$(INSTALL) -m 0700 src/modules/snomasks/*.so @MODULESDIR@/snomasks
$(INSTALL) -m 0700 -d @MODULESDIR@/extbans
$(INSTALL) -m 0700 src/modules/extbans/*.so @MODULESDIR@/extbans
$(INSTALL) -m 0700 -d @MODULESDIR@/cap
$(INSTALL) -m 0700 src/modules/cap/*.so @MODULESDIR@/cap
$(INSTALL) -m 0700 -d @MODULESDIR@/third
@#Ugly stuff to detect 0 files in this directory:
@+for f in src/modules/third/*.so; do \
[ -e $f ] && $(INSTALL) -m 0700 src/modules/third/*.so @MODULESDIR@/third || echo; \
done
$(INSTALL) -m 0700 -d @TMPDIR@
$(INSTALL) -m 0700 -d @CACHEDIR@
$(INSTALL) -m 0700 -d @PERMDATADIR@
$(INSTALL) -m 0700 -d @LOGDIR@
-@if [ ! -f "@CONFDIR@/ssl/server.cert.pem" ] ; then \
$(INSTALL) -m 0600 server.req.pem @CONFDIR@/ssl ; \
$(INSTALL) -m 0600 server.key.pem @CONFDIR@/ssl ; \
$(INSTALL) -m 0600 server.cert.pem @CONFDIR@/ssl ; \
-@if [ ! -f "$(DESTDIR)@CONFDIR@/dccallow.conf" ] ; then \
$(INSTALL) -m 0600 doc/conf/dccallow.conf $(DESTDIR)@CONFDIR@ ; \
fi
$(INSTALL) -m 0700 -d $(DESTDIR)@CONFDIR@/aliases
$(INSTALL) -m 0600 doc/conf/aliases/*.conf $(DESTDIR)@CONFDIR@/aliases
$(INSTALL) -m 0700 -d $(DESTDIR)@CONFDIR@/help
$(INSTALL) -m 0600 doc/conf/help/*.conf $(DESTDIR)@CONFDIR@/help
$(INSTALL) -m 0700 -d $(DESTDIR)@CONFDIR@/examples
$(INSTALL) -m 0600 doc/conf/examples/*.conf $(DESTDIR)@CONFDIR@/examples
$(INSTALL) -m 0700 unrealircd $(DESTDIR)@SCRIPTDIR@
$(INSTALL) -m 0700 -d $(DESTDIR)@MODULESDIR@
@rm -f $(DESTDIR)@MODULESDIR@/*.so 1>/dev/null 2>&1
$(INSTALL) -m 0700 src/modules/*.so $(DESTDIR)@MODULESDIR@
$(INSTALL) -m 0700 -d $(DESTDIR)@MODULESDIR@/usermodes
@rm -f $(DESTDIR)@MODULESDIR@/usermodes/*.so 1>/dev/null 2>&1
$(INSTALL) -m 0700 src/modules/usermodes/*.so $(DESTDIR)@MODULESDIR@/usermodes
$(INSTALL) -m 0700 -d $(DESTDIR)@MODULESDIR@/chanmodes
@rm -f $(DESTDIR)@MODULESDIR@/chanmodes/*.so 1>/dev/null 2>&1
$(INSTALL) -m 0700 src/modules/chanmodes/*.so $(DESTDIR)@MODULESDIR@/chanmodes
$(INSTALL) -m 0700 -d $(DESTDIR)@MODULESDIR@/snomasks
@rm -f $(DESTDIR)@MODULESDIR@/snomasks/*.so 1>/dev/null 2>&1
$(INSTALL) -m 0700 src/modules/snomasks/*.so $(DESTDIR)@MODULESDIR@/snomasks
$(INSTALL) -m 0700 -d $(DESTDIR)@MODULESDIR@/extbans
@rm -f $(DESTDIR)@MODULESDIR@/extbans/*.so 1>/dev/null 2>&1
$(INSTALL) -m 0700 src/modules/extbans/*.so $(DESTDIR)@MODULESDIR@/extbans
@#If the conf/ssl directory exists then rename it here to conf/tls
@#and add a symlink for backwards compatibility (so that f.e. certbot
@#doesn't randomly fail after an upgrade to U5).
-@if [ -d "$(DESTDIR)@CONFDIR@/ssl" ] ; then \
mv "$(DESTDIR)@CONFDIR@/ssl" "$(DESTDIR)@CONFDIR@/tls" ; \
ln -s "$(DESTDIR)@CONFDIR@/tls" "$(DESTDIR)@CONFDIR@/ssl" ; \
fi
$(INSTALL) -m 0700 -d $(DESTDIR)@CONFDIR@/tls
$(INSTALL) -m 0600 doc/conf/tls/curl-ca-bundle.crt $(DESTDIR)@CONFDIR@/tls
@# delete modules/cap directory, to avoid confusing with U4 to U5 upgrades:
rm -rf $(DESTDIR)@MODULESDIR@/cap
$(INSTALL) -m 0700 -d $(DESTDIR)@MODULESDIR@/third
@rm -f $(DESTDIR)@MODULESDIR@/third/*.so 1>/dev/null 2>&1
@#This step can fail with zero files, so we ignore exit status:
-$(INSTALL) -m 0700 src/modules/third/*.so $(DESTDIR)@MODULESDIR@/third
$(INSTALL) -m 0700 -d $(DESTDIR)@TMPDIR@
$(INSTALL) -m 0700 -d $(DESTDIR)@CACHEDIR@
$(INSTALL) -m 0700 -d $(DESTDIR)@PERMDATADIR@
$(INSTALL) -m 0700 -d $(DESTDIR)@LOGDIR@
-@if [ ! -f "$(DESTDIR)@CONFDIR@/tls/server.cert.pem" ] ; then \
$(INSTALL) -m 0600 server.req.pem $(DESTDIR)@CONFDIR@/tls ; \
$(INSTALL) -m 0600 server.key.pem $(DESTDIR)@CONFDIR@/tls ; \
$(INSTALL) -m 0600 server.cert.pem $(DESTDIR)@CONFDIR@/tls ; \
fi
@rm -f $(DESTDIR)@SCRIPTDIR@/source
ln -s @BUILDDIR@ $(DESTDIR)@SCRIPTDIR@/source
@echo ''
@echo '* UnrealIRCd is now installed.'
@@ -244,7 +249,7 @@ install: all
@echo '* To start/stop UnrealIRCd run: @SCRIPTDIR@/unrealircd"'
@echo ''
@echo '* Consult the documentation online at:'
@echo ' * https://www.unrealircd.org/docs/UnrealIRCd_4_documentation'
@echo ' * https://www.unrealircd.org/docs/'
@echo ' * https://www.unrealircd.org/docs/FAQ'
@echo '* You may also wish to install a cron job to ensure UnrealIRCd is always running:'
@echo ' * https://www.unrealircd.org/docs/Cron_job'
@@ -253,32 +258,19 @@ install: all
echo 'Again, be sure to change to the @SCRIPTDIR@ directory!' ; \
fi
### TODO: all the stuff below ;) ###
pem: src/ssl.cnf
@echo "Generating certificate request .. "
pem: extras/tls.cnf
@echo "Generating server key..."
$(OPENSSLPATH) ecparam -out server.key.pem -name secp384r1 -genkey
@echo "Generating certificate request..."
$(OPENSSLPATH) req -new \
-config src/ssl.cnf -sha256 -out server.req.pem \
-keyout server.key.pem -nodes
@echo "Generating self-signed certificate .. "
-config extras/tls.cnf -sha256 -out server.req.pem \
-key server.key.pem -nodes
@echo "Generating self-signed certificate..."
$(OPENSSLPATH) req -x509 -days 3650 -sha256 -in server.req.pem \
-key server.key.pem -out server.cert.pem
@echo "Generating fingerprint .."
$(OPENSSLPATH) x509 -subject -dates -sha256 -fingerprint -noout \
-in server.cert.pem
@echo "Setting o-rwx & g-rwx for files... "
@echo "Setting permissions on server.*.pem files..."
chmod o-rwx server.req.pem server.key.pem server.cert.pem
chmod g-rwx server.req.pem server.key.pem server.cert.pem
@echo "Done!. If you want to encrypt the private key, run"
@echo "make encpem"
encpem: server.key.pem
@echo "Encrypting server key .."
$(OPENSSLPATH) rsa -in server.key.pem -out server.key.c.pem -des3
-@if [ -f server.key.c.pem ] ; then \
echo "Replacing unencrypted with encrypted .." ; \
cp server.key.c.pem server.key.pem ; \
rm -f server.key.c.pem ; \
fi
Makefile: config.status Makefile.in
./config.status
+1130
View File
File diff suppressed because it is too large Load Diff
+6 -5
View File
@@ -1,13 +1,11 @@
[![Build Status - *NIX](https://travis-ci.org/unrealircd/unrealircd.svg?branch=unreal40)](https://travis-ci.org/unrealircd/unrealircd)
[![Build Status - Windows](https://ci.appveyor.com/api/projects/status/9kgectl2mfyia0s5/branch/unreal40?svg=true)](https://ci.appveyor.com/project/syzop/unrealircd/branch/unreal40)
[![Twitter Follow](https://img.shields.io/twitter/follow/Unreal_IRCd.svg?style=social&label=Follow)](https://twitter.com/Unreal_IRCd)
## About UnrealIRCd
UnrealIRCd is an Open Source IRC Server, serving thousands of networks since 1999.
It runs on Linux, OS X and Windows and is currently the most widely deployed IRCd
with a market share of over 50%. UnrealIRCd is a highly advanced IRCd with a strong
with a market share of 42%. UnrealIRCd is a highly advanced IRCd with a strong
focus on modularity, an advanced and highly configurable configuration file.
Key features include SSL, cloaking, its advanced anti-flood and anti-spam systems,
Key features include SSL/TLS, cloaking, its advanced anti-flood and anti-spam systems,
swear filtering and module support. We are also particularly proud on our extensive
online documentation.
@@ -22,7 +20,10 @@ Simply download the UnrealIRCd Windows version from www.unrealircd.org
Alternatively you can compile UnrealIRCd for Windows yourself. However this is not straightforward and thus not recommended.
#### *BSD/Linux/macOS
First you must compile the IRCd:
Do the following steps under a separate account for running UnrealIRCd,
[do NOT compile or run as root](https://www.unrealircd.org/docs/Do_not_run_as_root).
### Step 1: Compile the IRCd
* Run `./Config`
* Run `make`
+21
View File
@@ -0,0 +1,21 @@
# Security Policy
## Supported Versions
* The latest *stable* release of the 5.x branch
See [UnrealIRCd releases](https://www.unrealircd.org/docs/UnrealIRCd_releases) for information on older versions and End Of Life dates.
## Reporting a Vulnerability
Please report issues on the [bug tracker](https://bugs.unrealircd.org) and in the bug submit form **set the 'View Status' to 'private'**.
Do not report security issues on the forums or in a public IRC channel such as #unreal-support.
If you insist on e-mail then you can use syzop@unrealircd.org or security@unrealircd.org. Again, the bug tracker is preferred.
If you are *unsure* if something is a security issue, then report it at the bug tracker as a 'private' bug anyway. Better safe than sorry.
Do not ask around in public channels or forums.
You should get a response or at least an acknowledgement soon. If you don't hear back within 24 hours, then please try to contact us again.
## Full policy
See https://www.unrealircd.org/docs/Policy:_Handling_of_security_issues for full information.
-10
View File
@@ -1,10 +0,0 @@
version: 4.0.x-devbuild-{build}
environment:
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2017"
TARGET: "Visual Studio 2017"
SHORTNAME: "vs2017"
init:
- cmd: git config --global core.autocrlf true
build_script:
- cmd: call extras\\build-tests\\windows\\build.bat
+118 -7
View File
@@ -145,7 +145,7 @@ AC_ARG_ENABLE(ssl,
[enable_ssl=no])
AS_IF([test $enable_ssl != "no"],
[
AC_MSG_CHECKING([for openssl])
AC_MSG_CHECKING([for OpenSSL])
for dir in $enable_ssl /usr/local/opt/openssl /usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/sfw /usr/local /usr; do
ssldir="$dir"
if test -f "$dir/include/openssl/ssl.h"; then
@@ -169,15 +169,46 @@ AS_IF([test $enable_ssl != "no"],
AC_MSG_RESULT(not found)
echo ""
echo "Apparently you do not have both the openssl binary and openssl development libraries installed."
echo "Please install the needed binaries and libraries."
echo "The package is often called 'openssl-dev', 'openssl-devel' or 'libssl-dev'"
echo "After doing so re-run ./Config"
echo "The following packages are required:"
echo "1) The library package is often called 'openssl-dev', 'openssl-devel' or 'libssl-dev'"
echo "2) The binary package is usually called 'openssl'."
echo "NOTE: you or your system administrator needs to install the library AND the binary package."
echo "After doing so, simply re-run ./Config"
exit 1
else
CRYPTOLIB="-lssl -lcrypto";
if test ! "$ssldir" = "/usr" ; then
LDFLAGS="$LDFLAGS -L$ssldir/lib";
dnl check if binary path exists
if test -f "$ssldir/bin/openssl"; then
OPENSSLPATH="$ssldir/bin/openssl";
fi
fi
dnl linking require -ldl?
AC_MSG_CHECKING([OpenSSL linking with -ldl])
SAVE_LIBS="$LIBS"
LIBS="$LIBS $CRYPTOLIB -ldl"
AC_TRY_LINK([#include <openssl/err.h>], [ERR_clear_error();],
[
AC_MSG_RESULT(yes)
CRYPTOLIB="$CRYPTOLIB -ldl"
],
[
AC_MSG_RESULT(no)
dnl linking require both -ldl and -lpthread?
AC_MSG_CHECKING([OpenSSL linking with -ldl and -lpthread])
LIBS="$SAVE_LIBS $CRYPTOLIB -ldl -lpthread"
AC_TRY_LINK([#include <openssl/err.h>], [ERR_clear_error();],
[
AC_MSG_RESULT(yes)
CRYPTOLIB="$CRYPTOLIB -ldl -lpthread"
],
[
AC_MSG_RESULT(no)
])
])
LIBS="$SAVE_LIBS"
fi
])
])
@@ -190,14 +221,94 @@ SAVE_LIBS="$LIBS"
LIBS="$LIBS $CRYPTOLIB"
AC_TRY_LINK([#include <openssl/ssl.h>],
[SSL_CTX *ctx = NULL; SSL_CTX_set1_curves_list(ctx, "test");],
has_curves=1,
has_curves=0)
has_function=1,
has_function=0)
LIBS="$SAVE_LIBS"
AC_LANG_POP(C)
if test $has_curves = 1; then
if test $has_function = 1; then
AC_MSG_RESULT([yes])
AC_DEFINE([HAS_SSL_CTX_SET1_CURVES_LIST], [], [Define if ssl library has SSL_CTX_set1_curves_list])
else
AC_MSG_RESULT([no])
fi
])
AC_DEFUN([CHECK_SSL_CTX_SET_MIN_PROTO_VERSION],
[
AC_MSG_CHECKING([for SSL_CTX_set_min_proto_version in SSL library])
AC_LANG_PUSH(C)
SAVE_LIBS="$LIBS"
LIBS="$LIBS $CRYPTOLIB"
AC_TRY_LINK([#include <openssl/ssl.h>],
[SSL_CTX *ctx = NULL; SSL_CTX_set_min_proto_version(ctx, TLS1_VERSION);],
has_function=1,
has_function=0)
LIBS="$SAVE_LIBS"
AC_LANG_POP(C)
if test $has_function = 1; then
AC_MSG_RESULT([yes])
AC_DEFINE([HAS_SSL_CTX_SET_MIN_PROTO_VERSION], [], [Define if ssl library has SSL_CTX_set_min_proto_version])
else
AC_MSG_RESULT([no])
fi
])
AC_DEFUN([CHECK_SSL_CTX_SET_SECURITY_LEVEL],
[
AC_MSG_CHECKING([for SSL_CTX_set_security_level in SSL library])
AC_LANG_PUSH(C)
SAVE_LIBS="$LIBS"
LIBS="$LIBS $CRYPTOLIB"
AC_TRY_LINK([#include <openssl/ssl.h>],
[SSL_CTX *ctx = NULL; SSL_CTX_set_security_level(ctx, 1);],
has_function=1,
has_function=0)
LIBS="$SAVE_LIBS"
AC_LANG_POP(C)
if test $has_function = 1; then
AC_MSG_RESULT([yes])
AC_DEFINE([HAS_SSL_CTX_SET_SECURITY_LEVEL], [], [Define if ssl library has SSL_CTX_set_security_level])
else
AC_MSG_RESULT([no])
fi
])
AC_DEFUN([CHECK_ASN1_TIME_diff],
[
AC_MSG_CHECKING([for ASN1_TIME_diff in SSL library])
AC_LANG_PUSH(C)
SAVE_LIBS="$LIBS"
LIBS="$LIBS $CRYPTOLIB"
AC_TRY_LINK([#include <openssl/ssl.h>],
[int one, two; ASN1_TIME_diff(&one, &two, NULL, NULL);],
has_function=1,
has_function=0)
LIBS="$SAVE_LIBS"
AC_LANG_POP(C)
if test $has_function = 1; then
AC_MSG_RESULT([yes])
AC_DEFINE([HAS_ASN1_TIME_diff], [], [Define if ssl library has ASN1_TIME_diff])
else
AC_MSG_RESULT([no])
fi
])
AC_DEFUN([CHECK_X509_get0_notAfter],
[
AC_MSG_CHECKING([for X509_get0_notAfter in SSL library])
AC_LANG_PUSH(C)
SAVE_LIBS="$LIBS"
LIBS="$LIBS $CRYPTOLIB"
AC_TRY_LINK([#include <openssl/ssl.h>],
[X509_get0_notAfter(NULL);],
has_function=1,
has_function=0)
LIBS="$SAVE_LIBS"
AC_LANG_POP(C)
if test $has_function = 1; then
AC_MSG_RESULT([yes])
AC_DEFINE([HAS_X509_get0_notAfter], [], [Define if ssl library has X509_get0_notAfter])
else
AC_MSG_RESULT([no])
fi
])
+2
View File
@@ -1,4 +1,6 @@
#!/bin/bash
echo "Regenerating 'configure' and headers..."
echo "NOTE: Normally only UnrealIRCd developers run this command!!"
cd "$(dirname "${0}")"
Vendored
+2892 -3351
View File
File diff suppressed because it is too large Load Diff
+278 -420
View File
@@ -2,13 +2,12 @@ dnl Process this file with autoconf to produce a configure script.
dnl When updating the version, remember to update the following files
dnl appropriately:
dnl
dnl include/win32/setup.h
dnl src/win32/unrealinst.iss
dnl .CHANGES.NEW
dnl include/windows/setup.h
dnl src/windows/unrealinst.iss
dnl doc/Config.header
dnl src/version.c.SH
AC_INIT([unrealircd], [4.0.19-rc2], [http://bugs.unrealircd.org/], [], [http://unrealircd.org/])
AC_INIT([unrealircd], [5.0.10-git], [https://bugs.unrealircd.org/], [], [https://unrealircd.org/])
AC_CONFIG_SRCDIR([src/ircd.c])
AC_CONFIG_HEADER([include/setup.h])
AC_CONFIG_AUX_DIR([autoconf])
@@ -23,12 +22,11 @@ dnl Save CFLAGS, use this when building the libraries like c-ares
orig_cflags="$CFLAGS"
dnl Save build directory early on (used in our m4 macros too)
BUILDDIR="`pwd`"
AC_SUBST(BUILDDIR)
BUILDDIR_NOW="`pwd`"
dnl Calculate the versions. Perhaps the use of expr is a little too extravagant
# Generation version number (e.g.: X in X.Y.Z)
UNREAL_VERSION_GENERATION=["4"]
UNREAL_VERSION_GENERATION=["5"]
AC_DEFINE_UNQUOTED([UNREAL_VERSION_GENERATION], [$UNREAL_VERSION_GENERATION], [Generation version number (e.g.: X for X.Y.Z)])
# Major version number (e.g.: Y in X.Y.Z)
@@ -36,118 +34,66 @@ UNREAL_VERSION_MAJOR=["0"]
AC_DEFINE_UNQUOTED([UNREAL_VERSION_MAJOR], [$UNREAL_VERSION_MAJOR], [Major version number (e.g.: Y for X.Y.Z)])
# Minor version number (e.g.: Z in X.Y.Z)
UNREAL_VERSION_MINOR=["19"]
UNREAL_VERSION_MINOR=["10"]
AC_DEFINE_UNQUOTED([UNREAL_VERSION_MINOR], [$UNREAL_VERSION_MINOR], [Minor version number (e.g.: Z for X.Y.Z)])
# The version suffix such as a beta marker or release candidate
# marker. (e.g.: -rcX for unrealircd-3.2.9-rcX). This macro is a
# string instead of an integer because it contains arbitrary data.
UNREAL_VERSION_SUFFIX=["-rc2"]
UNREAL_VERSION_SUFFIX=["-git"]
AC_DEFINE_UNQUOTED([UNREAL_VERSION_SUFFIX], ["$UNREAL_VERSION_SUFFIX"], [Version suffix such as a beta marker or release candidate marker. (e.g.: -rcX for unrealircd-3.2.9-rcX)])
AC_PROG_CC
if test "$ac_cv_prog_gcc" = "yes"; then
CFLAGS="$CFLAGS -funsigned-char"
AC_CACHE_CHECK(if gcc has a working -pipe, ac_cv_pipe, [
save_cflags="$CFLAGS"
CFLAGS="$CFLAGS -pipe"
AC_TRY_COMPILE(,, ac_cv_pipe="yes", ac_cv_pipe="no")
CFLAGS="$save_cflags"
])
if test "$ac_cv_pipe" = "yes"; then
CFLAGS="-pipe $CFLAGS"
fi
fi
dnl UnrealIRCd might not be strict-aliasing safe at this time
AC_CACHE_CHECK(if the compiler has a working -fno-strict-aliasing, ac_cv_nsa, [
save_cflags="$CFLAGS"
CFLAGS="$CFLAGS -fno-strict-aliasing"
AC_TRY_COMPILE(,, ac_cv_nsa="yes", ac_cv_nsa="no")
CFLAGS="$save_cflags"
])
if test "$ac_cv_nsa" = "yes"; then
CFLAGS="$CFLAGS -fno-strict-aliasing"
fi
dnl Pointer signedness warnings are really a pain and 99.9% of the time
dnl they are of absolutely no use whatsoever. IMO the person who decided
dnl to enable this without -Wall should be shot on sight.
AC_CACHE_CHECK(if the compiler has a working -Wno-pointer-sign, ac_cv_nps, [
save_cflags="$CFLAGS"
CFLAGS="$CFLAGS -Wno-pointer-sign"
AC_TRY_COMPILE(,, ac_cv_nps="yes", ac_cv_nps="no")
CFLAGS="$save_cflags"
])
if test "$ac_cv_nps" = "yes"; then
CFLAGS="$CFLAGS -Wno-pointer-sign"
fi
dnl This is purely for charsys.c... I like it so we can easily read
dnl this for non-utf8. We can remove it once we ditch non-utf8 some day
dnl of course, or decide to ignore me and encode them.
AC_CACHE_CHECK(if the compiler has a working -Wno-invalid-source-encoding, ac_cv_nise, [
save_cflags="$CFLAGS"
CFLAGS="$CFLAGS -Wno-invalid-source-encoding"
AC_TRY_COMPILE(,, ac_cv_nise="yes", ac_cv_nise="no")
CFLAGS="$save_cflags"
])
if test "$ac_cv_nise" = "yes"; then
CFLAGS="$CFLAGS -Wno-invalid-source-encoding"
fi
dnl Pffff..
AC_CACHE_CHECK(if the compiler has a working -Wno-format-zero-length, ac_cv_nfzl, [
save_cflags="$CFLAGS"
CFLAGS="$CFLAGS -Wno-format-zero-length"
AC_TRY_COMPILE(,, ac_cv_nfzl="yes", ac_cv_nfzl="no")
CFLAGS="$save_cflags"
])
if test "$ac_cv_nfzl" = "yes"; then
CFLAGS="$CFLAGS -Wno-format-zero-length"
fi
dnl More and more and more....
AC_CACHE_CHECK(if the compiler has a working -Wno-format-truncation, ac_cv_nft, [
save_cflags="$CFLAGS"
CFLAGS="$CFLAGS -Wno-format-truncation -Werror"
AC_TRY_COMPILE(,, ac_cv_nft="yes", ac_cv_nft="no")
CFLAGS="$save_cflags"
])
if test "$ac_cv_nft" = "yes"; then
CFLAGS="$CFLAGS -Wno-format-truncation"
fi
AC_PATH_PROG(RM,rm)
AC_PATH_PROG(CP,cp)
AC_PATH_PROG(TOUCH,touch)
AC_PATH_PROG(OPENSSLPATH,openssl)
AS_IF([test x"$OPENSSLPATH" = "x"],
[
echo ""
echo "Apparently you do not have both the openssl binary and openssl development libraries installed."
echo "The following packages are required:"
echo "1) The library package is often called 'openssl-dev', 'openssl-devel' or 'libssl-dev'"
echo "2) The binary package is usually called 'openssl'."
echo "NOTE: you or your system administrator needs to install the library AND the binary package."
echo "After doing so, simply re-run ./Config"
exit 1
])
AC_PATH_PROG(INSTALL,install)
AC_CHECK_PROG(MAKER, gmake, gmake, make)
AC_PATH_PROG(GMAKE,gmake)
AC_PATH_PROG(GUNZIP, gunzip)
AC_PATH_PROG(PKGCONFIG, pkg-config)
dnl Check for compiler
AC_PROG_CC_C99
AS_IF([test "$ac_cv_prog_cc_c99" = "no"],
[AC_MSG_ERROR([No C99 compiler was found. Please install gcc or clang and other build tools. Eg, on Debian/Ubuntu you probably want to run the following as root: apt-get install build-essential ])])
dnl Check for make moved down, so the above compiler check takes precedence.
AC_CHECK_PROG(MAKER, gmake, gmake, make)
AC_PATH_PROG(GMAKE,gmake)
AS_IF([$MAKER --version | grep -q "GNU Make"],
[GNUMAKE="0"],
[AC_MSG_ERROR([It seems your system does not have make/gmake installed. If you are on Linux then install make, otherwise install gmake.])])
dnl Checks for libraries.
AC_CHECK_LIB(descrypt, crypt,
[AC_DEFINE([HAVE_CRYPT], [], [Define if you have crypt])
IRCDLIBS="$IRCDLIBS-ldescrypt "
MKPASSWDLIBS="-ldescrypt"],
IRCDLIBS="$IRCDLIBS-ldescrypt "],
[AC_CHECK_LIB(crypt, crypt,
[AC_DEFINE([HAVE_CRYPT], [], [Define if you have crypt])
IRCDLIBS="$IRCDLIBS-lcrypt "
MKPASSWDLIBS="-lcrypt"])])
AC_CHECK_LIB(socket, socket,
[IRCDLIBS="$IRCDLIBS-lsocket "
SOCKLIB="-lsocket"])
AC_CHECK_LIB(nsl, inet_ntoa,
[IRCDLIBS="$IRCDLIBS-lnsl "
INETLIB="-lnsl"])
AC_CHECK_LIB(crypto, RAND_egd,
AC_DEFINE(HAVE_RAND_EGD, 1, [Define if the libcrypto has RAND_egd]))
IRCDLIBS="$IRCDLIBS-lcrypt "])])
AC_SUBST(IRCDLIBS)
AC_SUBST(MKPASSWDLIBS)
dnl Check for big-endian system, even though these hardly exist anymore...
AS_CASE([$host_cpu],
[i?86|amd64|x86_64],
[ac_cv_c_bigendian=no]
)
AC_C_BIGENDIAN(
AC_DEFINE(NATIVE_BIG_ENDIAN, 1, [machine is bigendian]),
AC_DEFINE(NATIVE_LITTLE_ENDIAN, 1, [machine is littleendian]),
AC_MSG_ERROR([unknown endianness]),
AC_MSG_ERROR([universal endianness is not supported - compile separately and use lipo(1)])
)
dnl HARDENING START
dnl This is taken from https://github.com/kmcallister/autoharden
@@ -165,13 +111,9 @@ LD="$flag_wrap $LD"
# We use the same hardening flags for C and C++. We must check that each flag
# is supported by both compilers.
AC_DEFUN([check_cc_cxx_flag],
AC_DEFUN([check_cc_flag],
[AC_LANG_PUSH(C)
AX_CHECK_COMPILE_FLAG([$1],
[AC_LANG_PUSH(C)
AX_CHECK_COMPILE_FLAG([$1], [$2], [$3], [-Werror $4])
AC_LANG_POP(C)],
[$3], [-Werror $4])
AX_CHECK_COMPILE_FLAG([$1], [$2], [$3], [-Werror $4])
AC_LANG_POP(C)])
AC_DEFUN([check_link_flag],
@@ -186,23 +128,29 @@ AC_ARG_ENABLE([hardening],
HARDEN_CFLAGS=""
HARDEN_LDFLAGS=""
AS_IF([test x"$hardening" != x"no"], [
check_cc_cxx_flag([-fno-strict-overflow], [HARDEN_CFLAGS="$HARDEN_CFLAGS -fno-strict-overflow"])
check_cc_flag([-fno-strict-overflow], [HARDEN_CFLAGS="$HARDEN_CFLAGS -fno-strict-overflow"])
# This one will likely succeed, even on platforms where it does nothing.
check_cc_cxx_flag([-D_FORTIFY_SOURCE=2], [HARDEN_CFLAGS="$HARDEN_CFLAGS -D_FORTIFY_SOURCE=2"])
check_cc_flag([-D_FORTIFY_SOURCE=2], [HARDEN_CFLAGS="$HARDEN_CFLAGS -D_FORTIFY_SOURCE=2"])
check_cc_cxx_flag([-fstack-protector-all],
check_cc_flag([-fstack-protector-all],
[check_link_flag([-fstack-protector-all],
[HARDEN_CFLAGS="$HARDEN_CFLAGS -fstack-protector-all"
check_cc_cxx_flag([-Wstack-protector], [HARDEN_CFLAGS="$HARDEN_CFLAGS -Wstack-protector"],
check_cc_flag([-Wstack-protector], [HARDEN_CFLAGS="$HARDEN_CFLAGS -Wstack-protector"],
[], [-fstack-protector-all])
check_cc_cxx_flag([--param ssp-buffer-size=1], [HARDEN_CFLAGS="$HARDEN_CFLAGS --param ssp-buffer-size=1"],
check_cc_flag([--param ssp-buffer-size=1], [HARDEN_CFLAGS="$HARDEN_CFLAGS --param ssp-buffer-size=1"],
[], [-fstack-protector-all])])])
# Added in UnrealIRCd 5.0.5 (default on Ubuntu 19.10)
check_cc_flag([-fstack-clash-protection], [HARDEN_CFLAGS="$HARDEN_CFLAGS -fstack-clash-protection"])
# Control Flow Enforcement (ROP hardening) - requires CPU hardware support
check_cc_flag([-fcf-protection], [HARDEN_CFLAGS="$HARDEN_CFLAGS -fcf-protection"])
# At the link step, we might want -pie (GCC) or -Wl,-pie (Clang on OS X)
#
# The linker checks also compile code, so we need to include -fPIE as well.
check_cc_cxx_flag([-fPIE],
check_cc_flag([-fPIE],
[check_link_flag([-fPIE -pie],
[HARDEN_BINCFLAGS="-fPIE"
HARDEN_BINLDFLAGS="-pie"],
@@ -224,6 +172,91 @@ CXX="$saved_CXX"
LD="$saved_LD"
dnl HARDENING END
dnl UnrealIRCd might not be strict-aliasing safe at this time
check_cc_flag([-fno-strict-aliasing], [CFLAGS="$CFLAGS -fno-strict-aliasing"])
dnl UnrealIRCd should be able to compile with -fno-common
dnl This also makes ASan (if it is in use) able to instrument these variables.
check_cc_flag([-fno-common], [CFLAGS="$CFLAGS -fno-common"])
dnl Previously -funsigned-char was in a config check. It would always
dnl be enabled with gcc and clang. We now unconditionally enable it,
dnl skipping the check. This will cause an error if someone uses a
dnl non-gcc/non-clang compiler that does not support -funsigned-char
dnl which is good. After all, we really depend on it.
dnl UnrealIRCd should never be compiled without char being unsigned.
CFLAGS="$CFLAGS -funsigned-char"
dnl Compiler -W checks...
dnl We should be able to turn this on unconditionally:
CFLAGS="$CFLAGS -Wall"
dnl More warnings (if the compiler supports it):
check_cc_flag([-Wextra], [CFLAGS="$CFLAGS -Wextra"])
check_cc_flag([-Waggregate-return], [CFLAGS="$CFLAGS -Waggregate-return"])
dnl The following few are more experimental, if they have false positives we'll have
dnl to disable them:
dnl Can't use this, too bad: check_cc_flag([-Wlogical-op], [CFLAGS="$CFLAGS -Wlogical-op"])
check_cc_flag([-Wduplicated-cond], [CFLAGS="$CFLAGS -Wduplicated-cond"])
check_cc_flag([-Wduplicated-branches], [CFLAGS="$CFLAGS -Wduplicated-branches"])
dnl And now to filter out certain warnings:
dnl [!] NOTE REGARDING THE check_cc_flag used by these:
dnl We check for the -Woption even though we are going to use -Wno-option.
dnl This is due to the following (odd) gcc behavior:
dnl "When an unrecognized warning option is requested (e.g.,
dnl -Wunknown-warning), GCC emits a diagnostic stating that the option is not
dnl recognized. However, if the -Wno- form is used, the behavior is slightly
dnl different: no diagnostic is produced for -Wno-unknown-warning unless
dnl other diagnostics are being produced. This allows the use of new -Wno-
dnl options with old compilers, but if something goes wrong, the compiler
dnl warns that an unrecognized option is present."
dnl Since we don't want to use any unrecognized -Wno-option, we test for
dnl -Woption instead.
dnl Pointer signedness warnings are really a pain and 99.9% of the time
dnl they are of absolutely no use whatsoever. IMO the person who decided
dnl to enable this without -Wall should be shot on sight.
check_cc_flag([-Wpointer-sign], [CFLAGS="$CFLAGS -Wno-pointer-sign"])
dnl This is purely for charsys.c... I like it so we can easily read
dnl this for non-utf8. We can remove it once we ditch non-utf8 some day
dnl of course, or decide to ignore me and encode them.
check_cc_flag([-Winvalid-source-encoding], [CFLAGS="$CFLAGS -Wno-invalid-source-encoding"])
check_cc_flag([-Wformat-zero-length], [CFLAGS="$CFLAGS -Wno-format-zero-length"])
check_cc_flag([-Wformat-truncation], [CFLAGS="$CFLAGS -Wno-format-truncation"])
dnl While it can be useful to occasionally to compile with warnings about
dnl unused variables and parameters, we often 'think ahead' when coding things
dnl so they may be useless now but not later. Similarly, for variables, we
dnl don't always care about a variable that may still be present in a build
dnl without DEBUGMODE. Unused variables are optimized out anyway.
check_cc_flag([-Wunused], [CFLAGS="$CFLAGS -Wno-unused"])
check_cc_flag([-Wunused-parameter], [CFLAGS="$CFLAGS -Wno-unused-parameter"])
check_cc_flag([-Wunused-but-set-parameter], [CFLAGS="$CFLAGS -Wno-unused-but-set-parameter"])
dnl We use this and this warning is meaningless since 'char' is always unsigned
dnl in UnrealIRCd compiles (-funsigned-char).
check_cc_flag([-Wchar-subscripts], [CFLAGS="$CFLAGS -Wno-char-subscripts"])
check_cc_flag([-Wsign-compare], [CFLAGS="$CFLAGS -Wno-sign-compare"])
dnl Don't warn about empty body, we use this, eg via Debug(()) or in if's.
check_cc_flag([-Wempty-body], [CFLAGS="$CFLAGS -Wno-empty-body"])
dnl This one fails with ircstrdup(var, staticstring)
dnl Shame we have to turn it off completely...
check_cc_flag([-Waddress], [CFLAGS="$CFLAGS -Wno-address"])
dnl This one breaks our TO_INTFUNC() that is used in m_tkl for tkl_typetochar
check_cc_flag([-Wcast-function-type], [CFLAGS="$CFLAGS -Wno-cast-function-type"])
dnl End of -W... compiler checks.
dnl module checking based on Hyb7's module checking code
AC_DEFUN([AC_ENABLE_DYN],
[
@@ -289,8 +322,6 @@ dnl AC_DEFINE([DYNAMIC_LINKING], [], [Link dynamically as opposed to statically.
])
AC_CACHE_CHECK([if your system has IPv6 support], [ac_cv_ip6], [
save_libs="$LIBS"
LIBS="$LIBS $SOCKLIB"
AC_TRY_RUN([
#include <sys/types.h>
#include <sys/socket.h>
@@ -305,189 +336,23 @@ exit(0); /* We only check if the code compiles, that's enough. We can deal with
if test "$ac_cv_ip6" = "no"; then
AC_MSG_ERROR([Your system does not support IPv6])
fi
LIBS="$save_libs"
AC_CHECK_HEADER(sys/param.h,
AC_DEFINE([PARAMH], [], [Define if you have the <sys/param.h> header file.]))
AC_CHECK_HEADER(stdlib.h,
AC_DEFINE([STDLIBH], [], [Define if you have the <stdlib.h> header file.]))
AC_CHECK_HEADER(stddef.h,
AC_DEFINE([STDDEFH], [], [Define if you have the <stddef.h> header file.]))
AC_CHECK_HEADER(sys/syslog.h,
AC_DEFINE([SYSSYSLOGH], [], [Define if you have the <sys/syslog.h> header file.]))
AC_CHECK_HEADER(unistd.h,
AC_DEFINE([UNISTDH], [], [Define if you have the <unistd.h> header file.]))
AC_CHECK_HEADER(string.h,
AC_DEFINE([STRINGH], [], [Define if you have the <string.h> header file.]))
AC_CHECK_HEADER(strings.h,
AC_DEFINE([STRINGSH], [], [Define if you have the <strings.h> header file.]))
AC_CHECK_HEADER(malloc.h,
AC_DEFINE([MALLOCH], [<malloc.h>], [Define to <malloc.h> you need malloc.h.]))
AC_CHECK_HEADER(sys/rusage.h,
AC_DEFINE([RUSAGEH], [], [Define if you have the <sys/rusage.h> header file.]))
AC_CHECK_HEADER(glob.h,
AC_DEFINE([GLOBH], [], [Define if you have the <glob.h> header file.]))
AC_CHECK_HEADERS([stdint.h inttypes.h])
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
AC_TYPE_MODE_T
AC_TYPE_SIZE_T
AC_TYPE_INTPTR_T
AC_HEADER_TIME
AC_HEADER_SYS_WAIT
AC_STRUCT_TM
AC_TYPE_UID_T
unreal_CHECK_TYPE_SIZES
dnl in the future, it would be nice to avoid AC_TRY_RUN to allow
dnl better support for crosscompiling.
AC_CACHE_CHECK([what kind of nonblocking sockets you have], [ac_cv_nonblocking],[
save_libs="$LIBS"
LIBS="$LIBS $SOCKLIB"
AC_TRY_RUN([
#include <sys/types.h>
#include <sys/socket.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/file.h>
#include <signal.h>
alarmed() {
exit(1);
}
int main() {
#ifdef O_NONBLOCK
char b[12], x[32];
int f, l = sizeof(x);
f = socket(AF_INET, SOCK_DGRAM, 0);
if (f >= 0 && !(fcntl(f, F_SETFL, O_NONBLOCK))) {
signal(SIGALRM, alarmed);
alarm(3);
recvfrom(f, b, 12, 0, (struct sockaddr *)x, &l);
alarm(0);
exit(0);
}
#endif
exit(1);
}
],ac_cv_nonblocking=O_NONBLOCK,[
AC_TRY_RUN([
#include <sys/types.h>
#include <sys/socket.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/file.h>
#include <signal.h>
alarmed() {
exit(0);
}
int main() {
#ifdef O_NDELAY
char b[12], x[32];
int f, l = sizeof(x);
f = socket(AF_INET, SOCK_DGRAM, 0);
if (f >= 0 && !(fcntl(f, F_SETFL, O_NDELAY))) {
signal(SIGALRM, alarmed);
alarm(3);
recvfrom(f, b, 12, 0, (struct sockaddr *)x, &l);
alarm(0);
exit(0);
}
#endif
exit(1);
}],ac_cv_nonblocking=O_NDELAY,[
AC_TRY_RUN([
#include <sys/types.h>
#include <sys/socket.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/file.h>
#include <signal.h>
alarmed() {
exit(1);
}
int main() {
#ifdef FIONBIO
char b[12], x[32];
int f, l = sizeof(x);
f = socket(AF_INET, SOCK_DGRAM, 0);
if (f >= 0 && !(fcntl(f, F_SETFL, FIONBIO))) {
signal(SIGALRM, alarmed);
alarm(3);
recvfrom(f, b, 12, 0, (struct sockaddr *)x, &l);
alarm(0);
exit(0);
}
#endif
exit(1);
], ac_cv_nonblocking=FIONBIO,ac_cv_nonblocking=none)])])])
if test "$ac_cv_nonblocking" = "O_NONBLOCK"; then
AC_DEFINE([NBLOCK_POSIX], [], [Define if you have O_NONBLOCK])
elif test "$ac_cv_nonblocking" = "O_NDELAY"; then
AC_DEFINE([NBLOCK_BSD], [], [Define if you have O_NDELAY])
elif test "$ac_cv_nonblocking" = "FIONBIO"; then
AC_DEFINE([NBLOCK_SYSV], [], [Define if you have FIONBIO])
fi
LIBS="$save_libs"
dnl Checks for library functions.
AC_PROG_GCC_TRADITIONAL
AC_FUNC_SETPGRP
AC_FUNC_SETVBUF_REVERSED
AC_CHECK_FUNCS(snprintf,
AC_DEFINE([HAVE_SNPRINTF], [], [Define if you have snprintf]))
AC_CHECK_FUNCS(vsnprintf,
AC_DEFINE([HAVE_VSNPRINTF], [], [Define if you have vsnprintf]))
AC_CHECK_FUNCS(strlcpy,
AC_DEFINE([HAVE_STRLCPY], [], [Define if you have strlcpy. Otherwise, an internal implementation will be used!]))
AC_CHECK_FUNCS(strlcat,
AC_DEFINE([HAVE_STRLCAT], [], [Define if you have strlcat]))
AC_CHECK_FUNCS(strlncat,
AC_DEFINE([HAVE_STRLNCAT], [], [Define if you have strlncat]))
AC_CHECK_FUNCS(inet_pton,
AC_DEFINE([HAVE_INET_PTON], [], [Define if you have inet_pton]))
AC_CHECK_FUNCS(inet_ntop,
AC_DEFINE([HAVE_INET_NTOP], [], [Define if you have inet_ntop]))
dnl Check if it supports C99 style variable length arrays
AC_CACHE_CHECK([if C99 variable length arrays are supported], [ac_cv_varlen_arrays], [
AC_TRY_COMPILE(,[
int main() {
int i = 5;
int a[i];
a[0] = 1;
return 0;
}], ac_cv_varlen_arrays=yes, ac_cv_varlen_arrays=no)
])
if test "$ac_cv_varlen_arrays" = "yes" ; then
AC_DEFINE([HAVE_C99_VARLEN_ARRAY], [], [Define if you have a compiler with C99 variable length array support])
fi
dnl This check doesn't need to be in ./configure, we can
dnl write the sourcecode to actually handle the return value
dnl of setrlimit if necessary... -- ohnobinki
AC_CACHE_CHECK([if we can set the core size to unlimited], [ac_cv_force_core], [
AC_TRY_RUN([
#include <sys/time.h>
#include <sys/resource.h>
#include <unistd.h>
int main() {
struct rlimit corelim;
corelim.rlim_cur = corelim.rlim_max = RLIM_INFINITY;
if (setrlimit(RLIMIT_CORE, &corelim))
exit(1);
exit(0);
}
],ac_cv_force_core=yes,ac_cv_force_core=no)
])
if test "$ac_cv_force_core" = "yes"; then
AC_DEFINE([FORCE_CORE], [], [Define if you can set the core size to unlimited])
fi
AC_FUNC_VPRINTF
AC_CHECK_FUNCS([gettimeofday],
[AC_DEFINE([GETTIMEOFDAY], [], [Define if you have gettimeofday])],
[AC_CHECK_FUNCS([lrand48],
[AC_DEFINE([LRADN48], [], [Define if you have lrand48])])])
AC_CHECK_FUNCS([getrusage],
[AC_DEFINE([GETRUSAGE_2], [], [Define if you have getrusage])],
[AC_CHECK_FUNCS([times],
@@ -507,65 +372,14 @@ AC_CHECK_FUNCS([setproctitle],
]
)
AC_CACHE_CHECK([what type of signals you have], [ac_cv_sigtype], [
AC_TRY_RUN([
#include <signal.h>
int main() {
sigaction(SIGTERM, (struct sigaction *)0L, (struct sigaction *)0L);
}
], ac_cv_sigtype=POSIX, [
AC_TRY_RUN([
#include <signal.h>
int calls = 0;
void handler()
{
if (calls)
return;
calls++;
kill(getpid(), SIGTERM);
sleep(1);
}
int main() {
signal(SIGTERM, handler);
kill(getpid(), SIGTERM);
exit(0);
}
], ac_cv_sigtype=BSD,ac_cv_sigtype=SYSV)])])
if test "$ac_cv_sigtype" = "POSIX"; then
AC_DEFINE([POSIX_SIGNALS], [], [Define if you have POSIX signals])
elif test "$ac_cv_sigtype" = "BSD"; then
AC_DEFINE([BSD_RELIABLE_SIGNALS], [], [Define if you have BSD signals])
else
AC_DEFINE([SYSV_UNRELIABLE_SIGNALS], [], [Define if you have SYSV signals])
fi
AC_CHECK_FUNCS(strtoken,,AC_DEFINE([NEED_STRTOKEN], [], [Define if you need the strtoken function.]))
AC_CHECK_FUNCS(strtok,,AC_DEFINE([NEED_STRTOK], [], [Define if you need the strtok function.]))
AC_CHECK_FUNCS(strerror,,AC_DEFINE([NEED_STRERROR], [], [Define if you need the strerror function.]))
AC_CHECK_FUNCS(index,,AC_DEFINE([NOINDEX], [], [Define if you do not have the index function.]))
AC_CHECK_FUNCS(strtoul,,STRTOUL="strtoul.o")
AC_CHECK_FUNCS(bcopy,,AC_DEFINE([NEED_BCOPY], [], [Define if you don't have bcopy]))
AC_CHECK_FUNCS(bcmp,,AC_DEFINE([NEED_BCMP], [], [Define if you don't have bcmp]))
AC_CHECK_FUNCS(bzero,,AC_DEFINE([NEED_BZERO], [], [Define if you need bzero]))
AC_CHECK_FUNCS(strcasecmp,AC_DEFINE([GOT_STRCASECMP], [], [Define if you have strcasecmp]))
save_libs="$LIBS"
LIBS="$LIBS $SOCKLIB $INETLIB"
AC_CHECK_FUNCS(inet_addr,,AC_DEFINE([NEED_INET_ADDR], [], [Define if you need inet_addr]))
AC_CHECK_FUNCS(inet_ntoa,,AC_DEFINE([NEED_INET_NTOA], [], [Define if you need inet_ntoa]))
LIBS="$save_libs"
AC_CHECK_FUNCS(explicit_bzero,AC_DEFINE([HAVE_EXPLICIT_BZERO], [], [Define if you have explicit_bzero]))
AC_CHECK_FUNCS(syslog,AC_DEFINE([HAVE_SYSLOG], [], [Define if you have syslog]))
AC_SUBST(STRTOUL)
AC_SUBST(CRYPTOLIB)
AC_SUBST(MODULEFLAGS)
AC_SUBST(DYNAMIC_LDFLAGS)
AC_ARG_WITH(nick-history, [AS_HELP_STRING([--with-nick-history=length],[Specify the length of the nickname history])],
[AC_DEFINE_UNQUOTED([NICKNAMEHISTORYLENGTH], [$withval], [Set to the nickname history length you want])],
[AC_DEFINE([NICKNAMEHISTORYLENGTH], [2000], [Set to the nickname history length you want])])
AC_ARG_WITH([sendq], [AS_HELP_STRING([--with-sendq=maxsendq],[Specify the max sendq for the server])],
[AC_DEFINE_UNQUOTED([MAXSENDQLENGTH], [$withval], [Set to the max sendq you want])],
[AC_DEFINE([MAXSENDQLENGTH], [3000000], [Set to the max sendq you want])])
AC_ARG_WITH(permissions, [AS_HELP_STRING([--with-permissions=permissions], [Specify the default permissions for
configuration files])],
dnl We have an apparently out-of-place 0 here because of a MacOSX bug and because
@@ -592,6 +406,13 @@ AC_ARG_WITH(confdir, [AS_HELP_STRING([--with-confdir=path],[Specify the director
[AC_DEFINE_UNQUOTED([CONFDIR], ["$HOME/unrealircd/conf"], [Define the location of the configuration files])
CONFDIR="$HOME/unrealircd/conf"])
dnl We have to pass the builddir as well, for the module manager
AC_ARG_WITH(builddir, [AS_HELP_STRING([--with-builddir=path],[Specify the build directory])],
[AC_DEFINE_UNQUOTED([BUILDDIR], ["$withval"], [Define the build directory])
BUILDDIR="$withval"],
[AC_DEFINE_UNQUOTED([BUILDDIR], ["$BUILDDIR_NOW"], [Specify the build directory])
BUILDDIR="$BUILDDIR_NOW"])
AC_ARG_WITH(modulesdir, [AS_HELP_STRING([--with-modulesdir=path],[Specify the directory for loadable modules])],
[AC_DEFINE_UNQUOTED([MODULESDIR], ["$withval"], [Define the location of the modules])
MODULESDIR="$withval"],
@@ -651,6 +472,7 @@ AS_IF([test "x$PRIVATELIBDIR" = "x"],
LDFLAGS="$LDFLAGS $LDFLAGS_PRIVATELIBS"
export LDFLAGS])
AC_SUBST(BUILDDIR)
AC_SUBST(BINDIR)
AC_SUBST(SCRIPTDIR)
AC_SUBST(CONFDIR)
@@ -665,10 +487,10 @@ AC_SUBST(DOCDIR)
AC_SUBST(PIDFILE)
AC_SUBST(LDFLAGS_PRIVATELIBS)
AC_ARG_WITH(fd-setsize, [AS_HELP_STRING([--with-fd-setsize=size], [Specify the max file descriptors to use])],
AC_ARG_WITH(maxconnections, [AS_HELP_STRING([--with-maxconnections=size], [Specify the max file descriptors to use])],
[ac_fd=$withval],
[ac_fd=1024])
AC_DEFINE_UNQUOTED([MAXCONNECTIONS], [$ac_fd], [Set to the max connections you want])
[ac_fd=0])
AC_DEFINE_UNQUOTED([MAXCONNECTIONS_REQUEST], [$ac_fd], [Set to the maximum number of connections you want])
AC_ARG_ENABLE([prefixaq],
[AS_HELP_STRING([--disable-prefixaq],[Disable chanadmin (+a) and chanowner (+q) prefixes])],
@@ -681,29 +503,22 @@ AC_ARG_WITH(showlistmodes,
[AS_HELP_STRING([--with-showlistmodes], [Specify whether modes are shown in /list])],
[AS_IF([test $withval = "yes"],
[AC_DEFINE([LIST_SHOW_MODES], [], [Define if you want modes shown in /list])])])
AC_ARG_WITH(topicisnuhost, [AS_HELP_STRING([--with-topicisnuhost], [Display nick!user@host as the topic setter])],
[AS_IF([test $withval = "yes"],
[AC_DEFINE([TOPIC_NICK_IS_NUHOST], [], [Define if you want nick!user@host shown for the topic setter])])])
AC_ARG_WITH(shunnotices, [AS_HELP_STRING([--with-shunnotices], [Notify a user when he/she is no longer shunned])],
[AS_IF([test $withval = "yes"],
[AC_DEFINE([SHUN_NOTICES], [], [Define if you want users to be notified when their shun is removed])])])
AC_ARG_WITH(no-operoverride, [AS_HELP_STRING([--with-no-operoverride], [Disable OperOverride])],
[AS_IF([test $withval = "yes"],
[AC_DEFINE([NO_OPEROVERRIDE], [], [Define if you want OperOverride disabled])])])
AC_ARG_WITH(disableusermod, [AS_HELP_STRING([--with-disableusermod], [Disable /set* and /chg*])],
[AS_IF([test $withval = "yes"],
[AC_DEFINE([DISABLE_USERMOD], [], [Define if you want to disable /set* and /chg*])])])
AC_ARG_WITH(operoverride-verify, [AS_HELP_STRING([--with-operoverride-verify], [Require opers to invite themselves to +s/+p channels])],
[AS_IF([test $withval = "yes"],
[AC_DEFINE([OPEROVERRIDE_VERIFY], [], [Define if you want opers to have to use /invite to join +s/+p channels])])])
AC_ARG_WITH(disable-extendedban-stacking, [AS_HELP_STRING([--with-disable-extendedban-stacking], [Disable extended ban stacking])],
[AS_IF([test $withval = "yes"],
[AC_DEFINE([DISABLE_STACKED_EXTBANS], [], [Define to disable extended ban stacking (~q:~c:\#chan, etc)])])])
AC_ARG_WITH(system-tre, [AS_HELP_STRING([--with-system-tre], [Use the system tre package instead of bundled, discovered using pkg-config])], [], [with_system_tre=no])
AC_ARG_WITH(system-pcre2, [AS_HELP_STRING([--with-system-pcre2], [Use the system pcre2 package instead of bundled, discovered using pkg-config])], [], [with_system_pcre2=no])
AC_ARG_WITH(system-pcre2, [AS_HELP_STRING([--without-system-pcre2], [Use the system pcre2 package instead of bundled, discovered using pkg-config])], [], [with_system_pcre2=yes])
AC_ARG_WITH(system-argon2, [AS_HELP_STRING([--without-system-argon2], [Use bundled version instead of system argon2 library. Normally autodetected via pkg-config])], [], [with_system_argon2=yes])
AC_ARG_WITH(system-sodium, [AS_HELP_STRING([--without-system-sodium], [Use bundled version instead of system sodium library. Normally autodetected via pkg-config])], [], [with_system_sodium=yes])
AC_ARG_WITH(system-cares, [AS_HELP_STRING([--without-system-cares], [Use bundled version instead of system c-ares. Normally autodetected via pkg-config.])], [], [with_system_cares=yes])
CHECK_SSL
CHECK_SSL_CTX_SET1_CURVES_LIST
CHECK_SSL_CTX_SET_MIN_PROTO_VERSION
CHECK_SSL_CTX_SET_SECURITY_LEVEL
CHECK_ASN1_TIME_diff
CHECK_X509_get0_notAfter
AC_ARG_ENABLE(dynamic-linking, [AS_HELP_STRING([--disable-dynamic-linking], [Make the IRCd statically link with shared objects rather than dynamically (noone knows if disabling dynamic linking actually does anything or not)])],
[enable_dynamic_linking=$enableval], [enable_dynamic_linking="yes"])
AS_IF([test $enable_dynamic_linking = "yes"],
@@ -716,29 +531,11 @@ AC_ARG_ENABLE([werror],
[ac_cv_werror="$enableval"],
[ac_cv_werror="no"])
AC_MSG_CHECKING([if FD_SETSIZE is large enough to allow $ac_fd file descriptors])
AC_COMPILE_IFELSE([
#include <sys/types.h>
#include <sys/time.h>
int main() {
#if FD_SETSIZE < $ac_fd
#error FD_SETSIZE is smaller than $ac_fd
#endif
exit(0);
}
], AC_MSG_RESULT([yes]), [
# must be passed on the commandline to avoid a ``warning, you redefined something''
FD_SETSIZE="-DFD_SETSIZE=$ac_fd"
AC_MSG_RESULT(no)
])
AC_SUBST([FD_SETSIZE])
case `uname -s` in
*SunOS*|*solaris*)
AC_DEFINE([_SOLARIS], [], [Define if you are compiling unrealircd on Sun's (or Oracle's?) Solaris])
IRCDLIBS="$IRCDLIBS -lresolv "
;;
esac
AC_ARG_ENABLE([asan],
[AS_HELP_STRING([--enable-asan],
[Enable address sanitizer and other debugging options, not recommended for production servers!])],
[ac_cv_asan="$enableval"],
[ac_cv_asan="no"])
AC_CHECK_FUNCS([poll],
AC_DEFINE([HAVE_POLL], [], [Define if you have poll]))
@@ -752,50 +549,15 @@ dnl fail on certain solaris boxes. We might as
dnl well set it here.
export PATH_SEPARATOR
AS_IF([test "x$with_system_tre" = "xno"],[
dnl REMEMBER TO CHANGE WITH A NEW TRE RELEASE!
tre_version="0.8.0-git"
AC_MSG_RESULT(extracting TRE regex library)
cur_dir=`pwd`
cd extras
dnl remove old tre directory to force a recompile...
dnl and remove its installation prefix just to clean things up.
rm -rf tre-$tre_version rege[]xp
if test "x$ac_cv_path_GUNZIP" = "x" ; then
tar xfz tre.tar.gz
else
cp tre.tar.gz tre.tar.gz.bak
gunzip -f tre.tar.gz
cp tre.tar.gz.bak tre.tar.gz
tar xf tre.tar
fi
AC_MSG_RESULT(configuring TRE regex library)
cd tre-$tre_version
./configure --disable-agrep --enable-shared --disable-system-abi --disable-wchar --disable-multibyte --prefix=$cur_dir/extras/regexp --libdir=$PRIVATELIBDIR || exit 1
AC_MSG_RESULT(compiling TRE regex library)
$ac_cv_prog_MAKER || exit 1
AC_MSG_RESULT(installing TRE regex library)
$ac_cv_prog_MAKER install || exit 1
TRE_CFLAGS="-I$cur_dir/extras/regexp/include"
AC_SUBST(TRE_CFLAGS)
dnl Use system pcre2 when available, unless --without-system-pcre2.
has_system_pcre2="no"
AS_IF([test "x$with_system_pcre2" = "xyes"],[
PKG_CHECK_MODULES([PCRE2], libpcre2-8 >= 10.00,[has_system_pcre2=yes
AS_IF([test "x$PRIVATELIBDIR" != "x"], [rm -f "$PRIVATELIBDIR/"libpcre2*])],[has_system_pcre2=no])])
TRE_LIBS=
AS_IF([test -n "$ac_cv_path_PKGCONFIG"],
[TRE_LIBS="`$ac_cv_path_PKGCONFIG --libs tre.pc`"])
dnl For when pkg-config isn't available -- or for when pkg-config
dnl doesn't see the tre.pc file somehow... (#3982)
AS_IF([test -z "$TRE_LIBS"],
[TRE_LIBS="$PRIVATELIBDIR/libtre.so"])
AC_SUBST(TRE_LIBS)
cd $cur_dir
],[
dnl use pkgconfig for tre:
PKG_CHECK_MODULES([TRE], tre >= 0.7.5)
])
AS_IF([test "x$with_system_pcre2" = "xno"],[
AS_IF([test "$has_system_pcre2" = "no"], [
dnl REMEMBER TO CHANGE WITH A NEW PCRE2 RELEASE!
pcre2_version="10.30"
pcre2_version="10.36"
AC_MSG_RESULT(extracting PCRE2 regex library)
cur_dir=`pwd`
cd extras
@@ -819,7 +581,6 @@ AC_MSG_RESULT(installing PCRE2 regex library)
$ac_cv_prog_MAKER install || exit 1
PCRE2_CFLAGS="-I$cur_dir/extras/pcre2/include"
AC_SUBST(PCRE2_CFLAGS)
PCRE2_LIBS=
dnl See c-ares's compilation section for more info on this hack.
dnl ensure that we're linking against the bundled version of pcre2
@@ -832,9 +593,98 @@ AS_IF([test -z "$PCRE2_LIBS"],
[PCRE2_LIBS="$PRIVATELIBDIR/libpcre2-8.so"])
AC_SUBST(PCRE2_LIBS)
cd $cur_dir
],[
dnl use pkgconfig for pcre2:
PKG_CHECK_MODULES([PCRE2], libpcre2-8 >= 10.00)
])
dnl Use system argon2 when available, unless --without-system-argon2
has_system_argon2="no"
AS_IF([test "x$with_system_argon2" = "xyes"],[
PKG_CHECK_MODULES([ARGON2], [libargon2 >= 0~20161029],[has_system_argon2=yes
AS_IF([test "x$PRIVATELIBDIR" != "x"], [rm -f "$PRIVATELIBDIR/"libargon2*])],[has_system_argon2=no])])
AS_IF([test "$has_system_argon2" = "no"],[
dnl REMEMBER TO CHANGE WITH A NEW ARGON2 RELEASE!
argon2_version="20181209"
AC_MSG_RESULT(extracting Argon2 library)
cur_dir=`pwd`
cd extras
dnl remove old argon2 directory to force a recompile...
dnl and remove its installation prefix just to clean things up.
rm -rf argon2-$argon2_version argon2
if test "x$ac_cv_path_GUNZIP" = "x" ; then
tar xfz argon2-$argon2_version.tar.gz
else
cp argon2-$argon2_version.tar.gz argon2-$argon2_version.tar.gz.bak
gunzip -f argon2-$argon2_version.tar.gz
cp argon2-$argon2_version.tar.gz.bak argon2-$argon2_version.tar.gz
tar xf argon2-$argon2_version.tar
fi
AC_MSG_RESULT(compiling Argon2 library)
cd argon2-$argon2_version
$ac_cv_prog_MAKER || exit 1
AC_MSG_RESULT(installing Argon2 library)
$ac_cv_prog_MAKER install PREFIX=$cur_dir/extras/argon2 || exit 1
# We need to manually copy the libs to PRIVATELIBDIR because
# there is no way to tell make install in libargon2 to do so.
# BUT FIRST, delete the old library so it becomes an unlink+create
# operation rather than overwriting the existing file which would
# lead to a crash of the currently running IRCd.
rm -f "$PRIVATELIBDIR/"libargon2*
# Now copy the new library files:
cp -av $cur_dir/extras/argon2/lib/* $PRIVATELIBDIR/
ARGON2_CFLAGS="-I$cur_dir/extras/argon2/include"
AC_SUBST(ARGON2_CFLAGS)
ARGON2_LIBS="-L$PRIVATELIBDIR -largon2"
AC_SUBST(ARGON2_LIBS)
cd $cur_dir
])
dnl Use system sodium when available, unless --without-system-sodium
has_system_sodium="no"
AS_IF([test "x$with_system_sodium" = "xyes"],[
PKG_CHECK_MODULES([SODIUM], [libsodium >= 1.0.16],[has_system_sodium=yes
AS_IF([test "x$PRIVATELIBDIR" != "x"], [rm -f "$PRIVATELIBDIR/"libsodium*])],[has_system_sodium=no])])
AS_IF([test "$has_system_sodium" = "no"],[
dnl REMEMBER TO CHANGE WITH A NEW SODIUM RELEASE!
sodium_version="1.0.18"
AC_MSG_RESULT(extracting sodium library)
cur_dir=`pwd`
cd extras
dnl remove old sodium directory to force a recompile...
dnl and remove its installation prefix just to clean things up.
rm -rf sodium-$sodium_version sodium
if test "x$ac_cv_path_GUNZIP" = "x" ; then
tar xfz libsodium.tar.gz
else
cp libsodium.tar.gz libsodium.tar.gz.bak
gunzip -f libsodium.tar.gz
cp libsodium.tar.gz.bak libsodium.tar.gz
tar xf libsodium.tar
fi
AC_MSG_RESULT(compiling sodium library)
cd libsodium-$sodium_version
save_cflags="$CFLAGS"
CFLAGS="$orig_cflags"
export CFLAGS
./configure --prefix=$cur_dir/extras/sodium --libdir=$PRIVATELIBDIR --enable-shared --disable-static --enable-opt || exit 1
CFLAGS="$save_cflags"
AC_MSG_RESULT(compiling sodium resolver library)
$ac_cv_prog_MAKER || exit 1
AC_MSG_RESULT(installing sodium resolver library)
$ac_cv_prog_MAKER install || exit 1
SODIUM_CFLAGS="-I$cur_dir/extras/sodium/include"
AC_SUBST(SODIUM_CFLAGS)
SODIUM_LIBS=
dnl See c-ares's compilation section for more info on this hack.
dnl ensure that we're linking against the bundled version
dnl (we only reach this code if linking against the bundled version is desired).
AS_IF([test -n "$ac_cv_path_PKGCONFIG"],
[SODIUM_LIBS="`$ac_cv_path_PKGCONFIG --libs libsodium.pc`"])
dnl For when pkg-config isn't available
AS_IF([test -z "$SODIUM_LIBS"],
[SODIUM_LIBS="-L$PRIVATELIBDIR -lsodium"])
AC_SUBST(SODIUM_LIBS)
cd $cur_dir
])
dnl Use system c-ares when available, unless --without-system-cares.
@@ -847,7 +697,7 @@ AS_IF([test "$has_system_cares" = "no"], [
dnl REMEMBER TO CHANGE WITH A NEW C-ARES RELEASE!
dnl NOTE: when changing this here, ALSO change it in extras/curlinstall
dnl and in the comment in this file around line 400!
cares_version="1.13.0"
cares_version="1.17.1"
AC_MSG_RESULT(extracting c-ares resolver library)
cur_dir=`pwd`
cd extras
@@ -866,7 +716,7 @@ cd c-ares-$cares_version
save_cflags="$CFLAGS"
CFLAGS="$orig_cflags"
export CFLAGS
./configure --prefix=$cur_dir/extras/c-ares --libdir=$PRIVATELIBDIR --enable-shared || exit 1
./configure --prefix=$cur_dir/extras/c-ares --libdir=$PRIVATELIBDIR --enable-shared --disable-tests || exit 1
CFLAGS="$save_cflags"
AC_MSG_RESULT(compiling c-ares resolver library)
$ac_cv_prog_MAKER || exit 1
@@ -924,6 +774,14 @@ if test "$ac_cv_werror" = "yes" ; then
CFLAGS="$CFLAGS -Werror"
fi
dnl Address sanitizer build
if test "$ac_cv_asan" = "yes" ; then
CFLAGS="$CFLAGS -O1 -fno-inline -fsanitize=address -fno-omit-frame-pointer -DNOCLOSEFD"
IRCDLIBS="-fsanitize=address $IRCDLIBS"
fi
AC_SUBST(IRCDLIBS)
AC_SUBST(UNRLINCDIR)
AC_CONFIG_FILES([Makefile
@@ -933,8 +791,8 @@ AC_CONFIG_FILES([Makefile
src/modules/usermodes/Makefile
src/modules/snomasks/Makefile
src/modules/extbans/Makefile
src/modules/cap/Makefile
src/modules/third/Makefile
extras/unrealircd-upgrade-script
unrealircd])
AC_OUTPUT
chmod 0700 unrealircd
+14 -3
View File
@@ -7,14 +7,25 @@
\___/|_| |_|_| \___|\__,_|_|\___/\_| \_| \____/\__,_|
Configuration Program
for UnrealIRCd 4.0.19-rc2
for UnrealIRCd 5.0.10-git
This program will help you to compile your IRC server, and ask you
questions regarding the compile-time settings of it during the process.
regarding the setup of it, during the process.
A short installation guide is available online at:
https://www.unrealircd.org/docs/Installing_from_source
Full documentation is available at:
https://www.unrealircd.org/docs/UnrealIRCd_4_documentation
https://www.unrealircd.org/docs/UnrealIRCd_5_documentation
--------------------------------------------------------------------------------------
The full release notes are available in doc/RELEASE-NOTES.md
For easier viewing, check out the latest online release notes at:
https://github.com/unrealircd/unrealircd/blob/unreal50/doc/RELEASE-NOTES.md
UnrealIRCd 5 is compatible with the following services:
* anope with the "unreal4" protocol module - version 2.0.7 or higher required!
* atheme with the "unreal4" protocol module - tested with version 7.2.9
--------------------------------------------------------------------------------------
+47
View File
@@ -0,0 +1,47 @@
pub rsa4096 2015-07-02 [SC] [expires: 2025-06-29]
1D2D2B03A0B68ED11D68A24BA7A21B0A108FF4A9
uid UnrealIRCd releases (for verification of software downloads only!) <releases@unrealircd.org>
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFWVOFYBEACsWFWM25VDaGXq22GSTJo1O53bgAMCZsqj9VKDriUmj7uvozlp
BGHgYFVM4ZT1FUAsWedeIP2aLLkYGmH4odVaAk7IeUa7HfpE45/F6+End6bCpYGe
1UdVQM/Bu3VHoUtVvtIFg788JwbplroapA/D0pi/EAN8WYnN9etgLM2lvzwbjBz9
xTOefwvgRsKbCH63VW7NCyquEcdEJxnMHB7JZUEuzrOUvhAiIkwKw8wbcn36zX0i
wcAFtVO5uVTA/Tdu6nWsZvqVc6R1E3usJzWSwbmoUtPUM5Mk9I9gL73EsqEbgs5N
trT00r75RcfiThNEP8NtDtB8AFum6OCSg/+8bdJmKcWVKpuB+lUvP0d4UAqm5vmH
/KQh/nyHXKvAvhWqHizozP1WGevpxLFHMjm/+1T167Iil/3UcUyn9qd0CuYSszJw
y5Vp6iJHkVo8qxI89rkzSDRi+ppLCBTwuN01ducftDxvIQMVrphdKZLPGzQrltkh
lIN4XNS6cOOsrbbk5+Kc2xih6qt+DyiRHaNFQnoMdRVeIrmf4u4ClMcHlzELV8gF
D+s0BbVqhVwAhbKMfKaVmvVlj8bSET0z2s0vhZODwlgANpDBLNsIU6leiYRAzub5
WY5Hz1m7P8ZXSMPh4/vGh1kg3E9IRKLZDZ65gEYr8nNCzbAYmDQ3IkplIwARAQAB
tFxVbnJlYWxJUkNkIHJlbGVhc2VzIChmb3IgdmVyaWZpY2F0aW9uIG9mIHNvZnR3
YXJlIGRvd25sb2FkcyBvbmx5ISkgPHJlbGVhc2VzQHVucmVhbGlyY2Qub3JnPokC
PgQTAQIAKAUCVZU4VgIbAwUJEswDAAYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AA
CgkQp6IbChCP9KlFzQ/+ObuBgCtXvLcbpq7C2usHxgtEB1rV9khLGugJXevjMaf3
+vo4d5cd5go665po8oqDnSUfq+8LPDj/nnroKQcS5Kb4KdHz6rn+53rHWtw6PPGN
KswFS05Vy2AkYg4nVXvrGm0oV173qOms2REoStP0mEm7F7ZTJ6k1qgmZ8tcFgfMm
fqEl94O5zDWycaJx7K0h3n+xUyhh+lT9Zl3duzVzCc+YI+dD6UOIXBF9TF9fIb8m
300MBLwTTHq64nGsZbhfzCHNHAO6hTy5XmE+d1g4R87rKim6lP0V1LTbvhOhYhZg
0JrVOr9dhHY4tw1xglz++nMM24t2O9zoRoZjDMHBzzBm3gJq3G160kxVZKKcVaQd
nfYvPOBNtyEyaIIJD8vs2Z9jiJLjpoz0LhnE2TmE4M6YqBsSWfFuPrHE+PJQyEQg
2zEoTRCSFSLaq+5kl3vKM/cblwkQeKkNe8u6bDNk7bEPUCQstyOqcvoTWE2gs3f2
n7wI7BzW3uX5YUp1CcdPig1XxveI4XaKKrhRacvGvvNHdXw1scj1K0SCXvy4EPpf
dLthTC6BHwO2P56wlxK0MRL/GD72ttBCcsyLWYdL9OIT6Lx4bZVhvEjKDapWAL04
X1mXMHUK1iO4lunbqP3lu6F8qsuI/B2sIiJK7aSjv4bjVRw/jcESrhmCvnN3B3mI
RgQQEQIABgUCVZU9NQAKCRBpsoj7n/A5N4E2AJ4i5z98+mA8Ug9utdslGvHFRq+s
PgCeILJ7/dJFYZFz1YpaNTbRCHIesaWIXgQQEQgABgUCVZU9ZwAKCRBuZ21Ff+GZ
pueXAP9bJ1hPWa3ITIoapW9eTT1eNv+17KqcclwZzxCopbUkFAD+NptTuXpeivM+
USWsQJFpFlLdDckcv8QzLQwgzZ8TXtKJAhwEEAEIAAYFAlg796cACgkQ3pO4tH50
XrMyWQ/+NJyhO5yibAhN4RgCJ+qFdp9Llm+SQGFjVtw8L7nv3M0Us8xspmVlX7TZ
/OK6AhUyaqAmg3ZXruaetrBVIAlP675cXJ1NIPfyT+PvMUbupvqBhyPZKqdnh2WT
ZMYdQrvw503h+BlyjGeAWd34tLhtiM1A69tntFu2A7bKhkoxE7KoyCjKmLgUb30M
r5guxb6DCUXK8m5ooHl58kLtJrTpW9l3YYXpKe/POYPIK6ULZN7TChtFOTJ+ebx1
2LaQGGdRKaCSM1OX7mfvBG8GtljQcGoP+f5TmvRbCGGfiR9r6MdgG6LYTuYf7pR7
NBwxveqwJV4iOmd9b+doIra5tRX0TqEKdEqpVHhm4UTZlHVyIpg97Lc/7WiWS1Z5
UIhT4YxlztPUvWmCXlleNEqBYK86OsVFqryHDVKtPbH65k/xKfu8w/hHkv7TQ23r
eoMs1uBlaUWe3orgUOr0tnFLXz809SAwC9sxQq9TWTm50NqiaQvBVInSUssFYPkG
qBljIXtdUzFGBn3sTpFRY6p2yzIo54EQmQAvMQPEJkQ8JQJ47au82DxFUBZYKci5
lsJfRueGnn5A36eUZdkhZ6Dm61M3YldYcpRa4Xfi0AWbg5yW/uUipc36Ey+vwWyl
x+1IZgjnIIMsyDLuq2tm5p1tiJK2N9L0rxQb/DIK7j8+ZvmlFZQ=
=foLZ
-----END PGP PUBLIC KEY BLOCK-----
-121
View File
@@ -1,121 +0,0 @@
UnrealIRCd 4.0.19-rc2 Release Notes
====================================
This is the second release candidate for UnrealIRCd 4.0.19. Please help
test this release and report all bugs to https://bugs.unrealircd.org/
Enhancements:
* New option to disable a module: blacklist-module "modulename";
This will cause any 'loadmodule' lines for that module to be ignored.
This is especially useful if you only want to disable a few modules
that are (normally) automatically loaded by conf/modules.default.conf.
https://www.unrealircd.org/docs/Blacklist-module_directive
* Next three new features have to do with SASL. More information on SASL
in general can be found at https://www.unrealircd.org/docs/SASL
* A new require sasl { } block which allows you to force users on the
specified hostmask to use SASL. Any unauthenticated users matching
the specified hostmask are are rejected.
See https://www.unrealircd.org/docs/Require_sasl_block
* New "soft kline" and "soft gline". These will not be applied to users
that are authenticated to services using SASL.
These are just GLINE/KLINE's but prefixed with a percent sign:
Example: /GLINE %*@10.* 0 Only SASL allowed from here
* New "soft" ban actions for spamfilter, blacklist, antirandom, etc.
Actions such as "soft-kline" and "soft-kill" will only be applied to
unauthenticated users. Users who are authenticated to services (SASL)
are exempt from the corresponding spamfilter/blacklist/antirandom/..
See https://www.unrealircd.org/docs/Actions for the full action list.
* WARNING: If your network also contains UnrealIRCd servers below v4.0.19
then it is not recommended to use global soft bans (such as soft gline
or any spamfilter with soft-xx actions). There won't be havoc, but the
bans won't be effective on parts of the network.
* The following extban modules are not new but are now enabled by default:
extbans/textban, extbans/timedban and extbans/msgbypass.
In case you don't like them, use blacklist-module as mentioned earlier.
Just as a reminder, they provide the following functionality:
* TextBan: +b ~T:block:*badword* to block sentences with 'badword'
* Timed bans: ~t:duration:mask
These are bans that are automatically removed by the server.
The duration is in minutes and the mask can be any ban mask.
Some examples:
* A 5 minute ban on a host:
+b ~t:5:*!*@host
* A 5 minute quiet ban on a host (unable to speak):
+b ~t:5:~q:*!*@host
* An invite exception for 24 hours (1440 minutes):
+I ~t:1440:*!*@host
* A temporary exempt ban for a services account:
+e ~t:1440:~a:Account
* Allows someone to speak through +m for the next 24hrs:
+e ~t:1440:~m:moderated:*!*@host
* And any other crazy ideas you can come up with...
* Ban exception ~m:type:mask to allow bypassing of message restrictions.
Valid types are: 'external' (bypass +n), moderated (bypass +m/+M),
'censor' (bypass +G), 'color' (bypass +S/+c) and 'notice' (bypass +T).
Some examples:
* Let LAN users bypass +m: +e ~m:moderated:*!*@192.168.*
* Let ops in #otherchan bypass +m: +e ~m:moderated:~c:@#otherchan
* Make GitHub commit bot bypass +n: +e ~m:external:*!*@ipmask
* Allow a services account to use color: +e ~m:color:~a:ColorBot
* Timedban support in +f [5t#b2]:10 (set 2 minute ban on text flood).
* AntiRandom: The module will now (by default) exempt WEBIRC gateways
from antirandom checking because they frequently cause false positives.
This new behavior can be disabled via:
set { antirandom { except-webirc no; }; };
* Server linking attempts and errors are now also put in the log file.
* A new module that provides WHOX support, an enhanced and more standard
version of WHO (NOTE: the command is still "WHO").
This allows, among other things, the client to request additional
information, such as which services account each channel member is using.
The module is currently experimental. To use it, add this to your conf:
loadmodule "m_whox";
Major issues fixed:
* Blacklist: Potential crash issue when concurrently checking DNSBL
for the WEBIRC gateway and the spoofed host.
* Blacklist: In case of multiple blacklists the 2nd/3rd/.. blacklists
were not always checked properly.
Minor issues fixed:
* Remote includes: ./Config didn't properly detect libcurl on Ubuntu 18
(and possibly other Linux distributions as well)
* Timeouts during server linking attempts were not displayed.
* Delayjoin: Halfops did not see JOIN's when channel mode +D was set.
* IRCOps with minimal privileges lost their user modes on MODE change.
* IRCOps could not override channel mode +z (when not using SSL/TLS)
* Channel names sometimes truncated if using accents or special chars.
* TLSv1.3 ciphersuite setting was changed to reflect OpenSSL's behavior.
There is now set::ssl::ciphersuites, specifically for TLSv1.3.
Note that the default is perfectly fine so at this point in time it
shouldn't need any adjustment (but the option is there...).
Removed:
* allow::options::sasl has been removed. Use the new and more flexible
require sasl { } block instead.
Other changes:
* Windows users may be prompted to install the Visual C++ redistributable
package for Visual Studio 2017. This is because we now build on VS 2017
instead of VS 2012.
* We now use standard formatted messages for all K-Lines, G-Lines and
any other bans that will cause the user to be disconnected.
For technical details see the banned_client() function.
* The except throttle { } block now also overrides any limitations from
set::max-unknown-connection-per-ip. Useful for WEBIRC/cgiirc gateways.
* Localhost connections are considered secure, so these can be used even
if you have a plaintext-policy of 'deny' or 'warn'. (This was already
the case for servers, but now also for users and opers)
* Allow slashes in vhost/chghost/sethost/.. (but not through DNS)
Module coders:
* Windows: Be aware that we now build with Visual Studio 2017. This means
3rd party modules should be compiled with VS 2017 (or VS 2015) as well.
Future versions:
* We intend to change the default plaintext oper policy from 'warn' to 'deny'
later this year. This will deny /OPER when used from a non-SSL connection.
For security, IRC Operators should really use SSL/TLS!
==[ CHANGES IN OLDER RELEASES ]==
For changes in previous UnrealIRCd releases see doc/RELEASE-NOTES.old or
https://raw.githubusercontent.com/unrealircd/unrealircd/unreal40/doc/RELEASE-NOTES.old
+960
View File
@@ -0,0 +1,960 @@
UnrealIRCd 5.X.Y-git Release Notes
===============================
This is the current development version (git) of UnrealIRCd.
This UnrealIRCd release focusses on channel history. A way to store channel
history encrypted on disk has been added (to preserve between server restarts)
and the IRCv3 CHATHISTORY command has been implemented to allow fetching
thousands of lines of channel history.
It also contains a breaking change, meaning (almost) everyone will need
to change a few things in their configuration file.
Breaking change:
* The set::anti-flood block has been redone so you can have different limits
for ''unknown-users'' and ''known-users''.
* As a reminder, by default, "known-users" are users who are identified
to services OR are on an IP that has been connected for over 2 hours
in the past X days. The exact definition of "known-users" is in the
[security-group block](https://www.unrealircd.org/docs/Security-group_block).
* See [here](https://www.unrealircd.org/docs/FAQ#new-anti-flood-block)
for more information on the layout of the new set::anti-flood block.
* All violatons of target-flood, nick-flood, join-flood, away-flood,
invite-flood, knock-flood, max-concurrent-conversations are now
reported to opers with the snomask ```f``` (flood).
Enhancements:
* Add support for database encryption. The way this works
is that you define an encryption password in a
[secret { } block](https://www.unrealircd.org/docs/Secret_block).
Then from the various modules you can refer to this secret
block, from
[set::reputation::db-secret](https://www.unrealircd.org/docs/Set_block#set::reputation),
[set::tkldb::db-secret](https://www.unrealircd.org/docs/Set_block#set::tkldb)
and [set::channeldb::db-secret](https://www.unrealircd.org/docs/Set_block#set::channeldb).
This way you can encrypt the reputation, TKL and channel
database for increased privacy.
* Add optional support for
[persistent channel history](https://www.unrealircd.org/docs/Set_block#Persistent_channel_history):
* This stores channel history on disk for channels that have
both ```+H``` and ```+P``` set.
* If you enable this then we ALWAYS require you to set an
encryption password, as we do not allow storing of
channel history in plain text.
* If you enable the option, then the history is stored in
```data/history/``` in individual .db files. No channel
names are visible in the filenames for optimal privacy.
* See [Persistent channel history](https://www.unrealircd.org/docs/Set_block#Persistent_channel_history)
on how to enable this. By default it is off.
* Add optional support for IRCv3
[draft/chathistory](https://ircv3.net/specs/extensions/chathistory).
This module can be loaded via ```loadmodule "chathistory";```
* The maximums for channel mode ```+H``` have been raised and are now
different for ```+r``` (registered) and ```-r``` channels. For unregistered
channels the limit is now 200 lines / 31 days. For registered channels
the limit is 5000 lines / 31 days. The old limit for both was 200 lines / 7 days.
These maximums can be changed in the now slightly different
[set::history::channel::max-storage-per-channel](https://www.unrealircd.org/docs/Set_block#set::history)
block.
* Add c-ares and libsodium version output to boot screen and /VERSION.
* WHOX now supports displaying the
[reputation score](https://www.unrealircd.org/docs/Reputation_score).
If you are an IRCOp then you can use e.g. ```WHO * %cuhsnfmdaRr```.
* Add ability to [spamfilter](https://www.unrealircd.org/docs/Spamfilter)
message tags via the new 'T' target. Right now it would be unusual
to use this, but some day when we have more
[message tags](https://www.unrealircd.org/docs/Message_tags) it
may come in handy.
* Support [+draft/reply](https://ircv3.net/specs/client-tags/reply) IRCv3
client tag. Can be used by bots (and others) to indicate to what message
people are replying to. This module, reply-tag, is loaded by default.
* Send [draft/bot](https://ircv3.net/specs/extensions/bot-mode) IRCv3
message tag if the user has mode ```+B``` set.
Fixes:
* Forbid using [extended server bans](https://www.unrealircd.org/docs/Extended_server_bans)
in ZLINE/GZLINE since they won't work.
* Extended server ban ```~a:accname``` was not working for shun, and only
partially working for kline/gline.
* More accurate /ELINE error message.
Changed:
* Channel mode ```+H``` always showed time in minutes (```m```) until now.
From now on it will show it in minutes (```m```), hours (```h```) or
days (```d```) depending on the actual value. Eg ```+H 50:7d```.
* If you ran ```./unrealircd stop``` we used to wait only 1 second.
From now on we will wait up to 10 seconds max. This gives UnrealIRCd
plenty of time to write database files.
* If you have zero [log blocks](https://www.unrealircd.org/docs/Log_block)
then we already automatically logged errors to ```ircd.log```.
From now on we will log everything (not only errors) to that file.
Removed:
* Version check for curl and openssl as nowadays they have ABI guarantees.
Module coders / Developers:
* New UnrealDB API and disk format, see
https://www.unrealircd.org/docs/Dev:UnrealDB
* We now use libsodium for file encryption routines as well
as some helpers to lock/clear passwords in memory.
* Updated ```HOOKTYPE_LOCAL_NICKCHANGE``` and
```HOOKTYPE_REMOTE_NICKCHANGE``` to include an
```MessageTag *mtags``` argument in the middle.
You can use ```#if UNREAL_VERSION_TIME>=202115``` to detect this.
* Updated channel mode ```conv_param``` function to
include a ```Channel *channel``` argument at the end.
You can use ```#if UNREAL_VERSION_TIME>=202120``` to detect this.
* New: ```ModuleSetOptions(modinfo->handle, MOD_OPT_UNLOAD_PRIORITY, priority);```.
This can be used for modules to indicate they wish to be unloaded
before or after others. It is used by for example the channel
and history modules so they can save their databases before
chanmode modules or other modules get unloaded.
* New CAP [```draft/chathistory```](https://ircv3.net/specs/extensions/chathistory).
If a client REQ's this CAP then UnrealIRCd won't send history on-join as
it assumes the client will fetch it when they feel the need for it.
* New informative CAP:
[unrealircd.org/history-backend](https://www.unrealircd.org/history-backend)
Reminder: UnrealIRCd 4 is no longer supported
----------------------------------------------
UnrealIRCd 4.x is [no longer supported](https://www.unrealircd.org/docs/UnrealIRCd_4_EOL).
Admins must [upgrade to UnrealIRCd 5](https://www.unrealircd.org/docs/Upgrading_from_4.x).
UnrealIRCd 5.0.9.1
-------------------
The only change between 5.0.9 and 5.0.9.1 is:
* Build improvements on *NIX (faster compiling and lower memory requirements)
* Windows version is unchanged and still 5.0.9
UnrealIRCd 5.0.9
-----------------
The 5.0.9 release comes with several nice feature enhancements. There are no major bug fixes.
Enhancements:
* Changes to the "Client connecting" notice on IRC (for IRCOps):
* The format changed slightly, instead of ```{clients}``` it
now shows ```[class: clients]```
* SSL/TLS information is still shown via ```[secure]```
* New: ```[reputation: NNN]``` to show the current
[reputation score](https://www.unrealircd.org/docs/Reputation_score)
* New: ```[account: abcdef]``` to show the services account,
but only if [SASL](https://www.unrealircd.org/docs/SASL) was used.
* In the log file the format also changed slightly:
* IP information is now added as ```[127.0.0.1]``` in both the
connect and disconnect log messages.
* The vhost is logged as ```[vhost: xyz]``` instead of ```[VHOST xyz]```
* All the other values are now logged as well on-connect,
similar to the "Client connecting" notice, so: secure, reputation,
account (if applicable).
* New option [allow::global-maxperip](https://www.unrealircd.org/docs/Allow_block):
this imposes a global (network-wide) restriction on the number of
connections per IP address.
If you don't have a global-maxperip setting in the allow block then it
will default to maxperip plus one. So, if you currently have an
allow::maxperip of 3 then global-maxperip will be 4.
* [Handshake delay](https://www.unrealircd.org/docs/Set_block#set::handshake-delay)
is automatically disabled for users that are exempt from blacklist checking.
* Always exempt 127.* from gline, kline, etc.
* You can now have dated logfiles thanks to strftime formatting.
For example ```log "ircd.%Y-%m-%d.log" { }``` will create a log
file like called ircd.2020-01-31.log, a new one every day.
* The Windows build now supports TLSv1.3 too.
Fixes:
* Windows: some warnings and error messages on boot were previously
missing.
Changes:
* Add doc/KEYS which contains the public key(s) used to sign UnrealIRCd releases
* The options set::anti-flood::unknown-flood-* have been renamed and
integrated in a new block called
[set::anti-flood::handshake-data-flood](https://www.unrealircd.org/docs/Set_block#set::anti-flood::handshake-data-flood).
The ban-action can now also be changed. Note that almost nobody will have to
change this setting since it has a good default.
* On *NIX bump the default maximum connections from 8192 to 16384.
That is, when in "auto" mode, which is like for 99% of the users.
Note that the system may still limit the actual number of connections
to a lower value, epending on the value of ```ulimit -n -H```.
UnrealIRCd 5.0.8
-----------------
The main purpose of this release is to enhance the
[reputation](https://www.unrealircd.org/docs/Reputation_score)
functionality. There have also been some other changes and minor
bug fixes. For more information, see below.
Enhancements:
* Support for [security groups](https://www.unrealircd.org/docs/Security-group_block),
of which four groups always exist by default: known-users, unknown-users,
tls-users and tls-and-known-users.
* New extended ban ```~G:securitygroupname```. Typical usage would be
```MODE #chan +b ~G:unknown-users``` which will ban all users from the
channel that are not identified to services and have a reputation
score below 25 (by default). The exact settings can be tweaked in the
[security group block](https://www.unrealircd.org/docs/Security-group_block).
* The reputation command (IRCOp-only) has been extended to make it
easier to look for potential troublemakers:
* ```REPUTATION Nick``` shows reputation about the nick name
* ```REPUTATION IP``` shows reputation about the IP address
* ```REPUTATION #channel``` lists users in channel with their reputation score
* ```REPUTATION <NN``` lists users with reputation scores below value NN
* Only send the first 1000 matches on ```STATS gline``` or a
similar command. This to prevent the IRCOp from being flooded off.
This value can be changed via
[set::max-stats-matches](https://www.unrealircd.org/docs/Set_block#set::max-stats-matches)
* Warn when the SSL/TLS server certificate is expired or expires soon
(within 7 days).
* New option allow::options::reject-on-auth-failure if you want to
stop matching on a passworded allow block, see the
[allow password documentation](https://www.unrealircd.org/docs/Allow_block#password)
for more information. Note that most people won't use this.
Fixes:
* The ```WHO``` command searched on nick name even if it was told
to search on a specific account name via WHOX options.
* Some typos in the Config script and a warning
* Counting clients twice in some circumstances
Changes:
* Support for $(DESTDIR) in 'make install' if packaging for a distro
* Mention the ban reason in Q-line server notices
* Add self-test to module manager and improve the error message in case
the IRCd source directory does not exist.
* Print out a more helpful error if you run the unrealircd binary
rather than the unrealircd script with an argument like 'mkpasswd' etc.
* On *NIX create a symlink 'source' to the UnrealIRCd source
Module coders / Developers:
* The [Doxygen module API docs](https://www.unrealircd.org/api/5/index.html)
have been improved, in particular the
[Hook API](https://www.unrealircd.org/api/5/group__HookAPI.html)
is now 100% documented.
UnrealIRCd 5.0.7
-----------------
UnrealIRCd 5.0.7 consists mainly of fixes for the 5.x stable series,
with some minor enhancements.
Enhancements:
* Add support for ```estonian-utf8```, ```latvian-utf8``` and
```lithuanian-utf8``` in
[set::allowed-nickchars](https://www.unrealircd.org/docs/Nick_Character_Sets)
* Add [message tags](https://www.unrealircd.org/docs/Message_tags)
to ```PONG``` to help fix timestamp issues in KiwiIRC.
* Dutch helpop file (conf/help/help.nl.conf)
Fixes:
* When having multiple text bans (```+b ~T:censor```), these caused an empty
message.
* Text bans are now no longer bypassed by voiced users (```+v```).
* [Websockets](https://www.unrealircd.org/docs/WebSocket_support) that used
```labeled-response``` sometimes received multiple IRC messages in one
websocket packet.
* The reputation score of [WEBIRC users](https://www.unrealircd.org/docs/WebIRC_block)
was previously the score of the WEBIRC IP rather than the end-user IP.
* ```STATS badword``` was not working.
* When setting a very high channel limit, it showed a weird MODE ```+l``` value.
* The ```LINKS``` command worked, even when disabled via
```hideserver::disable-links``` in the optional hideserver module.
* In some cases ```WHO``` did not show your own entry, such as when
searching on account name, which was confusing.
* Memory leak when repeatedly using ```./unrealircd reloadtls``` or
```/REHASH -tls```.
Module coders / Developers:
* No changes, only some small additions to the
[Doxygen module API docs](https://www.unrealircd.org/api/5/index.html)
UnrealIRCd 5.0.6
-----------------
UnrealIRCd 5.0.6 is a small maintenance release for the stable 5.x series.
For existing 5.x users there is probably little reason to upgrade.
Enhancements:
* Spanish help conf was added (conf/help/help.es.conf)
Fixes:
* History playback on join was not obeying the limits from
[set::history::channel::playback-on-join](https://www.unrealircd.org/docs/Set_block#set::history).
Note that if you want to see more lines, there is the ```HISTORY```
command. For more information on the different ways to retrieve history, see
[Channel History](https://www.unrealircd.org/docs/Channel_history)
* [Spamfilter](https://www.unrealircd.org/docs/Spamfilter) with the
['tempshun' action](https://www.unrealircd.org/docs/Actions) was letting
the message through.
* In very specific circumstances a ```REHASH -tls``` would cause outgoing
linking to fail with the error "called a function you should not call".
* Crash if empty [set::cloak-method](https://www.unrealircd.org/docs/Set_block#set::cloak-method)
* Issues with labeled-response on websockets (partial fix)
Module coders / Developers:
* In ```RPL_ISUPPORT``` we now announce ```BOT=B``` to indicate the user mode and
```WHO``` status flag for bots.
* ```HOOKTYPE_ACCOUNT_LOGIN``` is called for remote users too now (also on server syncs)
* Send ```RPL_LOGGEDOUT``` when logging out of services account
* Fix double batch in message tags when using both labeled-response
and the ```HISTORY``` command
UnrealIRCd 5.0.5.1
-------------------
5.0.5.1 reverts the previously introduced UTF8 Spamfilter support.
Unfortunately we had to do this, due to a bug in the PCRE2 regex library
that caused a freeze / infinite loop with certain regexes and text.
UnrealIRCd 5.0.5
-----------------
This 5.0.5 release mainly focuses on new features, while also fixing a few bugs.
Fixes:
* [except ban { }](https://www.unrealircd.org/docs/Except_ban_block)
without 'type' was not exempting from gline.
* Channel mode ```+L #forward``` and ```+k key```: should forward
on wrong key, but was also redirecting on correct key.
* Crash on 32-bit machines in tkldb (on start or rehash)
* Crash when saving channeldb when a parameter channel mode is combined
with ```+P``` and that module was loaded after channeldb. This may
happen if you use 3rd party modules that add parameter channel modes.
Enhancements:
* [antimixedutf8](https://www.unrealircd.org/docs/Set_block#set::antimixedutf8)
has been improved to detect CJK and other scripts and this will now
catch more mixed UTF8 spam. Note that, if you previously manually
set the score very tight (much lower than the default of 10) then you
may have to increase it a bit, or not, depending on your network.
* Support for IRCv3 [+typing clienttag](https://ircv3.net/specs/client-tags/typing.html),
which adds "user is typing" support to channels and PM (if the client
supports it).
* New flood countermeasure,
[set::anti-flood::target-flood](https://www.unrealircd.org/docs/Set_block#set%3A%3Aanti-flood%3A%3Atarget-flood),
which limits flooding to channels and users. This is only meant as a
filter for high rate floods. You are still encouraged to use
[channel mode +f](https://www.unrealircd.org/docs/Anti-flood_features#Channel_mode_f)
in channels which give you more customized and fine-grained options
to deal with low- and medium-rate floods.
* If a chanop /INVITEs someone, it will now override ban forwards
such as ```+b ~f:#forward:*!*@*```.
Changes:
* We now do parallel builds by default (```make -j4```) within ./Config,
unless the ```$MAKE``` or ```$MAKEFLAGS``` environment variable is set.
* [set::restrict-commands](https://www.unrealircd.org/docs/Set_block#set%3A%3Arestrict-commands):
* The ```disable``` option is now removed as it is implied. In other words: if
you want to disable a command, then simply don't use ```connect-delay```.
* You can now have a block without ```connect-delay``` but still make
users bypass the restriction with ```exempt-identified``` and/or
```exempt-reputation-score```. Previously this was not possible.
* We now give an error when an IRCOp tries to place an *LINE that already
exists. (Previously we sometimes replaced the existing *LINE and other
times we did not)
* Add Polish HELPOP (help.pl.conf)
Module coders / Developers:
* Breaking API change in ```HOOKTYPE_CAN_SEND_TO_USER``` and
```HOOKTYPE_CAN_SEND_TO_CHANNEL```: the final argument has changed
from ```int notice``` to ```SendType sendtype```, which is an
enum, since we now have 3 message options (PRIVMSG, NOTICE, TAGMSG).
UnrealIRCd 5.0.4
------------------
This new 5.0.4 version fixes quite a number of bugs. It contains only two small feature improvements.
Fixes:
* When placing a SHUN on an online user it was not always effective.
* Channeldb was not properly restoring all channel modes, such as +P.
* When upgrading UnrealIRCd it could sometimes crash the currently
running IRC server (rare), or trigger a crash report on
```./unrealircd restart``` (quite common).
* UnrealIRCd was giving up too easily on ident lookups.
* Crash when unloading a module with moddata.
* Crash if an authenticated server sends wrong information (rare).
* Removing a TEMPSHUN did not work if the user was on another server.
* SAJOIN to 0 (part all channels) resulted in a desync when used on remote users.
* Forced nick change from services was not showing up if the user
was not in any channels.
Enhancements:
* New option [set::hide-idle-time::policy](https://www.unrealircd.org/docs/Set_block#set%3A%3Ahide-idle-time)
by which you can change usermode +I (hide idle time in WHOIS) from
oper-only to settable by users. More options will follow in a future
release.
* In WHOIS you can now see if a user is currently (temp)shunned.
This only works for locally connected users for technical reasons,
so use ```/WHOIS Nick Nick``` to see it for remote users.
Changes:
* The oper notices and logging with regards to server linking have changed
a little. They are more consistent and log more now.
* When an IRCOp tries to oper up from an insecure connection we will now
mention the https://www.unrealircd.org/docs/FAQ#oper-requires-tls page.
This message is customizable through
[set::plaintext-policy::oper-message](https://www.unrealircd.org/docs/Set_block#set::plaintext-policy).
* The French HELPOP text was updated.
UnrealIRCd 5.0.3.1
-------------------
This fixes a crash issue after REHASH in 5.0.3.
UnrealIRCd 5.0.3
-----------------
Fixes:
* Fix serious flood issue in labeled-response implementation.
* An IRCOp SQUIT'ing a far remote server may cause a broken link topology
* In channels that are +D (delayed join), PARTs were not shown correctly to
channel operators.
Enhancements:
* A new HISTORY command for history playback (```HISTORY #channel number-of-lines```)
which allows you to fetch more lines than the on-join history playback.
Of course, taking into account the set limits in the +H channel mode.
This command is one of the [two interfaces](https://www.unrealircd.org/docs/Channel_history#Ways_to_retrieve_history)
to [Channel history](https://www.unrealircd.org/docs/Channel_history).
* Two new [message tags](https://www.unrealircd.org/docs/Message_tags),
```unrealircd.org/userip``` and ```unrealircd.org/userhost```
which communicate the user@ip and real user@host to IRCOps.
Changes:
* Drop the draft/ prefix now that the IRCv3
[labeled-response](https://ircv3.net/specs/extensions/labeled-response.html)
specification is out of draft.
* The operclass permission ```immune:target-limit``` is now called
```immune:max-concurrent-conversations```, since it bypasses
[set::anti-flood::max-concurrent-conversations](https://www.unrealircd.org/docs/Set_block#set::anti-flood::max-concurrent-conversations).
For 99% of the users this change is not important, but it may be
if you use highly customized [operclass blocks](https://www.unrealircd.org/docs/Operclass_block)
Are you upgrading from UnrealIRCd 4.x to UnrealIRCd 5? If so,
then check out the *UnrealIRCd 5* release notes [further down](#unrealircd-5). At the
very least, check out [Upgrading from 4.x](https://www.unrealircd.org/docs/Upgrading_from_4.x).
UnrealIRCd 5.0.2
-----------------
Fixes:
* Halfop users are not synced correctly, resulting in missing users across links.
* [Channel history](https://www.unrealircd.org/docs/Channel_history) used
incorrect time internally, resulting in messages expiring too soon.
The syntax is now really ```/MODE #chan +H lines:time-in-minutes```.
To make clear that the time is in minutes, an 'm' will be added
automatically by the server (eg ```+H 15:1440m```).
* Documentation: to exempt someone from gline via /ELINE you have to use type 'G', not 'g'.
Similarly, to exempt from spamfilter, use type 'F' and not 'f'.
* Exempting IPs from throttling via [except throttle](https://www.unrealircd.org/docs/Except_throttle_block) was not working.
* Unable to customize [set::tls::outdated-protocols](https://www.unrealircd.org/docs/Set_block#set::ssl::outdated-protocols)
and [set::tls::outdated-ciphers](https://www.unrealircd.org/docs/Set_block#set::ssl::outdated-ciphers).
* Specifying multiple channels did not work in [set::auto-join](https://www.unrealircd.org/docs/Set_block#set::auto-join),
[set::oper-auto-join](https://www.unrealircd.org/docs/Set_block#set::oper-auto-join) and
[tld::channel](https://www.unrealircd.org/docs/Tld_block).
Enhancements:
* [Extended server bans](https://www.unrealircd.org/docs/Extended_server_bans) in *LINE and /ELINE allow
you to ban or exempt users on criteria other than host/IP. These use a
similar syntax to extended bans. Currently supported are ~a, ~S and ~r. Examples:
* ```/ELINE ~a:TrustedAccount kG 0 This user can bypass kline/gline when using SASL```
* ```/ELINE ~S:1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef kGF 0 Trusted user with this certificate fingerprint```
* ```/GLINE ~r:*some*stupid*real*name*```
* These can also be used in the configuration file, eg: ```except ban { mask ~S:11223344etc; type all; };```
* New options that may not be used much, but can be useful on specific networks:
* The IRCd may add automatic bans, for example due to a blacklist hit,
a spamfilter hit, or because of antirandom or antimixedutf8. The new
option [set::automatic-ban-target](https://www.unrealircd.org/docs/Set_block#set::automatic-ban-target) specifies on *what* the ban should
be placed. The default is *ip*. Other options are: userip, host, userhost, account, certfp.
* Similarly, an oper may type ```/GLINE nickname```. The new option
[set::manual-ban-target](https://www.unrealircd.org/docs/Set_block#set::manual-ban-target) specifies on what the ban should be placed.
By default this is *host* (fallback to *ip*).
* New options to exempt webirc users: [set::connthrottle::webirc-bypass](https://www.unrealircd.org/docs/Connthrottle),
[set::restrict-commands::name-of-command::exempt-webirc](https://www.unrealircd.org/docs/Set_block#set::restrict-commands).
UnrealIRCd 5.0.1
-----------------
Fixes:
* IRCd may hang in rare circumstances
* Windows: fix repeated "ERROR renaming 'data/reputation.db.tmp'" warnings
* Antirandom and blacklist did not deal properly with 'warn' actions
* [Authprompt](https://www.unrealircd.org/docs/Authentication#How_it_looks_like)
did not always work properly
* Line numbers were incorrect in config file warnings/errors when using @if or @define
Enhancements:
* New /ELINE exception type 'm' to bypass allow::maxperip.
Or in the configuration file: ```except ban { mask 203.0.113.0/24; type maxperip; };```
* IRCOps can override MLOCK restrictions when services are down,
if they have the channel:override:mlock operclass permission,
such as opers which use the operclass 'netadmin-with-override'.
Other:
* Gottem and k4be have [uploaded their 3rd party modules](https://modules.unrealircd.org/)
to unrealircd-contrib so *NIX users can now easily install them using the new
[Module manager](https://www.unrealircd.org/docs/Module_manager)
UnrealIRCd 5
-------------
After more than 6 months of hard work, UnrealIRCd 5 is now our new "stable" branch.
In particular I would like to thank Gottem and 'i' for their source code
contributions and PeGaSuS and westor for testing releases.
When we transitioned from 3.2.x to 4.0.0 there were 175,000 lines of source code
added/removed during 3 years of development. This time it was 120,000 lines in
only 6 months, a major effort!
**If you are upgrading from 4.x to 5.x, then it would be wise to read
[Upgrading from 4.x](https://www.unrealircd.org/docs/Upgrading_from_4.x).
In any case, be sure to upgrade your services package first! (if you use any)**
UnrealIRCd 5 is compatible with the following services:
* [anope](https://www.anope.org/) (version 2.0.7 or higher) -
with the "unreal4" protocol module
* [atheme](https://atheme.github.io/atheme.html) (version 7.2.9 or higher) -
with the "unreal4" protocol module
Summary
--------
The most visible change to end-users is channel history. A lot of IRCv3 features were added.
Various modules from Gottem have been integrated and enhanced.
We now have a 3rd party module manager so you can install modules with 1 simple command.
Channel settings of ```+P``` channels and *LINES are saved in a database and
restored on startup (via 'channeldb' and 'tkldb' respectively).
Channel mode ```+L``` has a slight change of meaning, the existing floodprot
mode (```+f```) has a new type to prevent repeated messages and a new drop action.
A few extended bans have been added as well (```~f``` and ```~p```).
IRCOps now have the ability to add ban exceptions via the ```/ELINE``` command.
Advanced admins can use more dynamic configuration options where you can
define variables and use them later in the configuration file.
Finally, there have been speed improvements, we use better defaults and
have added more countermeasures and options against spambots.
Under the hood *a significant amount* of the source code was changed and cleaned up.
Read below for the full list of enhancements, changes and removals (and information for developers too).
Enhancements
-------------
* Support for IRCv3 server generated [message tags](https://ircv3.net/specs/extensions/message-tags), which allows us to communicate
additional information in protocol messages such as in JOIN and PRIVMSG.
Currently implemented and permitted message tags are:
* [account](https://ircv3.net/specs/extensions/account-tag-3.2): communicate the services account that a user uses
* [msgid](https://ircv3.net/specs/extensions/message-ids): assign an unique message id to each message
* [time](https://ircv3.net/specs/extensions/server-time-3.2): assign a time label to each message
The last two are mainly for history playback.
* Support for IRCv3 [echo-message](https://ircv3.net/specs/extensions/echo-message-3.2), which helps clients, among other things,
to see if the message you sent was altered in any way, eg: censored,
stripped from color, etc.
* Support for IRCv3 [draft/labeled-response-0.2](https://ircv3.net/specs/extensions/labeled-response), which helps clients to
correlate commands and responses.
* Support for IRCv3 [BATCH](https://ircv3.net/specs/extensions/batch-3.2), needed for some other features.
* Recording and playback of [channel history](https://www.unrealircd.org/docs/Channel_history) when channel mode +H is set.
The syntax is: ```MODE #chan +H max-lines-to-record:max-time-to-record-in-minutes```.
For example: ```MODE #chan +H 50:1440``` means the last 50 messages will be stored and no
message will be stored longer than 1440 minutes (1 day).
The channel history is then played back when joining such a channel,
but with two things to keep in mind:
1) The client must support the 'server-time' CAP ('time' message tag),
otherwise history is not shown. Any modern IRC client supports this.
2) Only a maximum of 15 lines are played back on-join by default
The reason for the maximum 15 lines on-join playback is that this can
be quite annoying if you rejoin repeatedly and as to not flood the users
screen too much (unwanted). In the future we will support a mechanism
for clients to "fetch" history - rather than sending it on-join - so
they can fetch more than the 15 lines, up to the number of lines and
time configured in the +H channel mode.
You can configure the exact number of lines that are played back and
all the limits that apply to +H via [set::history::channel](https://www.unrealircd.org/docs/Set_block#set::history).
* For saving and retrieving history we currently have the following options:
* *history_backend_mem*: channel history is stored in memory.
This is very fast but also means history is lost on restart.
* *history_backend_null*: don't store channel history at all.
This can be useful to load on servers with no users on it, such as a
hub server, where storing history is unnecessary.
As you can see there is currently no 'disk' backend. However, in the
future more options may be added. Also note that 3rd party modules
can add history backends as well.
* Support for ban exceptions via the new ```/ELINE``` command. This allows you
to add exceptions for regular bans (KLINE/GLINE/ZLINE/etc), but also
for connection throttling and blacklist checking.
For more information, just type ```/ELINE ``` in your IRC client as an IRCOp.
* [Websocket](https://www.unrealircd.org/docs/WebSocket_support) support now includes type 'text'
in addition to 'binary', which should work with [KiwiIRC](https://kiwiirc.com/)'s nextclient.
Also, websockets are no longer active on all ports by default. You have to explicitly
enable the websocket option in the listen block and also specify type *text* or *binary*,
eg: ```listen { ip *; port 6667; options { websocket { type text; } } }```
Also note that websockets require nick names and channels to consist of UTF8
characters only, due to
[WebSocket being incompatible with non-UTF8](https://www.unrealircd.org/docs/WebSocket_support#Problems_with_websockets_and_non-UTF8)
* There's now a [Module manager](https://www.unrealircd.org/docs/Module_manager)
which allows you to install and upgrade 3rd party modules in an easy way:
* ```./unrealircd module list``` - to list all available 3rd party modules
* ```./unrealircd module install third/something``` - to install the specified module.
* You can now test for configuration errors without actually starting the
IRC server. This is ideal if you are upgrading UnrealIRCd to a newer
version: simply run ```./unrealircd configtest``` to make sure it passes
the configuration test, and then you can safely restart the server for
the upgrade (in this example case).
* Channel mode +L now kicks in for any rejected join, so not just for +l but
also for +b, +i, +O, +z, +R and +k. If, for example, the channel is
+L #insecure and also +z then, when an insecure user ties to join, they
will be redirected to #insecure.
* New extended ban ~f to forward users to the specified channel if the ban
matches. Example: ```MODE #chan +b ~f:#badisp:*!*@*.isp.org```
* Channel mode +f now has a 'd' action: drop message. This will send an
error message to the user and not show the message in the channel but
otherwise do nothing (no kick or ban).
For example: ```MODE #chan +f [5t#d]:15``` will limit sending a maximum of
5 messages per 15 seconds per-user and drop any messages sent above that limit.
* Channel mode +f now has 'r' floodtype to prevent repeated lines. This will
compare the current message to the last message and the one before that
the user sent to the channel. If it's a repeat then the user can be
kicked (the default action), the message can be dropped ('d') or the
user can be banned ('b'). Example: ```MODE #chan +f [1r#d]:15```
If you want to permit 1 repeated line but not 2 then use: ```+f [2r#d]:15```
* New module **tkldb** (loaded by default): all *LINES and spamfilters are now
saved across reboots. No need for services for that anymore.
* New module **channeldb** (loaded by default): saves and restores all channel
settings including topic, modes, bans etc. of +P (persistent) channels.
* New module [restrict-commands](https://www.unrealircd.org/docs/Set_block#set::restrict-commands), which allows you to restrict any IRC
command based on criteria such as "how long is this user connected",
"is this user registered (has a services account)" etc.
The example.conf now ships with configuration to disable LIST the
first 60 seconds and disable INVITE the first 120 seconds.
If you are having spambot problems then tweaking this configuration
may be helpful to you.
* New option [set::require-module](https://www.unrealircd.org/docs/Set_block#set::require-module), which allows you to require certain
modules on other UnrealIRCd 5 servers, otherwise the link is rejected.
* New option [set::min-nick-length](https://www.unrealircd.org/docs/Set_block#set::min-nick-length) to set a minimum nick length.
* New module rmtkl (loaded by default): this allows you to remove TKL's
such as GLINEs easily via the /RMTKL command.
* The [reputation and connthrottle](https://www.unrealircd.org/docs/Connthrottle) modules are now loaded by default.
Just as a reminder, what these do is classifying your users in "known
users (known IP's)" and "unknown IP's" for IP's that have not been
seen before (or only for a short amount of time). Then, when there
is a connection flood, unknown/new IP addresses are throttled at
20 connections per minute, while known users are always allowed in.
* Add support for [defines and conditional configuration](https://www.unrealircd.org/docs/Defines_and_conditional_config) via @define and @if.
This is mostly for power users, in particular users who share the same
configuration file across several servers.
* New extban ~p to hide the part/quit message in PART and QUIT.
For example: ```MODE #chan +b ~p:*!*@*.nl```
* You will now see a warning when a server is not responding even
before they time out. How long to wait for a PONG reply upon PING
can be changed via [set::ping-warning](https://www.unrealircd.org/docs/Set_block#set::ping-warning) and defaults to 15 seconds.
If you see the warning frequently then your connection is flakey.
* Add new setting [set::broadcast-channel-messages](https://www.unrealircd.org/docs/Set_block#set::broadcast-channel-messages) which defines when
channel messages are sent across server links. The default setting
is *auto* which is the correct setting for pretty much everyone.
* Add new option [set::part-instead-of-quit-on-comment-change](https://www.unrealircd.org/docs/Set_block#set::part-instead-of-quit-on-comment-change):
when a QUIT message is changed due to channel restrictions, such as
stripping color or censoring a word, we normally change the QUIT
message. This has an effect on ALL channels, not just the one that
imposed the restrictions. While we feel that is the best tradeoff,
there is now also this new option (off by default) that will change
the QUIT into a PART in such a case, so the other channels that
do not have the restrictions (eg: are -S and -G) can still see the
original QUIT message.
* New module [webredir](https://www.unrealircd.org/docs/Set_block#set::webredir::url). Quite some people run their IRCd on port 443 or 80
so their users can avoid firewall restrictions in place. In such a case,
with this module, you can now send a HTTP redirect in case some user
enters your IRC server name in their browser. Eg https://irc.example.org/
can be made to redirect to https://www.example.org/
* We now protect against misbehaving SASL servers and will time out
SASL sessions after
[set::sasl-timeout](https://www.unrealircd.org/docs/Set_block#set::sasl-timeout),
which is 15 seconds by default.
Changed
--------
* Channel mode +L can now be set by chanops (+o and higher) instead of only
by +q (channel owner)
* Channel names must now be valid UTF8 by default.
We actually have 3 possible settings of [set::allowed-channelchars](https://www.unrealircd.org/docs/Set_block#set::allowed-channelchars):
* **utf8**: Channel must be valid UTF8, this is the new default
* **ascii**: A very strict setting, for example in use at freenode,
the channel name may not contain high ascii or UTF8
* **any**: A very loose setting, which allows almost all characters
in the channel name. This was the OLD default, up to and
including UnrealIRCd 4. It is no longer recommended.
For most networks this new default setting of utf8 will be fine, since
by far most IRC clients use UTF8 for many years already.
If you have a network that has a significant portion of chatters
that are on old non-UTF8 clients that use a specific character set
then you may want to use ```set { allowed-nickchars any; }```
Some Russian and Ukrainian networks are known to need this.
* The "except tkl" block is now called [except ban](https://www.unrealircd.org/docs/Except_ban_block#UnrealIRCd_5). If no type
is specified in an except ban { } block then we exempt the entry
from kline, gline, zline, gzline and shun.
* We no longer use a blacklist for stats (set::oper-only-stats).
We use a whitelist now instead: [set::allow-user-starts](https://www.unrealircd.org/docs/Set_block#set::allow-user-stats).
Most users can just remove their old set::oper-only-stats line,
since the new default set::allow-user-starts setting is fine.
* Windows: we now require a 64-bit version, Windows 7 or later.
The new program path is: C:\Program Files\UnrealIRCd 5
and the binaries have been moved to a new subdirectory: bin\
* Modules lost their m_ prefix, so for example m_map is now just map.
Also the modules in cap/ are now directly in modules.
* More modules that were previously PERM (permanent) can now be unloaded
and reloaded on the fly. This allows more "hotfixing" without restart
in case of a bug and also more control for admins at runtime.
Only <5 modules out of 173 are permanent now.
* User mode +T now blocks channel CTCPs as well.
* User mode +q (unkickable) could previously be set by any IRCOp.
This has been changed to require the self:unkickablemode operclass
permission. This is included in the *-with-override operclasses
(eg: netadmin-with-operoverride).
* [set::modes-on-join](https://www.unrealircd.org/docs/Set_block#set::modes-on-join) is now ```+nt``` by default.
* The [authprompt](https://www.unrealircd.org/docs/Authentication#How_it_looks_like) module is now loaded by default. This means that if
you do a soft kline on someone (eg: ```KLINE %*@*.badisp```) then the user
has a chance to [authenticate](https://www.unrealircd.org/docs/Authentication#How_it_looks_like) to services, even without SASL, and
bypass the ban if (s)he is authenticated.
* The WHOX module is now used by default. Previously it was optional.
WHOX enhances the "WHO" output, providing additional information to
IRC clients such as the services account that someone is using.
It is also more universal than standard WHO. Unfortunately this also
means the WHO syntax changed to something less logical.
* At many places the term *SSL* has been changed to *SSL/TLS* or *TLS*.
Configuration items (eg: set::ssl to set::tls) have been renamed
as well and so have directories (eg: conf/ssl to conf/tls).
The old configuration names still work and currently does NOT raise
any warning. Also, when upgrading an existing installation on *NIX,
the conf/tls directory will be symlinked to conf/ssl as to not break
any Let's Encrypt certificate scripts.
* It is now mandatory to have at least one open SSL/TLS port, otherwise
UnrealIRCd will refuse to boot. Previously this was a warning.
* IRCOps now need to use SSL/TLS in order to oper up, as the
[set::plaintext-policy::oper](https://www.unrealircd.org/docs/Set_block#set::plaintext-policy) default setting is now 'deny'.
Similarly, [set::outdated-tls-policy::oper](https://www.unrealircd.org/docs/Set_block#set::outdated-tls-policy) is now also 'deny'.
You can change this, if you want, but it is not recommended.
* [set::outdated-tls-policy::server](https://www.unrealircd.org/docs/Set_block#set::outdated-tls-policy) is now 'deny' as well, since all
servers should use reasonable SSL/TLS protocols and ciphers.
* The default generated certificated has been changed from RSA 4096 bits
to Elliptic Curve Cryptography "384r1". This provides the same amount
of security but at higher speed. This only affects the default self-
signed certificate. You can still use RSA certificates just fine.
* If you do use an RSA certificate, we now require it to be at least
2048 bits otherwise UnrealIRCd will refuse to boot.
* When matching [allow { } blocks](https://www.unrealircd.org/docs/Allow_block), we now always continue with the next
block (if any) if the password did not match or no password was
specified. In other words, allow::options::nopasscont is now the
default and we behave as if there was a ::wrongpasscont too.
* All snomasks are now oper-only. Previously some were not, which
was confusing and could lead to information leaks.
Also removed weird set::snomask-on-connect accordingly.
* The IRCd now uses hash tables that are resilient against hash table
attacks. Also, the hash tables have increased in size to speed things
up when looking up nick names etc.
* Server options in VERSION (eg: Fhin6OoEMR3) are no longer shown to
normal users. They don't mean much nowadays anyway.
* ```./Config``` now asks fewer questions and configure runs faster since
many unnecessary checks have been removed (compatibility with very
old compilers / systems).
* We now default to system libs (eg: ```--with-system-pcre2``` is assumed)
* Spamfilter should catch some more spam evasion techniques.
* All /DCCDENY and deny dcc { } parsing and checking is now moved to
the 'dccdeny' module.
* Windows: If you choose to run UnrealIRCd as a service then it now
runs under the low-privilege NetworkService account rather than
the high-privilege LocalSystem account.
Minor issues fixed
-------------------
* Specifying a custom OpenSSL/LibreSSL path should work now
Removed
--------
* Support for old server protocols has been removed.
This means UnrealIRCd 5.x cannot link to 3.2.x. It also means you need
to use reasonably new services. Generally, if your services can link to
4.x then they should be able to link to 5.x as well. More information
about this change and why it was done
[can be found here](https://www.unrealircd.org/docs/FAQ#old-server-protocol).
* Connecting with a server password will no longer send that password
to NickServ. Use [SASL](https://www.unrealircd.org/docs/SASL) instead!
* Extended ban ~R (registered nick): this was the old method to match
registered users. Everyone should use ~a (services account) instead.
* The old TRE **posix** regex method has been removed because the TRE
library is no longer maintained for over a decade and contains many
bugs. (It was already deprecated in UnrealIRCd 4.2.3).
Use type **regex** instead, which uses the modern PCRE2 regex engine.
* Timesync support has been removed. Use your OS time synchronization
instead. (Note that Timesync was already disabled by default in 2018)
* Changing time offsets via ```TSCTL OFFSET``` and ```TSCTL SVSTIME``` are no longer
supported. Use your OS time synchronization (NTP!). Adjustments via
TSCTL are simply not accurate enough.
* The *nopost* module was removed since it no longer serves any useful
purpose. UnrealIRCd already protects against these kind of attacks
via ping cookies ([set::ping-cookie](https://www.unrealircd.org/docs/Set_block#set::ping-cookie), enabled by default).
Deprecated
-----------
* The set::official-channels block is now deprecated. This provided a
mechanism to pre-configure channels that would have 0 members and
would appear in /LIST with those settings, but once you joined all
those settings would be gone. Rather confusing.
Since UnrealIRCd 4.x we have permanent channels (+P) and since 5.x
we store these permanent channels in a database so all settings are
saved every few minutes and across restarts.
Since permanent channels (+P) are much better, the official-channels
support will be removed in a later version. There's no reason to
use official-channels anymore.
Developers
-----------
* The module header is now as follows:
ModuleHeader MOD_HEADER
= {
"nameofmodule",
"5.0",
"Some description",
"Name of Author",
"unrealircd-5",
};
There's a new author field, the version must start with a digit,
and also the name of the module must match the loadmodule name.
So for example third/funmod must also be named third/funmod.
* The ```MOD_TEST```, ```MOD_INIT```, ```MOD_LOAD``` and ```MOD_UNLOAD``` functions no longer
take a name argument. So: ```MOD_INIT(mymod)``` is now ```MOD_INIT()```
* We now use our own BuildBot infrastructure, so Travis-CI and AppVeyor
have been removed.
* We now use a new test framework.
* ```Auth_Check()``` now returns ```1``` for allow and ```0``` on deny (!!)
* New function ```new_message()``` which should be called when a new message
is sent, or at least for all channel events. It adds (or inherits)
message tags like 'account', 'msgid', 'time', etc.
* Many send functions now take an extra MessageTag *mtags parameter,
including but not limited to: sendto_one() and sendto_server().
* Command functions (CMD_FUNC) have an extra ```MessageTag *mtags```,
on the other hand the ```cptr``` parameter has been removed.
* Command functions no longer return ```int``` but are ```void```,
the same is true for ```exit_client()```. ```FLUSH_BUFFER``` has been removed too.
All this is a consequence of removing this (limited) signaling
of client exits. From now on, if you call ```exit_client()``` it will free
a lot of the client data and exit the user (close socket, send [s]quit),
but it will **not free 'sptr' itself**, so you can simply check if some
upstream function killed the client by checking ```IsDead(sptr)```.
This is highly recommended after running ```do_cmd()``` or calling other
functions that could kill a client. In which case you should return
rather than continue doing anything with ```sptr```.
Ultimately, in the main loop, the client will be freed (normally in less than 1 second).
* New single unified ```sendto_channel()``` and ```sendto_local_common_channels()```
functions that are used by all the channel commands.
* Numerics should now be sent using ```sendnumeric()```. There's also
a format string version ```sendnumericfmt()``` in case you need it,
in which case you need to pass the numeric format string yourself.
In such a case, don't forget the colon character, like ":%s", where needed.
* The parameters in several hooks have changed. Many now have an
extra ```MessageTag *mtags``` parameter. Sometimes there are other changes
as well, for example ```HOOKTYPE_CHANMSG``` now has 4 extra parameters.
* You can call do_cmd() with NULL mtags. Usually this is the correct way.
* If you used ```HOOKTYPE_PRE_USERMSG``` to block a message then you
should now use ```HOOKTYPE_CAN_SEND_TO_USER```. Similarly, the hook
```HOOKTYPE_CAN_SEND``` which deals with channels is now called
```HOOKTYPE_CAN_SEND_TO_CHANNEL```. Some other remarks:
* You CANNOT use HOOKTYPE_PRE_USERMSG anymore.
* The hooks require you to set an error message if you return HOOK_DENY.
* You should not send an error message yourself from these hooks.
In other words: do not use sendnumeric(). This is done by the
hook caller, based on the error message you return.
* Thanks to this, all rejecting of user messages now use generic
numeric 531 and all rejecting of channel messages use numeric 404.
See also under *Client protocol* later in this document.
* If you use CommandOverrideAddEx() to specify a priority value (rare)
then be aware that in 5.0.1 we now use the 4.0.x behavior again to
match the same style of priorities in hooks: overrides with the
lowest priority are run first.
* If you ever send a timestamp in a printf-like function, such as
in ```sendto_server()```, then be sure to use ```%lld``` and cast the timestamp
to *long long* so that it is compatible with both *NIX and Windows.
Example: ```sendnotice(sptr, "Timestamp is %lld", (long long)ts);```
* ```EventAdd()``` changed the order of parameters and expects every_msec now
which specifies the time in milliseconds rather than seconds. This
allows for additional precision, or at least multiple calls per second.
The minimum allowed every_msec value is 100 at this time.
The prototype is now: ```EventAdd(Module *module, char *name,
vFP event, void *data, long every_msec, int count);```
* New ```HOOKTYPE_IS_HANDSHAKE_FINISHED```. If a module returns ```0``` there, then
the ```register_user()``` function will not be called and the user will
not come online (yet). This is used by CAP and some other stuff.
Can be useful if your module needs to "hold" a user in the registration
phase.
* The function ```is_module_loaded()``` now takes a relative path like
"usermodes/noctcp" because with just "ctcp" one could not see the
difference between usermodes/noctcp and chanmodes/noctcp.
* ```CHFL_CHANPROT``` is now ```CHFL_CHANADMIN```, ```is_chanprot()``` is now ```is_chanadmin()```
* All hash tables now use [SipHash](https://en.wikipedia.org/wiki/SipHash), which is a hash function that is
resilient against hash table attacks. If you, as a module dev, too
use any hash tables anywhere (note: this is quite rare), then you
are recommended to use our functions, see the functions siphash()
and siphash_nocase() in src/hash.c.
* The random generator has been updated to use [ChaCha](https://en.wikipedia.org/wiki/Salsa20#ChaCha20_adoption) (more modern).
* You can now save pointers and integers etc. across rehashes by using
```LoadPersistentPointer()``` and ```SavePersistentPointer()```. For an example,
see ```src/modules/chanmodes/floodprot.c``` how this can be used.
Note that there can be no struct or type changes between rehashes.
* New ModData types: ```MODDATA_LOCALVAR``` and ```MODDA_GLOBALVAR```. These are
settings or things that are locally or globally identified by the
variable name only and not attached to any user/channel.
* Various files have been renamed. As previously mentioned, the m_
prefix was dropped in ```src/modules/m_*.c```. Similarly the s_ prefix
was dropped in ```src/s_*.c``` since it no longer had meaning. Also some
files have been deleted and integrated elsewhere or renamed to
have a name that better reflects their true meaning.
Related to this change is that all command functions are now called
```cmd_name``` rather than ```m_name```.
* ```HOOKTYPE_CHECK_INIT``` and ```HOOKTYPE_PRE_LOCAL_CONNECT```
have their return value changed. You should now return ```HOOK_*```, such
as ```HOOK_DENY``` or ```HOOK_CONTINUE```.
Server protocol
----------------
* UnrealIRCd 5 now assumes you support the following PROTOCTL options:
```NOQUIT EAUTH SID NICKv2 SJOIN SJ3 NICKIP TKLEXT2```.
If you fail to use ```SID``` or ```EAUTH``` then you will receive an
error. For the other options, support is *assumed*, no warning or
error is shown when you lack support. These are options that most,
if not all, services support since UnrealIRCd 4.x so it shouldn't be
a problem. More information [here](https://www.unrealircd.org/docs/FAQ#old-server-protocol)
* ```PROTOCTL MTAGS``` indicates that the server is capable of handling
message tags and that the server can cope with 4K lines. (Note that
the ordinary non-message-tag part is still limited to 512 bytes).
* Pseudo ID support in SASL was removed. We now use real UID's.
This breaks services who rely on the old pseudo ID format.
Client protocol
----------------
* Support for message tags and other IRCv3 features. See the IRCv3
specifications for more details.
* When a message is blocked, for whatever reason, we now use a generic
numeric response: ```:server 531 yourname targetname :reason``` for the block
This replaces all the various NOTICEs, ```ERR_NOCTCP```, ```ERR_NONONREG```, etc.
with just one single numeric.
The only other numerics that you may still encounter when PM'ing are
```ERR_NOSUCHNICK```, ```ERR_TOOMANYTARGETS``` and ```ERR_TARGETTOOFAST```, which are
generic errors to any command involving targets. And ```ERR_SERVICESDOWN```.
Note that channel messages already had a generic numeric for signaling
blocked messages for a very long time, ```ERR_CANNOTSENDTOCHAN```.
* The 271 response to the SILENCE command is now:
```:server 271 yournick listentry!*@*```
Previously the nick name appeared twice, which was a mistake.
* The 470 numeric, which is sent on /JOIN #channel redirect to #redirect
now uses the following format:
```:server 470 yournick #channel #redirect :[Link] Cannot join channel...etc..```
* Clients are recommended to implement and enable the
[server-time](https://ircv3.net/specs/extensions/server-time-3.2)
extension by default. When enabled, channel history is played back
on-join (if any) when the channel has channel mode +H.
Otherwise your users will not see channel history.
-979
View File
@@ -1,979 +0,0 @@
See doc/RELEASE-NOTES for the latest release notes.
This file (doc/RELEASE-NOTES.old) contains the release notes
of OLDER releases for historical purposes.
==[ CHANGES BETWEEN 4.0.17 AND 4.0.18 ]==
Enhancements:
* Support for checking IPv6 addresses in DNS blacklists
* For SSL/TLS we now set the default ECDH(E) curves to be
X25519:secp521r1:secp384r1:prime256v1 if using a recent version of
OpenSSL/LibreSSL. This can be overridden via set::ssl::ecdh-curve.
* The blacklist module now checks WEBIRC users as well.
* You can now require SASL for all clients via the allow block via:
allow { ip *; class clients; maxperip 2; options { sasl; }; };
This can be useful for a special sasl-only server which, for example,
only permits proxies and tor clients. In a future release the feature
will be made more flexible so it can be used for other purposes
as well.
Major issues fixed:
* A number of (potential) security issues were fixed:
* Memory leaks: this could allow an attacker to slowly consume all
available memory and ultimately cause UnrealIRCd to crash.
* Out of bounds read: in practice this does not seem to be
exploitable due to the many restrictions that are imposed.
* Compile issues on macOS
* Bug in blacklist module which could have caused false negatives,
allowing bad guys in which should have been denied.
* The new optional feature 'set::cloak-method ip' caused identical cloaks
Minor issues fixed:
* When using '/REHASH -ssl' or './unrealircd reloadtls' it did not reload
the SSL certificate/key if you were using ssl-options in listen, sni or
link blocks. In short: it only reloaded the ones from set::ssl until now.
* m_ircops sent a conflicting numeric, confusing some clients.
* Starting UnrealIRCd through a non-interactive(!) ssh session could cause
the ssh session to hang.
* An upgrade issue with non-system cURL causing compile problems.
Other changes:
* The built-in time synchronization feature is now disabled by default.
TimeSynch was added back in 2006 when lots of operating systems did not
ship with time synchronization turned on by default. Since incorrect time
severely breaks IRC networks this was a major problem. Nowadays this is
completely different with most Linux distro's, OS X, Windows, etc. doing
time synchronization out of the box. Since UnrealIRCd's implementation is
less precise and lacks authentication it's best left over to the system.
You can still re-enable timesynch via:
set { timesynch { enabled yes; }; };
.. but you should really use NTP or similar for system-wide time
synchronization instead.
* For developers there's now the --with-werror compile option which will
add -Werror.
* Added a lot more Travis-CI tests: various LibreSSL/OpenSSL versions
and also test macOS. This to prevent us from releasing broken stuff.
* Various code cleanups to get rid of lots of needless casts and to
eliminate compiler warnings.
* Just as a reminder (this change was already in version 4.0.17):
UnrealIRCd will no longer give user mode +z to users on WEBIRC
gateways using SSL/TLS IRC, unless the WEBIRC gateway gives us
some assurance that the client<->webirc gateway connection is
also secure (eg: https).
This is the regular WEBIRC format:
WEBIRC password gateway hostname ip
This indicates a secure client connection (NEW):
WEBIRC password gateway hostname ip :secure
Naturally, WEBIRC gateways MUST NOT send the "secure" option if
the client is using http or some other insecure protocol.
Module coders:
* HOOKTYPE_CHANNEL_SYNCED prototype changed, the 'merge' and 'removetheirs'
is now no longer an 'unsigned short' but an 'int' instead.
* HOOKTYPE_MODE_DEOP prototype changed, the 'modechar' is now no longer
a 'char' but an 'int' instead.
* In addition to safestrdup() there's now also safestrldup() which allows
you to specify a maximum allocated length (so including the nul byte).
This is used in m_pass.c and m_topic.c.
* New hook HOOKTYPE_CAN_BYPASS_CHANNEL_MESSAGE_RESTRICTION
https://www.unrealircd.org/docs/Dev:Hook_API#HOOKTYPE_CAN_BYPASS_CHANNEL_MESSAGE_RESTRICTION
Future versions:
* We intend to change the default plaintext oper policy from 'warn' to 'deny'
later this year. This will deny /OPER when used from a non-SSL connection.
For security, IRC Operators should really use SSL/TLS!
==[ CHANGES BETWEEN 4.0.16.1 AND 4.0.17 ]==
Enhancements:
* Two optional modules. These are not loaded by default. To use them,
include modules.optional.conf, or add these loadmodule lines:
loadmodule "extbans/timedban";
loadmodule "extbans/msgbypass";
* Timed bans: ~t:duration:mask
These are bans that are automatically removed by the server.
The duration is in minutes and the mask can be any ban mask.
Some examples:
* A 5 minute ban on a host:
+b ~t:5:*!*@host
* A 5 minute quiet ban on a host (unable to speak):
+b ~t:5:~q:*!*@host
* An invite exception for 1440m/24hrs
+I ~t:1440:*!*@host
* A temporary exempt ban for a services account
+e ~t:1440:~a:Account
* Allows someone to speak through +m for the next 24hrs:
+e ~t:1440:~m:moderated:*!*@host
* And any other crazy ideas you can come up with...
* New ban exception ~m:type:mask which allows bypassing of message
restrictions. Valid types are: 'external' (bypass +n),
moderated (bypass +m/+M), 'censor' (bypass +G),
'color' (bypass +S/+c) and 'notice' (bypass +T).
Some examples:
* Let LAN users bypass +m: +e ~m:moderated:*!*@192.168.*
* Let ops in #otherchan bypass +m: +e ~m:moderated:~c:@#otherchan
* Make GitHub commit bot bypass +n: +e ~m:external:*!*@ipmask
* Allow a services account to use color: +e ~m:color:~a:ColorBot
* Timedban support in +f [5t#b2]:10 (set 2 minute ban on text flood).
This is only available if the previously mentioned extbans/timedban
module is loaded.
* Added experimental UTF8 support in set::allowed-nickchars
See https://www.unrealircd.org/docs/Nick_Character_Sets
Example: set { allowed-nickchars { latin-utf8; }; };
Important remarks:
* All your servers must be on UnrealIRCd 4.0.17 (or later)
* Most(?) services do not support this, so users using UTF8 nicknames
won't be able to register at NickServ.
* In set::allowed-nickchars you must either choose an utf8 language
or a non-utf8 character set. You cannot combine the two.
* You also cannot combine multiple scripts/alphabets, such as:
latin, greek, cyrillic and hebrew. You must choose one.
* If you are already using set::allowed-nickchars on your network
(eg: 'latin1') then be careful when migrating (to eg: 'latin-utf8'):
* Your clients may still assume non-UTF8
* If users registered nicks with accents or other special characters
at NickServ then they may not be able to access their account
after the migration to UTF8.
* There is no CASEMAPPING or "visually identical character"-checking.
Just like in the old (non-utf8) charsys this means there is no
lower/uppercase checking for allowed-nickchars nicks. So a nick with
"O with accent" can be online at the same time as "o with accent".
They are treated as two different users.
The identical character looking issue is particular noticeable in
cyrillic script where for example cyrillic "A" looks identical to
latin "A" and thus can be used to impersonate a user.
Improved CASEMAPPING and "visually similar character"-checking is
part of ongoing research at the IRCv3 working group.
* Ability to customize the reject connection messages:
set {
reject-message {
password-mismatch "Password mismatch";
too-many-connections "Too many connections from your IP";
server-full "This server is full.";
unauthorized "You are not authorized to connect to this server";
};
};
* Added optional AppArmor profile in extras/security/apparmor/unrealircd
See https://www.unrealircd.org/docs/Using_AppArmor_with_UnrealIRCd
Major issues fixed:
* Crash when using OperOverride (*NIX only)
* Crash if linking anope with the 'unreal' module from a non-localhost
SSL connection. This is rarely done but also acts as a reminder that
people should really use the 'unreal4' module in anope (2.0.3+).
Minor issues fixed:
* set::restrict-extendedbans was not effective for stacked bans
* linking if only using link::outgoing caused a 'server name mismatch'
Other:
* UnrealIRCd will no longer give user mode +z to users on WEBIRC
gateways using SSL/TLS IRC, unless the WEBIRC gateway gives us
some assurance that the client<->webirc gateway connection is
also secure (eg: https).
This is the regular WEBIRC format:
WEBIRC password gateway hostname ip
This indicates a secure client connection (NEW):
WEBIRC password gateway hostname ip :secure
Naturally, WEBIRC gateways MUST NOT send the "secure" option if
the client is using http or some other insecure protocol.
Module coders:
* New hook HOOKTYPE_CAN_BYPASS_CHANNEL_MESSAGE_RESTRICTION
https://www.unrealircd.org/docs/Dev:Hook_API#HOOKTYPE_CAN_BYPASS_CHANNEL_MESSAGE_RESTRICTION
==[ CHANGES BETWEEN 4.0.16 AND 4.0.16.1 ]==
An interim release with a couple of backported fixes:
* Fix hang in (outgoing) server linking
* Fix crash when linking anope over SSL from non-localhost
* '/SPAMFILTER del <id>' did not remove the spamfilter on other servers
* set::restrict-extendedbans was not always applied (when stacked)
* Update automated build scripts
==[ CHANGES BETWEEN 4.0.15 AND 4.0.16 ]==
This is a major release with lots of new features and changes.
Enhancements:
* There's now an easy method to remove spamfilters:
'/SPAMFILTER del' will show a list of spamfilters along
with the appropriate command to remove them (by id).
* CAP v3.2 support.
* CAP 'cap-notify': notify users of any CAP changes.
* CAP 'extended-join': show account and gecos in JOIN.
* CAP 'chghost': notify on user/host changes.
Note that if you use set::allow-userhost-change force-rejoin
then clients which support CAP 'chghost' will not see the
PART+JOIN+MODE sequence as it is unnecessary. They already receive
a "CHGHOST" message as part of CAP 'chghost' instead.
* Updated CAP 'sasl' to specification 3.2 (includes mechlist).
* Automatically discover SASL server if saslmechlist is sent by services
and set::sasl-server is not set by the administrator. This should
help to get more networks to support SASL automatically (if you
run up to date services, of course)
* We send "CAP DEL sasl" if set::sasl-server squits and a "CAP NEW"
message when the server returns (to cap-notify and CAPv3.2 clients).
* Added password::type 'spkifp'. It's similar to 'sslclientcertfp' but
is a hash based on the public TLS key rather than the certificate.
The benefit of this is that the 'spkifp' can stay the same even if
you get a new certificate from Let's Encrypt. Note that 'certbot'
does not re-use keys by default so you will still get a different
spkifp every 60-90 days. Consider using another (3rd party) client
or tell the certbot guys to finally implement --reuse-key at
https://github.com/certbot/certbot/issues/3788
* The command './unrealircd spkifp' will output the SPKI fingerprint
* New option set::handshake-delay will delay the handshake (when a
user is connecting) up to this amount of time.
* If you have any blacklist { } block then UnrealIRCd will set an
set::handshake-delay of 2 seconds by default. This will allow (most)
DNSBL checking to be finished before the user comes online, while
still allowing a smooth user experience.
If your DNS(BL) is slow then you could raise this setting slightly.
* You can now have multiple webirc { } blocks with the same mask.
This permits multiple blocks like..
webirc {
mask *;
password "....." { sslclientcertfp; };
};
..should you need it.
In other words: we don't stop matching upon an authentication failure.
* Move CONNECTTIMEOUT to set::handshake-timeout and document it at
https://www.unrealircd.org/docs/Set_block#set::handshake-timeout
* Move MAXUNKNOWNCONNECTIONSPERIP to set::max-unknown-connections-per-ip
https://www.unrealircd.org/docs/Set_block#set::max-unknown-connections-per-ip
* Add set { cloak-method ip; }; which will make cloaking only be done
on the IP and thus result in an XX.YY.ZZ.IP cloaked host.
This so you can have "IP cloaking" without disabling DNS lookups.
GLINES on hosts still work and IRCOps (and yourself) can still see
the host in /WHOIS.
* New option set { ban-include-username yes; }; which will make bans
placed by spamfilters (and some other systems) to be placed not on *@ip
but on user@ip. Note that this won't work for ZLINE/GZLINE since no
no ident/username lookups are done in such cases.
Major issues fixed:
* None
Minor issues fixed:
* Gracefully handle incorrect server-to-server messages. These no longer
cause UnrealIRCd to crash. Note that this does not mean you can now
go send random RAW messages from a trusted server connection. Doing so
can cause desynchs, KILLs and SQUITs. We just try not to crash anymore.
* A small memory leak upon 'DNS i' (IRCOp only command)
Removed:
* Various old config.h settings that didn't have any effect.
* A few config.h settings that should never be turned off have been
removed altogether (eg: NO_FLOOD_AWAY is now always on).
* The deprecated and unused commands "CAP CLEAR" and "CAP ACK".
Other changes:
* When linking servers and not having any certificate validation,
UnrealIRCd will give you specific instructions on how to use
password::spkifp or verify-certificate. This to fix a possible
Man-in-the-Middle attack. Note that you'll only see this message
when linking two servers that are 4.0.16+.
* When a user does a nick change from a registered nick you will
now see the user mode -r. Previously this happened invisibly.
* The default oper snomask now includes 'S' (spamfilter notices).
* The shipped PCRE2 library has been upgraded to 10.30
Module coders:
* API change for HOOKTYPE_PRE_INVITE:
(aClient *sptr, aClient *target, aChannel *chptr, int *override)
Modules must now send the error message instead of only returning
HOOK_DENY. Also check for operoverride and set *override=1.
* Please use the following procedure in case of an user/host change:
userhost_save_current(acptr);
/* now do what you need to do: like change username or hostname */
userhost_changed(acptr);
This function will take care of notifying other clients about
the userhost change, such as doing PART+JOIN+MODE if force-rejoin
is enabled, and sending :xx CHGHOST user host messages to
"CAP chghost" capable clients.
Services coders:
* If you provide SASL then please send the mechlist like this:
MD client your.services.server saslmechlist :EXTERNAL,PLAIN
* Don't forget to send an EOS (End Of Synch) as part of the handshake,
if you are not doing so already. It's important:
:your.services.server EOS
==[ CHANGES BETWEEN 4.0.14 AND 4.0.15 ]==
Major issues fixed:
* Fix remotely triggerable crash issue in handshake. This allows a user
to crash an UnrealIRCd server, even those with restrictions such as
password protected hubs.
* Fix another remotely triggerable crash issue. This one requires the
user to connect, join a channel and have channel operator privileges.
==[ CHANGES BETWEEN 4.0.13 AND 4.0.14 ]==
Enhancements:
* New set::plaintext-policy configuration settings. This defines what
happens to users/ircops/servers that are not using SSL/TLS.
The default settings are:
set {
plaintext-policy {
user allow; /* allow any user to connect */
oper warn; /* warn on /OPER if not using SSL/TLS */
server deny; /* deny servers without SSL/TLS, except localhost */
};
};
You can change each of the three classes to 'allow', 'warn' or 'deny'.
See: https://www.unrealircd.org/docs/Set_block#set::plaintext-policy
If your services do not run on localhost and link without SSL/TLS
then you may get an error during linking. In such a case check out:
https://www.unrealircd.org/docs/FAQ#ERROR:_Servers_need_to_use_SSL.2FTLS
* You can now ask UnrealIRCd to verify certificates of server links by:
link irc1.test.net {
[..]
verify-certificate yes;
};
This will verify the certificate of the link, making sure it is valid,
issued for the specified name (irc1.test.net) and given out by a
trusted Certificate Authority (like Let's Encrypt).
Obviously, if you use self-signed certificates then you can't use this.
* Introduce a concept called "link security level". This will rate the
security of your network from 0 to 2. Whenever security is degraded
due to a new server link UnrealIRCd will print a warning about it.
See https://www.unrealircd.org/docs/Link_security
This also adds a new command /LINKSECURITY (IRCop-only).
* The plaintext-policy and link-security is shown in "CAP LS".
Major issues fixed:
* None
Minor issues fixed:
* If you had a link block named irc1.example.net and did an outgoing
connect to that server, then the server could introduce himself under
a different name, such as irc1.other.net. Not a security issue, since
all authentication has to be passed, but this could cause confusing
autoconnect attempts.
* password::sslclientcert did not accept relative paths
* Compile problem with LibreSSL (regarding SSL_CTX_get0_param)
* set::modes-on-connect: was refusing certain (old) modes like +N
Other changes:
* The ssl options 'verify-certificate' and 'no-self-signed' have been
removed. Use link::verify-certificate instead. It makes no sense to
verify certificates or prevent self signed certificates elsewhere
such as in vhost or oper, since there is no hostname to match against.
* Weak cipher suites such as 3DES and RC4 are disabled by default but
previously you could still enable them through set::ssl::ciphers.
Now you can no longer, since there is no legitimate reason to do so.
* Update cipher suite to work with TLS 1.3. This ensures you can use
TLS 1.3 in UnrealIRCd 4.0.14+ when OpenSSL supports it (in the future).
* Bump MODDATA_MAX_CLIENT from 8 to 12: needed if you have a lot of
3rd party modules loaded. Also moved MODDATA_MAX_* to include/config.h
Module coders:
* You can now attach ModData to server objects as well (including &me).
* Please do not use UmodeDel, CmdoverrideDel and any other *Del()
functions from MOD_UNLOAD. These undocumented functions are unnecessary
since 2008 or so. UnrealIRCd takes care of unloading all module objects.
It can cause a crash if someone unloads the module in UnrealIRCd 4
(more specifically: double free if unloading modules which use ModData).
Attempts to use these functions in future UnrealIRCd versions may result
in a compile error.
==[ CHANGES BETWEEN 4.0.12 AND 4.0.13 ]==
Enhancements:
* Support for Strict Transport Security (draft/sts).
See: https://www.unrealircd.org/docs/SSL/TLS#Strict_Transport_Security
* Support for Server Name Indication (SNI):
See: https://www.unrealircd.org/docs/Sni_block
* Add conf/modules.optional.conf. This loads all additional modules
that are not in modules.default.conf (m_ircops, m_staff, nocodes,
textban, hideserver, antirandom and websocket)
Major issues fixed:
* 'simple' spamfilters ended up being 'posix' after server linking.
* User mode +Z (secureonly) not working properly across server links.
* REHASH from WebSocket connection would cause a crash (requires IRCOp
privileges)
Minor issues fixed:
* We now prevent /OPER for oper blocks with a non-existant operclass
* Bump MAXCONNECTIONS for Windows, allowing you to hold more clients.
* The 'ban too broad' checking was broken. This permitted glines such
as 192.168.0.0/1 being set. Now it rejects CIDR of /15 and lower.
To disable this safety measure you can (still) use:
set { options { allow-insane-bans; }; };
Other changes:
* The websocket module now no longer sends \r\n in the websocket
data and no longer requires it on incoming messages (but you
can still send it if you like). Also version bumped to 1.0.0.
* Mark all shipped modules as official (non-3rd-party)
* Verify certificate when submitting crash reports
* Support --without-privatelibdir for packagers
* CACERT has been removed from curl-ca-bundle
Module coders:
* CAP API changes:
* The cap->visible(void) callback is now cap->visible(aClient *)
* There is a new cap->parameter(aClient *) callback function,
see the cap/sts module for how it can be used.
* Various updates to subfunctions to pass 'sptr' (due to the above),
including clicap_find(sptr, ...)
* New CLICAP_FLAGS_ADVERTISE_ONLY flag (CAP cannot be REQ'd)
==[ CHANGES BETWEEN 4.0.11 AND 4.0.12 ]==
Enhancements:
* New user mode +Z: Only allow SSL/TLS users to private message you.
* Ability to hide all channels in /LIST that you cannot join due to
deny channel blocks: set { hide-list { deny-channel }; };
* The optional 'nocodes' module which you can load will make +S/+c
also block/strip bold, underline and italic text. (The latter is new)
* Add support for 'mask' in allow channel { } and deny channel { }
and add some support for negative 'mask'. Probably not very useful
on most networks with services since bans/AKICK do the same, but:
deny channel { channel "#help*"; };
allow channel { channel "#help-nolan"; mask !192.168.*; };
allow channel { channel "#help-lan"; mask 192.168.*; };
Major issues fixed:
* Crash issue if a module using ModData was unloading (not reloading)
* Vhosts were not always correctly synched across servers.
* The maximum number of clients that a server could accept was decreased
by one on every linking attempt if it was both: 1) an outgoing
SSL/TLS linking attempt; AND 2) the error was "Connection refused".
Minor issues fixed:
* Adjustments to channel mode +f were not always effective.
* If you have a vhost set and wish to remove it and change to a cloaked
host you can now safely use '/MODE yournick -t'. This feature was
rarely used so far and it previously had a bug which caused it to
still expose the real host/IP to others. This has been resolved.
* Channel mode +D (delayjoin): when people are de-oped we now part
'hidden' users to avoid a client desynch.
* Bump lag for remote MOTD requests to avoid flooding.
Other changes:
* More than 95% of the crashes reported to us are due to 3rd party
modules (and thus not bugs in our code). We now ask users to unload
any recently installed 3rd party modules first, see if the crash
issue persists, and only then submit a crash report to us.
* UnrealIRCd will now refuse to run as root
https://www.unrealircd.org/docs/Do_not_run_as_root
Module coders:
* Added two functions to search for user modes:
has_user_mode(acptr, 'i') // returns 1 / 0
find_user_mode('i') // returns the user mode (as 'long')
==[ UNREALIRCD 4 INTRODUCTION ]==
UnrealIRCd 4 is here!
We have been working hard over the past few years to replace the successful
3.2.x series with a more modern code base. At the same time we have been
incorporating requests from our bug tracker, ideas from ourselves and
many suggestions that came up during the UnrealIRCd survey from Q4 2013.
UnrealIRCd is far more modular and configurable than before. For a brief
overview of what's new in UnrealIRCd 4 have a look at:
https://www.unrealircd.org/docs/What's_new_in_UnrealIRCd_4
==[ DOCUMENTATION ]==
All documentation has been moved to our wiki:
* Documentation: https://www.unrealircd.org/docs/
* FAQ: https://www.unrealircd.org/docs/FAQ
Be sure not to use any other (older) documentation as it isn't fully
compatible with UnrealIRCd 4. In particular, do NOT use unreal32docs*html.
==[ UPGRADING FROM 3.2.x ]==
If you are upgrading from 3.2.x then there are three important things to know:
1) NEW FILE LOCATIONS
In UnrealIRCd 4 the location of the configuration files and other files have
been changed. On *NIX the directory where you compile the IRCd from
(previously 'Unreal3.2.X', now 'unrealircd-4.0.X') is no longer the same as
the directory where the IRCd will be running from.
By default the IRCd is installed to /home/yourusername/unrealircd on *NIX
On Windows UnrealIRCd will install to C:\Program Files (x86\UnrealIRCd 4
The new directory structure is as follows (both on Windows and *NIX):
conf/ contains all configuration files
logs/ for log files
modules/ all modules (.so files on *NIX, .dll files on Windows)
2) CONFIGURATION FILE CHANGES
There have also been changes in various configuration blocks and settings.
Don't worry, UnrealIRCd can convert your existing 3.2.x configuration files
to UnrealIRCd 4 format. There's no need to start from scratch.
Please read https://www.unrealircd.org/docs/Upgrading_from_3.2.x !!
3) THIRD PARTY MODULES
If you are using 3rd party modules then they will need an update to run on
UnrealIRCd 4. Due to the many core changes in UnrealIRCd 4 it was simply
impossible to make 3.2.x modules work out-of-the-box on 4.x.
Contact your developer for a new version or ask on our Modules forum where
someone may be kind enough to convert the module for you if you ask nicely:
https://forums.unrealircd.org/viewforum.php?f=52
==[ END OF THE 3.2.X SERIES ]==
UnrealIRCd 3.2.x is no longer supported after December 31, 2016.
See https://www.unrealircd.org/docs/UnrealIRCd_3.2.x_deprecated
==[ SUPPORT ]==
Before you seek support, please check our documentation and FAQ:
* https://www.unrealircd.org/docs/Main_Page
* https://www.unrealircd.org/docs/FAQ
For support you have two choices:
* Forums: https://forums.unrealircd.org/
* IRC: irc.unrealircd.org / #unreal-support
==[ CHANGES BETWEEN 4.0.10 AND 4.0.11 ]==
Major issues fixed:
* Fix crash issue that can be triggered by regular users
* Fix crash if TOPIC_NICK_IS_NUHOST is enabled (rarely enabled)
* Fix crash if services send an incorrect raw command
Minor issues fixed:
* Now properly support 'z' when used in set::modes-on-join
Other changes:
* Show a warning if you don't have any SSL listeners
==[ CHANGES BETWEEN 4.0.9 AND 4.0.10 ]==
Improvements:
* Added "websocket" module. This provides support for WebSocket (RFC6455),
allowing JavaScript (internet browsers) to connect directly to IRC
without the need of a "gateway". This module is experimental and not
loaded by default. See https://www.unrealircd.org/docs/WebSocket_support
for more information on the module. For a very crude client example check
https://www.unrealircd.org/files/dev/ws/websocket_unrealircd.html
This module was sponsored by Aberrant Software Inc.
* UnrealIRCd already has the ability to configure SSL settings via the
set::ssl block. Now you can also override these settings for a link block
and listen block. One possible use for this would be having a long-lived
self-signed certificate for server linking on a serversonly port, and
a short-lived certificate for your users on the other ports (such as
a certificate from Let's Encrypt).
Another example would be to force TLSv1.2 for server linking but not
for users. Etc. Etc.
General settings (already existed) are in the set::ssl block:
https://www.unrealircd.org/docs/Set_block#set::ssl::certificate
Per-port settings go via listen::ssl-options:
https://www.unrealircd.org/docs/Listen_block
Per-link block settings go via link::outgoing::ssl-options:
https://www.unrealircd.org/docs/Link_block
* You can now exempt IP's from (DNSBL) blacklist checking via:
except blacklist { mask 1.2.3.4; };
* All free modules from vulnscan.org (by Syzop) are now included in
UnrealIRCd itself. Note that only the "privdeaf" and "jumpserver" modules
are loaded by default. The others you will need to load explicitly.
The new modules are:
* extbans/textban - Channel specific word filter (+b ~T:censor:*badword*)
https://www.unrealircd.org/docs/Extended_Bans
* usermodes/privdeaf - Do not permit PM's from others (User Mode +D)
* jumpserver - Redirect users to another server during maintenance
www.unrealircd.org/docs/User_%26_Oper_commands#JUMPSERVER
* antirandom - Detect drones with random nicks / ident / etc.
https://www.unrealircd.org/docs/Set_block#set::antirandom
* hideserver - Hide servers in /MAP and /LINKS
(Note that this does not truly enhance security)
* m_ircops - Show which ircops are online (/IRCOPS command)
* m_staff - Show custom file (/STAFF command)
* nocodes - Makes chanmode +S/+c also strip/block bold and underline
Major issues fixed:
* Incorrect bans being added during server linking
* Compile fixes for Ubuntu 16 LTS / gcc 5.4.x
* Crash if you had an invalid crypt password in your unrealircd.conf
* Crash if you did not load the chanmodes/nocolor module or changed
the order in which modules were loaded
Minor issues fixed:
* Delayjoin (channel mode +D) sending QUITs for hidden users, double JOIN, ..
* You no longer need to place 'class' blocks before 'allow' blocks
* Some error messages were not throttled
* WHO now supports multi-prefix
* Date in Windows log file for the first few messages was always 1970.
For services and module coders:
* Services coders: "SVSMODE Nick +d" will now mark a client as deaf.
Don't confuse this with "SVSMODE Nick +d <svid>". The parameter
makes all the difference.
* Module coders: changed return value handling of HOOKTYPE_RAWPACKET_IN
-1 indicates to stop parsing (return) and 0 indicates don't parse but
proceed to next packet. If you kill a client in this hook then be
sure to return -1.
==[ CHANGES BETWEEN 4.0.8.4 AND 4.0.9 ]==
* Fix "ghost" bug which could cause annoyed users and a memory leak
in UnrealIRCd. For more information see
https://forums.unrealircd.org/viewtopic.php?f=1&t=8625
==[ CHANGES BETWEEN 4.0.8 AND 4.0.8.4 ]==
* Fix build on FreeBSD with clang / without gcc
* If using remote includes and system curl not available then
install it during ./Config and no longer use /home/xyz/curl.
* More fixes for self-compiled remote includes
* Fix build if --with-system-cares is specified explicitly (which
is unnecessary anyway, as system c-ares this is auto-detected).
* More build fixes for older GCC compilers
==[ CHANGES BETWEEN 4.0.7 AND 4.0.8 ]==
Improvements:
* *NIX: As part of defense-in-depth UnrealIRCd now compiles with
several hardening options by default. This makes several type of
exploits more difficult and in some cases even impossible.
Tech: this enables full RELRO (GOT and PLT being read-only),
everything compiled as PIE making ASLR possible, stack protector
canaries are added, etc.
* Windows: releases are now signed. If you download the UnrealIRCd
installer you will no longer see "Unknown publisher" but rather
"Open Source Developer, Bram Matthys". Similarly all the EXE and
DLL module files have been signed which should make it easy for
anti virus software to see if something is an official UnrealIRCd
release file or not.
Major issues fixed:
* Possible crash if you have several blacklist blocks
Minor issues fixed:
* User mode +d (deaf) did not work
Other changes:
* We've always printed big warnings when running UnrealIRCd as root.
In this version we still do, but in future versions we will simply
refuse to boot. https://www.unrealircd.org/docs/Do_not_run_as_root
* System c-ares is preferred over our own shipped c-ares
* System cURL is preferred over ~/curl (if it has AsynchDNS)
* Our shipped libraries are no longer built as static
* Now that shipped libraries are dynamic they need to be installed
somewhere (if used). The default location is ~/unrealircd/lib and
can be changed via --with-privatelibdir. (Although, if you are a
package builder then you will probably use --with-system-xxx and
then private libraries are not used at all)
==[ CHANGES BETWEEN 4.0.6 AND 4.0.7 ]==
Improvements:
* UnrealIRCd now ships with a default ciphersuite list to have more
secure SSL/TLS defaults (rather than relying on your OS/Distro).
You can still customize ciphersuites through set::ssl::ciphers.
Details: https://www.unrealircd.org/docs/SSL_Ciphers_and_protocols
* set::ssl::protocols allows you to specify which SSL/TLS protocols
are permitted. The default is (still): TLSv1,TLSv1.1,TLSv1.2.
* Windows: remote includes now support IPv6
Major issues fixed:
* FreeBSD: unstable SSL links to other servers
Minor issues fixed:
* It was impossible to set both +b ~r:xyz and +b ~R:xyz
Removed the following rarely used build-time options:
* CHROOTDIR: Never worked in 4.0.x anyway. You can use AppArmor,
SELinux, FreeBSD jails, etc. as an alternative.
* IRC_USER/IRC_GROUP: Since this only applies to users installing
UnrealIRCd system-wide you should use your system services to do
this as well, such as: systemd's User=xx or start-stop-daemon.
Other changes:
* PCRE2 and c-ares libraries updated to latest versions
==[ CHANGES BETWEEN 4.0.5 AND 4.0.6 ]==
Major issues fixed:
* Fix SASL security issue with AUTHENTICATE
==[ CHANGES BETWEEN 4.0.4 AND 4.0.5 ]==
Major issues fixed:
* Crash issue (read-after-free)
* Bans on IPv6 cloaked hosts had no effect
* Prevent flood from unknown connection (with bugfix)
==[ CHANGES BETWEEN 4.0.4 AND 4.0.3(.1) ]==
New:
* Italian /HELPOP translation (help.it.conf)
* set::options::no-connect-ssl-info to hide SSL-related connect info
Major issues fixed:
* GLINE/KLINE on usermask@ did not have any effect
* Crash if you have a listen block with port 0
* Infinite loop on invalid operclass::parent reference
Minor issues fixed:
* files { } block only worked with absolute paths
* delayjoin: hidden users were not always joined on +vhoaq
* Fix small memory leak
* Duplicate replies on /VERSION
* When doing /VERSION on IRC as an IRCOp it showed the compile-time
rather than runtime OpenSSL/LibreSSL version
Other changes:
* Documentation updates
* Prevent installation in the same directory as the source
==[ CHANGES BETWEEN 4.0.3 AND 4.0.3.1 ]==
* Fix compile problem on FreeBSD & OpenBSD
Note: there is no 4.0.3.1 release for Windows since there were no
changes for the Windows version.
==[ CHANGES BETWEEN 4.0.2 AND 4.0.3 ]==
Major issues fixed:
* Crash on RPING command (IRCOp-only!)
* Crash on Windows on failed outgoing server connect
* Crash if you had a link { } block with invalid syntax
Minor issues fixed:
* Windows: Remote includes did not support https
Other:
* Windows version compiled with Visual Studio 2012 rather than a mix
* Windows version now using LibreSSL
* Crash reporter produces more useful reports (important for us)
==[ CHANGES BETWEEN 4.0.1 AND 4.0.2 ]==
The 4.0.2 release comes with the following new features:
* Ability to hide quit messages from *LINEd users (set::hide-ban-reason)
* Blacklist hits are now sent to new snomask +b rather than all ircops
Major issues fixed:
* None
Minor issues fixed:
* prefix-quit was not working
* FreeBSD: fix kevent bug flood in error log
* Incorrect server description in /LINKS
* Logging to syslog was broken
* OS X: Update ./Config to use Homebrew OpenSSL by default
* Don't show UID to client in case of a SVSMODE
==[ CHANGES BETWEEN 4.0.0 AND 4.0.1 ]==
The 4.0.1 release comes with the following minor improvements:
* The blacklist module now supports %ip (=banned IP) in blacklist::reason.
* *NIX: You can use cron again, see https://www.unrealircd.org/docs/Cron_job
* /MODULE now lists only 3rd party modules by default so you don't get flooded.
* *NIX: Added './unrealircd reloadtls' to reload TLS certificate and keys.
Major issue fixed:
* Crash if you removed a listen { } block with active clients on that port
* MODEs set by a server (not by a user) were not always propagated
correctly accross the network. In practice this only affected /SAMODE
and possibly some services that don't send MODEs from ChanServ/BotServ.
Minor issues fixed:
* When doing /LIST under mIRC it would hide empty +P channels.
* Servers wouldn't link if link::outgoing::hostname was a CNAME.
* SSL Certificate fingerprint not communicated properly to servers/services.
* *NIX: ./unrealircd [stop|rehash] failed if not installed to ~/unrealircd.
* Windows: IRCd could crash after showing the config error screen on startup.
==[ CHANGES BETWEEN 3.2.X AND 4.X ]==
Below is a summary of the changes between UnrealIRCd 3.2.x and UnrealIRCd 4.
For a complete list of all 1100+ changes you can use 'git log' or have a
look at: https://github.com/unrealircd/unrealircd/commits/unreal40
==[ NEW ]==
* We moved a lot of functionality, including most channel modes, user
modes and all extended bans into 138 separate modules.
This makes it...
A) possible to fully customize what exact functionality you want to load.
You could even strip down UnrealIRCd to get something close to the
basic RFC1459 features from the 1990s. (No idea why you would want
that, but it's possible)
B) easier for coders to see all source code related to a specific feature
C) possible to fix bugs and just reload rather than restart the IRCd.
Have a look at modules.default.conf which contains the "default" set of
modules that you can load if you just want to load all functionality.
If you want to customize the list of modules to load then simply make
a copy of that file, give it a different name, and include that one
instead. Since the file is fully documented, you can just comment out
or delete the loadmodule lines of things you don't want to load.
* Oper permissions have changed completely: [A4+]
* All previous oper levels/ranks no longer exist (Netadmin, Admin, ..)
* oper::flags has been removed. Instead you must specify an operclass
in oper::operclass (for example, 'operclass netadmin').
* In operclass block(s) you define the privileges. You can now control
exactly what an IRCOp can and cannot do.
Have a look at operclass.default.conf which ships with UnrealIRCd,
it contains a number of default operclass blocks suitable for the
most common situations. See also the operclass block documentation:
https://www.unrealircd.org/docs/Operclass_block
* If you ask UnrealIRCd to convert your 3.2.x configuration file then
it will try to select a suitable operclass for the oper. This will
not always 100% match your current oper block rights, though.
* Channel Mode +A (Admin Only) has been removed. You can use the new
extended ban ~O:<operclass>. This allows you to, for example, create
an operclass 'netadmin' only channel: /MODE #chan +iI ~O:netadmin*
* set::hosts has been removed, use oper::vhost instead.
* Since oper levels have been removed you no longer see things like
"OperX is a Network Administrator" in /WHOIS by default.
If you want that, then you can set oper::swhois to
"is a Network Administrator" (or any other text).
* Entirely rewritten I/O and event loop. This allows the IRCd to scale
more easily to tens of thousands of clients by using kernel-evented I/O
mechanisms such as epoll and kqueue.
* Memory pooling has been added to improve memory allocation efficiency
and performance.
* On-connect DNSBL/RBL checking via the new blacklist block. [B1]
* The Windows version now has IPv6 support too. [B3]
* On all OS's we compile with IPv6 support enabled. You can still
disable IPv6 at runtime by setting set::options::disable-ipv6. [B3]
* The local nickname length can be modified without recompiling the IRCd
* Channel Mode +d: This will hide joins/parts for users who don't say
anything in a channel. Whenever a user speaks for the first time they
will appear to join. Chanops will still see everyone joining normally
as if there was no +d set.
* If you connect with SSL/TLS with a client certificate then your SSL
Fingerprint (SHA256 hash) can be seen by yourself and others through
/WHOIS. The fingerprint is also shared with all servers on the network.
* ExtBan ~S:<certificate fingerprint> for ban exceptions / invex. This
can be used like +iI ~S:000000000etc.
* bcrypt has been added as a password hashing algorithm and is now the
preferred algorithm [A3]
* './unreal mkpasswd' will now prompt you for the password to hash [A3]
* Protection against SSL renegotiation attacks [A3]
* When you link two servers the current timestamp is exchanged. If the
time differs more than 60 seconds then servers won't link and it will
show a message that you should fix your clock(s). This requires
version alpha3 (or later) on both ends of the link [A3]
* Configuration file converter that will upgrade your 3.2.x conf to 4.x.
On *NIX run './unreal upgrade-conf'. On Windows simply try to boot and
after the config errors screen UnrealIRCd offers the conversion. [A3]
* The IRCd can now better handle unknown channel modes which expect a
parameter. This can be useful in a scenario where you are slowly
upgrading all your servers.
* If you want to unset a vhost but keep cloaked then use /MODE yournick -t
* A "crash reporter" was added. When UnrealIRCd is started it will check
if a previous UnrealIRCd instance crashed and (after booting a new
instance) it will spit out a report and ask if you want to submit it
to the UnrealIRCd developers. Doing so will help us a lot as many bugs
are often not reported. Note that UnrealIRCd will always ask before
sending any information and never do so automatically. [B3]
* SSL: Support for ECDHE has been added to provide "forward secrecy". [B4]
==[ CHANGED ]==
* Numerics have been removed. Instead we now use SIDs (Server ID's) and
UIDs (User ID's). SIDs work very similar to server numerics and UIDs
help us to fix a number of lag-related race conditions / bugs.
* The module commands.so / commands.dll has been removed. All commands
(those that are modular) are now in their own module.
* Self-signed certificates are now generated using 4096 bits, a SHA256
hash and validity of 10 years. [A2]
* Building with SSL (OpenSSL) is now mandatory [A2]
* The link { } block has been restructured, see
https://www.unrealircd.org/docs/Upgrading_from_3.2.x#Link_block [A3]
* Better yet, check out our secure server linking tutorial:
https://www.unrealircd.org/docs/Tutorial:_Linking_servers
* If you have no set::throttle block you now get a default of 3:60 [A3]
* password entries in the conf no longer require specifying an auth-type
like password "..." { md5; };. UnrealIRCd will now auto-detect. [A3]
* You will now see a warning when you link to a non-SSL server. [A3]
* Previously we used POSIX Regular expressions in spamfilters and at
some other places. We have now moved to PCRE Regular expressions.
They look very similar, but PCRE is a lot faster.
For backwards-compatibility we still compile with both regex engines. [A3]
* Spamfilter command syntax has been changed, it now has an extra option
to indicate the matching method:
/SPAMFILTER [add|del|remove|+|-] [method] [type] ....
Where 'method' can be one of:
* -regex: this is the new fast PCRE2 regex engine
* -simple: supports just strings and ? and * wildcards (super fast)
* -posix: the old regex engine for compatibility with 3.2.x. [A3]
* If you have both 3.2.x and 4.x servers on your network then the
4.x server will only send spamfilters of type 'posix' to the 3.2.x
servers because 3.2.x servers don't support the other two types.
So in a mixed network you probably want to keep using 'posix' for
a while until all your servers are running UnrealIRCd 4. [A3]
* set::oper-only-stats now defaults to "*"
* oper::from::userhost and vhost::from::userhost are now called
oper::mask and vhost::mask. The usermask@ part is now optional and
it supports two syntaxes. For one entry you can use: mask 1.2.3.*;
For multiple entries the syntax is: mask { 192.168.*; 10.*; };
* Because having both allow::ip and allow::hostname in the same allow
block was highly confusing (it was an OR-match) you must now choose
between either allow::ip OR allow::hostname. [A3]
* cgiirc block is renamed to webirc and the syntax has changed [A4]
* set::pingpong-warning is removed, warning always off now [A4]
* More helpful configuration file parse error messages [A4]
* You can use '/OPER username' without password if you use SSL
certificate (fingerprint) authentication. The same is true for
'/VHOST username'. [A4]
* You must now always use 'make install' on *NIX [A4]
* Changed (default) directory structure entirely, see the section
titled 'CONFIGURATION CHANGES' about 100 lines up. [A4]
* badword quit { } is removed, we use badword channel for it. [A4]
* badwords.*.conf is now just one badwords.conf
* To load all default modules you now include modules.default.conf.
This file was called modules.conf in earlier alpha's.
The file has been split up in sections and a lot of comments have
been added to aid the user in deciding whether to load or not to
load each module. [A4]
* Snomask +s is now (always) IRCOp-only. [A4]
* Previously there was little logic behind what modes halfops could
set. Now the idea is as follows: halfops should be able to help out
in case of a flood but not be able to change any 'policy decission
modes' such as +G, +S, +c, +s. Due to this change halfops can now
set modes +beiklmntIMKNCR (was: +beikmntI). [A4]
* If no link::hub or link::leaf is specified then assume hub "*". [B1]
* SWHOIS (Special whois title) has been extended in a number of ways:
* We now "track" who or what set an swhois. This allows us to
remove the swhois received via oper/vhost on de-oper/de-vhost.
* You can now have multiple swhois lines
* Multiple oper::swhois and vhost::swhois items are supported. [B1]
* When trying to link two servers without link::outgoing::options::ssl
(which is not recommended) we try to use STARTTLS in order to
'upgrade' the connection to use SSL/TLS anyway. This can be disabled
via link::outgoing::options::insecure. [B2]
* SSLv3 has now been disabled for security. This also means you can only
link UnrealIRCd 4 with 3.2.10.3 and later because earlier versions
used SSLv3 instead of TLS due to an OpenSSL API mistake. [B4]
==[ MODULE CODERS / DEVELOPERS ]==
* A lot of technical documentation for module coders has been added
at https://www.unrealircd.org/docs/ describing things like how to
write a module from scratch, the User & Channel Mode System, Commands,
Command Overrides, Hooks, attaching custom-data to users/channels,
and more. [A2+]
* For commands: do not read from parv[0] anymore, doing so will lead
to a crash. Use sptr->name instead. This change is necessary as
the "name" in parv[0] could possibly point to a UID/SID rather than
a nick name. Thus, if you would send parv[0] to a non-UID or non-SID
capable server this would lead to serious issues (not found errors).
* Added MOD_OPT_PERM_RELOADABLE which permits reloading (eg: upgrades)
but disallows unloading of a module [A3]
* There have been *a lot* of source code cleanups (ALL)
* We now use the information from PROTOCTL CHANMODES= for parameter
skipping if the channel mode is unknown. Also, when channel modes
are loaded or unloaded we re-broadcast PROTOCTL CHANMODES=. [B1]
* The server protocol docs have been removed. The protocol is now
documented at https://www.unrealircd.org/docs/Server_protocol
See also https://www.unrealircd.org/docs/Server_protocol:Changes
for a list of changes between the 3.2 and 4.0 server protocol.
* GCC typechecking has been added to make sure your HookAdd... calls
are adding hook functions with the correct parameter (types).
==[ REMOVED / DROPPED ]==
* Numeric server IDs, see above. [A1]
* PROTOCTL TOKEN and SJB64 are no longer implemented. [A1]
* Ziplinks have been removed. [A1]
* WebTV support. [A3]
* Channel Mode +j was removed and replaced by the configuration setting
set::anti-flood::join-flood (default: 3 per 90 seconds). [B1]
* /CHATOPS: use /GLOBOPS instead which does the same
/ADCHAT & /NACHAT: gone as we don't have such oper levels anymore
Your opers should actually be in an #opers channel. If you also want
special classes of oper channels like #admins then use +iI ~O:*admin*
* User modes:
* +N (Network Administrator): see 'Oper permissions' under NEW as for why
* +a (Services Administrator): same
* +A (Server Administrator: same
* +C (Co Administrator): same
* +O (Local IRC Operator): same
* +h (HelpOp): all this did was add a line "is available for help" in
WHOIS. You can use a vhost block with vhost::swhois as a replacement
or for opers just add an oper::swhois item.
* +g (failops): we already have snomasks and the +o usermode for this
* +v (receive infected DCC SEND rejection notices): moved to snomask +D
+123 -143
View File
@@ -1,143 +1,123 @@
Rules about patches & modifications to UnrealIRCd
1. When making a change, always add a small description in the commit log.
Don't forget to mention the bug# and credit the reporter (if any).
2. If new files are made, it must contain proper copyright headers.
3. If you want to submit patches (f.e. if you don't have write access to
the repository), then submit them to https://bugs.unrealircd.org/
using "hg export" or "hg diff". Naturally include a clear description
of what the change does.
4. Each bug or feature should have a bug# so people can have a discussion
about it. This has a few implications (read!!):
* People must report bugs/feature requests to bugs.unrealircd.org and
not on IRC, e-mail, etc.
* That means other people can see the bug# and comment on it. This means
discussion is easy to read back for each issue and not spread between
several IRC logs.
Furthermore, by using the bugtracker instead of directly committing,
people could point out that there might be a better way to do things
than you originally thought, or it might be that other devs don't like
it at all.
* If a head coder has 'acknowledged' or 'confirmed' the bug or stated in
a comment that it's OK to implement, then a dev may take the issue.
The dev should change the status to 'assigned' and work on it, then
commit and change it to 'resolved', set 'fixed in version' to next
release, and add a comment pasting the relevant Changelog item and the
releaseid (.XYZ).
Of course other guidelines, like #7 and #8 still apply.
5. Do not commit changes that do not have an associated bug# and have not
had any discussion.
3.2.x: Small/tiny bugfixes that do not change any functionality, are
very unlikely to break anything and definitely don't require any prior
discussion may be exempted.
3.4.x: During the alpha & beta stage it is permitted to commit fixes
and code cleanups / restructuring without any discussion.
However in general, and in particular for new features, it is appreciated
if there has been prior discussion on bugs.unrealircd.org (or by mail).
6. Regarding reidenting, restructuring or other major code cleanups: please
discuss before doing so. The other devs might not agree with you on the
particular cleanup you have in mind which would result in another
clean-up-the-cleanup commit.
You may, however reindent and clean up individual sections when you are
working on fixing a particular bug# or implementing a new feature. In fact
you're encouraged to do so if the code is confusing without it. However,
obey the style of Unreal's code (mostly outlined in this document)
and do not introduce yet another (new) style. Also, be careful with doing
any cleanup: if you're unsure in any way about the use of something,
or something that looks redundant on first sight, then look more
carefully... it might indeed be useless and/or redundant, but it might
also be a subtle thing that can create great bugs when 'cleaned up'.
7. Prior to a 3.2.x release: be very careful with any restructuring of a
subsystem or doing any major commits that may break things. Stuff like
this can be perfectly fine if there are many months to go, but are not
good to do a month before release. The head coder may impose additional
restrictions during such a period.
8. During the Release Candidate stage (from RC1 until the final release)
only the head coder may commit directly, all others should ask and
present their patch before committing. Yes, even if you are changing
only 1 line of code or text.
9. UnrealIRCd should compile on all supported operating systems and
platforms, using GCC 3 or higher on *NIX, and Visual Studio 2008 or
higher on Windows. This means you cannot blindly use all C99 extensions.
10. Coders must test their code before committing.
11. /*
* These kind of comments
*/
NOT
// These kind of comments
12. if (something == 1)
{
moo; /* comment */
/* This does what what what */
cow(go(moo));
}
NOT
if (something == 1) {
}
13. Do not touch version.c.SH or version.h, unless you are a head coder
if you need a credit in, contact us
14. Protocol changes must be discussed before making patches for it.
15. We do NOT rip people off. If we use other people's code, it MUST be
properly credited.
16. We generally use tabsize 4 and 8. In any case, use tabs and NOT spaces.
Some code is old and horrible and has a mix of tabs and spaces used for
spacing, that's something we do not want to have ;)
17. Be careful about overflows. Do not do any unchecked string copies.
Instead of strcpy, strcat and sprintf/ircsprintf, use the following
functions: strlcpy, strlcat, snprintf/ircnsprintf.
If you are copying/writing character-by-character or word-by-word in a
loop, be very sure about your size counting. Sometimes it's possible
to avoid such code alltogether by just calling strlcat each time.
18. Speed. When optimizing or writing code, keep in mind that readability and
stability comes FIRST, and after that comes speed. So we'd rather prefer some
readable code (even if difficult) over some odd highly optimized routine which
nobody understands, is difficult to extend, and might have several bugs.
As mentioned earlier: use ircsnprintf, not snprintf (this is because
ircsnprintf is optimized for simple strings like the ones we use).
ircsnprintf calls snprintf when it finds a (non-simple) format specifier it
can't handle. Simple format specifiers do not have prefixes other than
h and l.
19. Initialize your structs and use the proper memory calls.
In UnrealIRCd we use MyMalloc, MyMallocEx and MyFree (so not malloc/free).
MyMalloc usually maps to malloc, and MyMallocEx is a malloc plus filling
the memory area (eg: the struct) with zero's (a la calloc).
Use of MyMallocEx is suggested. In general you should not be using MyMalloc.
"But MyMalloc is faster!" you might say. This is true, but using MyMallocEx
has very little speed impact and enormous benefits: people tend to forget
to set certain fields in the struct to NULL, or much more common: when
someone later on (eg: 1 year later) adds a field to a struct, there could
be several places he/she needs to update to make sure x->something is NULL
after allocating a new struct. Bad idea.
Little speed impact, huge stability benefits, easy decision ;).
20. Comment your code! This should speak for itself...
Put comments wherever you think they are needed, to aid any further coders
with reading your code.. and, in fact, it will aid yourself as well if you
would look back at your code 2 years later.
If there's some obscure pitfall, DO mention it! Don't just "hope" a next
author will see it like you did.
21. Use enums whenever possible, rather than #define constants. Besides making
things more clean, it also aids debugging.
Rules about patches & modifications to UnrealIRCd
1. When making a change, always add a small description in the commit log.
Don't forget to mention the bug# and credit the reporter (if any).
2. If new files are made, they must contain proper copyright headers.
3. Each bug or feature should have a bug# so people can have a discussion
about it. This has a few implications (read!!):
* People must report bugs/feature requests to bugs.unrealircd.org and
not on IRC, e-mail, etc.
* That means other people can see the bug# and comment on it. This means
discussion is easy to read back for each issue and not spread between
several IRC logs.
Furthermore, by using the bugtracker instead of directly committing,
people could point out that there might be a better way to do things
than you originally thought, or it might be that other devs don't like
it at all.
* If a head coder has 'acknowledged' or 'confirmed' the issue or stated
in a comment that it's OK to implement, then any dev may take the issue.
The dev should change the status to 'assigned' and work on it, then
commit and change it to 'resolved', set 'fixed in version' to the
correct release, and add a comment pasting the relevant commit log.
Of course other guidelines, in particular rule #7, still applies.
4. If you don't have direct write access to the repository then you can
submit changes as as PR on github. It is very much preferred to also
have a bugs.unrealircd.org entry for it as well (see previous item).
5. For the stable branch, in general, only commit changes that have an
associated bugid# and/or were discussed.
For branches currently in development (alpha/beta) there's more freedom
and if you think the change will be small and is fine without a
discussion then feel free to commit.
6. Regarding reidenting, restructuring or other major code cleanups: please
discuss before doing so. The other devs might not agree with you on the
particular cleanup you have in mind which would result in another
clean-up-the-cleanup commit.
You may, however reindent and clean up individual sections when you are
working on fixing a particular bug# or implementing a new feature. In fact
you're encouraged to do so if the code is confusing without it. However,
obey the style of Unreal's code (mostly outlined in this document)
and do not introduce yet another (new) style. Also, be careful with doing
any cleanup: if you're unsure in any way about the use of something,
or something that looks redundant on first sight, then look more
carefully... it might indeed be useless and/or redundant, but it might
also be a subtle thing that can create great bugs when 'cleaned up'.
7. During the Release Candidate stage (from RC1 until the final release)
only the head coder may commit directly, all others should ask and
present their patch before committing. Yes, even if you are changing
only 1 line of code or text.
9. UnrealIRCd should compile on all supported operating systems and
platforms, using GCC 3 or higher on *NIX, and Visual Studio 2008 or
higher on Windows. This means you cannot blindly use all C99 extensions.
10. Coders must test their code before committing.
11. /*
* These kind of comments
*/
NOT
// These kind of comments
12. if (something == 1)
{
moo; /* comment */
/* This does what what what */
cow(go(moo));
}
NOT
if (something == 1) {
}
13. Do not touch version.c.SH or version.h, unless you are a head coder.
If you need a credit in, contact us
14. Protocol changes must be discussed before making patches for it.
15. We do NOT rip people off. If we use other people's code, it MUST be
properly credited.
16. We use tabsize 8 and we use tabs AND NOT SPACES.
Some code is old and horrible and has a mix of tabs and spaces used for
spacing, that's something we do not want to have ;)
17. Be careful about overflows. Do not do any unchecked string copies.
Instead of strcpy, strcat and sprintf/ircsprintf, use the following
functions: strlcpy, strlcat, snprintf/ircnsprintf.
If you are copying/writing character-by-character or word-by-word in a
loop, eg using *p++ = x; then be very sure about your size counting.
Often it's better to avoid such code altogether, by simply using
strlcat for everything.
18. Speed. When optimizing or writing code, keep in mind that readability and
stability comes FIRST, and after that comes speed. So we'd rather prefer some
readable code (even if difficult) over some odd highly optimized routine which
nobody understands, is difficult to extend, and might have several bugs.
As mentioned earlier: use ircsnprintf, not snprintf (this is because
ircsnprintf is optimized for simple strings like the ones we use).
ircsnprintf calls snprintf when it finds a (non-simple) format specifier it
can't handle. Simple format specifiers do not have prefixes other than
h and l.
19. Initialize your structs and use the proper memory calls.
In UnrealIRCd we use safe_alloc, safe_free, safe_strdup and safe_strldup.
Do NOT use malloc, calloc or strdup.
20. Comment your code! This should speak for itself...
Put comments wherever you think they are needed, to aid any further coders
with reading your code.. and, in fact, it will aid yourself as well if you
would look back at your code 2 years later.
If there's some obscure pitfall, DO mention it! Don't just "hope" a next
author will see it like you did.
21. Use enums whenever possible, rather than #define constants. Besides making
things more clean, it also aids debugging.
+9 -9
View File
@@ -5,39 +5,39 @@ alias identify {
target chanserv;
type services;
parameters "IDENTIFY %1-";
};
}
format "^[^#]" {
target nickserv;
type services;
parameters "IDENTIFY %1-";
};
}
type command;
};
}
alias services {
format "^#" {
target chanserv;
type services;
parameters "%1-";
};
}
format "^[^#]" {
target nickserv;
type services;
parameters "%1-";
};
}
type command;
};
}
alias register {
format "^#" {
target chanserv;
type services;
parameters "REGISTER %1-";
};
}
format "^[^#]" {
target nickserv;
type services;
parameters "REGISTER %1-";
};
}
type command;
};
}
+12 -13
View File
@@ -1,18 +1,17 @@
/* Anope Aliases */
alias nickserv { type services; };
alias ns { target nickserv; type services; };
alias chanserv { type services; };
alias cs { target chanserv; type services; };
alias memoserv { type services; spamfilter yes; };
alias ms { target memoserv; type services; spamfilter yes; };
alias operserv { type services; };
alias os { target operserv; type services; };
alias helpserv { type services; };
alias botserv { type services; };
alias bs { target botserv; type services; };
alias hostserv { type services; };
alias hs { target hostserv; type services; };
alias nickserv { type services; }
alias ns { target nickserv; type services; }
alias chanserv { type services; }
alias cs { target chanserv; type services; }
alias memoserv { type services; spamfilter yes; }
alias ms { target memoserv; type services; spamfilter yes; }
alias operserv { type services; }
alias os { target operserv; type services; }
alias botserv { type services; }
alias bs { target botserv; type services; }
alias hostserv { type services; }
alias hs { target hostserv; type services; }
include "aliases/aliases.conf";
+21 -21
View File
@@ -1,26 +1,26 @@
/* Atheme Aliases */
alias nickserv { type services; };
alias ns { target nickserv; type services; };
alias chanserv { type services; };
alias cs { target chanserv; type services; };
alias memoserv { type services; spamfilter yes; };
alias ms { target memoserv; type services; spamfilter yes; };
alias operserv { type services; };
alias os { target operserv; type services; };
alias helpserv { type services; };
alias botserv { type services; };
alias bs { target botserv; type services; };
alias hostserv { type services; };
alias hs { target hostserv; type services; };
alias saslserv { type services; };
alias sss { target saslserv; type services; };
alias gameserv { type services; };
alias gms { target gameserv; type services; };
alias groupserv { type services; };
alias grs { target groupserv; type services; };
alias alis { type services; };
alias ls { target alis; type services; };
alias nickserv { type services; }
alias ns { target nickserv; type services; }
alias chanserv { type services; }
alias cs { target chanserv; type services; }
alias memoserv { type services; spamfilter yes; }
alias ms { target memoserv; type services; spamfilter yes; }
alias operserv { type services; }
alias os { target operserv; type services; }
alias helpserv { type services; }
alias botserv { type services; }
alias bs { target botserv; type services; }
alias hostserv { type services; }
alias hs { target hostserv; type services; }
alias saslserv { type services; }
alias sss { target saslserv; type services; }
alias gameserv { type services; }
alias gms { target gameserv; type services; }
alias groupserv { type services; }
alias grs { target groupserv; type services; }
alias alis { type services; }
alias ls { target alis; type services; }
include "aliases/aliases.conf";
+25 -25
View File
@@ -1,33 +1,33 @@
/* Auspice Aliases */
/* Uncomment this, if you have enabled "MassServ, W and X" in auspice */
# alias massserv { type services; };
# alias ma { target massserv; type services; };
# alias W { type services; };
# alias X { type services; };
# alias massserv { type services; }
# alias ma { target massserv; type services; }
# alias W { type services; }
# alias X { type services; }
/* Uncomment this, if you have enabled "WebServ" in auspice */
# alias webserv { type services; };
# alias ws { target webserv; type services; };
# alias webserv { type services; }
# alias ws { target webserv; type services; }
alias agent { type services; };
alias adminserv { type services; };
alias as { target adminserv; type services; };
alias botserv { type services; };
alias bs { target botserv; type services; };
alias chanserv { type services; };
alias cs { target chanserv; type services; };
alias helpserv { type services; };
alias hs { target helpserv; type services; };
alias hostserv { type services; };
alias ho { target hostserv; type services; };
alias memoserv { type services; spamfilter yes; };
alias ms { target memoserv; type services; spamfilter yes; };
alias nickserv { type services; };
alias ns { target nickserv; type services; };
alias operserv { type services; };
alias os { target operserv; type services; };
alias rootserv { type services; };
alias rs { target rootserv; type services; };
alias agent { type services; }
alias adminserv { type services; }
alias as { target adminserv; type services; }
alias botserv { type services; }
alias bs { target botserv; type services; }
alias chanserv { type services; }
alias cs { target chanserv; type services; }
alias helpserv { type services; }
alias hs { target helpserv; type services; }
alias hostserv { type services; }
alias ho { target hostserv; type services; }
alias memoserv { type services; spamfilter yes; }
alias ms { target memoserv; type services; spamfilter yes; }
alias nickserv { type services; }
alias ns { target nickserv; type services; }
alias operserv { type services; }
alias os { target operserv; type services; }
alias rootserv { type services; }
alias rs { target rootserv; type services; }
include "aliases/aliases.conf";
+8 -8
View File
@@ -1,12 +1,12 @@
/* Cygnus Aliases */
alias nickserv { type services; };
alias ns { target nickserv; type services; };
alias chanserv { type services; };
alias cs { target chanserv; type services; };
alias memoserv { type services; spamfilter yes; };
alias ms { target memoserv; type services; spamfilter yes; };
alias rootserv { type services; };
alias rs { target rootserv; type services; };
alias nickserv { type services; }
alias ns { target nickserv; type services; }
alias chanserv { type services; }
alias cs { target chanserv; type services; }
alias memoserv { type services; spamfilter yes; }
alias ms { target memoserv; type services; spamfilter yes; }
alias rootserv { type services; }
alias rs { target rootserv; type services; }
include "aliases/aliases.conf";
+12 -12
View File
@@ -1,16 +1,16 @@
/* Epona Aliases */
alias nickserv { type services; };
alias ns { target nickserv; type services; };
alias chanserv { type services; };
alias cs { target chanserv; type services; };
alias memoserv { type services; spamfilter yes; };
alias ms { target memoserv; type services; spamfilter yes; };
alias operserv { type services; };
alias os { target operserv; type services; };
alias helpserv { type services; };
alias hs { target helpserv; type services; };
alias botserv { type services; };
alias bs { target botserv; type services; };
alias nickserv { type services; }
alias ns { target nickserv; type services; }
alias chanserv { type services; }
alias cs { target chanserv; type services; }
alias memoserv { type services; spamfilter yes; }
alias ms { target memoserv; type services; spamfilter yes; }
alias operserv { type services; }
alias os { target operserv; type services; }
alias helpserv { type services; }
alias hs { target helpserv; type services; }
alias botserv { type services; }
alias bs { target botserv; type services; }
include "aliases/aliases.conf";
+10 -10
View File
@@ -1,14 +1,14 @@
/* Generic Aliases */
alias nickserv { type services; };
alias ns { target nickserv; type services; };
alias chanserv { type services; };
alias cs { target chanserv; type services; };
alias memoserv { type services; spamfilter yes; };
alias ms { target memoserv; type services; spamfilter yes; };
alias operserv { type services; };
alias os { target operserv; type services; };
alias helpserv { type services; };
alias hs { target helpserv; type services; };
alias nickserv { type services; }
alias ns { target nickserv; type services; }
alias chanserv { type services; }
alias cs { target chanserv; type services; }
alias memoserv { type services; spamfilter yes; }
alias ms { target memoserv; type services; spamfilter yes; }
alias operserv { type services; }
alias os { target operserv; type services; }
alias helpserv { type services; }
alias hs { target helpserv; type services; }
include "aliases/aliases.conf";
+2 -2
View File
@@ -1,4 +1,4 @@
/* Generic StatServ Aliases */
alias statserv { type stats; };
alias ss { target statserv; type stats; };
alias statserv { type stats; }
alias ss { target statserv; type stats; }
+13 -13
View File
@@ -1,17 +1,17 @@
/* IRCServices Aliases */
alias nickserv { type services; };
alias ns { target nickserv; type services; };
alias chanserv { type services; };
alias cs { target chanserv; type services; };
alias memoserv { type services; spamfilter yes; };
alias ms { target memoserv; type services; spamfilter yes; };
alias operserv { type services; };
alias os { target operserv; type services; };
alias helpserv { type services; };
alias hs { target helpserv; type services; };
alias irciihelp { type services; };
alias statserv { type services; };
alias ss { target statserv; type services; };
alias nickserv { type services; }
alias ns { target nickserv; type services; }
alias chanserv { type services; }
alias cs { target chanserv; type services; }
alias memoserv { type services; spamfilter yes; }
alias ms { target memoserv; type services; spamfilter yes; }
alias operserv { type services; }
alias os { target operserv; type services; }
alias helpserv { type services; }
alias hs { target helpserv; type services; }
alias irciihelp { type services; }
alias statserv { type services; }
alias ss { target statserv; type services; }
include "aliases/aliases.conf";
+4 -4
View File
@@ -1,6 +1,6 @@
/* OperStats Aliases */
alias operserv { type stats; };
alias os { target operserv; type stats; };
alias statserv { type stats; };
alias ss { target statserv; type stats; };
alias operserv { type stats; }
alias os { target operserv; type stats; }
alias statserv { type stats; }
alias ss { target statserv; type stats; }
+19 -19
View File
@@ -30,22 +30,22 @@
*/
badword all { word "pussy"; };
badword all { word "fuck"; };
badword all { word "whore"; };
badword all { word "slut"; };
badword all { word "shit"; };
badword all { word "asshole"; };
badword all { word "bitch"; };
badword all { word "cunt"; };
badword all { word "vagina"; };
badword all { word "penis"; };
badword all { word "jackass"; };
badword all { word "*fucker*"; };
badword all { word "faggot"; };
badword all { word "fag"; };
badword all { word "horny"; };
badword all { word "dickhead"; };
badword all { word "sonuvabitch"; };
badword all { word "*fuck*"; };
badword all { word "tits"; };
badword all { word "pussy"; }
badword all { word "fuck"; }
badword all { word "whore"; }
badword all { word "slut"; }
badword all { word "shit"; }
badword all { word "asshole"; }
badword all { word "bitch"; }
badword all { word "cunt"; }
badword all { word "vagina"; }
badword all { word "penis"; }
badword all { word "jackass"; }
badword all { word "*fucker*"; }
badword all { word "faggot"; }
badword all { word "fag"; }
badword all { word "horny"; }
badword all { word "dickhead"; }
badword all { word "sonuvabitch"; }
badword all { word "*fuck*"; }
badword all { word "tits"; }
+20 -20
View File
@@ -17,26 +17,26 @@
*/
/* first.. deny everything, then allow known-good stuff... */
deny dcc { filename "*"; reason "Possible executable content"; soft yes; };
deny dcc { filename "*"; reason "Possible executable content"; soft yes; }
/* common image formats */
allow dcc { filename "*.jpg"; soft yes; };
allow dcc { filename "*.jpeg"; soft yes; };
allow dcc { filename "*.gif"; soft yes; };
allow dcc { filename "*.png"; soft yes; };
allow dcc { filename "*.bmp"; soft yes; };
allow dcc { filename "*.jpg"; soft yes; }
allow dcc { filename "*.jpeg"; soft yes; }
allow dcc { filename "*.gif"; soft yes; }
allow dcc { filename "*.png"; soft yes; }
allow dcc { filename "*.bmp"; soft yes; }
/* audio / video (but not scripted/playlists!) */
allow dcc { filename "*.mp1"; soft yes; };
allow dcc { filename "*.mp2"; soft yes; };
allow dcc { filename "*.mp3"; soft yes; };
allow dcc { filename "*.mpg"; soft yes; };
allow dcc { filename "*.mpeg"; soft yes; };
allow dcc { filename "*.m1v"; soft yes; };
allow dcc { filename "*.m2v"; soft yes; };
allow dcc { filename "*.vob"; soft yes; };
allow dcc { filename "*.wav"; soft yes; };
allow dcc { filename "*.mp1"; soft yes; }
allow dcc { filename "*.mp2"; soft yes; }
allow dcc { filename "*.mp3"; soft yes; }
allow dcc { filename "*.mpg"; soft yes; }
allow dcc { filename "*.mpeg"; soft yes; }
allow dcc { filename "*.m1v"; soft yes; }
allow dcc { filename "*.m2v"; soft yes; }
allow dcc { filename "*.vob"; soft yes; }
allow dcc { filename "*.wav"; soft yes; }
/* text / misc */
allow dcc { filename "*.txt"; soft yes; };
allow dcc { filename "*.log"; soft yes; };
allow dcc { filename "*.pdf"; soft yes; };
allow dcc { filename "*.c"; soft yes; };
allow dcc { filename "*.cpp"; soft yes; };
allow dcc { filename "*.txt"; soft yes; }
allow dcc { filename "*.log"; soft yes; }
allow dcc { filename "*.pdf"; soft yes; }
allow dcc { filename "*.c"; soft yes; }
allow dcc { filename "*.cpp"; soft yes; }
+202 -73
View File
@@ -1,19 +1,19 @@
/* Configuration file for UnrealIRCd 4.0
/* Configuration file for UnrealIRCd 5
*
* Simply copy this file to your conf/ directory, call it
* 'unrealircd.conf' and walk through it line by line (edit it!)
*
* Important: All lines, except the opening { line, end with an ;
* including };. This is very important, if you miss a ; somewhere then
* the configuration file parser will complain and your file will not
* Important: All lines, except { and } end with an ;
* This is very important, if you miss a ; somewhere then the
* configuration file parser will complain and the file will not
* be processed correctly!
* If this is your first experience with an UnrealIRCd configuration
* file then we really recommend you to read a little about the syntax,
* this only takes a few minutes and will help you a lot:
* https://www.unrealircd.org/docs/Configuration#Configuration_file_syntax
*
* UnrealIRCd 4 documentation (very extensive!):
* https://www.unrealircd.org/docs/UnrealIRCd_4_documentation
* UnrealIRCd 5 documentation (very extensive!):
* https://www.unrealircd.org/docs/UnrealIRCd_5_documentation
*
* Frequently Asked Questions:
* https://www.unrealircd.org/docs/FAQ
@@ -42,12 +42,13 @@ include "modules.default.conf";
* - help/help.conf for our on-IRC /HELPOP system
* - badwords.conf for channel and user mode +G
* - spamfilter.conf as an example for spamfilter usage
* (commented out)
* - operclass.default.conf contains some good operclasses which
* you can use in your oper blocks.
*/
include "help/help.conf";
include "badwords.conf";
include "spamfilter.conf";
//include "spamfilter.conf";
include "operclass.default.conf";
/* This is the me { } block which basically says who we are.
@@ -57,10 +58,10 @@ include "operclass.default.conf";
* have it's own sid).
*/
me {
name "irc.foonet.com";
info "FooNet Server";
name "irc.example.org";
info "ExampleNET Server";
sid "001";
};
}
/* The admin { } block defines what users will see if they type /ADMIN.
* It normally contains information on how to contact the administrator.
@@ -68,8 +69,8 @@ me {
admin {
"Bob Smith";
"bob";
"widely@used.name";
};
"email@example.org";
}
/* Clients and servers are put in class { } blocks, we define them here.
* Class blocks consist of the following items:
@@ -86,7 +87,7 @@ class clients
maxclients 1000;
sendq 200k;
recvq 8000;
};
}
/* Special class for IRCOps with higher limits */
class opers
@@ -95,7 +96,7 @@ class opers
maxclients 50;
sendq 1M;
recvq 8000;
};
}
/* Server class with good defaults */
class servers
@@ -103,8 +104,8 @@ class servers
pingfreq 60;
connfreq 15; /* try to connect every 15 seconds */
maxclients 10; /* max servers */
sendq 5M;
};
sendq 20M;
}
/* Allow blocks define which clients may connect to this server.
* This allows you to add a server password or restrict the server to
@@ -118,7 +119,7 @@ allow {
ip *@*;
class clients;
maxperip 3;
};
}
/* Example of a special allow block on a specific IP:
* Requires users on that IP to connect with a password. If the password
@@ -129,7 +130,7 @@ allow {
class clients;
password "somesecretpasswd";
maxperip 20;
};
}
/* Oper blocks define your IRC Operators.
* IRC Operators are people who have "extra rights" compared to others,
@@ -157,8 +158,8 @@ oper bobsmith {
*/
operclass netadmin;
swhois "is a Network Administrator";
vhost netadmin.mynet.org;
};
vhost netadmin.example.org;
}
/* Listen blocks define the ports where the server should listen on.
* In other words: the ports that clients and servers may use to
@@ -171,35 +172,35 @@ oper bobsmith {
* port <port>;
* options {
* <options....>;
* };
* };
* }
* }
*/
/* Standard IRC port 6667 */
listen {
ip *;
port 6667;
};
}
/* Standard IRC SSL/TLS port 6697 */
listen {
ip *;
port 6697;
options { ssl; };
};
options { tls; }
}
/* Special SSL/TLS servers-only port for linking */
listen {
ip *;
port 6900;
options { ssl; serversonly; };
};
options { tls; serversonly; }
}
/* NOTE: If you are on an IRCd shell with multiple IP's and you use
* the above listen { } blocks then you will likely get an
* 'Address already in use' error and the ircd won't start.
* This means you MUST bind to a specific IP instead of '*' like:
* listen { ip 1.2.3.4; port 6667; };
* listen { ip 1.2.3.4; port 6667; }
* Of course, replace the IP with the IP that was assigned to you.
*/
@@ -207,50 +208,49 @@ listen {
* Link blocks allow you to link multiple servers together to form a network.
* See https://www.unrealircd.org/docs/Tutorial:_Linking_servers
*/
link hub.mynet.org
link hub.example.org
{
incoming {
mask *@something;
};
}
outgoing {
bind-ip *; /* or explicitly an IP */
hostname hub.mynet.org;
hostname hub.example.org;
port 6900;
options { ssl; };
};
options { tls; }
}
/* We use the SPKI fingerprint of the other server for authentication.
* Run './unrealircd spkifp' on the other side to get it.
* NOTE: requires UnrealIRCd 4.0.16 or later.
*/
password "AABBCCDDEEFFGGHHIIJJKKLLMMNNOOPPQQRRSSTTUUV=" { spkifp; };
password "AABBCCDDEEFFGGHHIIJJKKLLMMNNOOPPQQRRSSTTUUV=" { spkifp; }
class servers;
};
}
/* The link block for services is usually much simpler.
* For more information about what Services are,
* see https://www.unrealircd.org/docs/Services
*/
link services.mynet.org
link services.example.org
{
incoming {
mask 127.0.0.1;
};
}
password "changemeplease";
class servers;
};
}
/* U-lines give other servers (even) more power/commands.
* If you use services you must add them here.
* NEVER put the name of an UnrealIRCd server here!!!
*/
ulines {
services.mynet.org;
};
services.example.org;
}
/* Here you can add a password for the IRCOp-only /DIE and /RESTART commands.
* This is mainly meant to provide a little protection against accidental
@@ -259,13 +259,13 @@ ulines {
drpass {
restart "restart";
die "die";
};
}
/* The log block defines what should be logged and to what file.
* See also https://www.unrealircd.org/docs/Log_block
*/
/* This is a good default, it logs almost everything */
/* This is a good default, it logs everything */
log "ircd.log" {
flags {
oper;
@@ -273,13 +273,14 @@ log "ircd.log" {
server-connects;
kills;
errors;
flood;
sadmin-commands;
chg-commands;
oper-override;
tkl;
spamfilter;
};
};
}
}
/* With "aliases" you can create an alias like /SOMETHING to send a message to
* some user or bot. They are usually used for services.
@@ -293,7 +294,7 @@ include "aliases/anope.conf";
ban nick {
mask "*C*h*a*n*S*e*r*v*";
reason "Reserved for Services";
};
}
/* Ban ip.
* Note that you normally use /KLINE, /GLINE and /ZLINE for this.
@@ -301,19 +302,19 @@ ban nick {
ban ip {
mask 195.86.232.81;
reason "Hate you";
};
}
/* Ban server - if we see this server linked to someone then we delink */
ban server {
mask eris.berkeley.edu;
reason "Get out of here.";
};
}
/* Ban user - just as an example, you normally use /KLINE or /GLINE for this */
ban user {
mask *tirc@*.saturn.bbn.com;
reason "Idiot";
};
}
/* Ban realname allows you to ban clients based on their 'real name'
* or 'gecos' field.
@@ -321,12 +322,12 @@ ban user {
ban realname {
mask "Swat Team";
reason "mIRKFORCE";
};
}
ban realname {
mask "sub7server";
reason "sub7";
};
}
/* Ban and TKL exceptions. Allows you to exempt users / machines from
* KLINE, GLINE, etc.
@@ -339,26 +340,26 @@ ban realname {
except ban {
mask *@192.0.2.1;
// you may add more mask entries here..
};
}
/* except tkl with type 'all' protects you from GLINE, GZLINE, QLINE, SHUN */
except tkl {
/* except ban with type 'all' protects you from GLINE, GZLINE, QLINE, SHUN */
except ban {
mask *@192.0.2.1;
type all;
};
}
/* With deny dcc blocks you can ban filenames for DCC */
deny dcc {
filename "*sub7*";
reason "Possible Sub7 Virus";
};
}
/* deny channel allows you to ban a channel (mask) entirely */
deny channel {
channel "*warez*";
reason "Warez is illegal";
class "clients";
};
}
/* VHosts (Virtual Hosts) allow users to acquire a different host.
* See https://www.unrealircd.org/docs/Vhost_block
@@ -373,17 +374,62 @@ vhost {
mask *@unrealircd.com;
login "test";
password "test";
};
}
/* Blacklist blocks will query an external DNS Blacklist service
* whenever a user connects, to see if the IP address is known
* to cause drone attacks, is a known hacked machine, etc.
* Documentation: https://www.unrealircd.org/docs/Blacklist_block
* Or just have a look at the blocks below.
*/
/* DroneBL, probably the most popular blacklist used by IRC Servers.
* See https://dronebl.org/ for their documentation and the
* meaning of the reply types. At time of writing we use types:
* 3: IRC Drone, 5: Bottler, 6: Unknown spambot or drone,
* 7: DDoS Drone, 8: SOCKS Proxy, 9: HTTP Proxy, 10: ProxyChain,
* 11: Web Page Proxy, 12: Open DNS Resolver, 13: Brute force attackers,
* 14: Open Wingate Proxy, 15: Compromised router / gateway,
* 16: Autorooting worms.
*/
blacklist dronebl {
dns {
name dnsbl.dronebl.org;
type record;
reply { 3; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15; 16; }
}
action gline;
ban-time 24h;
reason "Proxy/Drone detected. Check https://dronebl.org/lookup?ip=$ip for details.";
}
/* EFnetRBL, see https://rbl.efnetrbl.org/ for documentation
* and the meaning of the reply types.
* At time of writing: 1 is open proxy, 4 is TOR, 5 is drones/flooding.
*
* NOTE: If you want to permit TOR proxies on your server, then
* you need to remove the '4;' below in the reply section.
*/
blacklist efnetrbl {
dns {
name rbl.efnetrbl.org;
type record;
reply { 1; 4; 5; }
}
action gline;
ban-time 24h;
reason "Proxy/Drone/TOR detected. Check https://rbl.efnetrbl.org/?i=$ip for details.";
}
/* You can include other configuration files */
/* include "klines.conf"; */
/* Network configuration */
set {
network-name "MYNet";
default-server "irc.mynet.org";
services-server "services.mynet.org";
stats-server "stats.mynet.org";
network-name "ExampleNET";
default-server "irc.example.org";
services-server "services.example.org";
stats-server "stats.example.org";
help-channel "#Help";
hiddenhost-prefix "Clk";
prefix-quit "Quit";
@@ -399,20 +445,21 @@ set {
"aoAr1HnR6gl3sJ7hVz4Zb7x4YwpW";
"and another one";
"and another one";
};
};
}
}
/* Server specific configuration */
set {
kline-address "set.this.to.email.address"; /* e-mail or URL shown when a user is banned */
modes-on-connect "+ixw"; /* when users connect, they will get these user modes */
modes-on-oper "+xwgs"; /* when someone becomes IRCOp they'll get these modes */
modes-on-oper "+xws"; /* when someone becomes IRCOp they'll get these modes */
modes-on-join "+nt"; /* default channel modes when a new channel is created */
oper-auto-join "#opers"; /* IRCOps are auto-joined to this channel */
options {
hide-ulines; /* hide U-lines in /MAP and /LINKS */
show-connect-info; /* show "looking up your hostname" messages on connect */
};
}
maxchannelsperuser 10; /* maximum number of channels a user may /JOIN */
@@ -427,15 +474,12 @@ set {
/* static-part does the same for /PART */
/* static-part yes; */
/* Which /STATS to restrict to opers only. We suggest to leave it to * (ALL) */
oper-only-stats "*";
/* Anti flood protection */
/* Flood protection */
anti-flood {
nick-flood 3:60; /* 3 nick changes per 60 seconds (the default) */
connect-flood 3:60; /* 3 connection attempts per 60 seconds (the default) */
away-flood 4:120; /* 4 times per 2 minutes you may use /AWAY (default) */
};
}
/* Settings for spam filter */
spamfilter {
@@ -443,8 +487,93 @@ set {
ban-reason "Spam/Advertising"; /* default reason */
virus-help-channel "#help"; /* channel to use for 'viruschan' action */
/* except "#help"; channel to exempt from Spamfilter */
};
};
}
/* Restrict certain commands.
* See https://www.unrealircd.org/docs/Set_block#set::restrict-commands
*/
restrict-commands {
list {
connect-delay 60;
exempt-identified yes;
exempt-reputation-score 24;
}
invite {
connect-delay 120;
exempt-identified yes;
exempt-reputation-score 24;
}
/* In addition to the ability to restrict any command,
* such as shown above. There are also 4 special types
* that you can restrict. These are "private-message",
* "private-notice", "channel-message" and "channel-notice".
* They are commented out (disabled) in this example:
*/
//private-message {
// connect-delay 10;
//}
//private-notice {
// connect-delay 10;
//}
}
}
/*
* The following will configure connection throttling of "unknown users".
*
* When UnrealIRCd detects a high number of users connecting from IP addresses
* that have not been seen before, then connections from new IP's are rejected
* above the set rate. For example at 10:60 only 10 users per minute can connect
* that have not been seen before. Known IP addresses can always get in,
* regardless of the set rate. Same for users who login using SASL.
*
* See also https://www.unrealircd.org/docs/Connthrottle for details.
* Or just keep reading the default configuration settings below:
*/
set {
connthrottle {
/* First we must configure what we call "known users".
* By default these are users on IP addresses that have
* a score of 24 or higher. A score of 24 means that the
* IP was connected to this network for at least 2 hours
* in the past month (or minimum 1 hour if registered).
* The sasl-bypass option is another setting. It means
* that users who authenticate to services via SASL
* are considered known users as well.
* Users in the "known-users" group (either by reputation
* or by SASL) are always allowed in by this module.
*/
known-users {
minimum-reputation-score 24;
sasl-bypass yes;
}
/* New users are all users that do not belong in the
* known-users group. They are considered "new" and in
* case of a high number of such new users connecting
* they are subject to connection rate limiting.
* By default the rate is 20 new local users per minute
* and 30 new global users per minute.
*/
new-users {
local-throttle 20:60;
global-throttle 30:60;
}
/* This configures when this module will NOT be active.
* The default settings will disable the module when:
* - The reputation module has been running for less than
* a week. If running less than 1 week then there is
* insufficient data to consider who is a "known user".
* - The server has just been booted up (first 3 minutes).
*/
disabled-when {
reputation-gathering 1w;
start-delay 3m;
}
}
}
/* Finally, you may wish to have a MOTD (Message of the Day), this can be
* done by creating an 'ircd.motd' text file in your conf/ directory.
+58 -63
View File
@@ -1,4 +1,4 @@
/* Fichier de configuration pour UnrealIRCd 4.0
/* Fichier de configuration pour UnrealIRCd 5
*
* Copiez ce fichier dans le répertoire conf/, renommez le
* 'unrealircd.conf' et parcourez-le ligne par ligne (modifiez le !)
@@ -13,8 +13,8 @@
* beaucoup :
* https://www.unrealircd.org/docs/Configuration#Configuration_file_syntax
*
* Documentation pour UnrealIRCd 4 (très complète !) :
* https://www.unrealircd.org/docs/UnrealIRCd_4_documentation/fr
* Documentation pour UnrealIRCd 5 (très complète !) :
* https://www.unrealircd.org/docs/UnrealIRCd_5_documentation/fr
*
* Foire Aux Questions :
* https://www.unrealircd.org/docs/FAQ
@@ -49,7 +49,7 @@ include "modules.default.conf";
*/
include "help/help.conf";
include "badwords.conf";
include "spamfilter.conf";
//include "spamfilter.conf";
include "operclass.default.conf";
/* Le bloc me { } indique qui est le serveur.
@@ -59,10 +59,10 @@ include "operclass.default.conf";
* (chaque serveur doit avoir un sid différent).
*/
me {
name "irc.foonet.com";
info "Serveur FooNet";
name "irc.example.org";
info "Serveur ExampleNET";
sid "001";
};
}
/* Le bloc admin { } définit ce que les utilisateurs verront en faisant
* /ADMIN. C'est généralement des infos de contact de l'administrateur.
@@ -70,8 +70,8 @@ me {
admin {
"Bob Smith";
"bob";
"adresse.email@foonet.com";
};
"adresse.email@example.org";
}
/* Les clients et serveurs sont placés dans des classes, que nous
* définissons dans ces blocs class { }.
@@ -92,7 +92,7 @@ class clients
maxclients 1000;
sendq 200k;
recvq 8000;
};
}
/* Classe spéciale pour des IRCOps avec des limites plus hautes */
class opers
@@ -101,7 +101,7 @@ class opers
maxclients 50;
sendq 1M;
recvq 8000;
};
}
/* Classe pour des serveurs */
class servers
@@ -110,7 +110,7 @@ class servers
connfreq 15; /* essayer de se connecter toutes les 15 sec */
maxclients 10; /* nombre max de serveurs */
sendq 5M;
};
}
/* Les blocs allow définissent quels clients peuvent se connecter au
* serveur. Ils vous permettent d'ajouter un mot de passe ou de restreindre
@@ -124,7 +124,7 @@ allow {
ip *@*;
class clients;
maxperip 5;
};
}
/* Exemple de bloc allow spécial pour une IP donnée :
* Les utilisateurs sur cette IP doivent se connecter avec un mot de passe.
@@ -135,7 +135,7 @@ allow {
class clients;
password "unmotdepassesecret";
maxperip 20;
};
}
/* Les blocs oper définissent vos Opérateurs IRC.
* Les Opérateurs IRC sont des utilisateurs avec des "droits en plus"
@@ -160,8 +160,8 @@ oper bobsmith {
*/
operclass netadmin;
swhois "est un Administrateur du Réseau";
vhost netadmin.mynet.org;
};
vhost netadmin.example.org;
}
/* Les blocs listen définissent les ports sur lesquels le serveur écoute.
* C'est-à-dire les ports que les clients et les serveurs utilisent pour
@@ -174,29 +174,29 @@ oper bobsmith {
* port <numéro de port>;
* options {
* <options....>;
* };
* };
* }
* }
*/
/* Port standard pour IRC 6667 */
listen {
ip *;
port 6667;
};
}
/* Port standard pour IRC sur SSL/TLS 6697 */
listen {
ip *;
port 6697;
options { ssl; };
};
options { tls; }
}
/* Port SSL/TLS spécial pour la connexion entre serveurs */
listen {
ip *;
port 6900;
options { ssl; serversonly; };
};
options { tls; serversonly; }
}
/* NOTE : Si vous utilisez un serveur IRC avec plusieurs IP et que vous
* utilisez les blocs listen ci-dessus, vous aurez peut-être une
@@ -212,23 +212,23 @@ listen {
* pour former un réseau IRC.
* Voir https://www.unrealircd.org/docs/Tutorial:_Linking_servers
*/
link hub.mynet.org
link hub.example.org
{
incoming {
mask *@something;
};
}
outgoing {
bind-ip *; /* ou une IP précise */
hostname hub.mynet.org;
hostname hub.example.org;
port 6900;
options { ssl; };
};
options { tls; }
}
password "00:11:22:33:44:55:66:77:88:99:AA:BB:CC:DD:EE:FF"; /* Empreinte SSL de l'autre serveur */
class servers;
};
}
/* Les U-lines donnent encore plus de pouvoir à certains serveurs.
* Si vous utilisez des Services, vous devez les indiquer ici.
@@ -237,8 +237,8 @@ link hub.mynet.org
* https://www.unrealircd.org/docs/Services )
*/
ulines {
services.mynet.org;
};
services.example.org;
}
/* Ici vous pouvez indiquer un mot de passe pour les commandes /DIE et
* /RESTART, qui sont restreintes aux IRCops.
@@ -248,7 +248,7 @@ ulines {
drpass {
restart "restart";
die "die";
};
}
/* Le bloc log indique ce qui doit être journalisé et dans quel fichier.
* Voir aussi https://www.unrealircd.org/docs/Log_block
@@ -267,8 +267,8 @@ log "ircd.log" {
oper-override;
tkl;
spamfilter;
};
};
}
}
/* Avec des "alias", vous pouvez créer un alias comme /UNTRUC pour envoyer
* un message à un utilisateur ou à un bot. Ils sont souvent utilisés pour
@@ -286,7 +286,7 @@ include "aliases/anope.conf";
ban nick {
mask "*C*h*a*n*S*e*r*v*";
reason "Réservé aux Services";
};
}
/* Bannir une IP.
* NB : vous pouvez aussi utiliser /KLINE, /GLINE et /ZLINE pour ça.
@@ -294,7 +294,7 @@ ban nick {
ban ip {
mask 195.86.232.81;
reason "Je vous hais !";
};
}
/* Bannir un serveur - si ce serveur est connecté au réseau, nous nous
* déconnecterons
@@ -302,7 +302,7 @@ ban ip {
ban server {
mask eris.berkeley.edu;
reason "Va-t-en d'ici.";
};
}
/* Bannir un utilisateur - juste pour l'exemple, on utilise normalement
* /KLINE or /GLINE pour ça
@@ -310,18 +310,18 @@ ban server {
ban user {
mask *tirc@*.saturn.bbn.com;
reason "Idiot";
};
}
/* Bannir un realname (ou 'gecos') */
ban realname {
mask "Swat Team";
reason "mIRKFORCE";
};
}
ban realname {
mask "sub7server";
reason "sub7";
};
}
/* Exceptions de ban et TKL. Vous permet d'exempter des utilisateurs des
* KLINE, GLINE, etc ...
@@ -335,13 +335,13 @@ ban realname {
except ban {
mask *@192.0.2.1;
// vous pouvez ajouter d'autres lignes mask à la suite
};
}
/* except tkl avec le type 'all' vous protège des GLINE, GZLINE, QLINE, SHUN */
except tkl {
/* except ban avec le type 'all' vous protège des GLINE, GZLINE, QLINE, SHUN */
except ban {
mask *@192.0.2.1;
type all;
};
}
/* Avec un bloc deny dcc vous pouvez interdire des noms de fichiers dans
* les échanges DCC
@@ -349,14 +349,14 @@ except tkl {
deny dcc {
filename "*sub7*";
reason "Possible virus Sub7";
};
}
/* deny channel vous permet d'interdire des masques de noms de salons */
deny channel {
channel "*warez*";
reason "Le warez est illegal";
class "clients";
};
}
/* Les VHosts (Virtual Hosts - Hôtes Virtuels) permettent aux utilisateurs
* d'avoir un nom d'hôte différent.
@@ -372,17 +372,17 @@ vhost {
mask *@unrealircd.com;
login "test";
password "test";
};
}
/* Vous pouvez inclure d'autres fichiers de configuration */
/* include "klines.conf"; */
/* Configuration du réseau */
set {
network-name "MYNet";
default-server "irc.mynet.org";
services-server "services.mynet.org";
stats-server "stats.mynet.org";
network-name "ExampleNET";
default-server "irc.example.org";
services-server "services.example.org";
stats-server "stats.example.org";
help-channel "#Help";
hiddenhost-prefix "Clk";
prefix-quit "Quit";
@@ -400,20 +400,20 @@ set {
"aoAr1HnR6gl3sJ7hVz4Zb7x4YwpW";
"et une autre";
"et une troisième";
};
};
}
}
/* Configuration spécifique au serveur */
set {
kline-address "indiquez.une.adresse.email"; /* e-mail ou URL indiquée lorsqu'un utilisateur est banni */
modes-on-connect "+ixw"; /* modes utilisateur ajoutés lorsqu'un utilisateur se connecte */
modes-on-oper "+xwgs"; /* modes utilisateur ajoutés lorsqu'un utilisateur devient IRCOp */
modes-on-oper "+xws"; /* modes utilisateur ajoutés lorsqu'un utilisateur devient IRCOp */
oper-auto-join "#opers"; /* salon que les IRCOps joignent automatiquement */
options {
hide-ulines; /* cacher les U-lines de /MAP et /LINKS */
show-connect-info; /* afficher les messages "looking up your hostname" à la connexion */
};
}
maxchannelsperuser 10; /* nombre max de salons par utilisateur */
@@ -430,17 +430,12 @@ set {
/* static-part fait la même chose pour /PART */
/* static-part yes; */
/* Quelles /STATS sont restreintes aux Opérateurs. Nous vous
* conseillons de laisser '*' (toutes)
*/
oper-only-stats "*";
/* Protections anti-flood */
anti-flood {
nick-flood 3:60; /* 3 changements de nick par 60 secondes */
connect-flood 3:60; /* 3 tentatives de connexions par 60 seconds */
away-flood 4:120; /* 4 utilisation de /AWAY par 2 minutes */
};
}
/* Paramètres de Spamfilter */
spamfilter {
@@ -448,8 +443,8 @@ set {
ban-reason "Spam/Publicité"; /* raison par defaut */
virus-help-channel "#help"; /* salon par défaut pour l'action 'viruschan' */
/* except "#help"; salon à exempter de Spamfilter */
};
};
}
}
/*
* Un problème ou besoin d'aide supplémentaire ?
+107 -66
View File
@@ -1,4 +1,4 @@
/* UnrealIRCd 4.0 için yapılandırma dosyası
/* UnrealIRCd 5 için yapılandırma dosyası
* Türkçe Çeviri: Diablo - (Serkan Sepetçi)
* İletişim: irc.trirc.com:6667 - diablo@unrealircd.org
*
@@ -14,8 +14,8 @@
* bu size bilgi edinmeniz açısından yardımcı olacaktır:
* https://www.unrealircd.org/docs/Configuration#Configuration_file_syntax
*
* UnrealIRCd 4 belgeleme (çok geniş!):
* https://www.unrealircd.org/docs/UnrealIRCd_4_documentation
* UnrealIRCd 5 belgeleme (çok geniş!):
* https://www.unrealircd.org/docs/UnrealIRCd_5_documentation
*
* Sıkça Sorulan Sorular:
* https://www.unrealircd.org/docs/FAQ
@@ -49,7 +49,7 @@ include "modules.default.conf";
*/
include "help/help.conf";
include "badwords.conf";
include "spamfilter.conf";
//include "spamfilter.conf";
include "operclass.default.conf";
/* me { } bloğu genelde kim olduğumuzu belirtir.
@@ -59,10 +59,10 @@ include "operclass.default.conf";
* kendi sid olmalıdır).
*/
me {
name "irc.foonet.com";
info "FooNet Server";
name "irc.example.org";
info "ExampleNET Server";
sid "001";
};
}
/* admin { } bloğu /ADMIN sorgusunda kullanıcılara görüntülenecek metni belirler.
* Normalde yöneticiye ulaşma konusunda bilgi içerir.
@@ -70,8 +70,8 @@ me {
admin {
"Bob Smith";
"bob";
"widely@used.name";
};
"email@example.org";
}
/* Kullanıcılar ve sunucular için class { } bloğu belirtilir.
* Class blokları aşağıdaki işlemlerden oluşur:
@@ -88,7 +88,7 @@ class clients
maxclients 1000;
sendq 200k;
recvq 8000;
};
}
/* IRCOp'lar için varsaylan yüksek limitli özel class ayarları */
class opers
@@ -97,7 +97,7 @@ class opers
maxclients 50;
sendq 1M;
recvq 8000;
};
}
/* Sunucular için varsayılan class ayarları */
class servers
@@ -106,7 +106,7 @@ class servers
connfreq 15; /* Her 15 saniyede bir bağlanmayı dener */
maxclients 10; /* maksimum kullanıcı */
sendq 5M;
};
}
/* Allow blockları sunucunuza kimlerin bağlanabileceğini belirtir.
* Bir sunucu şifresi eklenebilir veya belirlitilen bir IP adresi için
@@ -120,7 +120,7 @@ allow {
ip *@*;
class clients;
maxperip 3;
};
}
/* Örnek olarak özel bir IP bloğu izini:
* Bu IP bir şifre ile bağlantı yapması olduğunu gerektirir.
@@ -131,7 +131,7 @@ allow {
class clients;
password "somesecretpasswd";
maxperip 20;
};
}
/* Oper bloğu, IRC Operatorleri tanımlar.
* IRC Operatörler, diğer kullanıcılara göre "ekstra haklara" sahip kullanıcılardır.
@@ -159,8 +159,8 @@ oper bobsmith {
*/
operclass netadmin;
swhois "is a Network Administrator";
vhost netadmin.mynet.org;
};
vhost netadmin.example.org;
}
/* Listen blokları sunucu portu için gereken bağlantı noktalarını tanımlar.
* Diğer bir deyişle: Bu portlar kullanıcılar ve serverlar için
@@ -173,29 +173,29 @@ oper bobsmith {
* port <port numarası>;
* options {
* <seçenekler....>;
* };
* };
* }
* }
*/
/* Standard IRC port 6667 */
listen {
ip *;
port 6667;
};
}
/* Standard IRC SSL/TLS port 6697 */
listen {
ip *;
port 6697;
options { ssl; };
};
options { tls; }
}
/* Özel SSL/TLS sadece sunucuları bağlamak için port */
listen {
ip *;
port 6900;
options { ssl; serversonly; };
};
options { tls; serversonly; }
}
/* DiKKAT: Eğer bir çok IP barındıran bir IRCd Shell kullanıyorsanız
* logunuzda olası 'Address already in use' hatasını alacaksınız
@@ -209,50 +209,49 @@ listen {
* Link blockları bir ağ oluşturmak için birden fazla sunucu bağlamaya izin verir.
* Görmek için: https://www.unrealircd.org/docs/Tutorial:_Linking_servers
*/
link hub.mynet.org
link hub.example.org
{
incoming {
mask *@something;
};
}
outgoing {
bind-ip *; /* veya açıkça bir IP */
hostname hub.mynet.org;
hostname hub.example.org;
port 6900;
options { ssl; };
};
options { tls; }
}
/* Kimlik doğrulaması için diğer sunucunun SPKI parmak izini kullanıyoruz.
* Kullanmamız için diğer tarafda './unrealircd spkifp' uygulayıp çalıştırıyoruz.
* NOT: UnrealIRCd 4.0.16 veya üzeri versiyonları gerektirir.
*/
password "AABBCCDDEEFFGGHHIIJJKKLLMMNNOOPPQQRRSSTTUUV=" { spkifp; };
password "AABBCCDDEEFFGGHHIIJJKKLLMMNNOOPPQQRRSSTTUUV=" { spkifp; }
class servers;
};
}
/* Servis'ler için bağlantı bloğu genellikle çok daha basittir.
* Servis'lerin ne olduğu hakkında daha fazla bilgi için,
* https://www.unrealircd.org/docs/Services
*/
link services.mynet.org
link services.example.org
{
incoming {
mask 127.0.0.1;
};
}
password "changemeplease";
class servers;
};
}
/* U-lines satırları sunuculara daha güç/komut kazandırır.
* Eğer hizmetlerini kullanmak istiyorsanız onları buraya eklemeniz gerekir.
* ASLA buraya (normal) UnrealIRCd sunucunun adını yazmayınız!!!
*/
ulines {
services.mynet.org;
};
services.example.org;
}
/* Bu blok /DIE ve /RESTART için şifre tanımlamanızı sağlar. Sadece IRCOp'lar içindir.
* Bu genelde kazara sunucuyu yeniden başlatma ve kapanmasına karşı biraz
@@ -261,7 +260,7 @@ ulines {
drpass {
restart "restart";
die "die";
};
}
/* Bu log bloğu hangi dosyaya ve nelerin olması gerektiğini tanımlar.
* Görmeniz için: https://www.unrealircd.org/docs/Log_block
@@ -280,8 +279,8 @@ log "ircd.log" {
oper-override;
tkl;
spamfilter;
};
};
}
}
/* Bazı kullanıcılara veya botlara bir mesaj göndermek için "aliases"
* takma ad oluşturmanızı sağlar. Genellikle servisler için kullanılır.
@@ -295,7 +294,7 @@ include "aliases/anope.conf";
ban nick {
mask "*C*h*a*n*S*e*r*v*";
reason "Servisler için ayrılmış";
};
}
/* Ban ip.
* Normalde bunun için /KLINE, /GLINE ve /ZLINE kullanıldığını unutmayınız.
@@ -303,19 +302,19 @@ ban nick {
ban ip {
mask 195.86.232.81;
reason "Senden nefret ediyorum";
};
}
/* Ban server - bir sunucunun bağlanmasını devredışı kılar */
ban server {
mask eris.berkeley.edu;
reason "Defol git buradan.";
};
}
/* Ban user - normalde /KLINE veya /GLINE kullanıldığını unutmayınız */
ban user {
mask *tirc@*.saturn.bbn.com;
reason "Salak";
};
}
/* Ban realname bloğu bir kullanıcıyı, GECOS kısmı esas alınarak
* banlamanıza olanak sağlar.
@@ -323,12 +322,12 @@ ban user {
ban realname {
mask "Swat Team";
reason "mIRKFORCE";
};
}
ban realname {
mask "sub7server";
reason "sub7";
};
}
/* Ban ve TKL istisnaları. Kullanıcıları / makineleri gözetmeksizin
* KLINE, GLINE, gibi banlardan muaf tutmanıza olanak sağlar.
@@ -341,26 +340,26 @@ ban realname {
except ban {
mask *@192.0.2.1;
// burada daha fazla mask girdileri ekleyebilirsiniz..
};
}
/* except tkl bloğu, sizi 'tüm' GLINE, GZLINE, QLINE, SHUN gibi banlardan koruyacaktır */
except tkl {
/* except ban bloğu, sizi 'tüm' GLINE, GZLINE, QLINE, SHUN gibi banlardan koruyacaktır */
except ban {
mask *@192.0.2.1;
type all;
};
}
/* Deny dcc bloğu, sunucu üzerinden DCC yoluyla dosya gönderilmesine izin vermeyecektir */
deny dcc {
filename "*sub7*";
reason "Olası Sub7 Virüsü";
};
}
/* Deny channel bloğu, kullanıcıların belirtilen kanallara girmesini engeller */
deny channel {
channel "*warez*";
reason "Warez is illegal";
class "clients";
};
}
/* VHosts (Virtual Hosts) bloğu, kullanıcının yeni bir host alabilmesine olanak sağlar.
* Görmeniz için; https://www.unrealircd.org/docs/Vhost_block
@@ -375,17 +374,62 @@ vhost {
mask *@unrealircd.com;
login "test";
password "test";
};
}
/* Blacklist blokları, bir kullanıcı bağlandığında IP adresinin drone saldırılarına
* neden olduğunu, bilinen bir saldırıya uğramış bir makine olup olmadığını görmek
* için harici bir DNS Kara Liste hizmetinden sorgulayacaktır.
* Belgeleme: https://www.unrealircd.org/docs/Blacklist_block
* veya aşağıdaki bloklar satırına bakınız.
*/
/* DroneBL, muhtemelen IRC Sunucuları tarafından kullanılan en popüler kara liste.
* Belgeler ve cevap (reply) tiplerin anlamlarını görmek için https://dronebl.org/
* adresine bakınız. Bu zamanda aşağıdaki cevap (reply) tiplerini kullanıyoruz:
* 3: IRC Drone, 5: Bottler, 6: Unknown spambot or drone,
* 7: DDoS Drone, 8: SOCKS Proxy, 9: HTTP Proxy, 10: ProxyChain,
* 11: Web Page Proxy, 12: Open DNS Resolver, 13: Brute force attackers,
* 14: Open Wingate Proxy, 15: Compromised router / gateway,
* 16: Autorooting worms.
*/
blacklist dronebl {
dns {
name dnsbl.dronebl.org;
type record;
reply { 3; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15; 16; }
}
action gline;
ban-time 24h;
reason "Proxy/Drone belirlendi. Ayrıntılar için https://dronebl.org/lookup?ip=$ip adresine bakınız.";
}
/* EFnetRBL, belgeler ve cevap (reply) tiplerini görmek için https://rbl.efnetrbl.org/
* adresine bakınız.
* Yazma sırasında: 1 is open proxy, 4 is TOR, 5 is drones/flooding.
*
* NOT: Sunucunuzda TOR proxy'lerine izin vermek istiyorsanız,
* cevap (reply) tiplerinden '4;' öğesini kaldırmanız gerekiyor.
*/
blacklist efnetrbl {
dns {
name rbl.efnetrbl.org;
type record;
reply { 1; 4; 5; }
}
action gline;
ban-time 24h;
reason "Proxy/Drone/TOR belirlendi. Ayrıntılar için https://rbl.efnetrbl.org/?i=$ip adresine bakınız.";
}
/* Diğer yapılandırma dosyalarını dahil edebilirsiniz */
/* include "klines.conf"; */
/* Ağ yapılandırması */
set {
network-name "MYNet";
default-server "irc.mynet.org";
services-server "services.mynet.org";
stats-server "stats.mynet.org";
network-name "ExampleNET";
default-server "irc.example.org";
services-server "services.example.org";
stats-server "stats.example.org";
help-channel "#Help";
hiddenhost-prefix "Clk";
prefix-quit "Quit";
@@ -401,20 +445,20 @@ set {
"aoAr1HnR6gl3sJ7hVz4Zb7x4YwpW";
"ve diğeri";
"ve diğeri";
};
};
}
}
/* Sunucunun kendine özgü yapılandırması */
set {
kline-address "set.this.to.email.address"; /* bir kullanıcı banlandığında e-mail yada URL satırı gösterir */
modes-on-connect "+ixw"; /* kullanıcılar bağlandığında, bu modları alacaktır */
modes-on-oper "+xwgs"; /* Birisi IRC Operatör olduğunda bu modları alacaktır */
modes-on-oper "+xws"; /* Birisi IRC Operatör olduğunda bu modları alacaktır */
oper-auto-join "#opers"; /* IRCoplar bu kanala otomatik olarak giriş yapacaktır */
options {
hide-ulines; /* U-lines satırları /MAP ve /LINKS komutunda gözükmez */
show-connect-info; /* sunucuya bağlanırken "looking up your hostname" mesajı görüntülenecektir */
};
}
maxchannelsperuser 10; /* bir kullanıcının maksimum girebileceği kanal sayısı */
@@ -429,15 +473,12 @@ set {
/* static-part /PART komutu ile aynı işi görür */
/* static-part yes; */
/* /STATS komutunu operler için kısıtlar. Önerilen * (TÜMÜ) */
oper-only-stats "*";
/* Anti flood Koruması */
anti-flood {
nick-flood 3:60; /* Her 60 saniyede 3 nick değişikliği (varsayılan) */
connect-flood 3:60; /* Her 60 saniyede 3 bağlantı girişi izni (varsayılan) */
away-flood 4:120; /* Her 2 dakikada 4 kez /AWAY kullanımı izni (varsayılan) */
};
}
/* Spam filter Ayarları */
spamfilter {
@@ -445,8 +486,8 @@ set {
ban-reason "Spam/Advertising"; /* varsayılan sebep */
virus-help-channel "#help"; /* 'viruschan' eylemi için kullanılacak kanal */
/* except "#help"; Spamfilter'den muaf tutulacak kanal */
};
};
}
}
/* Son olarak, bir MOTD (Günün Mesajı) oluşturabilirsiniz, bu
* conf/ dizininde 'ircd.motd' metin dosyası oluşturarak yapabilirsiniz.
* Bu dosyanın içeriği bağlantı kuran kullanıcılara gösterilecektir.
+382 -247
View File
File diff suppressed because it is too large Load Diff
+129 -134
View File
@@ -1,4 +1,4 @@
/* UnrealIRCd 4.0 Help Configuration
/* UnrealIRCd 5 Help Configuration
* Based on the original help text written by hAtbLaDe
* Revised by CC (07/2002) and many others
*
@@ -28,7 +28,7 @@ help {
" /HELPOP OFLAGS - liefert eine Liste aller O:Line Flags";
" -";
" ==-------------------------oOo--------------------------==";
};
}
help Usercmds {
" Zur Zeit sind folgende User-Befehle verfügbar.";
@@ -48,7 +48,7 @@ help Usercmds {
" KICK NICK TIME";
" KNOCK NOTICE TOPIC";
" ==-------------------------oOo-------------------------==";
};
}
help Opercmds {
" Dieser Abschnitt führt alle Befehle auf, die nur";
@@ -69,7 +69,7 @@ help Opercmds {
" DCCDENY MKPASSWD SDESC ZLINE";
" DIE MODULE SETHOST";
" ==-------------------------oOo-------------------------==";
};
}
help Svscmds {
" Dieser Abschnitt gibt alle Befehle aus die nur";
@@ -85,7 +85,7 @@ help Svscmds {
" SVSFLINE SVSMOTD SVSO SWHOIS";
" SVSJOIN SVSNICK SVSPART UNSQLINE";
" ==-------------------------oOo-------------------------==";
};
}
help Umodes {
" Hier eine Liste aller User Modi, die benutzt werden können.";
@@ -120,7 +120,7 @@ help Umodes {
" V = Markiert den Client als einen WebTV-User";
" W = User erhält eine NOTICE, wenn und von wem er /WHOISed wird (nur für IRCOPS)";
" ==---------------------------oOo---------------------------==";
};
}
help Snomasks {
" Snomask seht für 'Service NOtice MASK'. Hiermit wird (hauptsächlich)";
@@ -150,7 +150,7 @@ help Snomasks {
" S = Sieht Spamfilter Treffer";
" v = Sieht wenn sich jemand für einen VHOST einloggt.";
" ==-------------------------oOo------------------------==";
};
}
help Chmodes {
" Hier sind alle verfügbaren ChannelModes aufgelistet die man mit /MODE setzen kann.";
@@ -197,7 +197,7 @@ help Chmodes {
" [h] erfordert mindestens HalfOp Staus, [o] erfordert mindestens Op Staus,";
" [q] erfordert Owner Status";
" ==------------------------------oOo----------------------------==";
};
}
help ExtBans {
" Erweiterte Banntypen: ";
@@ -228,7 +228,7 @@ help ExtBans {
" | | Dieser Bann würde auch auf 'Stupid bot script v1.4'. ";
" | | passen. ";
" ==------------------------------------------------------------------------------==";
};
}
help Chmodef {
" Der +f Channel Mode ermöglicht eienn umfangreichen Flood Schutz für einen";
@@ -254,7 +254,7 @@ help Chmodef {
" -";
" Wird eine aktion für einen Modus gewählt, kann eine Zeit (in Minuten)";
" angegeben werden, nach der die gewählte aktion aufgehoben wird.";
};
}
help Oflags {
@@ -292,7 +292,7 @@ help Oflags {
" X (can_addline) Kann /ADDLINE ausführen";
" d (can_dccdeny) Kann /DCCDENY ausführen";
" ==----------------------oOo--------------------==";
};
}
help Nick {
@@ -302,7 +302,7 @@ help Nick {
" -";
" Syntax: NICK <neuer Nickname>";
" Beispiel: NICK hAtbLaDe";
};
}
help Whois {
" Zeigt Informationen über den angegebenen User";
@@ -323,7 +323,7 @@ help Whois {
" + - User ist Voiced (+v)";
" ! - User hat Channels, die für whois verborgen sind (+p) und man selbst ist IRCOp";
" ? - Der Channel ist geheim (+s) und man selbst ist IRCOp";
};
}
help Who {
" Liefert Informationen über User";
@@ -367,7 +367,7 @@ help Who {
" + - User ist Voiced (+v)";
" ! - User ist +H und man selbst ein IRC Operator";
" ? - User ist nur sichtbar, weil man selbst IRC Operator ist";
};
}
help Whowas {
" Liefert Informationen über User, die nicht mehr zum";
@@ -376,7 +376,7 @@ help Whowas {
" Syntax: WHOWAS <nickname>";
" WHOWAS <nickname> <max number of replies>";
" Beispiel: WHOWAS hAtbLaDe";
};
}
help Cycle {
" Der/die angegebene(n) Channel(s)werden verlassen und";
@@ -386,7 +386,7 @@ help Cycle {
" Syntax: CYCLE <chan1>,<chan2>,<chan3>";
" Example: CYCLE #help";
" Example: CYCLE #main,#chat";
};
}
help Dns {
" Liefert Informationen über den DNS Cache des IRC Servers.";
@@ -397,14 +397,14 @@ help Dns {
" 'DNS i' liefert Details über die Nameserver Konfiguration";
" -";
"Syntax: DNS [option]";
};
}
help Names {
" Liefert eine Liste aller User im angegeben Channel.";
" -";
"Syntax: NAMES <channel>";
"Beispiel: NAMES #Support";
};
}
help Ison {
" Überprüfung, ob bestimmte User mit angegebenem Nicknamen";
@@ -412,7 +412,7 @@ help Ison {
" -";
" Syntax: ISON <user> <user2> <user3> <user4>";
" Beispiel: ISON hAtbLaDe Stskeeps OperServ AOLBot";
};
}
help Join {
" Wird verwendet, um einen oder mehrere Channels auf einem";
@@ -427,7 +427,7 @@ help Join {
" Beispiel: JOIN #Support";
" JOIN #Lobby,#IRCd";
" JOIN #IRCd,#Support,#main letmein,somepass,anotherpass";
};
}
help Part {
" Befehl, um einen Channel zu verlassen, in dem man sich momentan";
@@ -438,7 +438,7 @@ help Part {
" Syntax: PART <chan>,<chan2>,<chan3>,<chan4> <reason>";
" Beispiel: PART #Support";
" PART #Lobby,#IRCd See ya later!";
};
}
help Motd {
" Zeigt die Message Of The Day des IRC Servers an, auf dem man ";
@@ -447,21 +447,21 @@ help Motd {
" -";
" Syntax: MOTD";
" MOTD <server>";
};
}
help Rules {
" Zeigt die Regeln des Netzwerkes an, mit dem man verbunden ist.";
" -";
" Syntax: RULES";
" RULES <server>";
};
}
help Lusers {
" Liefert Informationen über die Anzahl lokaler und ";
" globaler User und die maximal erreichte Userzahl..";
" -";
" Syntax: LUSERS [server]";
};
}
help Map {
" Zeigt eine pseude-grafische Netzwerks Karte an, aus der die";
@@ -469,7 +469,7 @@ help Map {
" zu Routing Zwecken benötigt.";
" -";
" Syntax: MAP";
};
}
help Quit {
" Beendet die Verbindung zum IRC Server. Die verbleibenden User in";
@@ -478,7 +478,7 @@ help Quit {
" -";
" Syntax: QUIT <reason>";
" Beispiel: QUIT Leaving!";
};
}
help Ping {
" Der Ping Befehl dient dazu, die Anwesenheit eines Users oder Servers";
@@ -490,10 +490,10 @@ help Ping {
" Zu beachten ist, dass dies unterschiedlich zum CTCP PING Befehl ist.";
" -";
" Syntax: PING <server> <server2>";
" Beispiel: PING irc.fyremoon.net";
" Beispiel: PING irc.example.org";
" PING hAtbLaDe";
" PING hAtbLaDe irc2.dynam.ac";
};
}
help Pong {
" Die PONG Nachricht ist die Antwort auf die PING Nachricht. Wird der";
@@ -502,16 +502,16 @@ help Pong {
" Nachricht geantwortet hat und diese Nachricht erzeugt hat.";
" -";
" Syntax: PONG <server> <server2>";
" Beispiel: PONG irc.fyremoon.net irc2.dynam.ac";
" (PONG Nachricht von irc.fyremoon.net to irc2.dynam.ac)";
};
" Beispiel: PONG irc.example.org irc2.dynam.ac";
" (PONG Nachricht von irc.example.org to irc2.dynam.ac)";
}
help Version {
" Liefert versions Informationen über den benutzten IRCd.";
" -";
" Syntax: VERSION";
" VERSION <server>";
};
}
help Stats {
" Liefert verschiedene statistische Informationen über den Server.";
@@ -521,21 +521,21 @@ help Stats {
" -";
" Gibt man nur /stats ohne Parameter ein, erhält man eine Liste der";
" möglichen Flags.";
};
}
help Links {
" Listet sämtliche Server auf, die momentan zum Netzwerk verbunden";
" sind. Nur IRCops können gelinkte U-lined Servers /Services) sehen.";
" -";
" Syntax: LINKS";
};
}
help Admin {
" Liefert Informationen über die Administration des Servers.";
" -";
" Syntax: ADMIN";
" ADMIN <server>";
};
}
help Userhost {
" Zeigt den userhost des angegebenen Nicknamen an. Wird ";
@@ -543,7 +543,7 @@ help Userhost {
" -";
" Syntax: USERHOST <nickname>";
" Beispiel: USERHOST hAtbLaDe";
};
}
help Userip {
" Liefert die IP des Users zurück, nach dem gefragt wurde.";
@@ -551,7 +551,7 @@ help Userip {
" -";
" Syntax: USERIP <nickname>";
" Beispiel: USERIP codemastr";
};
}
help Topic {
" Setzt oder ändert das Topic des angegebenen Channels";
@@ -561,7 +561,7 @@ help Topic {
" TOPIC <channel> <topic> (Ändert Topic)";
" Beispiel: TOPIC #Operhelp";
" TOPIC #Lobby Welcome to #Lobby!!";
};
}
help Invite {
" Sendet einem User eine Einladung, einen bestimmten Channel zu betreten.";
@@ -572,7 +572,7 @@ help Invite {
" Syntax: INVITE <user> <channel>";
" Beispiel: INVITE hAtbLaDe #Support";
" Beispiel: INVITE";
};
}
help Kick {
" Entfernt einen User aus einem Channel. Kann nur von Operators oder ";
@@ -582,7 +582,7 @@ help Kick {
" Syntax: KICK <channel>[,<channel2>..] <user>[,<user2>..] <reason>";
" Beispiel: KICK #Lobby foobar Lamer..";
" KICK #Lobby,#OperHelp Lamer23,Luser12 Lamers!";
};
}
help Away {
" Stellt den eigenen Online Status auf \"Away\" ein.";
@@ -590,7 +590,7 @@ help Away {
" Syntax: AWAY <Grund> (Setzt eigenen Nick auf Away und zeigt angegebenen Grund an)";
" AWAY (Hebt den Away Status auf)";
" Beispiel: AWAY Essenszeit!";
};
}
help Watch {
" Watch ist ein Benachrichtigungssystem welches schneller und ressourcenschonender";
@@ -604,7 +604,7 @@ help Watch {
" Syntax: WATCH +nick1 +nick2 +nick3 (Fügt Nickname hinzu)";
" WATCH -nick (Löscht Nickname)";
" WATCH (Zeigt die Watch Liste an)";
};
}
help List {
" Liefert eine vollständige Liste sämtlicher Channels im Netzwerk.";
@@ -621,7 +621,7 @@ help List {
" !*mask* Zeigt Channels an, die NICHT zur Maske *mask* passen";
" -";
" Sämtliche Flags können statt einer Standard Maske verwendet werden.";
};
}
help Privmsg {
" Eröffnet eine private Unterhaltung, ein sogenanntes 'Query'";
@@ -638,7 +638,7 @@ help Privmsg {
" Beispiel: PRIVMSG hAtbLaDe :Hello";
" PRIVMSG hAtbLaDe,Somefella,Lamer :Hallo allerseits!";
" PRIVMSG @#hottub Am Samstag haben wir Team Besprechung.";
};
}
help Notice {
" Sendet Nachrichten an bestimmte Empfänger, die nur von diesen gelesen";
@@ -656,7 +656,7 @@ help Notice {
" Beispiel: NOTICE hAtbLaDe :Hello";
" NOTICE hAtbLaDe,Somefella,Lamer :Hallo Leute!";
" NOTICE @#hottub Achtet mal auf diesen Lamer.";
};
}
help Knock {
" In Channels, die auf invite only eingestellt sind, kann man";
@@ -664,14 +664,14 @@ help Knock {
" -";
" Syntax: KNOCK <channel> <message>";
" Beispiel: KNOCK #secret_chan Ich bin Op hier, holt mich mal rein!";
};
}
help Setname {
" Ermöglicht es, dass User ihren \"Real name\" (GECOS) direkt online";
" im IRC, ohne neu zu connecten, ändern können.";
" -";
" Syntax: SETNAME <New Real Name>";
};
}
help Vhost {
" Verbirgt den realen Hostnamen durch Überschreiben mit einem virtuellen,";
@@ -680,7 +680,7 @@ help Vhost {
" -";
" Synatx: VHOST <login> <password>";
" Beispiel: VHOST openbsd ilovecypto";
};
}
help Mode {
" Setzt einen Modus für einen Channel oder einen User. Eine Liste der";
@@ -689,34 +689,34 @@ help Mode {
" Syntax: MODE <channel/user> <mode>";
" Beispiel: MODE #Support +tn";
" MODE #Support +ootn hAtbLaDe XYZ";
};
}
help Credits {
" Zeigt eine Liste aller, die an der Entwicklung von UnrealIRCd mitgewirkt haben.";
" -";
" Syntax: CREDITS";
" CREDITS <server>";
};
}
help Dalinfo {
" Diser Befehl liefert historische Danksagungen (von ircu, etc..)";
" -";
" Syntax: DALINFO";
" Syntax: DALINFO <server>";
};
}
help License {
" Dieser Befehl zeigt die Lizenzinformationen für UnrealIRCd an.";
" Syntax: LICENSE";
" LICENSE <server>";
};
}
help Time {
" Zeigt das aktuelle Datum und die Zeit des Servers an.";
" -";
" Syntax : TIME";
" TIME <server>";
};
}
help Silence {
" Nachrichten von einem User oder einer Liste von Usern werden ignoriert.";
@@ -724,7 +724,7 @@ help Silence {
" Syntax: SILENCE +nickname (Schreibt einen Nicknamen in die SILENCE Liste)";
" SILENCE -nickname (Löscht einen Nicknamen aus der SILENCE Liste)";
" SILENCE (Zeigt die aktuelle SILENCE Liste an)";
};
}
help Oper {
" Bewirkt, dass ein User den IRC Operator Status erhält.";
@@ -734,7 +734,7 @@ help Oper {
" Achtung: Sowohl uid als auch Passwort sind case sensitive ";
" (Groß- und Kleinschreibung beachten!)";
" Beispiel: OPER hAtbLaDe foobar234";
};
}
help Wallops {
" Sendet eine \"Nachricht\" an alle, die den Usermodus +w haben.";
@@ -742,7 +742,7 @@ help Wallops {
" können sie lesen.";
" -";
" Syntax: WALLOPS <nachricht>";
};
}
help Globops {
" Sendet eine globale \"Nachricht\" an alle IRCops. Die Nachricht";
@@ -751,7 +751,7 @@ help Globops {
" -";
" Syntax: GLOBOPS <message>";
" Beispiel: GLOBOPS Lets get em clones ..";
};
}
help Locops {
" Ähnlich, wie GLOBOPS, allerdings empfangen nur IRCops,";
@@ -759,28 +759,28 @@ help Locops {
" -";
" Syntax: LOCOPS <message>";
" Beispiel: LOCOPS Gib dem User mal ne k:line ...";
};
}
help Chatops {
" Sendet eine Nachricht an alle IrcOps (global).";
" -";
" Syntax: CHATOPS <message>";
" Example: CHATOPS Gonna k:line that user ...";
};
}
help Adchat {
" Sendet eine Nachricht an alle Admins, die online sind.";
" -";
" Syntax: ADCHAT <text>";
" Beispiel: ADCHAT Hey guys! I'm finally here.";
};
}
help Nachat {
" Sendet eine Nachricht an alle NetAdmins, die online sind.";
" -";
" Syntax: NACHAT <text>";
" Beispiel: NACHAT Hey guys! How is everything?";
};
}
help Kill {
" Dieser Befehl entfernt User vom Server (anders als KICK";
@@ -790,7 +790,7 @@ help Kill {
" -";
" Syntax: KILL <user1>, <user2>, <user3>,... <reason>";
" Beispiel: KILL Jack16 Werbung für Dialer hier nicht erlaubt";
};
}
help Kline {
" Dieser Befehl erzeugt zeitabhängige K:Line bezogen auf eine";
@@ -806,7 +806,7 @@ help Kline {
" Beispiel: KLINE *@*.aol.com Abuse (setzt eine permanente K:line)";
" KLINE *@*.someisp.com 2d Abuse (setzt eine K:line für 2 Tage)";
" KLINE -*@*.aol.com";
};
}
help Zline {
" Dieser Befehl erzeugt zeitabhängige Z:Line bezogen auf eine";
@@ -824,7 +824,7 @@ help Zline {
" ZLINE -*@127.0.0.1";
" Anmerkung: Gibt man bei zline statt einer IP einen Host an, so wirkt sie wie eine kline.";
" ACHTUNG: Der IrcOp benötigt hierfür das can_gkline oper Flag";
};
}
help Gline {
" Dieser Befehl erzeugt zeitabhängige G:Line bezogen auf eine";
@@ -842,7 +842,7 @@ help Gline {
" GLINE *@*.idiot.net 1d5h :Spammers (Setzt eine 29 std G:line)";
" GLINE -*@*.idiot.net";
" ACHTUNG: Der IrcOp benötigt hierfür das can_gkline oper Flag";
};
}
help Shun {
" Verhindert, dass der User IRGENDEINEN Befehl ausführen kann, ausser";
@@ -860,7 +860,7 @@ help Shun {
" (Shunt foobar@aol.com für 10 Minuten wegen Spamming)";
" SHUN +foobar@aol.com 1d6h :Spamming (Bewirkt einen 30 stündigen SHUN)";
" ACHTUNG: Der IrcOp benötigt hierfür das can_gkline oper Flag";
};
}
help Gzline {
" Dieser Befehl erzeugt zeitabhängige globale Z:Line. Wer eine IP Adresse";
@@ -877,7 +877,7 @@ help Gzline {
" GZLINE *@4.16.200.* 1d5h Spammers (Setzt eine 29 std Globale Z:line)";
" GZLINE -*@4.16.200.* ";
" Anmerkung: Gibt man bei gzline statt einer IP einen Host an, so wirkt sie wie eine gline.";
};
}
help Akill {
" Setzt einen Autokill für die angegebene Host Maske. Das verhindert, ";
@@ -887,14 +887,14 @@ help Akill {
" -";
" Syntax: AKILL <user@host> :<Grund>";
" Beispiel: AKILL foo@aol.com :Spammers!";
};
}
help Rakill {
" Löscht einen durch Service Administrator gesetzten AKILL.";
" DIESER BEFEHL IST NUR SERVERN ERLAUBT";
" -";
" Syntax: RAKILL <user@host>";
};
}
help Rehash {
" Veranlasst den Server, seine Konfigurationsdatei neu einzulesen.";
@@ -922,7 +922,7 @@ help Rehash {
" zur regelmäßigen automatischen Wiederverfügbarmachung von nicht mehr";
" benötigtem Speicherplatz, indem nicht mehr erreichbare Objekte im";
" Speicher automatisch freigegeben werden.";
};
}
help Restart {
" Killt den IRC Prozess und startet ihn neu. Dabei werden alle momentan";
@@ -932,7 +932,7 @@ help Restart {
" Syntax: RESTART";
" RESTART <password>";
" RESTART <password> <reason>";
};
}
help Die {
" Beendet den IRC Prozess. Dabei werden alle momentan zum Server";
@@ -941,17 +941,17 @@ help Die {
" -";
" Syntax: DIE";
" DIE <password>";
};
}
help Lag {
" Dieser Befehl ist ähnlich einem Traceroute für IRC Server.";
" Man gibt beispielsweise /LAG irc.fyremoon.net ein und es";
" Man gibt beispielsweise /LAG irc.example.org ein und es";
" erfolgen Antworten von jedem Server über den der Befehl geleitet wird";
" mit Zeit u.s.w.";
" Hilfreich, um nachzuschauen, wo ein Lag ist.";
" -";
" Syntax: LAG <server>";
};
}
help Sethost {
" Mit diesem Befehl kann man den Virtual host (Vhost) in jeden gewünschten";
@@ -960,7 +960,7 @@ help Sethost {
" -";
" Syntax: SETHOST <new hostname>";
" Beispiel: SETHOST hier.kommt.der.chef";
};
}
help Setident {
" Mit diesem Befehl kann man den Ident (Username) ändern.";
@@ -968,7 +968,7 @@ help Setident {
" -";
" Syntax: SETIDENT <new ident>";
" Beispiel: SETIDENT l33t";
};
}
help Chghost {
" Mit diesem Befehl kann man den Host eines Users, der aktuell";
@@ -977,7 +977,7 @@ help Chghost {
" -";
" Syntax: CHGHOST <nick> <host>";
" Beispiel: CHGHOST hAtbLaDe root.me.com";
};
}
help Chgident {
" Ändert den Ident eines Users im IRC Netzwerk.";
@@ -985,7 +985,7 @@ help Chgident {
" -";
" Syntax: CHGIDENT <nick> <ident>";
" Beispiel: CHGIDENT hAtbLaDe sheep";
};
}
help Chgname {
" Ändert den \"IRC Name\" (oder \"Real Name\") eines Users im IRC Netzwerk.";
@@ -993,7 +993,7 @@ help Chgname {
" -";
" Syntax: CHGNAME <nick> <name>";
" Beispiel: CHGNAME hAtbLaDe Gotta new name :)";
};
}
help Squit {
" Trennt einen IRC Server vom Netzwerk.";
@@ -1002,7 +1002,7 @@ help Squit {
" -";
" Syntax: SQUIT <server>";
" Beispiel: SQUIT leaf.*";
};
}
help Connect {
" Linkt einen anderen IRC Server zu dem, auf dem der Befehl gegeben wird.";
@@ -1013,7 +1013,7 @@ help Connect {
" CONNECT <hub> <port> <leaf>";
" Beispiel: CONNECT leaf.*";
" CONNECT hub.* 6667 leaf.*";
};
}
help Dccdeny {
" Legt ein DCC Verbot für diese Dateimaske fest. Das bedeutet, dass alle";
@@ -1021,7 +1021,7 @@ help Dccdeny {
" Befehl nur für IrcOps.";
" -";
" Syntax: DCCDENY <filename mask> <reason>";
};
}
help Undccdeny {
" Wird EXAKT die angegeben Datei gefunden, wird sie gelöscht, andernfalls";
@@ -1029,7 +1029,7 @@ help Undccdeny {
" Befehl nur für IrcOps.";
" -";
" Syntax: UNDCCDENY <filename mask>";
};
}
help Sajoin {
" Zwingt einen User, einen Channel zu joinen.";
@@ -1038,7 +1038,7 @@ help Sajoin {
" Syntax: SAJOIN <nick> <channel>,[<channel2>..]";
" Beispiel: SAJOIN hAtbLaDe #OperHelp";
" SAJOIN hAtbLaDe #Support,#IRCHelp";
};
}
help Sapart {
" Zwingt einen User, einen Channel zu verlassen.";
@@ -1047,7 +1047,7 @@ help Sapart {
" Syntax: SAPART <nick> <channel>,[<channel2>..]";
" Beispiel: SAPART hAtbLaDe #OperHelp";
" SAPART hAtbLaDe #Support,#IRCHelp";
};
}
help Samode {
" Erlaubt es einem Services Administrator die Modi eines Channels zu ändern,";
@@ -1056,7 +1056,7 @@ help Samode {
" -";
" Syntax: SAMODE <channel> <mode>";
" Beispiel: SAMODE #Support +m";
};
}
help Trace {
" Man kann TRACE auf Server und User anwenden.";
@@ -1067,15 +1067,15 @@ help Trace {
" Befehl nur für IrcOps.";
" -";
" Syntax: TRACE <servername|nickname>";
" Beispiel: TRACE irc.fyremoon.net";
};
" Beispiel: TRACE irc.example.org";
}
help Opermotd {
" Zeigt die Operator MOTD des IRCd an.";
" Befehl nur für IrcOps.";
" -";
" Syntax: OPERMOTD";
};
}
help Sdesc {
" Mit diesem Befehl kann man die Infozeile des Servers ändern,";
@@ -1084,20 +1084,18 @@ help Sdesc {
" -";
" Syntax: SDESC <New description>";
" Beispiel: SDESC Fly High, Fly Free";
};
}
help Mkpasswd {
" Dieser Befehl verschlüsselt den übergebenen String und liefert einen 'hash' zurück.";
" Diesen 'hash' kann man für jegliche verschlüsselten Passworte in die conf Datei einbauen";
" wie z.B. bei oper::passwort, vhost::passwort etc.";
" Mögliche Typen (in der Reihenfolge ihrer Sicherheit) sind:";
" *NIX: crypt, md5, sha1 [*], ripemd160 [*]";
" Windows: crypt [*], md5, sha1, ripemd160 [*]";
" [*: nur verfügbar, wenn mit SSL Unterstützung compiliert wurde]";
" Weitere Informationen und mögliche Typen:";
" https://www.unrealircd.org/docs/Authentication_types";
" -";
" Syntax: MKPASSWD <method> <password>";
" Beispiel: MKPASSWD md5 IamTeh1337";
};
" Beispiel: MKPASSWD argon2 IamTeh1337";
}
help Module {
" Dieser Befehl liefert eine Liste aller geladenen Module.";
@@ -1118,24 +1116,21 @@ help Module {
" [OLD?] Fehlende Modul Version, vergessen, ein altes Beta* Modul neu zu kompilieren?";
" Zusätzlich sieht man eine Liste, welche 'hooks' und Befehlüberschreitungen";
" vorhanden sind (die Nummer der 'hook's' kann in include/modules.h nachgesehen werden.";
};
}
help Close {
" Dieser Befehl schliesst alle unbekannten Verbindungen zum IRC Server";
" IRC server.";
" -";
" Syntax: CLOSE";
};
}
help Tsctl {
" Dies ist ein erweiterter Befehl, um die interne IRC Uhrzeit anzupassen.";
" Uhrzeit aller Server anzeigen.";
" Befehl nur für IrcOps.";
" -";
" Syntax: TSCTL OFFSET +|- <time> (Stellt interne IRC Uhrzeit)";
" TSCTL TIME (Erzeugt einen Zeitstatus Bericht)";
" TSCTL ALLTIME (Zeigt den Zeitstatus aller Server)";
" TSCTL SVSTIME <timestamp> (Stellt die Uhrzeit auf allen Servern ein)";
};
" Syntax: TSCTL ALLTIME (Zeigt den Zeitstatus aller Server)";
}
help Svsnick {
" Ändert den Nicknamen des Users, der angegeben wird.";
@@ -1143,7 +1138,7 @@ help Svsnick {
" -";
" Syntax: SVSNICK <nickname> <new nickname> <timestamp>";
" Beispiel: SVSNICK hAtbLaDe Foobar 963086432";
};
}
help Svsmode {
" Ändert Modi des Users, der angegeben wird.";
@@ -1151,7 +1146,7 @@ help Svsmode {
" -";
" Syntax: SVSMODE <nickname> <usermode>";
" Beispiel: SVSMODE hAtbLaDe +i";
};
}
help Svskill {
" Disconnected einen User vom Netzwerk.";
@@ -1159,7 +1154,7 @@ help Svskill {
" -";
" Syntax: SVSKILL <user> :<reason>";
" Beispiel: SVSKILL Lamer21 :Goodbye";
};
}
help Svsnoop {
" Dieser Befehl aktiviert oder deaktiviert die Möglichkeit";
@@ -1168,7 +1163,7 @@ help Svsnoop {
" -";
" Syntax: SVSNOOP <server> <+/->";
" Beispiel: SVSNOOP leaf.* -";
};
}
help Svsjoin {
" Zwingt einen User, einen Channel zu joinen.";
@@ -1177,7 +1172,7 @@ help Svsjoin {
" Syntax: SVSJOIN <nick> <channel>[,<channel2>..]";
" Beispiel: SVSJOIN hAtbLaDe #jail";
" SVSJOIN hAtbLaDe #jail,#zoo";
};
}
help Svspart {
" Zwingt einen User einen Channel zu verlassen.";
@@ -1187,7 +1182,7 @@ help Svspart {
" Beispiel: SVSPART hAtbLaDe #Hanson";
" SVSPART hAtbLaDe #Hanson,#AOL";
" SVSPART hAtbLaDe #Hanson,#AOL Und weg auch....";
};
}
help Svso {
" Gibt dem Nick Operflags wie die in den O:lines.";
@@ -1197,7 +1192,7 @@ help Svso {
" Syntax: SVSO <nick> <+operflags> (Setzt die Operflags)";
" SVSO <nick> - (Löscht alle O:Line Flags)";
" Beispiel: SVSO SomeNick +bBkK";
};
}
help Swhois {
" Ändert die WHOIS Meldung des Nicknamen.";
@@ -1206,7 +1201,7 @@ help Swhois {
" Syntax: SWHOIS <nick> :<message> (Stellt SWHOIS ein)";
" SWHOIS <nick> : (Reset des SWHOIS)";
" Beispiel: SWHOIS SomeNick :is a lamer";
};
}
help Sqline {
" Bannt den Nicknamen oder ähnliche Namen vom Server.";
@@ -1214,7 +1209,7 @@ help Sqline {
" -";
" Syntax: SQLINE <nickmask> :<Reason>";
" Beispiel: SQLINE *Bot* :No bots";
};
}
help Unsqline {
" Entfernt Bann auf Nickname oder Nickname Maske.";
@@ -1222,7 +1217,7 @@ help Unsqline {
" -";
" Synax: UNSQLINE <nickmask>";
" Beispiel: UNSQLINE *Bot*";
};
}
help Svs2mode {
" Ändert die Usermodi eines Nicknamens.";
@@ -1230,7 +1225,7 @@ help Svs2mode {
" -";
" Syntax: :services.somenet.com SVS2MODE <nickname> +<mode>";
" Beispiel: :services.roxnet.org SVS2MODE hAtbLaDe +h";
};
}
help Svsfline {
" Setzt gegebene Dateimaske auf DCCDENY";
@@ -1239,7 +1234,7 @@ help Svsfline {
" Syntax: :server SVSFLINE + file :grund (Fügt Dateinamen hinzu)";
" :server SVSFLINE - file (löscht den Dateinamen)";
" :server SVSFLINE * (Löscht die DCCDENY Liste)";
};
}
help Svsmotd {
"Ändert die Service Message Of The Day";
@@ -1248,7 +1243,7 @@ help Svsmotd {
" SVSMOTD ! (Löscht die MOTD)";
" SVSMOTD ! :<text> (Löscht Text und fügt neuen hinzu)";
"Beispiel: SVSMOTD # :Services MOTD";
};
}
help Svsnline {
" Setzt einen globalen Bann auf den Realnamen.";
@@ -1261,7 +1256,7 @@ help Svsnline {
" SVSNLINE - (um einen Bann zu löschen)";
" SVSNLINE * (um alle Banns zu löschen)";
" Beispiel: SVSNLINE sub7_drone :*sub7*";
};
}
help Svslusers {
" Ändert die globale und/oder lokale maximalen Userzahl";
@@ -1270,15 +1265,15 @@ help Svslusers {
" Muss durch einen U:Lined Server gesendet werden.";
" -";
" Syntax: SVSLUSERS <server> <globalmax|-1> <localmax|-1>";
" Beispiel: SVSLUSERS irc.test.com -1 200";
};
" Beispiel: SVSLUSERS irc.example.org -1 200";
}
help Svswatch {
" Ändert die WATCH Liste eines Users.";
" Muss durch einen U:Lined Server gesendet werden.";
" Syntax: SVSWATCH <nick> :<watch parameters>";
" Beispiel: SVSWATCH Blah :+Blih!*@* +Bluh!*@* +Bleh!*@*.com";
};
}
help Svssilence {
" Ändert die SILENCE Liste eines Users.";
@@ -1287,7 +1282,7 @@ help Svssilence {
" zum Setzen/Löschen in einer Zeile stehen.";
" Syntax: SVSSILENCE <nick> :<silence parameters>";
" Beispiel: SILENCE Blah :+*!*@*.com +*!*@*.bla.co.uk";
};
}
help Svssno {
" Ändert die snomask des angegebenen Users.";
@@ -1295,7 +1290,7 @@ help Svssno {
" -";
" Syntax: SVSSNO <nickname> <snomasks>";
" Beispiel: SVSSNO joe +Gc";
};
}
help Svs2sno {
" Ändert die snomask eines Nicknamen und zeigt dem";
@@ -1304,7 +1299,7 @@ help Svs2sno {
" -";
" Syntax: SVS2SNO <nickname> <snomasks>";
" Beispiel: SVS2SNO joe +Gc";
};
}
help Svsnolag {
" Aktiviert ein 'kein fake lag' für einen User.";
@@ -1312,7 +1307,7 @@ help Svsnolag {
" -";
" Syntax: SVSNOLAG [+|-] <nickname>";
" Example: SVSNOLAG + joe";
};
}
help Svs2nolag {
" Aktiviert ein 'kein fake lag' für einen User.";
@@ -1320,7 +1315,7 @@ help Svs2nolag {
" -";
" Syntax: SVS2NOLAG [+|-] <nickname>";
" Example: SVS2NOLAG + joe";
};
}
help Spamfilter {
" Diese Befehle setzten oder löschen globale Spam Filter.";
@@ -1337,14 +1332,14 @@ help Spamfilter {
" 'kline', 'gline', 'zline', 'gzline', 'block' (blockiert Nachricht),";
" 'dccblock' (kann keine DCC mehr senden), 'viruschan' (verlässt alle Channels";
" und joint zwangsweise im Virus Help Channel), warn (Warnung für IrcOps).";
" [regex] hier handelt es sich um den Ausdruck in der Nachricht, auf den hin Reaktionen";
" erfolgen sollen.";
" [tkltime] die Zeitdauer, wie lange *LINEs, die durch [action] gesetzt wurden, gelten sollen";
" (ein '-' angeben, um den Default aus set::spamfilter::ban-time zu verwenden,";
" dieser Wert wird für 'block/tempshun' ignoriert).";
" dieser Wert wird für 'block/tempshun' ignoriert).";
" [reason] der Grund für die *LINE oder blocknachricht, DARF KEINE LEERZEICHEN ENTHALTEN,";
" '_' wird in Leerzeichen übersetzt. Auch hier gilt, dass bei Angabe von '-' der";
" Default (set::spamfilter::ban-reason) benutzt wird.";
" [regex] hier handelt es sich um den Ausdruck in der Nachricht, auf den hin Reaktionen";
" erfolgen sollen.";
" - ";
" Einige Beispiele (die möglicherweise länger als eine Zeile sind):";
" /spamfilter add p block - - Come watch me on my webcam";
@@ -1355,7 +1350,7 @@ help Spamfilter {
" /spamfilter add p kill - Please_go_to_www.viruscan.xx/nicepage/virus=blah Come watch me on my webcam";
" /spamfilter del p block - - Come watch me on my webcam*";
" /spamfilter add cN gzline 1d No_advertising_please come to irc\..+\..+";
};
}
help Tempshun {
" Setzt oder löscht 'temoräre Shuns'.";
@@ -1366,25 +1361,25 @@ help Tempshun {
" Syntax: TEMPSHUN [+|-]<nickname> [reason]";
" Example: TEMPSHUN evilguy vermutlich Infektion";
" TEMPSHUN -niceguy";
};
}
help DccAllow {
" Für Hilfe zum DCCALLOW System, gib ein: '/DCCALLOW HELP'";
/* It would be useless and bad to include it here since that
* stuff quickly gets out-of-synch.
*/
};
}
help Addmotd {
" Fügt eine Zeile ans Ende der MOTD an.";
" -";
" Syntax: ADDMOTD <text>";
" Beispiel: ADDMOTD Spielt fair!";
};
}
help Addomotd {
" Fügt eine Zeile ans Ende der OPERMOTD an. ";
" -";
" Syntax: ADDOMOTD <text>";
" Beispiel: ADDOMOTD Abuse it and lose it!";
};
}
File diff suppressed because it is too large Load Diff
+340 -323
View File
File diff suppressed because it is too large Load Diff
+127 -145
View File
@@ -1,4 +1,4 @@
/* UnrealIRCd 4.0 Help Configuration
/* UnrealIRCd 5 Help Configuration
* Based on the original help text written by hAtbLaDe
* Revised by CC (07/2002) and many others
*
@@ -23,7 +23,7 @@ help {
" /HELPOP CHMODES - Per la lista delle mode per i canali.";
" -";
" ==-------------------------oOo--------------------------==";
};
}
/* note: indexes were generated by cat somecmds|sort|column -c 70
* along with tab->space conversion (tabwidth 8).
@@ -48,7 +48,7 @@ help Usercmds {
" KICK NICK TIME";
" KNOCK NOTICE TOPIC";
" ==-------------------------oOo-------------------------==";
};
}
help Opercmds {
" In questa sezione trovi i comandi disponibili solamente agli Oper.";
@@ -68,7 +68,7 @@ help Opercmds {
" DCCDENY MKPASSWD SDESC ZLINE";
" DIE MODULE SETHOST";
" ==-------------------------oOo-------------------------==";
};
}
help Svscmds {
" In questa sezione sono elencati i comandi che possono essere";
@@ -85,7 +85,7 @@ help Svscmds {
" SVSFLINE SVSMOTD SVSO SWHOIS";
" SVSJOIN SVSNICK SVSPART UNSQLINE";
" ==-------------------------oOo-------------------------==";
};
}
help Umodes {
" Questa è una lista di tutte le mode utente disponibili.";
@@ -112,7 +112,7 @@ help Umodes {
" T = Blocca la ricezione di CTCP.";
" W = Segnala quando qualcuno fa un /WHOIS su di te (disponibile solo allo Staff).";
" ==---------------------------oOo---------------------------==";
};
}
help Snomasks {
" Snomask sta per 'Service NOtice MASK', principalmente controlla quali";
@@ -140,7 +140,7 @@ help Snomasks {
" S = Mostra blocchi dovuti allo Spamfilter.";
" v = Mostra l'utilizzo del comando /VHOST.";
" ==-------------------------oOo------------------------==";
};
}
help Chmodes {
" Questa è una lista di tutte le mode canale disponibili.";
@@ -186,7 +186,7 @@ help Chmodes {
" Z = Indica che tutti gli utenti in canale stanno utilizzando una connessione sicura";
" (Questa mode è modificabile solo dal server e solo se il canale è già +z).";
" ==------------------------------oOo----------------------------==";
};
}
help ExtBans {
" Questi ban di permettono di bannare im naniera diversa dal tradizionale nick!user@host.";
@@ -213,11 +213,7 @@ help ExtBans {
" Questi tipi di ban introducono nuovi criteri per bannare un utente:";
" ==-Type--------Name---------------------------Explanation-----------------------==";
" | | Se un utente è identificato ai services con questo ";
" | | account, rientrerà nel ban. ";
" | | Questo è leggermente differente da ~R perché un ";
" ~a | account | utente con nick ABC potrebbe essere identificato con ";
" | | l'account XYZ. Non tutti i services supportano questo ";
" | | comando, in tal caso dovrai usare ~R. ";
" ~a | account | account, rientrerà nel ban. ";
" | | Esempio: +e ~a:Name ";
"-----------------------------------------------------------------------------------";
" | | Se l'utente è nel canale specificato nel ban, non sarà ";
@@ -239,14 +235,6 @@ help ExtBans {
" | | (' ') che il trattino basso ('_'), quindi rientrerebbe ";
" | | in questo ban anche 'Stupid bot script'. ";
"-----------------------------------------------------------------------------------";
" | | Se un utente è identificato ai services (solitamente ";
" | | NickServ) e il suo nickname è quello indicato, rientrerà";
" | | nel ban. Ciò significa che questo ban è realmente utile ";
" ~R | registered | solo per le eccezioni (+e), ad esempio +e ~R:Nick. ";
" | | Permetterà a <Nick> di stare in canale, a meno che non ";
" | | ci siano altri ban ad impedirlo, se è identificato a ";
" | | NickServ e sta usando il nickname <Nick>. ";
"-----------------------------------------------------------------------------------";
" | | Quando un utente sta usando SSL/TLS con un certificato ";
" | | client puoi far corrispondere all'utente la sua firma ";
" ~S | certfp | digitale (che trovi con /WHOIS). Molto utile per le ";
@@ -258,7 +246,7 @@ help ExtBans {
"ad esempio +b ~q:~c:#lamers impedirà di scrivere a tutti gli utenti che frequentano #lamers.";
"I ban del secondo gruppo possono essere usati anche per le eccezioni agli inviti (+I),";
"come +I ~c:#trusted e +I ~a:accountname.";
};
}
help Chmodef {
" La mode di canale +f fornisce una protezione completa dal flood per il canale.";
@@ -283,7 +271,7 @@ help Chmodef {
" -";
" Se scegli di specificare un'azione per una mode, puoi anche specificare";
" un tempo (in minuti) dopo il quale quell'azione sarà annullata.";
};
}
help Nick {
" Cambia la tua 'identità online' sul server.";
@@ -292,7 +280,7 @@ help Nick {
" -";
" Sintassi: NICK <nuovonick>";
" Esempio: NICK Ugo";
};
}
help Whois {
" Mostra tutte le informazioni possibili sull'utente in questione,";
@@ -312,7 +300,7 @@ help Whois {
" + - L'utente è voice nel canale (+v).";
" ! - L'utente ha nascosto i suoi canali nel whois (+p) e tu lo vedi perché sei un Oper.";
" ? - Il canale è segreto (+s) e tu lo vedi perché sei un Oper.";
};
}
help Who {
" Fornisce informazioni sugli utenti.";
@@ -354,7 +342,7 @@ help Who {
" + - L'utente è voice del canale (+v).";
" ! - L'utente ha nascosto il suo stato di Oper, ma tu puoi vederlo perché sei Oper.";
" ? - L'utente è visibile solamente agli Oper.";
};
}
help Whowas {
" Fornisce informazioni simili al whois (vedi /HELPOP WHOIS)";
@@ -363,7 +351,7 @@ help Whowas {
" Sintassi: WHOWAS <nickname>";
" WHOWAS <nickname> <numero massimo di risultati>";
" Esempio: WHOWAS Ugo";
};
}
help Cycle {
" 'Cicla' dal canale indicato. Questo comando corrisponde";
@@ -372,7 +360,7 @@ help Cycle {
" Sintassi: CYCLE <chan1>,<chan2>,<chan3>";
" Esempio: CYCLE #help";
" Esempio: CYCLE #main,#chat";
};
}
help Dns {
" Restituisce informzioni relative alla cache DNS del server IRC.";
@@ -383,14 +371,14 @@ help Dns {
" 'DNS i' mostrerà informazioni dettagliate sulla configurazione dei nameservers";
" -";
" Sintassi: DNS [opzione]";
};
}
help Names {
" Restituisce la lista degli utenti sul canale indicato.";
" -";
" Sintassi: NAMES <canale>";
" Esempio: NAMES #irchelp";
};
}
help Ison {
" Usato per determinare se un dato utente è";
@@ -398,7 +386,7 @@ help Ison {
" -";
" Sintassi: ISON <utente1> <utente2> <utente3>";
" Esempio: ISON hAtbLaDe Stskeeps AOLBot";
};
}
help Join {
" Usato per accedere ad uno o più canali sul server IRC.";
@@ -411,7 +399,7 @@ help Join {
" Esempio: JOIN #irchelp";
" JOIN #Lobby,#IRCd";
" JOIN #IRCd,#irchelp,#main letmein,somepass,anotherpass";
};
}
help Part {
" Usato per uscire da uno o più canali del server IRC.";
@@ -421,34 +409,34 @@ help Part {
" Sintassi: PART <canale1>,<canale2>,<canale3> <motivo>";
" Example: PART #irchelp";
" PART #Lobby,#IRCd A più tardi!";
};
}
help Motd {
" Mostra il 'Message Of The Day' del server IRC a cui sei connesso.";
" -";
" Sintassi: MOTD";
" MOTD <server>";
};
}
help Rules {
" Mostra il regolamento del server IRC a cui sei connesso.";
" -";
" Sintassi: RULES";
" RULES <server>";
};
}
help Lusers {
" Fornisce informazioni relative agli utenti locali e globali,";
" come numero di utenti massimo e attuale.";
" -";
" Sintassi: LUSERS [server]";
};
}
help Map {
" Restituisce una 'Mappa' grafica della net IRC.";
" -";
" Sintassi: MAP";
};
}
help Quit {
" Ti disconnette dal server IRC.";
@@ -457,7 +445,7 @@ help Quit {
" -";
" Sintassi: QUIT <motivo>";
" Esempio: QUIT Sto uscendo!";
};
}
help Ping {
" Questo comando è utilizzato per verificare la presenza di un client o un";
@@ -469,10 +457,10 @@ help Ping {
" Nota che questo comando è differente dal /CTCP PING.";
" -";
" Sintassi: PING <server> <server2>";
" Esempio: PING irc.mynet.it";
" Esempio: PING irc.example.org";
" PING Ugo";
" PING Ugo irc.mynet.it";
};
" PING Ugo irc.example.org";
}
help Pong {
" Il PONG è una risposta ad un messaggio PING. Se il parametro <server2> è definito,";
@@ -481,16 +469,16 @@ help Pong {
" questo messaggio.";
" -";
" Sintassi: PONG <server> <server2>";
" Esempio: PONG irc.mynet.it irc.othernet.it";
" (corrisponde a un messaggio PONG da irc.mynet.it a irc.othernet.it)";
};
" Esempio: PONG irc.example.org irc.othernet.it";
" (corrisponde a un messaggio PONG da irc.example.org a irc.othernet.it)";
}
help Version {
" Fornisce informazioni relative alla versione del software IRCd in uso.";
" -";
" Sintassi: VERSION";
" VERSION <server>";
};
}
help Stats {
" Fornisce informazioni statistiche relative al server.";
@@ -499,21 +487,21 @@ help Stats {
" Esempio: STATS u";
" -";
" Digita /STATS senza parametri per un elenco delle flag disponibili.";
};
}
help Links {
" Elenca tutti i server attualmente linkati nella net IRC.";
" Solo gli Oper possono vedere i server U:Lined";
" -";
" Sintassi: LINKS";
};
}
help Admin {
" Fornisce informazioni relative agli amministratori del server.";
" -";
" Sintassi: ADMIN";
" ADMIN <server>";
};
}
help Userhost {
" Restituisce la mask user@host dell'utente indicato.";
@@ -521,7 +509,7 @@ help Userhost {
" -";
" Sintassi: USERHOST <nickname>";
" Esempio: USERHOST Ugo";
};
}
help Userip {
" Restituisce l'IP dell'utente indicato";
@@ -529,7 +517,7 @@ help Userip {
" -";
" Sintassi: USERIP <nickname>";
" Esempio: USERIP Ugo";
};
}
help Topic {
" Imposta o cambia il topic del canale indicato.";
@@ -539,7 +527,7 @@ help Topic {
" TOPIC <canale> <messaggio> (Cambia il topic attuale con <messaggio>)";
" Example: TOPIC #Operhelp";
" TOPIC #Lobby Benvenuti su #Lobby!";
};
}
help Invite {
" Manda all'utente indicato un invito per accedere ad un dato canale.";
@@ -551,7 +539,7 @@ help Invite {
" Sintassi: INVITE <utente> <canale>";
" Esempio: INVITE Ugo #irchelp";
" Esempio: INVITE";
};
}
help Kick {
" Espelle un utente da un canale. Può essere utilizzato solo da halfop e superiori.";
@@ -559,7 +547,7 @@ help Kick {
" -";
" Sintassi: KICK <canale> <utente> [motivo]";
" Esempio: KICK #Lobby foobar Lamer";
};
}
help Away {
" Imposta il tuo stato come 'Away' (non al computer).";
@@ -569,7 +557,7 @@ help Away {
" Sintassi: AWAY <motivo> (Ti imposta away con la motivazione fornita)";
" AWAY (Annulla il tuo stato di away)";
" Esempio: AWAY Ora di pranzo!";
};
}
help Watch {
" 'Watch' è un sistema di notifica sul server più veloce e che utilizza";
@@ -583,7 +571,7 @@ help Watch {
" Sintassi: WATCH +nick1 +nick2 +nick3 (Aggiunge i nick indicati alla lista)";
" WATCH -nick (Rimuove i nick indicati dalla lista)";
" WATCH (Controlla quali utenti sono online)";
};
}
help List {
" Fornisce un elenco completo di tutti i canali presenti sulla net IRC.";
@@ -600,7 +588,7 @@ help List {
" !*mask* Elenca i canali che NON corrispondono al parametro indicato";
" -";
" Ciascuno di questi può essere usato al posto dei valori standard.";
};
}
help Privmsg {
" Invia un messaggio ad un utente, canale o server.";
@@ -619,7 +607,7 @@ help Privmsg {
" /PRIVMSG $<mask> <testo>";
" Invia un messaggio a tutti gli utenti sui server che corrispondono a <mask>. Solo per Oper.";
" I client mostrano generalmente questo tipo di messaggi nella finestra di status.";
" Esempio: /PRIVMSG $*.mynet.it Nelle prossime ore il server subirà un aggiornamento";
" Esempio: /PRIVMSG $*.example.org Nelle prossime ore il server subirà un aggiornamento";
" Nota che in molti casi è preferibile utilizzare i services (ad esempio /OS GLOBAL).";
" -";
" Sono supportati anche più destinatari, ad esempio /PRIVMSG <nick1>,<nick2>,<nick3>.";
@@ -627,7 +615,7 @@ help Privmsg {
" Nota: In alcuni vecchi client (ad esempio ircII) non puoi utilizzare /msg o /privmsg";
" per utilizzare le 'funzioni avanzate'. Dovrai invece usare";
" '/QUOTE PRIVMSG @#canale ciao' o un comando simile.";
};
}
help Notice {
" Invia un notice ad un utente, canale o server.";
@@ -646,7 +634,7 @@ help Notice {
" /NOTICE $<mask> <testo>";
" Invia un messaggio a tutti gli utenti sui server che corrispondono a <mask>. Solo per Oper.";
" I client mostrano generalmente questo tipo di messaggi nella finestra di status.";
" Esempio: /NOTICE $*.mynet.it Nelle prossime ore il server subirà un aggiornamento";
" Esempio: /NOTICE $*.example.org Nelle prossime ore il server subirà un aggiornamento";
" Nota che in molti casi è preferibile utilizzare i services (ad esempio /OS GLOBAL).";
" -";
" Sono supportati anche più destinatari, ad esempio /NOTICE <nick1>,<nick2>,<nick3>.";
@@ -654,7 +642,7 @@ help Notice {
" Nota: In alcuni vecchi client (ad esempio ircII) non puoi utilizzare /notice";
" per utilizzare le 'funzioni avanzate'. Dovrai invece usare";
" '/QUOTE NOTICE @#canale ciao' o un comando simile.";
};
}
help Knock {
" Per i canali ad invito, puoi utilizzare questo comando per 'bussare'";
@@ -662,14 +650,14 @@ help Knock {
" -";
" Syntax: KNOCK <canale> <messaggio>";
" Example: KNOCK #canale Fatemi entrare!";
};
}
help Setname {
" Permette agli utenti di cambiare il loro 'Real name' (GECOS)";
" direttamente sul server IRC, senza riconnettersi.";
" -";
" Sintassi: SETNAME <Nuovo Realname>";
};
}
help Vhost {
" Nasconde il tuo hostname reale con uno virtuale";
@@ -677,7 +665,7 @@ help Vhost {
" -";
" Sintassi: VHOST <login> <password>";
" Esempio: VHOST mylogin mypassword";
};
}
help Mode {
" Imposta una mode su un canale o un utente.";
@@ -686,7 +674,7 @@ help Mode {
" Sintassi: MODE <canale/utente> <mode> <parametri>";
" Example: MODE #irchelp +tn";
" MODE #irchelp +ootn hAtbLaDe XYZ";
};
}
help Credits {
" Con questo comando verrà mostrata una lista di utenti";
@@ -694,27 +682,27 @@ help Credits {
" -";
" Sintassi: CREDITS";
" CREDITS <server>";
};
}
help Dalinfo {
" Questo comando mostrerà i crediti storici (da ircu, ecc.).";
" -";
" Sintassi: DALINFO";
" Sintassi: DALINFO <server>";
};
}
help License {
" Questo comando mostra i dettagli relativi alla licenza con cui è rilasciato UnrealIRCd.";
" Sintassi: LICENSE";
" LICENSE <server>";
};
}
help Time {
" Mostra la data e l'ora corrente del server.";
" -";
" Sintassi : TIME";
" TIME <server>";
};
}
help Silence {
" Ignora i messaggi di un utente o di una lista di utenti a livello server.";
@@ -722,7 +710,7 @@ help Silence {
" Sintassi: SILENCE +nickname (Aggiunge un nick alla lista)";
" SILENCE -nickname (Rimuove un nick dalla lista)";
" SILENCE (Elenca i nick attualmente in lista SILENCE)";
};
}
help Oper {
" Utilizzato dagli utenti per ottenere i privilegi di Oper";
@@ -731,28 +719,28 @@ help Oper {
" Sintassi: OPER <utente> <password>";
" Nota: sia <utente> che <password> sono case sensitive.";
" Esempio: OPER Ugo foobar234";
};
}
help Wallops {
" Invia un particolare messaggio a tutti gli utenti con la mode +w impostata.";
" Solo gli Oper possono inviare wallops, mentre chiunque può visualizzarli.";
" -";
" Sintassi: WALLOPS <messaggio>";
};
}
help Locops {
" Invia un messaggio a tutti gli Oper sullo stesso server di chi invia.";
" -";
" Sintassi: LOCOPS <messaggio>";
" Esempio: LOCOPS Dobbiamo bannare quell'utente...";
};
}
help Globops {
" Invia un messaggio a tutti gli Oper.";
" -";
" Sintassi: GLOBOPS <messaggio>";
" Esempio: GLOBOPS Dobbiamo bannare quell'utente...";
};
}
help Kill {
" Disconnette forzatamente un utente dal server IRC.";
@@ -760,7 +748,7 @@ help Kill {
" -";
" Sintassi: KILL <nick1>,<nick2>,<nick3> <motivo>";
" Example: KILL Ugo Non sono ammessi cloni";
};
}
help Kline {
" Questo comando aggiunge una kline a tempo.";
@@ -775,7 +763,7 @@ help Kline {
" KLINE *@*.isp.com 2d Violazione del regolamento (aggiunge una kline di due giorni)";
" KLINE Idiot 1d Utente non gradito";
" KLINE -*@*.aol.com";
};
}
help Zline {
" Questo comando aggiunge una zline a tempo.";
@@ -790,7 +778,7 @@ help Zline {
" ZLINE *@1.2.3.4 2d Violazione del regolamento (aggiunge una kline di due giorni)";
" ZLINE -*@1.2.3.4";
" Nota: questo comando richiede il permesso can_zline nel blocco oper";
};
}
help Gline {
" Questo comando aggiunge una gline a tempo.";
@@ -806,7 +794,7 @@ help Gline {
" GLINE Idiot 1d Violazione del regolamento";
" GLINE -*@*.idiot.net";
" Nota: questo comando richiede il permesso can_gkline nel blocco oper";
};
}
help Shun {
" Impedisce all'utente di eseguire ogni comando ad eccezione di /ADMIN";
@@ -824,7 +812,7 @@ help Shun {
" ('shunna' foobar@aol.com per 10 minuti per Spam)";
" SHUN +foobar@aol.com 1d6h :Spam (Aggiunge uno shun di 30 ore)";
" Nota: questo comando richiede il permesso can_gkline nel blocco oper";
};
}
help Gzline {
" Questo comando aggiunge una zline globale a tempo.";
@@ -838,7 +826,7 @@ help Gzline {
" Esempio: GZLINE *@1.2.3.4 900 Spam (Aggiunge una gzline di 15 minuti)";
" GZLINE *@1.2.3.4 1d5h Spam (Aggiunge una gzline di 29 ore)";
" Nota: questo comando richiede il permesso can_gzline nel blocco oper";
};
}
help Rehash {
" Ricarica i file di configurazione del server.";
@@ -858,8 +846,8 @@ help Rehash {
" -dns - Inizializza e ricarica il risolutore DNS";
" -garbage - Forza la pulizia dei file inutili";
" -motd - Ricarica i file MOTD, BOTMOTD, OPERMOTD e RULES, inclusi quelli nei blocchi tld";
" -ssl - Ricarica i certificati SSL";
};
" -tls - Ricarica i certificati SSL/TLS";
}
help Restart {
" Termina e riavvia il processo IRC, disconnettendo tutti gli utenti attualmente connessi.";
@@ -868,7 +856,7 @@ help Restart {
" Sintassi: RESTART";
" RESTART <password>";
" RESTART <password> <motivo>";
};
}
help Die {
" Termina il processo IRC, disconnettendo tutti gli utenti attualmente connessi.";
@@ -876,16 +864,16 @@ help Die {
" -";
" Sintassi: DIE";
" DIE <password>";
};
}
help Lag {
" Questo comando è come un 'traceroute' per i server IRC.";
" Digitando /LAG irc.mynet-it otterrai una risposta con l'elenco";
" Digitando /LAG irc.example.org otterrai una risposta con l'elenco";
" di tutti i server dai quali è passata la richiesta.";
" Utile per identificare in quale punto si verifica il lag.";
" -";
" Sintassi: LAG <server>";
};
}
help Sethost {
" Permette agli utenti di cambiare il proprio host con un virtualhost";
@@ -894,7 +882,7 @@ help Sethost {
" -";
" Sintassi: SETHOST <nuovo-host>";
" Esempio: SETHOST il.mio.vhost";
};
}
help Setident {
" Permette agli utenti di cambiare la propria ident.";
@@ -902,7 +890,7 @@ help Setident {
" -";
" Sintassi: SETIDENT <nuova-ident>";
" Esempio: SETIDENT l33t";
};
}
help Chghost {
" Cambia l'hostname di un utente attualmente connesso.";
@@ -910,7 +898,7 @@ help Chghost {
" -";
" Sintassi: CHGHOST <nick> <nuovo-host>";
" Esempio: CHGHOST Ugo my.new.host";
};
}
help Chgident {
" Cambia l'ident di un utente attualmente connesso.";
@@ -918,7 +906,7 @@ help Chgident {
" -";
" Sintassi: CHGIDENT <nick> <nuova-ident>";
" Esempio: CHGIDENT Ugo user";
};
}
help Chgname {
" Cambia il 'Realname' di un utente attualmente connesso.";
@@ -926,15 +914,15 @@ help Chgname {
" -";
" Sintassi: CHGNAME <nick> <nuovo-realname>";
" Esempio: CHGNAME Ugo Il mio nuovo nome :)";
};
}
help Squit {
" Disconnette un determinato server IRC dalla net.";
" Questa funzione è utilizzabile solo dagli Oper.";
" -";
" Sintassi: SQUIT <server>";
" Esempio: SQUIT server2.mynet.it";
};
" Esempio: SQUIT server2.example.org";
}
help Connect {
" Connette un determinato server IRC a quello attualmente utilizzato";
@@ -945,7 +933,7 @@ help Connect {
" CONNECT <server1> <porta> <server2>";
" Esempio: CONNECT leaf.server.net";
" CONNECT leaf.server.net 6667 hub.server.net";
};
}
help Dccdeny {
" Aggiunge un blocco DCC per un determinato file.";
@@ -953,14 +941,14 @@ help Dccdeny {
" Questa funzione è utilizzabile solo dagli Oper.";
" -";
" Sintassi: DCCDENY <file> <motivo>";
};
}
help Undccdeny {
" Rimuove il blocco DCC dal file esatto indicato, se esistente. Se non esistente esegue una ricerca.";
" Questa funzione è utilizzabile solo dagli Oper.";
" -";
" Sintassi: UNDCCDENY <file>";
};
}
help Sajoin {
" Forza un utente ad accedere ad un canale.";
@@ -969,7 +957,7 @@ help Sajoin {
" Sintassi: SAJOIN <nick> <canale>,[<canale2>,ecc.]";
" Esempio: SAJOIN Ugo #OperHelp";
" SAJOIN Ugo #OperHelp,#IRCHelp";
};
}
help Sapart {
" Forza un utente a lasciare un canale.";
@@ -979,7 +967,7 @@ help Sapart {
" Esempio: SAPART Ugo #OperHelp";
" SAPART Ugo #OperHelp,#IRCHelp";
" SAPART Ugo #OperHelp,#IRCHelp Utente assente";
};
}
help Samode {
" Permette di modificare le mode di un canale pur non essendone op o superiore.";
@@ -987,7 +975,7 @@ help Samode {
" -";
" Sintassi: SAMODE <canale> <mode>";
" Esempio: SAMODE #irchelp +m";
};
}
help Trace {
" Permette di tracciare un server o un utente.";
@@ -995,15 +983,15 @@ help Trace {
" Se utilizzato su un server ne restituisce classe, versione e informazioni sul collegamento.";
" -";
" Sintassi: TRACE <server/nick>";
" Esempio: TRACE irc.mynet.it";
};
" Esempio: TRACE irc.example.org";
}
help Opermotd {
" Mostra il MOTD per gli Oper";
" Questa funzione è utilizzabile solo dagli Oper.";
" -";
" Sintassi: OPERMOTD";
};
}
help Sdesc {
" Permette di modificare la descrizione del server";
@@ -1012,20 +1000,18 @@ help Sdesc {
" -";
" Sintassi: SDESC <nuova descrizione>";
" Esempio: SDESC Il mio server IRC";
};
}
help Mkpasswd {
" Restituisce un 'hash' della stringa specificata.";
" Può essere utilizzato per ogni password criptata da inserire nel file di configurazione,";
" ad esempio come password per gli oper o per i vhost.";
" Metodi disponibili (in ordine di sicurezza):";
" *NIX: crypt, md5, sha1 [*], ripemd160 [*]";
" Windows: crypt [*], md5, sha1, ripemd160 [*]";
" [*: disponibile solo se compilato con supporto SSL]";
" Per ulteriori informazioni e metodi disponibili, consultare:";
" https://www.unrealircd.org/docs/Authentication_types";
" -";
" Sintassi: MKPASSWD <metodo> <password>";
" Esempio: MKPASSWD md5 LaMiaPassword";
};
" Esempio: MKPASSWD argon2 LaMiaPassword";
}
help Module {
" Restituisce un elenco di tutti i moduli caricati sul server.";
@@ -1047,23 +1033,19 @@ help Module {
" [3RD] Il modulo è di terze parti, ovvero non parte del core di UnrealIRCd.";
" In aggiunta vedrai un elenco degli hook e dei comandi di ovverride presenti";
" (il numero di hook può essere visto anche in include/modules.h).";
};
}
help Close {
" Questo comando termina tutte le connessioni sconosciute al server IRC.";
" -";
" Sintassi: CLOSE";
};
}
help Tsctl {
" Questo è un comando avanzato utilizzato per correggere l'orologio interno di IRC.";
" Questa funzione è utilizzabile solo dagli Oper.";
" -";
" Sintassi: TSCTL OFFSET +|- <orario> (Modifica l'orologio interno di IRC)";
" TSCTL TIME (Restituisce il report TS)";
" TSCTL ALLTIME (Mostra il report TS di tutti i server)";
" TSCTL SVSTIME <timestamp> (Imposta l'orario di tutti i server)";
};
" Sintassi: TSCTL ALLTIME (Mostra il report TS di tutti i server)";
}
help Htm {
" Attiva o disattiva la modalità 'High Traffic'.";
@@ -1081,7 +1063,7 @@ help Htm {
" NOISY - Abilita un avviso quando la modalità HTM viene attivata/disattivata";
" QUIET - Disabilita l'avviso quando la modalità HTM viene attivata/disattivata";
" TO <valore> - Imposta il valore oltre il quale attivare HTM";
};
}
help Svsnick {
" Cambia il nickname dell'utente indicato.";
@@ -1089,7 +1071,7 @@ help Svsnick {
" -";
" Sintassi: SVSNICK <nickname> <nuovo-nick> <timestamp>";
" Esempio: SVSNICK Ugo Foobar 963086432";
};
}
help Svsmode {
" Cambia le mode dell'utente indicato.";
@@ -1097,7 +1079,7 @@ help Svsmode {
" -";
" Sintassi: SVSMODE <nickname> <usermode>";
" Esempio: SVSMODE Ugo +i";
};
}
help Svskill {
" Disconnette forzatamente un utente dal server.";
@@ -1105,7 +1087,7 @@ help Svskill {
" -";
" Sintassi: SVSKILL <nickname> :<motivo>";
" Esempio: SVSKILL Lamer21 :Arrivederci";
};
}
help Svsnoop {
" Attiva o disattiva le funzionalità per gli Oper sul server indicato.";
@@ -1113,7 +1095,7 @@ help Svsnoop {
" -";
" Sintassi: SVSNOOP <server> <+/->";
" Esempio: SVSNOOP leaf.server.net -";
};
}
help Svsjoin {
" Forza un utente ad accedere ad un canale.";
@@ -1122,7 +1104,7 @@ help Svsjoin {
" Sintassi: SVSJOIN <nick> <canale1>[,<canale2>,ecc.] [password1[,password2,ecc.]]";
" Esempio: SVSJOIN Ugo #jail";
" SVSJOIN Ugo #jail,#zoo";
};
}
help Svspart {
" Forza un utente a lasciare un canale.";
@@ -1132,7 +1114,7 @@ help Svspart {
" Esempio: SVSPART Ugo #Hanson";
" SVSPART Ugo #Hanson,#AOL";
" SVSPART Ugo #Hanson,#AOL Accesso non ammesso";
};
}
help Svso {
" Assegna all'utente delle operflag come quelle nelle operclass.";
@@ -1142,7 +1124,7 @@ help Svso {
" Sintassi: SVSO <nick> <+operflags> (aggiunge le operflag)";
" SVSO <nick> - (rimuove tutte le operflag)";
" Esempio: SVSO Ugo +bBkK";
};
}
help Swhois {
" Cambia il messaggio di whois dell'utente indicato.";
@@ -1151,7 +1133,7 @@ help Swhois {
" Sintassi: SWHOIS <nick> :<messaggio> (imposta il messaggio di SWHOIS)";
" SWHOIS <nick> : (Resetta il messaggio di SWHOIS)";
" Esempio: SWHOIS Ugo :sono un lamer";
};
}
help Sqline {
" Blocca l'uso di un determinato nick sul server.";
@@ -1159,7 +1141,7 @@ help Sqline {
" -";
" Sintassi: SQLINE <nick> :<motivo>";
" Esempio: SQLINE *Bot* :Bot non ammessi";
};
}
help Unsqline {
" Rimuove il blocco di un nick dal server.";
@@ -1167,7 +1149,7 @@ help Unsqline {
" -";
" Sintassi: UNSQLINE <nick>";
" Esempio: UNSQLINE *Bot*";
};
}
help Svs2mode {
" Cambia le mode di un utente e gli mostra un messaggio di notifica.";
@@ -1175,7 +1157,7 @@ help Svs2mode {
" -";
" Sintassi: SVS2MODE <nickname> <mode>";
" Esempio: SVS2MODE Ugo +h";
};
}
help Svsfline {
" Aggiunge il file indicato alla lista DCCDENY.";
@@ -1184,7 +1166,7 @@ help Svsfline {
" Sintassi: :server SVSFLINE + file :motivo (aggiunge il file alla lista)";
" :server SVSFLINE - file (rimuove il file dalla lista)";
" :server SVSFLINE * (svuota la lista)";
};
}
help Svsmotd {
" Cambia il MOTD dei services.";
@@ -1193,7 +1175,7 @@ help Svsmotd {
" SVSMOTD ! (Cancella il MOTD)";
" SVSMOTD ! :<testo> (Cancella il MOTD attuale e aggiunge il testo)";
" Esempio: SVSMOTD # :Services MOTD";
};
}
help Svsnline {
" Aggiunge un ban sul realname.";
@@ -1205,7 +1187,7 @@ help Svsnline {
" SVSNLINE - :<realname> (rimuove un ban)";
" SVSNLINE * (Rimuove tutti i ban)";
" Esempio: SVSNLINE + sub7_drone :*sub7*";
};
}
help Svslusers {
" Modifica il conteggio degli utenti locali o globali di un server.";
@@ -1213,15 +1195,15 @@ help Svslusers {
" Deve essere inviato tramite un server U:Lined.";
" -";
" Sintassi: SVSLUSERS <server> <globalmax|-1> <localmax|-1>";
" Esempio: SVSLUSERS irc.mynet.it -1 200";
};
" Esempio: SVSLUSERS irc.example.org -1 200";
}
help Svswatch {
" Cambia la lista WATCH di un utente.";
" Deve essere inviato tramite un server U:Lined.";
" Sintassi: SVSWATCH <nick> :<parametri>";
" Esempio: SVSWATCH Ugo :+Blih!*@* +Bluh!*@* +Bleh!*@*.com";
};
}
help Svssilence {
" Cambia la lista SILENCE di un utente.";
@@ -1230,7 +1212,7 @@ help Svssilence {
" più valori in una stessa linea.";
" Sintassi: SVSSILENCE <nick> :<parametri>";
" Esempio: SVSSILENCE Ugo :+*!*@*.com +*!*@*.bla.com";
};
}
help Svssno {
" Cambia le snomask di un utente.";
@@ -1238,7 +1220,7 @@ help Svssno {
" -";
" Sintassi: SVSSNO <nickname> <snomasks>";
" Esempio: SVSSNO Ugo +Gc";
};
}
help Svs2sno {
" Cambia le snomask di un utente e gli mostra un messaggio di notifica";
@@ -1246,7 +1228,7 @@ help Svs2sno {
" -";
" Sintassi: SVS2SNO <nickname> <snomasks>";
" Esempio: SVS2SNO Ugo +Gc";
};
}
help Svsnolag {
" Abilita il 'no fake lag' per un utente";
@@ -1254,7 +1236,7 @@ help Svsnolag {
" -";
" Sintassi: SVSNOLAG [+|-] <nickname>";
" Esempio: SVSNOLAG + Ugo";
};
}
help Svs2nolag {
" Abilita il 'no fake lag' per un utente";
@@ -1262,7 +1244,7 @@ help Svs2nolag {
" -";
" Syntax: SVS2NOLAG [+|-] <nickname>";
" Example: SVS2NOLAG + Ugo";
};
}
help Spamfilter {
" Questo comando aggiunge o rimuove filtri di spamfilter globali.";
@@ -1282,11 +1264,11 @@ help Spamfilter {
" 'kline', 'gline', 'zline', 'gzline', 'block' (blocca il messaggio),";
" 'dccblock' (blocca l'invio di DCC), 'viruschan' (esce da tutti i canali ed entra";
" automaticamente sul 'virus chan' definito nel file di configurazione), 'warn' (avvisa gli Oper).";
" [stringa] La stringa che deve essere bloccata (come espressione regolare o testo semplice)";
" [durata] La durata del ban in caso sia impostata una *line come azione. Usa '-' per utilizzare";
" la durata di default definita nel file di configurazione";
" [motivo] Il motivo da visualizzare nella *line, utilizzando i trattini bassi come spazi.";
" Usa '-' per utilizzare il motivo di default definito nel file di configurazione";
" [stringa] La stringa che deve essere bloccata (come espressione regolare o testo semplice)";
" - ";
" Alcuni esempi:";
" /spamfilter add -simple p block - - Come watch me on my webcam";
@@ -1297,7 +1279,7 @@ help Spamfilter {
" /spamfilter add -simple p kill - Please_go_to_www.viruscan.xx/nicepage/virus=blah Come watch me on my webcam";
" /spamfilter del -simple p block - - Come watch me on my webcam*";
" /spamfilter add -regex cN gzline 1d No_advertising_please /come to irc\..+\..+/";
};
}
help Tempshun {
" Aggiunge o rimuove shun temporanei'.";
@@ -1307,23 +1289,23 @@ help Tempshun {
" Sintassi: TEMPSHUN [+|-]<nickname> [motivo]";
" Example: TEMPSHUN Ugo possibile virus";
" TEMPSHUN -Ugo";
};
}
help DccAllow {
" Per informazioni sul sistema DCCALLOW digita '/DCCALLOW HELP'";
/* Sarebbe inutile inserire qui le informazioni che si possono già trovare altrove */
};
}
help Addmotd {
" Aggiunge una linea alla fine del MOTD ";
" -";
" Sintassi: ADDMOTD <testo>";
" Esempio: ADDMOTD Divertiti!";
};
}
help Addomotd {
" Aggiunge una linea alla fine dell'OperMOTD ";
" -";
" Sintassi: ADDOMOTD <testo>";
" Esempio: ADDOMOTD Fatti non foste a moderare come bruti...";
};
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+129 -142
View File
@@ -1,4 +1,4 @@
/* UnrealIRCd 4.0 Help Configuration
/* UnrealIRCd 5 Help Configuration
* Based on the original help text written by hAtbLaDe
* Revised by CC (07/2002)
*
@@ -24,7 +24,7 @@ help {
" /HELPOP OFLAGS - Просмотреть флаги в O:line";
" -";
" ==-------------------------oOo--------------------------==";
};
}
help Usercmds {
" Список команд, доступных пользователям на данный момент.";
@@ -44,7 +44,7 @@ help Usercmds {
" KICK NICK TIME";
" KNOCK NOTICE TOPIC";
" ==-------------------------oOo---------------------------==";
};
}
help Opercmds {
" Список команд, доступных только IRC операторам.";
@@ -64,7 +64,7 @@ help Opercmds {
" DCCDENY MKPASSWD SDESC ZLINE";
" DIE MODULE SETHOST";
" ==-------------------------oOo---------------------------==";
};
}
help Svscmds {
" Список команд, которые могут быть посланы";
@@ -81,7 +81,7 @@ help Svscmds {
" SVSFLINE SVSMOTD SVSO SWHOIS";
" SVSJOIN SVSNICK SVSPART UNSQLINE";
" ==-------------------------oOo---------------------------==";
};
}
help Umodes {
" Список режимов пользователя.";
@@ -125,7 +125,7 @@ help Umodes {
" W = Позволяет видеть, когда кто-то делает /WHOIS на Ваш";
" ник (только для IRC операторов)";
" ==---------------------------oOo---------------------------==";
};
}
help Snomasks {
" Snomask - это сокращение от 'Service NOtice MASK'.";
@@ -157,7 +157,7 @@ help Snomasks {
" S = Видны сообщения спам фильтра";
" v = Видны попытки использования команды /VHOST";
" ==-------------------------oOo------------------------==";
};
}
help Chmodes {
" В этой секции приведён список режимов, которые могут быть наложены";
@@ -230,7 +230,7 @@ help Chmodes {
" [h] - минимум требуются права halfop, [o] - минимум требуются права";
" chanop, [q] - требуются права владельца";
" ==------------------------------oOo----------------------------==";
};
}
help ExtBans {
" Данные типы банов позволяют вам банить не только по традиционной маске nick!user@host.";
@@ -272,19 +272,12 @@ help ExtBans {
" ~r | настоящее имя | он не сможет зайти. Пример: +b ~r:*Stupid_bot_script* ";
" | | Дополнение: Подчёркивание ('_') обозначает и ";
" | | пробел (' '), и подчёркивание ('_'). ";
"-----------------------------------------------------------------------------------";
" | | Бан срабатывает, если пользователь идентифицирован ";
" ~R | | на сервисах (обычно Nickserv) и имя совпадает. В ";
" |зарегестрирован| реальности необходим для исключений на канале. ";
" | | Пример: +e ~R:Nick ";
" | | Позволяет Nick находится на канале, независимо от банов,";
" | | если он идентифицирован на сервисах, использует ник Nick";
" ==------------------------------------------------------------------------------==";
" -";
" Вы можете стекировать расширенные типы банов первой и второй группы друг с другом.";
" Пример: +b ~q:~c:#lamers";
" Действием данной команды будет молчание всех пользователей, кто сидит в #lamers";
};
}
help Chmodef {
" Режим канала +f предоставляет гибкий механизм защиты канала от флуда.";
@@ -310,7 +303,7 @@ help Chmodef {
" -";
" Если вы задаёте некое действие в ответ на флуд, вы можете так же указать,";
" как долго (в минутах) будет действовать наказание.";
};
}
help Oflags {
" Описание флагов, помещаемых в O:lines конфигурационного файла сервера";
@@ -347,7 +340,7 @@ help Oflags {
" X (can_addline) Может использовать /ADDLINE";
" d (can_dccdeny) Может использовать /DCCDENY";
" ==----------------------oOo--------------------==";
};
}
help Nick {
" Изменяет виртуальное имя (Ник).";
@@ -356,7 +349,7 @@ help Nick {
" -";
" Синтаксис: NICK <новое имя>";
" Пример: NICK hAtbLaDe";
};
}
help Whois {
" Показывает различную информацию о пользователе:";
@@ -379,7 +372,7 @@ help Whois {
" видите, потому что имеете права оператора IRC";
" ? - Канал является \"Секретным\" (+s), но вы его видите, потому";
" что имеете права оператора IRC";
};
}
help Who {
" Возвращает информацию о пользователях";
@@ -435,7 +428,7 @@ help Who {
" ! - У пользователя установлен флаг +H";
" ? - Вы видите пользователя только потому, что являетесь IRC";
" оператором";
};
}
help Whowas {
" Показывает информацию WHOIS о пользователях";
@@ -444,7 +437,7 @@ help Whowas {
" Синтаксис: WHOWAS <имя пользователя>";
" WHOWAS <имя пользователя> <количество записей>";
" Пример: WHOWAS hAtbLaDe";
};
}
help Cycle {
" Выполнить цикл \"выйти/войти\" в указанном канале. Команда";
@@ -453,7 +446,7 @@ help Cycle {
" Синтаксис: CYCLE <канал1>,<канал2>,<канал3>";
" Пример: CYCLE #help";
" CYCLE #main,#chat";
};
}
help Dns {
" Возвращает информацию из DNS кэша IRC сервера.";
@@ -465,14 +458,14 @@ help Dns {
" 'DNS i' вернёт подробную информацию о конфигурации сервера имён";
" -";
"Синтаксис: DNS [опция]";
};
}
help Names {
" Возвращает список пользователей указанного канала.";
" -";
" Синтаксис: NAMES <канал>";
" Пример: NAMES #Support";
};
}
help Ison {
" Служит для определения состояния Пользователя - в";
@@ -480,7 +473,7 @@ help Ison {
" -";
" Синтаксис: ISON <имя> <имя2> <имя3> <имя4>";
" Пример: ISON hAtbLaDe Stskeeps OperServ AOLBot";
};
}
help Join {
" Используется для входа на канал(ы) IRC сервера.";
@@ -494,7 +487,7 @@ help Join {
" Пример: JOIN #Support";
" JOIN #Lobby,#IRCd";
" JOIN #IRCd,#Support,#main letmein,somepass,anotherpass";
};
}
help Part {
" Используется для того, чтобы покинуть текущий канал.";
@@ -506,7 +499,7 @@ help Part {
" Синтаксис: PART <канал>,<канал2>,<канал3>,<канал4> <причина>";
" Пример: PART #Support";
" PART #Lobby,#IRCd See ya later!";
};
}
help Motd {
" Показывают информационное сообщение IRC сервера, к которому";
@@ -514,28 +507,28 @@ help Motd {
" -";
" Синтаксис: MOTD";
" MOTD <сервер>";
};
}
help Rules {
" Показывает правила пользования сетью.";
" -";
" Синтаксис: RULES";
" RULES <сервер>";
};
}
help Lusers {
" Предоставляет информацию о количестве локальных и глобальных";
" пользователей (текущее и максимальное количество пользователей сети).";
" -";
" Синтаксис: LUSERS [сервер]";
};
}
help Map {
" Предоставляет \"Карту Сети\" список серверов и связи между ними.";
" В основном используется для визуализации маршрутизации в сети.";
" -";
" Синтаксис: MAP";
};
}
help Quit {
" Отключает от IRC сервера. Пользователи каналов, в которых вы";
@@ -545,7 +538,7 @@ help Quit {
" -";
" Синтаксис: QUIT <причина>";
" Пример: QUIT Leaving!";
};
}
help Ping {
" Команда PING используется для определения присутствия клиента или";
@@ -558,10 +551,10 @@ help Ping {
" CTCP PING";
" -";
" Синтаксис: PING <сервер> <сервер2>";
" Пример: PING irc.fyremoon.net";
" Пример: PING irc.example.org";
" PING hAtbLaDe";
" PING hAtbLaDe irc2.dynam.ac";
};
}
help Pong {
" Сообщение PONG - это ответ на запрос PING. Если указан параметр";
@@ -570,16 +563,16 @@ help Pong {
" идёт ответ на запрос PING.";
" -";
" Синтаксис: PONG <сервер> <сервер2>";
" Пример: PONG irc.fyremoon.net irc2.dynam.ac";
" (PONG от irc.fyremoon.net на irc2.dynam.ac)";
};
" Пример: PONG irc.example.org irc2.dynam.ac";
" (PONG от irc.example.org на irc2.dynam.ac)";
}
help Version {
" Возавращает версию ПО на IRC сервере.";
" -";
" Синтаксис: VERSION";
" VERSION <сервер>";
};
}
help Stats {
" Возвращает немного статистической информации с сервера";
@@ -589,7 +582,7 @@ help Stats {
" -";
" Дайте команду /stats без параметров для получения списка доступных";
" флагов.";
};
}
help Links {
" Возвращает список серверов, слинкованных с сетью на данный момент.";
@@ -597,14 +590,14 @@ help Links {
" IRC операторы.";
" -";
" Синтаксис: LINKS";
};
}
help Admin {
" Возвращает административную информацию с указанного сервера.";
" -";
" Синтаксис: ADMIN";
" ADMIN <сервер>";
};
}
help Userhost {
" Возвращает имя хоста для указанного пользователя.";
@@ -612,7 +605,7 @@ help Userhost {
" -";
" Синтаксис: USERHOST <имя>";
" Пример: USERHOST hAtbLaDe";
};
}
help Userip {
" Возвращает IP адрес указанного пользователя.";
@@ -620,7 +613,7 @@ help Userip {
" -";
" Синтаксис: USERIP <имя>";
" Пример: USERIP codemastr";
};
}
help Topic {
" Устанавливает/изменяет тему указанного канала, или просто показывает";
@@ -630,7 +623,7 @@ help Topic {
" TOPIC <канал> <тема> (Изменит тему)";
" Пример: TOPIC #Operhelp";
" TOPIC #Lobby Welcome to #Lobby!!";
};
}
help Invite {
" Посылает указанному пользователю приглашение войти на указанный канал.";
@@ -642,7 +635,7 @@ help Invite {
" -";
" Синтаксис: INVITE [<имя> <канал>]";
" Пример: INVITE";
};
}
help Kick {
" Удаляет пользователя из канала. Может быть использована только";
@@ -651,7 +644,7 @@ help Kick {
" -";
" Синтаксис: KICK <канал> <пользователь> [причина]";
" Пример: KICK #Lobby foobar Lamer..";
};
}
help Away {
" Помечает вас как отсутствующего - \"Away\".";
@@ -660,7 +653,7 @@ help Away {
" указанной причине)";
" AWAY (Снимет статус отсутствующего)";
" Пример: AWAY Lunch time!";
};
}
help Watch {
" Watch - это система уведомлений, более быстрая и использующая меньше";
@@ -675,7 +668,7 @@ help Watch {
" уведомлений)";
" WATCH -имя (Удаление имени из списка)";
" WATCH (Покажет весь список уведомлений)";
};
}
help List {
" Возвращает полный список каналов, доступных в сети IRC на данный";
@@ -695,7 +688,7 @@ help List {
" -";
" Все эти параметры могут быть использованы вместо стандартной";
" строки поиска.";
};
}
help Privmsg {
" Позволяет послать сообщение пользователю, всему каналу или целому";
@@ -719,7 +712,7 @@ help Privmsg {
" [Только для Операторов IRC]";
" Сообщение показывается в окне статуса большинством современных IRC";
" клиентов.";
" Пример: /PRIVMSG $*.mynet.net We will be upgrading our net in the";
" Пример: /PRIVMSG $*.example.org We will be upgrading our net in the";
" next hour";
" Однако, следует заметить, что в большинстве случаев лучше использовать";
" сервисы (/OS GLOBAL).";
@@ -732,7 +725,7 @@ help Privmsg {
" нельзя использовать дополнительные возможности команд /msg или";
" /privmsg, нужно пользоваться ими следующим образом:";
" '/QUOTE PRIVMSG @#channel blah'.";
};
}
help Notice {
" Посылает \"notice\" пользователю, каналу или всем, кто подключен к";
@@ -755,7 +748,7 @@ help Notice {
" Посылает \"notice\" всем пользователям сервера, попадающим под";
" <маска> [Доступно только операторам]";
" Сообщения видны в окне статуса большинства современных клиентов.";
" Пример: /NOTICE $*.mynet.net We will be upgrading our net in the";
" Пример: /NOTICE $*.example.org We will be upgrading our net in the";
" next hour";
" В большинстве случаев сервисы (/OS GLOBAL) будут лучшей";
" альтернативой.";
@@ -766,7 +759,7 @@ help Notice {
" ВАЖНО: В случае использования старых клиентов (ircII, к примеру),";
" чтобы использовать дополнительные возможности, необходимо применять";
" следующий способ: '/QUOTE NOTICE @#channel blah'.";
};
}
help Knock {
" Для каналов с ограничением доступа \"только по приглашению\" вы можете";
@@ -774,14 +767,14 @@ help Knock {
" -";
" Синтаксис: KNOCK <#канал> <сообщение>";
" Пример: KNOCK #secret_chan I'm an op, let me in!";
};
}
help Setname {
" Позволяет пользователю изменить реальное имя (\"Real name\") (GECOS)";
" без отключения от IRC";
" -";
" Синтаксис: SETNAME <новое \"реальное имя\">";
};
}
help Vhost {
" Скрывает реальный hostname пользователя, заменяя его виртуальным";
@@ -789,7 +782,7 @@ help Vhost {
" -";
" Синтаксис: VHOST <логин> <пароль>";
" Пример: VHOST openbsd ilovecypto";
};
}
help Mode {
" Устанавливает режим для пользователя или канала.";
@@ -799,7 +792,7 @@ help Mode {
" Синтаксис: MODE <канал/пользователь> <режим>";
" Пример: MODE #Support +tn";
" MODE #Support +ootn hAtbLaDe XYZ";
};
}
help Credits {
" Эта команда возвращает список людей, так или иначе помогавших в";
@@ -807,28 +800,28 @@ help Credits {
" -";
" Синтаксис: CREDITS";
" CREDITS <сервер>";
};
}
help Dalinfo {
" Историческая справка о создателях сервера (от ircu, и далее...)";
" -";
" Синтаксис: DALINFO";
" DALINFO <сервер>";
};
}
help License {
" Возвращает информацию о лицензии, под которой распространяется";
" UnrealIRCd.";
" Синтаксис: LICENSE";
" LICENSE <сервер>";
};
}
help Time {
" Отображает текущую дату и время на сервере.";
" -";
" Синтаксис: TIME";
" TIME <сервер>";
};
}
help Silence {
" Игнорирует сообщения от пользователя или группы пользователей сервера.";
@@ -836,7 +829,7 @@ help Silence {
" Синтаксис: SILENCE +nickname (Добавляет ник в SILENCE список)";
" SILENCE -nickname (Удаляет ник из SILENCE списка)";
" SILENCE (Отображает текущий SILENCE список)";
};
}
help Oper {
" Позволяет пользователю получить статус IRC оператора.";
@@ -844,7 +837,7 @@ help Oper {
" Синтаксис: OPER <идентификатор> <пароль>";
" ВАЖНО: идентификатор и пароль чувствительны к регистру";
" Пример: OPER hAtbLaDe foobar234";
};
}
help Wallops {
" Посылает сообщение всем пользователям с установленным флагом +w.";
@@ -852,7 +845,7 @@ help Wallops {
" сообщения может любой пользователь с установленным флагом +w";
" -";
" Синтаксис: WALLOPS <сообщение>";
};
}
help Globops {
" Посылает общесетевое сообщение для IRC операторов. Видеть его могут";
@@ -860,35 +853,35 @@ help Globops {
" -";
" Синтаксис: GLOBOPS <сообщение>";
" Пример: GLOBOPS Lets get em clones ..";
};
}
help Locops {
" Посылает сообщение IRC операторам, подключенным к серверу (local).";
" -";
" Синтаксис: LOCOPS <сообщение>";
" Пример: LOCOPS Gonna k:line that user ...";
};
}
help Chatops {
" Посылает сообщение всем IRC операторам (global).";
" -";
" Синтаксис: CHATOPS <message>";
" Пример: CHATOPS Gonna k:line that user ...";
};
}
help Adchat {
" Посылает сообщение всем подключенным администраторам";
" -";
" Синтаксис: ADCHAT <текст>";
" Пример: ADCHAT Hey guys! I'm finally here.";
};
}
help Nachat {
" Посылает сообщение всем подключенным администраторам сети";
" -";
" Синтаксис: NACHAT <текст>";
" Пример: NACHAT Hey guys! How is everything?";
};
}
help Kill {
" Отключает пользователей от сервера IRC.";
@@ -896,7 +889,7 @@ help Kill {
" -";
" Синтаксис: KILL <ник1>,<ник2>,<ник3>,... <причина>";
" Пример: KILL Jack16 Cloning is not allowed";
};
}
help Kline {
" Команда временно добавляет пользователя или хост в K:Lines. ";
@@ -913,7 +906,7 @@ help Kline {
" KLINE *@*.someisp.com 2d Abuse (добавляет K:line на 2 дня)";
" KLINE Idiot 1d Please go away";
" KLINE -*@*.aol.com";
};
}
help Zline {
" Команда временно добавляет пользователя или хост в Z:Lines. ";
@@ -929,7 +922,7 @@ help Zline {
" ZLINE *@127.0.0.1 2d Abuse (Добавляет Z:line на 2 дня)";
" ZLINE -*@127.0.0.1";
" ВАЖНО: для использования требуется флаг, разрешающий zline";
};
}
help Gline {
" Команда временно добавляет пользователя или хост в G:Lines. ";
@@ -946,7 +939,7 @@ help Gline {
" GLINE *@*.idiot.net 1d Spammer (Добавляет G:line на 24 часа)";
" GLINE -*@*.idiot.net";
" ВАЖНО: для использования требуется флаг, разрешающий gline";
};
}
help Shun {
" Запрещает использование любой команды, кроме ADMIN и ответов на";
@@ -966,7 +959,7 @@ help Shun {
" (Shun foobar@aol.com на 10 минут по причине Spamming)";
" SHUN +foobar@aol.com 1d6h :Spamming (SHUN на 30 часов)";
" ВАЖНО: для использования требуется флаг, разрешающий gkline";
};
}
help Gzline {
" Команда накладывает временный глобальный Z:line. Если вы попадаете под";
@@ -984,7 +977,7 @@ help Gzline {
" GZLINE *@4.16.200.* 1d5h Spammers (Действующий 29 часов";
" общесетевой Z:line)";
" ВАЖНО: требует установленного can_gzline флага";
};
}
help Akill {
" Применяет Autokill на указанную маску. Запрещает подключение к сети";
@@ -993,14 +986,14 @@ help Akill {
" -";
" Синтаксис: AKILL <user@host> :<причина>";
" Пример: AKILL foo@aol.com :Spammers!";
};
}
help Rakill {
" Снимает ранее установленный AKILL.";
" ЭТА КОМАНДА МОЖЕТ БЫТЬ ИСПОЛЬЗОВАНА ТОЛЬКО СЕРВЕРАМИ";
" -";
" Синтаксис: RAKILL <user@host>";
};
}
help Rehash {
" Заставляет сервер перечитать файл конфигурации.";
@@ -1021,9 +1014,9 @@ help Rehash {
" -dns - Переинециализация и перезагрузка преобразования адресов";
" -garbage - Активирует \"сборщик мусора\"";
" -motd - Перечитает все файлы MOTD, BOTMOTD, OPERMOTD и RULES (включая tld{})";
" -ssl - Перезагрузка сертификатов SSL";
" -tls - Перезагрузка сертификатов SSL/TLS";
};
}
help Restart {
" Перезапускает IRC демона, с отключением всех пользователей,";
@@ -1033,7 +1026,7 @@ help Restart {
" Синтаксис: RESTART";
" RESTART <пароль>";
" RESTART <пароль> <причина>";
};
}
help Die {
" Убивает IRC демон, отключает от него всех пользователей.";
@@ -1041,16 +1034,16 @@ help Die {
" -";
" Синтаксис: DIE";
" DIE <пароль>";
};
}
help Lag {
" Команда - аналог Traceroute для IRC серверов";
" Вы вводите /LAG irc.fyremoon.net и получаете ответ от каждого";
" Вы вводите /LAG irc.example.org и получаете ответ от каждого";
" сервера, через который она проходит, с указанием времени задержки.";
" Используется для поиска лагов и серверов с нестыковкой по времени";
" -";
" Синтаксис: LAG <server>";
};
}
help Sethost {
" Пользуясь этой командой вы можете сменить свой виртуальный хост";
@@ -1059,7 +1052,7 @@ help Sethost {
" -";
" Синтаксис: SETHOST <новое имя>";
" Пример: SETHOST i.have.hairy.armpits";
};
}
help Setident {
" Этой командой вы можете сменить себе ваш идент (Username).";
@@ -1067,7 +1060,7 @@ help Setident {
" -";
" Синтаксис: SETIDENT <новый ident>";
" Пример: SETIDENT l33t";
};
}
help Chghost {
" Сменяет имя хоста пользователя IRC сети на указанное.";
@@ -1075,7 +1068,7 @@ help Chghost {
" -";
" Синтаксис: CHGHOST <ник> <хост>";
" Пример: CHGHOST hAtbLaDe root.me.com";
};
}
help Chgident {
" Изменяет идентификационную информацию (Ident) о пользователе сети.";
@@ -1083,7 +1076,7 @@ help Chgident {
" -";
" Синтаксис: CHGIDENT <ник> <ident>";
" Пример: CHGIDENT hAtbLaDe sheep";
};
}
help Chgname {
" Изменяет \"IRC Name\" (или \"Real Name\") пользователя сети";
@@ -1091,7 +1084,7 @@ help Chgname {
" -";
" Синтаксис: CHGNAME <ник> <имя>";
" Пример: CHGNAME hAtbLaDe Gotta new name :)";
};
}
help Squit {
" Отключает IRC сервер (или все сервера, попадающие под маску) от сети.";
@@ -1100,7 +1093,7 @@ help Squit {
" -";
" Синтаксис: SQUIT <сервер>";
" Пример: SQUIT leaf.*";
};
}
help Connect {
" Подключает указанный IRC сервер к тому, на котором вы находитесь.";
@@ -1111,21 +1104,21 @@ help Connect {
" CONNECT <leaf> <port> <hub>";
" Пример: CONNECT leaf.*";
" CONNECT leaf.* 6667 hub.*";
};
}
help Dccdeny {
" Запрещает передачу файлов, попадающих под указанную маску, по DCC.";
" Команда доступна только IRC операторам.";
" -";
" Синтаксис: DCCDENY <маска> <причина>";
};
}
help Undccdeny {
" Отменить запрет на передачу файлов по указанной маске.";
" Команда доступна только IRC операторам.";
" -";
" Синтаксис: UNDCCDENY <filename mask>";
};
}
help Sajoin {
" Заставляет пользователя войти в канал.";
@@ -1134,7 +1127,7 @@ help Sajoin {
" Синтаксис: SAJOIN <ник> <канал>,[<канал2>..]";
" Пример: SAJOIN hAtbLaDe #OperHelp";
" SAJOIN hAtbLaDe #Support,#IRCHelp";
};
}
help Sapart {
" Заставляет пользователя покинуть канал.";
@@ -1144,7 +1137,7 @@ help Sapart {
" Пример: SAPART hAtbLaDe #OperHelp";
" SAPART hAtbLaDe #Support,#IRCHelp";
" SAPART hAtbLaDe #Support,#IRCHelp Go away";
};
}
help Samode {
" Позволяет администратору сервисов изменить режимы на указанном канале";
@@ -1153,7 +1146,7 @@ help Samode {
" -";
" Синтаксис: SAMODE <канал> <режим>";
" Пример: SAMODE #Support +m";
};
}
help Trace {
" Команду TRACE можно использовать на сервере или пользователе.";
@@ -1164,15 +1157,15 @@ help Trace {
" используете его в первый раз.";
" -";
" Синтаксис: TRACE <сервер|ник>";
" Пример: TRACE irc.fyremoon.net";
};
" Пример: TRACE irc.example.org";
}
help Opermotd {
" Показывает MOTD сервера для IRC операторов";
" Команда доступна только IRC операторам.";
" -";
" Синтаксис: OPERMOTD";
};
}
help Sdesc {
" Этой командой можно изменить описание сервера без применения squit";
@@ -1181,20 +1174,18 @@ help Sdesc {
" -";
" Синтаксис: SDESC <новое описание>";
" Пример: SDESC Fly High, Fly Free";
};
}
help Mkpasswd {
" Команда возвратит 'hash' указанной строки, который можно";
" в последствии использовать в конфигурационном файле в качестве пароля:";
" в oper::password, vhost::password, и т.д.";
" Доступные типы хешей (по возрастанию уровня безопасности):";
" *NIX: crypt, md5, sha1 [*], ripemd160 [*]";
" Windows: crypt [*], md5, sha1, ripemd160 [*]";
" [*: доступно в случае, если сервер имеет поддержку SSL]";
" Дополнительную информацию и типы хешей:";
" https://www.unrealircd.org/docs/Authentication_types";
" -";
" Синтаксис: MKPASSWD <метод> <пароль>";
" Пример: MKPASSWD md5 IamTeh1337";
};
" Пример: MKPASSWD argon2 IamTeh1337";
}
help Module {
" Покажет список загруженных сервером модулей.";
@@ -1214,24 +1205,20 @@ help Module {
" [OLD?] Отсутствует Mod_Version, забыли перекомпилировать старый";
" модуль";
" Так же будут видны присутствующие hooks и command overrides.";
};
}
help Close {
" Команда позволяет отключить все неизвестные соединения к IRC серверу.";
" -";
" Синтаксис: CLOSE";
};
}
help Tsctl {
" Команда позволяет управлять временем в IRC сети";
" Может использоваться только IRC операторами.";
" -";
" Синтаксис: TSCTL OFFSET +|- <time> (Настройка времени IRC)";
" TSCTL TIME (Покажет время)";
" TSCTL ALLTIME (Покажет время на всех серверах)";
" TSCTL SVSTIME <timestamp> (Установит время на всех";
" серверах)";
};
" Синтаксис: TSCTL ALLTIME (Покажет время на всех серверах)";
}
help Svsnick {
" Меняет ник указанному пользователю.";
@@ -1239,7 +1226,7 @@ help Svsnick {
" -";
" Синтаксис: SVSNICK <старый ник> <новый ник> <timestamp>";
" Пример: SVSNICK hAtbLaDe Foobar 963086432";
};
}
help Svsmode {
" Изменяет режимы указанного пользователя.";
@@ -1247,7 +1234,7 @@ help Svsmode {
" -";
" Синтаксис: SVSMODE <ник> <режим>";
" Пример: SVSMODE hAtbLaDe +i";
};
}
help Svskill {
" Отключает пользователя от сети.";
@@ -1255,7 +1242,7 @@ help Svskill {
" -";
" Синтаксис: SVSKILL <пользователь> :<причина>";
" Пример: SVSKILL Lamer21 :Goodbye";
};
}
help Svsnoop {
" Включает или отключает режим IRC оператора";
@@ -1265,7 +1252,7 @@ help Svsnoop {
" -";
" Синтаксис: SVSNOOP <сервер> <+/->";
" Пример: SVSNOOP leaf.* -";
};
}
help Svsjoin {
" Заставляет пользователя войти в указанный канал.";
@@ -1274,7 +1261,7 @@ help Svsjoin {
" Синтаксис: SVSJOIN <ник> <канал>[,<канал2>..] [ключ1[,ключ2[..]]]";
" Пример: SVSJOIN hAtbLaDe #jail";
" SVSJOIN hAtbLaDe #jail,#zoo";
};
}
help Svspart {
" Заставляет пользователя покинуть канал.";
@@ -1284,7 +1271,7 @@ help Svspart {
" Пример: SVSPART hAtbLaDe #Hanson";
" SVSPART hAtbLaDe #Hanson,#AOL";
" SVSPART hAtbLaDe #Hanson,#AOL You must leave";
};
}
help Svso {
" Даёт пользователю Operflags как описано в O:lines.";
@@ -1294,7 +1281,7 @@ help Svso {
" Синтаксис: SVSO <nick> <+operflags> (Добавляет Operflags)";
" SVSO <nick> - (Снимает все O:Line флаги)";
" Пример: SVSO SomeNick +bBkK";
};
}
help Swhois {
" Изменяет сообщение WHOIS для указанного ника.";
@@ -1303,7 +1290,7 @@ help Swhois {
" Синтаксис: SWHOIS <ник> :<сообщение> (Устанавливает SWHOIS)";
" SWHOIS <ник> : (Сбрасывает SWHOIS)";
" Пример: SWHOIS SomeNick :is a lamer";
};
}
help Sqline {
" Накладывает бан на указанный ник или маску.";
@@ -1311,7 +1298,7 @@ help Sqline {
" -";
" Синтаксис: SQLINE <маска> :<причина>";
" Пример: SQLINE *Bot* :No bots";
};
}
help Unsqline {
" Снимает бан с указанного ника или маски";
@@ -1319,7 +1306,7 @@ help Unsqline {
" -";
" Синтаксис: UNSQLINE <маска>";
" Пример: UNSQLINE *Bot*";
};
}
help Svs2mode {
" Изменяет режимы указанного пользователя и уведомляет его";
@@ -1328,7 +1315,7 @@ help Svs2mode {
" -";
" Синтаксис: SVS2MODE <ник> <режимы>";
" Пример: SVS2MODE hAtbLaDe +h";
};
}
help Svsfline {
" Добавляет маску файла к DCCDENY";
@@ -1337,7 +1324,7 @@ help Svsfline {
" Синтаксис: :server SVSFLINE + file :reason (Добавляет имя файла)";
" :server SVSFLINE - file (Удаляет имя файла)";
" :server SVSFLINE * (Очищает список DCCDENY)";
};
}
help Svsmotd {
" Изменяет MOTD у сервисов.";
@@ -1346,7 +1333,7 @@ help Svsmotd {
" SVSMOTD ! (Удаляет текущий MOTD)";
" SVSMOTD ! :<текст> (Замещает текущий новым MOTD)";
" Пример: SVSMOTD # :Services MOTD";
};
}
help Svsnline {
" Создаёт глобальный бан на основе реального имени.";
@@ -1358,7 +1345,7 @@ help Svsnline {
" SVSNLINE - :<имя> (чтобы удалить бан)";
" SVSNLINE * (очистить все баны)";
" Пример: SVSNLINE + sub7_drone :*sub7*";
};
}
help Svslusers {
" Изменяет общее и/или локальное максимальное количество";
@@ -1367,15 +1354,15 @@ help Svslusers {
" Должно использоваться через сервер, описанный в U:Lines.";
" -";
" Синтаксис: SVSLUSERS <сервер> <globalmax|-1> <localmax|-1>";
" Пример: SVSLUSERS irc.test.com -1 200";
};
" Пример: SVSLUSERS irc.example.org -1 200";
}
help Svswatch {
" Изменяет список WATCH у указанного пользователя.";
" Должно использоваться через сервер, описанный в U:Lines.";
" Синтаксис: SVSWATCH <имя> :<параметры>";
" Пример: SVSWATCH Blah :+Blih!*@* +Bluh!*@* +Bleh!*@*.com";
};
}
help Svssilence {
" Изменяет список SILENCE у указанного пользователя.";
@@ -1384,7 +1371,7 @@ help Svssilence {
" несколько записей одной командой.";
" Синтаксис: SVSSILENCE <имя> :<параметры>";
" Пример: SVSSILENCE Blah :+*!*@*.com +*!*@*.bla.co.uk";
};
}
help Svssno {
" Изменяет snomask для указанного ника.";
@@ -1392,7 +1379,7 @@ help Svssno {
" -";
" Синтаксис: SVSSNO <ник> <snomasks>";
" Пример: SVSSNO joe +Gc";
};
}
help Svs2sno {
" Изменяет snomask для указанного ника и уведомляет пользователя";
@@ -1401,7 +1388,7 @@ help Svs2sno {
" -";
" Синтаксис: SVS2SNO <ник> <snomasks>";
" Пример: SVS2SNO joe +Gc";
};
}
help Svsnolag {
" Включает 'no fake lag' для указанного пользователя.";
@@ -1409,7 +1396,7 @@ help Svsnolag {
" -";
" Синтаксис: SVSNOLAG [+|-] <ник>";
" Пример: SVSNOLAG + joe";
};
}
help Svs2nolag {
" Включает 'no fake lag' для указанного пользователя.";
@@ -1417,7 +1404,7 @@ help Svs2nolag {
" -";
" Синтаксис: SVS2NOLAG [+|-] <ник>";
" Пример: SVS2NOLAG + joe";
};
}
help Spamfilter {
@@ -1439,7 +1426,6 @@ help Spamfilter {
" сообщение), 'dccblock' (блокирует любой dccs), 'viruschan'";
" (покинуть все каналы и войти в канал помощи),";
" 'warn' (уведомляет операторов).";
" [regex] регулярное выражение, блокируемое фильтром";
" [tkltime] длительность применяемого фильтром действия (указание '-'";
" включает значение из set::spamfilter::ban-time, но для";
" block/tempshun этот параметр игнорируется.);";
@@ -1447,6 +1433,7 @@ help Spamfilter {
" ПРОБЕЛОВ, '_' будут преобразованы в пробелы. Если в качестве";
" причины указать '-', будет использовано значение";
" по-умолчанию из set::spamfilter::ban-reason.";
" [regex] регулярное выражение, блокируемое фильтром";
" - ";
" Примеры:";
" /spamfilter add p block - - Come watch me on my webcam";
@@ -1457,7 +1444,7 @@ help Spamfilter {
" /spamfilter add p kill - Please_go_to_www.viruscan.xx/nicepage/virus=blah Come watch me on my webcam";
" /spamfilter del p block - - Come watch me on my webcam*";
" /spamfilter add cN gzline 1d No_advertising_please come to irc\..+\..+";
};
}
help Tempshun {
" Добавляет/удаляет 'временный shun'.";
@@ -1468,23 +1455,23 @@ help Tempshun {
" Синтаксис: TEMPSHUN [+|-]<ник> [причина]";
" Пример: TEMPSHUN evilguy suspected infection";
" TEMPSHUN -niceguy";
};
}
help DccAllow {
" Для получения помощи по системе DCCALLOW, введите '/DCCALLOW HELP'";
};
}
help Addmotd {
" Добавляет линию в конец MOTD (сообщение дня)";
" -";
" Синтаксис: ADDMOTD <текст>";
" Пример: ADDMOTD Удачного общения!";
};
}
help Addomotd {
" Добавляет линию в конец OPERMOTD (сообщение дня для операторов)";
" -";
" Синтаксис: ADDOMOTD <текст>";
" Пример: ADDOMOTD Согрешите и потеряйте операторство!";
};
}
+176 -170
View File
File diff suppressed because it is too large Load Diff
+130 -104
View File
@@ -29,115 +29,116 @@ loadmodule "cloak";
// User commands (MINIMAL)
// These provide just the minimal set of IRC commands that are
// required by RFC1459 along with WATCH and MAP.
loadmodule "m_admin";
loadmodule "m_away";
loadmodule "m_invite";
loadmodule "m_ison";
loadmodule "m_join";
loadmodule "m_kick";
loadmodule "m_links";
loadmodule "m_list";
loadmodule "m_lusers";
loadmodule "m_map";
loadmodule "m_message";
loadmodule "m_mode";
loadmodule "m_motd";
loadmodule "m_names";
loadmodule "m_nick";
loadmodule "m_part";
loadmodule "m_pass";
loadmodule "m_pingpong";
loadmodule "m_protoctl";
loadmodule "m_quit";
loadmodule "m_rules";
loadmodule "m_topic";
loadmodule "m_user";
loadmodule "m_userhost";
loadmodule "m_watch";
loadmodule "m_who";
loadmodule "m_whois";
loadmodule "m_whowas";
loadmodule "admin";
loadmodule "away";
loadmodule "invite";
loadmodule "ison";
loadmodule "join";
loadmodule "kick";
loadmodule "links";
loadmodule "list";
loadmodule "lusers";
loadmodule "map";
loadmodule "message";
loadmodule "mode";
loadmodule "motd";
loadmodule "names";
loadmodule "nick";
loadmodule "part";
loadmodule "pass";
loadmodule "pingpong";
loadmodule "protoctl";
loadmodule "quit";
loadmodule "rules";
loadmodule "topic";
loadmodule "user";
loadmodule "userhost";
loadmodule "watch";
loadmodule "whox";
loadmodule "whois";
loadmodule "whowas";
// User commands (EXTENDED)
// These are commands that provide extended functionality.
loadmodule "m_botmotd";
loadmodule "m_cap";
loadmodule "m_cycle";
loadmodule "m_dccallow";
loadmodule "m_help";
loadmodule "m_knock";
loadmodule "m_lag";
loadmodule "m_sasl";
loadmodule "m_setname";
loadmodule "m_silence";
loadmodule "m_starttls";
loadmodule "m_time";
loadmodule "m_userip";
loadmodule "m_vhost";
loadmodule "botmotd";
loadmodule "cap";
loadmodule "cycle";
loadmodule "dccallow";
loadmodule "help";
loadmodule "knock";
loadmodule "lag";
loadmodule "sasl";
loadmodule "setname";
loadmodule "silence";
loadmodule "starttls";
loadmodule "time";
loadmodule "userip";
loadmodule "vhost";
loadmodule "history";
// IRC Operator commands
// Note: several of these like m_kill are also server-to-server commands
// Note: several of these like kill are also server-to-server commands
// which are required if you link to other servers.
loadmodule "m_addmotd";
loadmodule "m_addomotd";
loadmodule "m_chghost";
loadmodule "m_chgident";
loadmodule "m_chgname";
loadmodule "m_close";
loadmodule "m_connect";
loadmodule "m_squit";
loadmodule "m_dccdeny";
loadmodule "m_globops";
loadmodule "m_kill"; /* also server-to-server */
loadmodule "m_locops";
loadmodule "m_mkpasswd";
loadmodule "m_oper";
loadmodule "m_opermotd";
loadmodule "m_sajoin";
loadmodule "m_samode";
loadmodule "m_sapart";
loadmodule "m_sdesc";
loadmodule "m_sethost";
loadmodule "m_setident";
loadmodule "m_stats";
loadmodule "m_tkl"; /* also server-to-server */
loadmodule "m_trace";
loadmodule "m_tsctl";
loadmodule "m_undccdeny";
loadmodule "m_unsqline";
loadmodule "m_wallops";
loadmodule "addmotd";
loadmodule "addomotd";
loadmodule "chghost";
loadmodule "chgident";
loadmodule "chgname";
loadmodule "close";
loadmodule "connect";
loadmodule "squit";
loadmodule "dccdeny";
loadmodule "globops";
loadmodule "kill"; /* also server-to-server */
loadmodule "locops";
loadmodule "mkpasswd";
loadmodule "oper";
loadmodule "opermotd";
loadmodule "sajoin";
loadmodule "samode";
loadmodule "sapart";
loadmodule "sdesc";
loadmodule "sethost";
loadmodule "setident";
loadmodule "stats";
loadmodule "tkl"; /* also server-to-server */
loadmodule "trace";
loadmodule "tsctl";
loadmodule "unsqline";
loadmodule "wallops";
loadmodule "jumpserver";
// Server-to-server commands
// Don't remove these, unless you never link to other servers.
loadmodule "m_eos";
loadmodule "m_md";
loadmodule "m_netinfo";
loadmodule "m_server";
loadmodule "m_sjoin";
loadmodule "m_sqline";
loadmodule "m_swhois";
loadmodule "m_umode2";
loadmodule "eos";
loadmodule "md";
loadmodule "netinfo";
loadmodule "server";
loadmodule "sjoin";
loadmodule "sqline";
loadmodule "swhois";
loadmodule "umode2";
loadmodule "sinfo";
loadmodule "require-module";
// Services commands
// You could disable these if you don't use Services
// https://www.unrealircd.org/docs/Services
loadmodule "m_sendsno";
loadmodule "m_sendumode";
loadmodule "m_svsfline";
loadmodule "m_svsjoin";
loadmodule "m_svskill";
loadmodule "m_svslusers";
loadmodule "m_svsmode";
loadmodule "m_svsmotd";
loadmodule "m_svsnick";
loadmodule "m_svsnline";
loadmodule "m_svsnolag";
loadmodule "m_svsnoop";
loadmodule "m_svspart";
loadmodule "m_svssilence";
loadmodule "m_svssno";
loadmodule "m_svswatch";
loadmodule "sendsno";
loadmodule "sendumode";
loadmodule "svsjoin";
loadmodule "svskill";
loadmodule "svslusers";
loadmodule "svsmode";
loadmodule "svsmotd";
loadmodule "svsnick";
loadmodule "svsnline";
loadmodule "svsnolag";
loadmodule "svsnoop";
loadmodule "svspart";
loadmodule "svssilence";
loadmodule "svssno";
loadmodule "svswatch";
/*** Channel modes ***/
@@ -159,6 +160,7 @@ loadmodule "chanmodes/nonickchange"; /* +N */
loadmodule "chanmodes/nokick"; /* +Q */
loadmodule "chanmodes/regonlyspeak"; /* +M */
loadmodule "chanmodes/secureonly"; /* +z */
loadmodule "chanmodes/history"; /* +H */
/*** User modes ***/
@@ -183,7 +185,6 @@ loadmodule "extbans/join"; /* +b ~j (prevent only joins) */
loadmodule "extbans/quiet"; /* +b ~q (prevent only messaging) */
loadmodule "extbans/nickchange"; /* +b ~n (prevent only nick changes) */
loadmodule "extbans/realname"; /* +b ~r (ban by real name) */
loadmodule "extbans/regnick"; /* +b ~R (ban/exempt if using registered nick) */
loadmodule "extbans/account"; /* +b ~a (ban/exempt if logged in with services account) */
loadmodule "extbans/inchannel"; /* +b ~c (ban/exempt if in channel) */
loadmodule "extbans/operclass"; /* +b ~O (ban/exempt by operclass) */
@@ -191,20 +192,45 @@ loadmodule "extbans/certfp"; /* +b ~S (ban/exempt by certfp) */
loadmodule "extbans/textban"; /* +b ~T (censor or block text) */
loadmodule "extbans/msgbypass"; /* +e ~m (bypass message restrictions) */
loadmodule "extbans/timedban"; /* +b ~t (timed bans / temporary bans) */
loadmodule "extbans/partmsg"; /* +b ~p (hide part/quit message) */
loadmodule "extbans/securitygroup"; /* +b ~G (security group) */
/*** CAP modules ***/
loadmodule "cap/sts"; /* strict transport policy (set::ssl::sts-policy) */
loadmodule "cap/plaintext-policy"; /* plaintext-policy announce */
loadmodule "cap/link-security"; /* link-security announce */
/** IRCv3 extensions */
loadmodule "account-notify"; /* send ACCOUNT message upon services account login */
loadmodule "message-tags"; /* add tags to messages, required for various IRCv3 features */
loadmodule "batch"; /* also required for several IRCv3 features */
loadmodule "server-time"; /* adds server timestamp to various messages */
loadmodule "message-ids"; /* adds unique msgid to various messages */
loadmodule "account-tag"; /* adds services account information to messages */
loadmodule "echo-message"; /* shows clients if their messages are altered/filtered */
loadmodule "labeled-response"; /* correlate requests and responses easily */
loadmodule "bot-tag"; /* indicate the message comes from a bot (draft/bot) */
loadmodule "typing-indicator"; /* typing indicator in PM and channels (+typing) */
loadmodule "reply-tag"; /* indicate to which message you are responding (+draft/reply) */
loadmodule "clienttagdeny"; /* informs clients about supported client-only message tags */
loadmodule "sts"; /* strict transport policy (set::tls::sts-policy) */
loadmodule "link-security"; /* link-security announce */
loadmodule "plaintext-policy"; /* plaintext-policy announce */
/*** Other ***/
// These are modules that don't fit in any of the previous sections
loadmodule "certfp"; /* SSL certificate fingerprint in /WHOIS (& more) */
loadmodule "ssl_antidos"; /* prevent SSL DoS (renegotiate floods) */
loadmodule "m_nopost"; /* Block POST commands (Firefox XPS IRC Attack) */
loadmodule "ident_lookup"; /* Ident lookups if set::options::identd-check is set*/
loadmodule "certfp"; /* SSL/TLS certificate fingerprint in /WHOIS (& more) */
loadmodule "tls_antidos"; /* prevent TLS DoS (renegotiate floods) */
loadmodule "webirc"; /* WEBIRC command. See webirc block. */
loadmodule "blacklist"; /* Blacklist support (DNSBL). See blacklist block. */
loadmodule "jointhrottle"; /* set::anti-flood::join-flood (previously chanmode +j) */
loadmodule "charsys"; /* Provides set::allowed-nickchars (must always be loaded!) */
loadmodule "authprompt"; /* Authentication prompt, see set::authentication-prompt */
loadmodule "history_backend_mem"; /* History storage backend (used by chanmodes/history) */
loadmodule "tkldb"; /* Write TKLines to .db file */
loadmodule "channeldb"; /* Write channel settings to .db file (+P channels only) */
loadmodule "rmtkl"; /* Easily remove *-Lines in bulk with /RMTKL */
loadmodule "restrict-commands"; /* Provides set::restrict-commands settings */
loadmodule "reputation"; /* used by Connthrottle and others, see next */
loadmodule "connthrottle"; /* see https://www.unrealircd.org/docs/Connthrottle */
loadmodule "userip-tag"; /* unrealircd.org/userip tag for ircops */
loadmodule "userhost-tag"; /* unrealircd.org/userhost tag for ircops */
loadmodule "targetfloodprot"; /* set::anti-flood::target-flood protection */
+43 -10
View File
@@ -15,12 +15,12 @@
// This add the /IRCOPS command: A more visual way for users
// to see which IRCOps are online.
loadmodule "m_ircops";
loadmodule "ircops";
// This adds the /STAFF command: This command simply displays
// a text file that you can configure here:
loadmodule "m_staff";
set { staff-file "network.staff"; };
loadmodule "staff";
set { staff-file "network.staff"; }
/*** Channel modes ***/
@@ -36,7 +36,8 @@ loadmodule "nocodes";
// The hideserver module will hide /MAP and /LINKS to regular users.
// It does not truly enhance security as server names can still be
// seen at other places.
loadmodule "hideserver";
// Comment out the following line to enable this:
// loadmodule "hideserver";
// The antirandom module will kill or *line users that have a nick,
// ident and/or realname that is considered "random".
@@ -126,7 +127,7 @@ set {
except-hosts {
mask 192.168.*;
mask 127.*;
};
}
/* EXCEPT-WEBIRC:
* This will make antirandom not check connections from WEBIRC gateways.
@@ -135,13 +136,45 @@ set {
* default is 'yes'.
*/
except-webirc yes;
};
};
}
}
// This module will send a HTTP 301 redirect to any client which sends
// a HTTP request to us. This is commented out by default:
//loadmodule "webredir";
//set {
// webredir {
// url "https://...";
// }
//}
// This adds websocket support. For more information, see:
// https://www.unrealircd.org/docs/WebSocket_support
loadmodule "websocket";
// This adds support for WHOX
// This is currently experimental!
loadmodule "m_whox";
// This module will detect and stop spam containing of characters of
// mixed "scripts", where (for example) some characters are in
// Latin script and other characters are in Cyrillic script.
loadmodule "antimixedutf8";
set {
antimixedutf8 {
/* Take action at this 'score'.
* 10 is a good and safe default.
*/
score 10;
/* Action to take, see:
* https://www.unrealircd.org/docs/Actions
*/
ban-action block;
/* Block/kill/ban reason (sent to user) */
ban-reason "Possible mixed character spam";
/* Duration of ban (does not apply to block/kill) */
ban-time 4h; // For other types
}
}
// Currently incomplete and experimental:
loadmodule "chathistory";
+21
View File
@@ -0,0 +1,21 @@
#
# This file contains the list of repositories that are used
# by the './unrealircd module' command.
# Note that 3rd party modules are NOT written by the UnrealIRCd team.
# Use such modules at your own risk. In case of problems, contact
# the module author. For more information, see:
# https://www.unrealircd.org/docs/Module_manager
#
#
# This is the unrealircd-contrib repository which is added by default in
# UnrealIRCd 5 to make it easy for users to install 3rd party modules.
# If you are a module coder and want to add your module to this repository
# as well, then read the rules and procedure at:
# https://www.unrealircd.org/docs/Rules_for_3rd_party_modules_in_unrealircd-contrib
#
https://modules.unrealircd.org/modules.list
# You can add more repositories here. However, do note that all
# URLs MUST start with https://
+75 -95
View File
@@ -6,9 +6,11 @@
*
* The operclass block is extensively documented at:
* https://www.unrealircd.org/docs/Operclass_block
* And the permissions itself (operclass::permissions) at:
* https://www.unrealircd.org/docs/Operclass_permissions
*
* DO NOT EDIT THIS FILE! IT WILL BE OVERWRITTEN DURING NEXT UPGRADE!!
* Instead, if you want to change the privileges in an operclass block,
* Instead, if you want to change the permissions in an operclass block,
* you should copy the definition, or this entire file, to either your
* unrealircd.conf or some other file (eg: operclass.conf) that you
* you will include from your unrealircd.conf.
@@ -18,147 +20,125 @@
/* Local IRC Operator */
operclass locop {
privileges {
privacy;
permissions {
chat;
channel;
client;
channel { operonly; override { flood; } }
client { see; }
immune;
self;
notice { local; };
server { opermotd; info; close; module; dns; rehash; };
route { local; };
kill { local; };
tkl {
self { getbaddcc; opermodes; set; }
server { opermotd; info; close; module; dns; rehash; }
route { local; }
kill { local; }
server-ban {
kline;
zline { local; };
};
trace { local; invisible-users; };
map;
};
};
zline { local; }
}
}
}
/* Global IRC Operator */
operclass globop {
privileges {
privacy;
permissions {
chat;
channel;
channel { operonly; see; override { flood; } }
client;
immune;
notice;
self;
server { opermotd; info; close; remote; module; dns; rehash; };
self { getbaddcc; opermodes; set; }
server { opermotd; info; close; module; dns; rehash;
remote; tsctl { view; } }
route;
kill;
tkl { shun; zline; kline; gline; };
trace;
who;
override { see; };
map;
};
};
server-ban { dccdeny; shun; zline; kline; gline; }
}
}
/* Server administrator */
operclass admin {
privileges {
privacy;
permissions {
chat;
channel;
channel { operonly; see; override { flood; } }
client;
immune;
notice;
self;
server { opermotd; info; close; remote; module; dns; addline; rehash; description; addmotd; addomotd; tsctl; };
self { getbaddcc; opermodes; set; }
server { opermotd; info; close; module; dns; rehash;
remote; description; addmotd;
addomotd; tsctl { view; } }
route;
kill;
tkl { shun; zline; kline; gline; };
spamfilter;
trace;
who;
override { see; };
map;
};
};
server-ban;
}
}
/* Services Admin */
operclass services-admin {
privileges {
privacy;
permissions {
chat;
channel;
channel { operonly; see; override { flood; } }
client;
immune;
notice;
self;
server { opermotd; info; close; remote; module; dns; addline; rehash; description; addmotd; addomotd; tsctl; };
self { getbaddcc; opermodes; set; }
server { opermotd; info; close; module; dns; rehash;
remote; description; addmotd;
addomotd; tsctl { view; } }
route;
kill;
tkl { shun; zline; kline; gline; };
spamfilter;
trace;
who;
sajoin;
sapart;
samode;
override { see; };
};
};
server-ban;
sacmd;
services;
}
}
/* Network Administrator */
operclass netadmin {
privileges {
privacy;
permissions {
chat;
channel;
channel { operonly; see; override { flood; } }
client;
immune;
notice;
self;
server { opermotd; info; close; remote; module; dns; addline; rehash; description; addmotd; addomotd; tsctl; };
kill;
tkl { shun; zline; kline; gline; };
self { getbaddcc; opermodes; set; }
server { opermotd; info; close; module; dns; rehash;
remote; description; addmotd;
addomotd; tsctl; }
route;
spamfilter;
trace;
who;
sajoin;
sapart;
samode;
servicebot { deop; kill; };
override { see; };
map;
};
};
kill;
server-ban;
sacmd;
services;
}
}
/* Same as 'globop' operclass, but with OperOverride capabilities added */
operclass globop-with-override {
parent globop;
privileges {
override;
};
};
permissions {
channel { operonly; see; override; }
self { getbaddcc; opermodes; set; unkickablemode; }
}
}
/* Same as 'admin' operclass, but with OperOverride capabilities added */
operclass admin-with-override {
parent admin;
privileges {
override;
};
};
permissions {
channel { operonly; see; override; }
self { getbaddcc; opermodes; set; unkickablemode; }
}
}
/* Same as 'services-admin' operclass, but with OperOverride capabilities added */
operclass services-admin-with-override {
parent services-admin;
privileges {
override;
};
};
permissions {
channel { operonly; see; override; }
self { getbaddcc; opermodes; set; unkickablemode; }
}
}
/* Same as 'netadmin' operclass, but with OperOverride capabilities added */
operclass netadmin-with-override {
parent netadmin;
privileges {
override;
};
};
permissions {
channel { operonly; see; override; }
self { getbaddcc; opermodes; set; unkickablemode; }
}
}
+127 -205
View File
@@ -1,232 +1,154 @@
/*
* This an example spamfilter file, it contains several
* real and useful spamfilters. This should give you an
* idea of how powerful spamfilter can be in real-life
* situations.
* This configuration file contains example spamfilter rules.
* They are real rules that were useful a long time ago.
* Since 2005 these rules are no longer maintained.
* The main purpose nowadays is to serve as an example
* to give you an idea of how powerful spamfilters can
* be in real-life situations.
*
* $Id$
* Documentation on spamfilter is available at:
* https://www.unrealircd.org/docs/Spamfilter
*/
/* Guidelines on the 'action' field:
* As a general rule we use 'action block' for any newly added
* spamfilters at first, later on (after knowing about false
* positives) we might change some to viruschan/kill/gline/etc..
/* General note:
* If you want to use a \ in a spamfilter, or in fact
* anywhere in the configuration file, then you need
* to escape this to \\ instead.
*/
/* First some spamfilters with match-type 'simple'.
* The only matchers available are * and ?
* PRO's: very fast, easy matching: everyone can do this.
* CON's: limited ability to fine-tune spamfilters
*/
spamfilter {
match-type posix;
match "\x01DCC (SEND|RESUME)[ ]+\"(.+ ){20}";
target { private; channel; };
action kill;
reason "mIRC 6.0-6.11 exploit attempt";
};
spamfilter {
match-type posix;
match "\x01DCC (SEND|RESUME).{225}";
target { private; channel; };
action kill;
reason "Possible mIRC 6.12 exploit attempt";
};
spamfilter {
match-type posix;
match "Come watch me on my webcam and chat /w me :-\) http://.+:\d+/me\.mpg";
match-type simple;
match "Come watch me on my webcam and chat /w me :-) http://*:*/me.mpg";
target private;
action gline;
reason "Infected by fyle trojan: see http://www.sophos.com/virusinfo/analyses/trojfylexa.html";
};
}
/* This signature uses a \ which has to escaped to \\ in the configuration file */
spamfilter {
match-type posix;
match "Speed up your mIRC DCC Transfer by up to 75%.*www\.freewebs\.com/mircupdate/mircspeedup\.exe";
target private;
action gline;
reason "Infected by mirseed trojan: see http://www.sophos.com/virusinfo/analyses/trojmirseeda.html";
};
spamfilter {
match-type posix;
match "^http://www\.angelfire\.com/[a-z0-9]+/[a-z0-9]+/[a-z_]+\.jpg <- .*!";
target private;
action block;
reason "Infected by fagot worm: see http://www.f-secure.com/v-descs/fagot.shtml";
};
spamfilter {
match-type posix;
match "^FREE PORN: http://free:porn@([0-9]{1,3}\.){3}[0-9]{1,3}:8180$";
target private;
action gline;
reason "Infected by aplore worm: see http://www.f-secure.com/v-descs/aplore.shtml";
};
spamfilter {
match-type posix;
match "^!login Wasszup!$";
target channel;
action gline;
reason "Attempting to login to a GTBot";
};
spamfilter {
match-type posix;
match "^!login grrrr yeah baby!$";
target channel;
action gline;
reason "Attempting to login to a GTBot";
};
spamfilter {
match-type posix;
match "^!packet ([0-9]{1,3}\.){3}[0-9]{1,3} [0-9]{1,15}";
target channel;
action gline;
reason "Attempting to use a GTBot";
};
spamfilter {
match-type posix;
match "^!icqpagebomb ([0-9]{1,15} ){2}.+";
target channel;
action gline;
reason "Attempting to use a GTBot";
};
spamfilter {
match-type posix;
match "^!pfast [0-9]{1,15} ([0-9]{1,3}\.){3}[0-9]{1,3} [0-9]{1,5}$";
target channel;
action gline;
reason "Attempting to use a GTBot";
};
spamfilter {
match-type posix;
match "^!portscan ([0-9]{1,3}\.){3}[0-9]{1,3} [0-9]{1,5} [0-9]{1,5}$";
target channel;
action gline;
reason "Attempting to use a GTBot";
};
spamfilter {
match-type posix;
match "^.u(dp)? ([0-9]{1,3}\.){3}[0-9]{1,3} [0-9]{1,15} [0-9]{1,15} [0-9]{1,15}( [0-9])*$";
target channel;
action gline;
reason "Attempting to use an SDBot";
};
spamfilter {
match-type posix;
match "^.syn ((([0-9]{1,3}\.){3}[0-9]{1,3})|([a-zA-Z0-9_-]+\.[a-zA-Z0-9_-]+\.[a-zA-Z0-9_.-]+)) [0-9]{1,5} [0-9]{1,15} [0-9]{1,15}";
target { channel; private; };
action gline;
reason "Attempting to use a SpyBot";
};
spamfilter {
match-type posix;
match "^porn! porno! http://.+\/sexo\.exe";
target private;
action gline;
reason "Infected by soex trojan: see http://www.trendmicro.com/vinfo/virusencyclo/default5.asp?VName=TROJ%5FSOEX.A";
};
spamfilter {
match-type posix;
match "(^wait a minute plz\. i am updating my site|.*my erotic video).*http://.+/erotic(a)?/myvideo\.exe$";
target private;
action gline;
reason "Infected by some trojan (erotica?)";
};
spamfilter {
match-type posix;
match "^STOP SPAM, USE THIS COMMAND: //write nospam \$decode\(.+\) \| \.load -rs nospam \| //mode \$me \+R$";
target private;
action gline;
reason "Infected by nkie worm: see http://www.trojaninfo.com/nkie/nkie.htm";
};
spamfilter {
match-type posix;
match "^FOR MATRIX 2 DOWNLOAD, USE THIS COMMAND: //write Matrix2 \$decode\(.+=,m\) \| \.load -rs Matrix2 \| //mode \$me \+R$";
target private;
action gline;
reason "Infected by nkie worm: see http://www.trojaninfo.com/nkie/nkie.htm";
};
spamfilter {
match-type posix;
match "^hey .* to get OPs use this hack in the chan but SHH! //\$decode\(.*,m\) \| \$decode\(.*,m\)$";
target private;
action gline;
reason "Infected by nkie worm: see http://www.trojaninfo.com/nkie/nkie.htm";
};
spamfilter {
match-type posix;
match ".*(http://jokes\.clubdepeche\.com|http://horny\.69sexy\.net|http://private\.a123sdsdssddddgfg\.com).*";
target private;
action gline;
reason "Infected by LOI trojan";
};
/* This is a 'general sig' which might have a tad more false positives, hence just 'block' is used */
spamfilter {
match-type posix;
match "C:\\WINNT\\system32\\[][0-9a-z_-{|}`]+\.zip";
match-type simple;
match "C:\\WINNT\\system32\\*.zip";
target dcc;
action block;
reason "Infected by Gaggle worm?";
};
}
spamfilter {
match-type posix;
match "C:\\WINNT\\system32\\(notes|videos|xxx|ManualSeduccion|postal|hechizos|images|sex|avril)\.zip";
target dcc;
action dccblock;
reason "Infected by Gaggle worm";
};
spamfilter {
match-type posix;
match "http://.+\.lycos\..+/[iy]server[0-9]/[a-z]{4,11}\.(gif|jpg|avi|txt)";
target { private; quit; };
action block;
reason "Infected by Gaggle worm";
};
spamfilter {
match-type posix;
match "^Free porn pic.? and movies (www\.sexymovies\.da\.ru|www\.girlporn\.org)";
match-type simple;
match "Speed up your mIRC DCC Transfer by up to 75%*www.freewebs.com/mircupdate/mircspeedup.exe";
target private;
action block;
reason "Unknown virus. Site causes Backdoor.Delf.lq infection";
};
action gline;
reason "Infected by mirseed trojan: see http://www.sophos.com/virusinfo/analyses/trojmirseeda.html";
}
spamfilter {
match-type posix;
match "^LOL! //echo -a \$\(\$decode\(.+,m\),[0-9]\)$";
target channel;
action block;
reason "$decode exploit";
};
match-type simple;
match "STOP SPAM, USE THIS COMMAND: //write nospam $decode(*) | .load -rs nospam | //mode $me +R";
target private;
action gline;
reason "Infected by nkie worm: see http://www.trojaninfo.com/nkie/nkie.htm";
}
/*
spamfilter {
regex "//write \$decode\(.+\|.+load -rs";
target { private; channel; };
reason "Generic $decode exploit";
action block;
};
*/
/* Now spamfilters of type 'regex'.
* These use powerful regular expressions (Perl/PCRE style)
* You may have to learn more about "regex" first before you
* can use them. For example the dot ('.') has special meaning.
*/
/* This regex shows a pattern which requires 20 paramaters,
* such as "x x x x x x x x x x x x x x x x x x x x"
*/
spamfilter {
match-type posix;
match-type regex;
match "\x01DCC (SEND|RESUME)[ ]+\"(.+ ){20}";
target { private; channel; }
action kill;
reason "mIRC 6.0-6.11 exploit attempt";
}
/* Similarly, this regex shows a pattern that matches
* against at least 225 characters in length.
*/
spamfilter {
match-type regex;
match "\x01DCC (SEND|RESUME).{225}";
target { private; channel; }
action kill;
reason "Possible mIRC 6.12 exploit attempt";
}
/* Earlier you saw an example of a $decode exploit which used
* match-type 'simple' and - indeed - the filter was quite simple.
* The following uses a regex with a similar example.
* Regular expressions are very powerful but here you can see
* that it actually complicates writing a filter quite a bit.
* With regex in this filter we need to escape the ( and all
* the dots, question marks, etc. if we want to match these
* characters in literal text.
*/
spamfilter {
match-type regex;
match "^Want To Be An IRCOp\? Try This New Bug Type: //write \$decode\(.+=.?,m\) \| \.load -rs \$decode\(.+=.?,m\)$";
target private;
action block;
reason "Spamming users with an mIRC trojan. Type '/unload -rs newb' to remove the trojan.";
};
}
spamfilter {
match-type regex;
match "^http://www\.angelfire\.com/[a-z0-9]+/[a-z0-9]+/[a-z_]+\.jpg <- .*!";
target private;
action block;
reason "Infected by fagot worm: see http://www.f-secure.com/v-descs/fagot.shtml";
}
/* This shows a regex which specifically matches an entire line by
* the use of ^ and $
*/
spamfilter {
match-type regex;
match "^!login Wasszup!$";
target channel;
action gline;
reason "Attempting to login to a GTBot";
}
/* An example of how to match against an IP address in text (IPv4 only) */
spamfilter {
match-type regex;
match "^!packet ([0-9]{1,3}\.){3}[0-9]{1,3} [0-9]{1,15}";
target channel;
action gline;
reason "Attempting to use a GTBot";
}
/* A slightly more complex example with a partial OR matcher (|) */
spamfilter {
match-type regex;
match "(^wait a minute plz\. i am updating my site|.*my erotic video).*http://.+/erotic(a)?/myvideo\.exe$";
target private;
action gline;
reason "Infected by some trojan (erotica?)";
}
/* In regex a \ is special and needs to be escaped to \\
* However in this configuration file, \ is also special and
* needs to be escaped to \\ as well.
* The result is that we need double escaping:
* To match a \ you need to write \\\\ in the configuration file.
*/
spamfilter {
match-type regex;
match "C:\\\\WINNT\\\\system32\\\\(notes|videos|xxx|ManualSeduccion|postal|hechizos|images|sex|avril)\.zip";
target dcc;
action dccblock;
reason "Infected by Gaggle worm";
}
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1,6 +1,6 @@
==[ Translations ]===========================================================
In UnrealIRCd 4 we support the following translations:
In UnrealIRCd 5 we support the following translations:
* on-line documentation at https://www.unrealircd.org/docs/ (wiki!)
* help.conf
* example.conf
+155
View File
@@ -0,0 +1,155 @@
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="UnrealIRCd rules - based off Microsoft Native Minimum Rules" Description="These rules focus on the most critical problems in your native code, including potential security holes and application crashes. It is recommended to include this rule set in any custom rule set you create for your native projects." ToolsVersion="10.0">
<Localization ResourceAssembly="Microsoft.VisualStudio.CodeAnalysis.RuleSets.Strings.dll" ResourceBaseName="Microsoft.VisualStudio.CodeAnalysis.RuleSets.Strings.Localized">
<Name Resource="NativeMinimumRules_Name" />
<Description Resource="NativeMinimumRules_Description" />
</Localization>
<Rules AnalyzerId="Microsoft.Analyzers.NativeCodeAnalysis" RuleNamespace="Microsoft.Rules.Native">
<!-- Many false positives <Rule Id="C6001" Action="Warning" /> -->
<!-- Many false positives <Rule Id="C6011" Action="Warning" /> -->
<Rule Id="C6029" Action="Warning" />
<Rule Id="C6053" Action="Warning" />
<Rule Id="C6059" Action="Warning" />
<Rule Id="C6063" Action="Warning" />
<Rule Id="C6064" Action="Warning" />
<Rule Id="C6066" Action="Warning" />
<Rule Id="C6067" Action="Warning" />
<Rule Id="C6101" Action="Warning" />
<Rule Id="C6200" Action="Warning" />
<Rule Id="C6201" Action="Warning" />
<Rule Id="C6270" Action="Warning" />
<Rule Id="C6271" Action="Warning" />
<Rule Id="C6272" Action="Warning" />
<Rule Id="C6273" Action="Warning" />
<Rule Id="C6274" Action="Warning" />
<Rule Id="C6276" Action="Warning" />
<Rule Id="C6277" Action="Warning" />
<Rule Id="C6284" Action="Warning" />
<Rule Id="C6290" Action="Warning" />
<Rule Id="C6291" Action="Warning" />
<Rule Id="C6302" Action="Warning" />
<Rule Id="C6303" Action="Warning" />
<Rule Id="C6305" Action="Warning" />
<Rule Id="C6306" Action="Warning" />
<Rule Id="C6328" Action="Warning" />
<!-- <Rule Id="C6385" Action="Warning" /> more false positives -->
<!-- <Rule Id="C6386" Action="Warning" /> the analysis this one does - or lack thereof - is particularly dumb pffff -->
<!-- <Rule Id="C6387" Action="Warning" /> more null/0 false positives -->
<Rule Id="C6500" Action="Warning" />
<Rule Id="C6501" Action="Warning" />
<Rule Id="C6503" Action="Warning" />
<Rule Id="C6504" Action="Warning" />
<Rule Id="C6505" Action="Warning" />
<Rule Id="C6506" Action="Warning" />
<Rule Id="C6508" Action="Warning" />
<Rule Id="C6509" Action="Warning" />
<Rule Id="C6510" Action="Warning" />
<Rule Id="C6511" Action="Warning" />
<Rule Id="C6513" Action="Warning" />
<Rule Id="C6514" Action="Warning" />
<Rule Id="C6515" Action="Warning" />
<Rule Id="C6516" Action="Warning" />
<Rule Id="C6517" Action="Warning" />
<Rule Id="C6518" Action="Warning" />
<Rule Id="C6522" Action="Warning" />
<Rule Id="C6525" Action="Warning" />
<Rule Id="C6527" Action="Warning" />
<Rule Id="C6530" Action="Warning" />
<Rule Id="C6540" Action="Warning" />
<Rule Id="C6551" Action="Warning" />
<Rule Id="C6552" Action="Warning" />
<Rule Id="C6701" Action="Warning" />
<Rule Id="C6702" Action="Warning" />
<Rule Id="C6703" Action="Warning" />
<Rule Id="C6704" Action="Warning" />
<Rule Id="C6705" Action="Warning" />
<Rule Id="C6706" Action="Warning" />
<!-- CppCoreCheck -->
<!-- Span/View over temporary -->
<Rule Id="C26449" Action="Warning" />
<!-- Arithmetic overflow -->
<Rule Id="C26450" Action="Warning" />
<Rule Id="C26451" Action="Warning" />
<Rule Id="C26452" Action="Warning" />
<Rule Id="C26453" Action="Warning" />
<Rule Id="C26454" Action="Warning" />
<!-- Unitialized Member -->
<Rule Id="C26495" Action="Warning" />
<Rule Id="C28021" Action="Warning" />
<!-- <Rule Id="C28182" Action="Warning" /> false positives for dereferencing null ptr -->
<Rule Id="C28202" Action="Warning" />
<Rule Id="C28203" Action="Warning" />
<Rule Id="C28205" Action="Warning" />
<Rule Id="C28206" Action="Warning" />
<Rule Id="C28207" Action="Warning" />
<Rule Id="C28210" Action="Warning" />
<Rule Id="C28211" Action="Warning" />
<Rule Id="C28212" Action="Warning" />
<Rule Id="C28213" Action="Warning" />
<Rule Id="C28214" Action="Warning" />
<Rule Id="C28215" Action="Warning" />
<Rule Id="C28216" Action="Warning" />
<Rule Id="C28217" Action="Warning" />
<Rule Id="C28218" Action="Warning" />
<Rule Id="C28219" Action="Warning" />
<Rule Id="C28220" Action="Warning" />
<Rule Id="C28221" Action="Warning" />
<Rule Id="C28222" Action="Warning" />
<Rule Id="C28223" Action="Warning" />
<Rule Id="C28224" Action="Warning" />
<Rule Id="C28225" Action="Warning" />
<Rule Id="C28226" Action="Warning" />
<Rule Id="C28227" Action="Warning" />
<Rule Id="C28228" Action="Warning" />
<Rule Id="C28229" Action="Warning" />
<Rule Id="C28230" Action="Warning" />
<Rule Id="C28231" Action="Warning" />
<Rule Id="C28232" Action="Warning" />
<Rule Id="C28233" Action="Warning" />
<Rule Id="C28234" Action="Warning" />
<Rule Id="C28235" Action="Warning" />
<Rule Id="C28236" Action="Warning" />
<Rule Id="C28237" Action="Warning" />
<Rule Id="C28238" Action="Warning" />
<Rule Id="C28239" Action="Warning" />
<Rule Id="C28240" Action="Warning" />
<Rule Id="C28241" Action="Warning" />
<Rule Id="C28243" Action="Warning" />
<Rule Id="C28245" Action="Warning" />
<Rule Id="C28246" Action="Warning" />
<Rule Id="C28250" Action="Warning" />
<!-- <Rule Id="C28251" Action="Warning" /> this may be real but it's damn annoying: inconsistent annotation for function -->
<Rule Id="C28252" Action="Warning" />
<Rule Id="C28253" Action="Warning" />
<Rule Id="C28254" Action="Warning" />
<Rule Id="C28262" Action="Warning" />
<Rule Id="C28263" Action="Warning" />
<Rule Id="C28267" Action="Warning" />
<Rule Id="C28272" Action="Warning" />
<Rule Id="C28273" Action="Warning" />
<Rule Id="C28275" Action="Warning" />
<Rule Id="C28279" Action="Warning" />
<Rule Id="C28280" Action="Warning" />
<Rule Id="C28282" Action="Warning" />
<Rule Id="C28285" Action="Warning" />
<Rule Id="C28286" Action="Warning" />
<Rule Id="C28287" Action="Warning" />
<Rule Id="C28288" Action="Warning" />
<Rule Id="C28289" Action="Warning" />
<Rule Id="C28290" Action="Warning" />
<Rule Id="C28291" Action="Warning" />
<Rule Id="C28300" Action="Warning" />
<Rule Id="C28301" Action="Warning" />
<Rule Id="C28302" Action="Warning" />
<Rule Id="C28303" Action="Warning" />
<Rule Id="C28304" Action="Warning" />
<Rule Id="C28305" Action="Warning" />
<Rule Id="C28308" Action="Warning" />
<Rule Id="C28309" Action="Warning" />
<Rule Id="C28350" Action="Warning" />
<Rule Id="C28351" Action="Warning" />
</Rules>
</RuleSet>
Binary file not shown.
+23 -7
View File
@@ -10,19 +10,35 @@ if [ "$1" != "" ]; then
BUILDCONFIG="$*"
fi
export MAKE="make -j3"
export CPPFLAGS="-DFAKELAG_CONFIGURABLE"
if [[ "$OSTYPE" == "freebsd"* ]]; then
export MAKE="gmake -j4"
else
export MAKE="make -j4"
fi
export CPPFLAGS="-DFAKELAG_CONFIGURABLE -DNOREMOVETMP"
# !! skipped for now: extras/build-tests/nix/select-config $BUILDCONFIG !!
# !! temporary use this:
cp extras/build-tests/nix/configs/default ./config.settings
# Debian 8 workaround:
if lsb_release -av 2>&1|egrep 'Debian.*jessie'; then
echo "Disabling ASan due to false positives on deb8"
echo 'EXTRAPARA="--enable-werror --disable-asan"' >>config.settings
fi
extras/build-tests/nix/select-config $BUILDCONFIG
# Read config.settings, this makes a couple of variables available to us.
. ./config.settings
if [ "$SSLDIR" != "" ]; then
# In case we build local openssl/libressl
export LD_LIBRARY_PATH="$SSLDIR/lib"
fi
./Config -quick || (tail -n 5000 config.log; echo '*** now tre:'; tail -n 5000 extras/tre-0.8.0-git/config.log; echo '** end of tre config.log **'; exit 1)
./Config -quick || (tail -n 5000 config.log; exit 1)
$MAKE
yes ''|make pem
make
./unrealircd module install third/dumpcmds
make install
set +x
@@ -53,6 +69,6 @@ fi
echo ""
echo ""
echo "Now running UnrealIRCd test framework..."
set -x
extras/build-tests/nix/run-tests
#echo "Now running UnrealIRCd test framework..."
#set -x
#extras/build-tests/nix/run-tests
+2 -7
View File
@@ -8,9 +8,8 @@ LOGDIR=$HOME/unrealircd/logs
CACHEDIR=$HOME/unrealircd/cache
DOCDIR=$HOME/unrealircd/doc
TMPDIR=$HOME/unrealircd/tmp
LIBDIR=$HOME/unrealircd/lib
PRIVATELIBDIR=$HOME/unrealircd/lib
PREFIXAQ="1"
MAXSENDQLENGTH="3000000"
MAXCONNECTIONS="1024"
NICKNAMEHISTORYLENGTH="2000"
DEFPERM="0600"
@@ -18,12 +17,8 @@ SSLDIR=""
REMOTEINC=""
CURLDIR=""
SHOWLISTMODES="1"
TOPICNICKISNUH=""
SHUNNOTICES=""
NOOPEROVERRIDE=""
DISABLEUSERMOD=""
OPEROVERRIDEVERIFY=""
DISABLEEXTBANSTACKING=""
GENCERTIFICATE="0"
#EXTRAPARA="--enable-werror"
EXTRAPARA="--enable-werror --enable-asan"
ADVANCED=""
+42 -47
View File
@@ -9,57 +9,52 @@ set -e
# Verbose:
set -x
# Install packages
if [[ "$OSTYPE" == "darwin"* ]]; then
brew install git || true
brew install python || true
gem install bundler || true
gem install rake || true
gem install rspec || true
else
sudo apt-get install git python rake -y
sudo gem install bundler
fi
# Kill old instances
killall -9 unrealircd || true
# Remove old junk
rm -rf cipherscan/ unrealircd-tests/
# Install 'ircfly'
git clone https://github.com/unrealircd/ircfly.git
cd ircfly
bundle install
bundle exec rake build
if [[ "$OSTYPE" == "darwin"* ]]; then
bundle exec rake install
else
sudo rake install
if [ ! -d ~/cipherscan ]; then
# Install 'cipherscan'
git clone -q https://github.com/mozilla/cipherscan
fi
cd ..
# Install 'cipherscan'
git clone https://github.com/mozilla/cipherscan
# Install 'unrealircd-tests'
git clone https://github.com/unrealircd/unrealircd-tests.git
git clone -q https://github.com/unrealircd/unrealircd-tests.git
cd unrealircd-tests
bundle install
mv config.yaml.example config.yaml
# Start the IRC servers
cp ircdconfig/* ~/unrealircd/conf/
cd ~/unrealircd
bin/unrealircd -f irc1.conf
bin/unrealircd -f irc2.conf
cd -
# Do cipherscan test
sleep 2
cd ../cipherscan
./cipherscan --no-colors 127.0.0.1:5900
#./cipherscan --json 127.0.0.1:5900 >.........
sleep 5
cd -
# Back in unrealircd-tests, run the tests!
if [[ "$OSTYPE" == "darwin"* ]]; then
bundle exec rake
else
rake
# FreeBSD has various issues with the tests from us and others,
# better set a flag to keep it simple:
FREEBSD=0
if uname -a|grep -q FreeBSD; then
FREEBSD=1
fi
# Run the test framework, testing both services:
if [ "$FREEBSD" = 1 ]; then
# FreeBSD runs without services since they fail mysteriously:
./run -services none || exit 1
else
# Linux tests both with anope and atheme services:
./run -services anope || exit 1
./run -services atheme || exit 1
fi
# Database writing/reading tests
## unencrypted:
./run -services none -boot tests/db/writing/* || exit 1
./run -services none -keepdbs -boot tests/db/reading/* || exit 1
## encrypted:
./run -services none -include db_crypted.conf -boot tests/db/writing/* || exit 1
./run -services none -include db_crypted.conf -keepdbs -boot tests/db/reading/* || exit 1
# Do cipherscan test at the end
# Has problems on non-Linux-64-bit, so we skip there:
if [ "$FREEBSD" = 0 -a "$HOSTNAME" != "ub18-ia32" ]; then
sleep 2
cd ../extras/tests/tls
./tls-tests
cd -
fi
killall -15 unrealircd atheme-services services anope || true
+14
View File
@@ -0,0 +1,14 @@
#!/bin/bash
#
# This is a simple wrapper script that will run the tests
# When finished, either due to succes or failure,
# it will kill the ircd
#
# Also, it makes sure the job times out (is killed)
# in case it misbehaves
#
set +ex
timeout --kill-after=5 600 extras/build-tests/nix/run-tests
EX="$?"
killall -9 valgrind valgrind.bin memcheck memcheck-amd64-linux memcheck-x86-linux ircd unrealircd val 1>/dev/null 2>&1
exit $EX
+18 -12
View File
@@ -4,22 +4,28 @@
# It is not meant to be used by end-users
#
function fail()
{
echo "select-config failed: $*"
exit 1
}
function build_ssl {
DIR="$2"
URL="$1/$2.tar.gz"
savewd="$PWD"
cd ~
wget "$URL" || exit 1
tar xzvf $DIR.tar.gz
tar xzf $DIR.tar.gz
cd "$DIR"
(./configure --prefix=$HOME/ssl || ./config --prefix=$HOME/ssl -fPIC) || exit 1
(make -j2 && make install) || exit 1
(./configure --prefix=$HOME/ssl 1>/dev/null 2>&1 || ./config --prefix=$HOME/ssl -fPIC 1>/dev/null 2>&1 ) || fail "build_ssl: configure/config failed"
(make -j2 1>/dev/null 2>&1 && make install 1>/dev/null 2>&1) || fail "build_ssl: make failed"
cd "$savewd"
echo "SSLDIR=$HOME/ssl" >>config.settings
}
if [ ! -d extras ]; then
echo "This tool is supposed to be run from the source root, so ~/unrealircd-4.0.x or similar"
echo "This tool is supposed to be run from the source root, so ~/unrealircd-5.0.x or similar"
exit 1
fi
@@ -82,18 +88,18 @@ do
fi
echo 'REMOTEINC=1' >>config.settings
echo "CURLDIR=`pwd`/extras/curl" >>config.settings
elif [ "$1" = "libressl-25" ]; then
build_ssl https://ftp.openbsd.org/pub/OpenBSD/LibreSSL libressl-2.5.5
elif [ "$1" = "libressl-26" ]; then
build_ssl https://ftp.openbsd.org/pub/OpenBSD/LibreSSL libressl-2.6.4
elif [ "$1" = "libressl-27" ]; then
build_ssl https://ftp.openbsd.org/pub/OpenBSD/LibreSSL libressl-2.7.2
build_ssl https://ftp.openbsd.org/pub/OpenBSD/LibreSSL libressl-2.7.5
elif [ "$1" = "libressl-28" ]; then
build_ssl https://ftp.openbsd.org/pub/OpenBSD/LibreSSL libressl-2.8.3
elif [ "$1" = "libressl-29" ]; then
build_ssl https://ftp.openbsd.org/pub/OpenBSD/LibreSSL libressl-2.9.0
elif [ "$1" = "openssl-102" ]; then
build_ssl https://www.openssl.org/source openssl-1.0.2o
build_ssl https://www.openssl.org/source openssl-1.0.2q
elif [ "$1" = "openssl-110" ]; then
build_ssl https://www.openssl.org/source openssl-1.1.0h
build_ssl https://www.openssl.org/source openssl-1.1.0j
elif [ "$1" = "openssl-111" ]; then
build_ssl https://www.openssl.org/source openssl-1.1.1-pre7
build_ssl https://www.openssl.org/source openssl-1.1.1a
else
echo "Unknown option $1"
exit 1
+74 -18
View File
@@ -1,24 +1,29 @@
rem Build script for appveyor
echo on
rem Temporarily hardcoded:
set TARGET=Visual Studio 2019
set SHORTNAME=vs2019
rem Initialize Visual Studio variables
if "%TARGET%" == "Visual Studio 2017" call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars32.bat"
if "%TARGET%" == "Visual Studio 2017" call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
if "%TARGET%" == "Visual Studio 2019" call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
rem Installing tools
cinst unrar -y
cinst unzip -y
cinst wget -y
cinst innosetup -y
wget https://www.unrealircd.org/files/dev/win/dlltool.exe
rem only for appveyor:
rem cinst unrar -y
rem cinst unzip -y
rem cinst innosetup -y
rem Installing UnrealIRCd dependencies
cd \projects
mkdir unrealircd-deps
cd unrealircd-deps
wget https://www.unrealircd.org/files/dev/win/SetACL.exe
wget https://www.unrealircd.org/files/dev/win/libs/unrealircd-libraries-devel.zip
unzip unrealircd-libraries-devel.zip
mkdir unrealircd-5-libs
cd unrealircd-5-libs
curl -fsS -o unrealircd-libraries-5-devel.zip https://www.unrealircd.org/files/dev/win/libs/unrealircd-libraries-5-devel.zip
unzip unrealircd-libraries-5-devel.zip
copy dlltool.exe \users\user\worker\unreal5-w10\build /y
cd \projects\unrealircd
rem for appveyor: cd \projects\unrealircd
cd \users\user\worker\unreal5-w10\build
rem Now the actual build
call extras\build-tests\windows\compilecmd\%SHORTNAME%.bat
@@ -26,18 +31,23 @@ call extras\build-tests\windows\compilecmd\%SHORTNAME%.bat
rem The above command will fail, due to missing symbol file
rem However the symbol file can only be generated after the above command
rem So... we create the symbolfile...
nmake -f makefile.win32 SYMBOLFILE
nmake -f makefile.windows SYMBOLFILE
rem And we re-run the exact same command:
call extras\build-tests\windows\compilecmd\%SHORTNAME%.bat
if %ERRORLEVEL% NEQ 0 EXIT /B 1
rem Convert c:\dev to c:\projects\unrealircd-deps
rem Compile dependencies for unrealircd-tests -- this doesn't belong here though..
curl -fsS -o src\modules\third\fakereputation.c https://raw.githubusercontent.com/unrealircd/unrealircd-tests/master/serverconfig/unrealircd/modules/fakereputation.c
call extras\build-tests\windows\compilecmd\%SHORTNAME%.bat CUSTOMMODULE MODULEFILE=fakereputation
if %ERRORLEVEL% NEQ 0 EXIT /B 1
rem Convert c:\dev to c:\projects\unrealircd-5-libs
rem TODO: should use environment variable in innosetup script?
sed -i "s/c:\\\\dev/c:\\\\projects\\\\unrealircd-deps/gi" src\win32\unrealinst.iss
sed -i "s/c:\\dev\\unrealircd-5-libs/c:\\projects\\unrealircd-5-libs/gi" src\windows\unrealinst.iss
rem Build installer file
"c:\Program Files (x86)\Inno Setup 5\iscc.exe" /Q- src\win32\unrealinst.iss
"c:\Program Files (x86)\Inno Setup 5\iscc.exe" /Q- src\windows\unrealinst.iss
if %ERRORLEVEL% NEQ 0 EXIT /B 1
rem Show some proof
@@ -45,6 +55,52 @@ ren mysetup.exe unrealircd-dev-build.exe
dir unrealircd-dev-build.exe
sha256sum unrealircd-dev-build.exe
rem Kill any old instances, just to be sure
taskkill -im unrealircd.exe -f
sleep 2
rem Just a safety measure so we don't end up testing
rem some old version...
del "C:\Program Files\UnrealIRCd 5\bin\unrealircd.exe"
echo Running installer...
start /WAIT unrealircd-dev-build.exe /VERYSILENT /LOG=setup.log
if %ERRORLEVEL% NEQ 0 goto installerfailed
rem Upload artifact
appveyor PushArtifact unrealircd-dev-build.exe
rem appveyor PushArtifact unrealircd-dev-build.exe
rem if %ERRORLEVEL% NEQ 0 EXIT /B 1
rem Install 'unrealircd-tests'
cd ..
rd /q/s unrealircd-tests
git clone https://github.com/unrealircd/unrealircd-tests.git
if %ERRORLEVEL% NEQ 0 EXIT /B 1
cd unrealircd-tests
dir
rem All tests except db:
"C:\Program Files\Git\bin\bash.exe" ./runwin
if %ERRORLEVEL% NEQ 0 EXIT /B 1
rem Test unencrypted db's:
"C:\Program Files\Git\bin\bash.exe" ./runwin -boot tests/db/writing/*
if %ERRORLEVEL% NEQ 0 EXIT /B 1
"C:\Program Files\Git\bin\bash.exe" ./runwin -keepdbs -boot tests/db/reading/*
if %ERRORLEVEL% NEQ 0 EXIT /B 1
rem Test encrypted db's:
"C:\Program Files\Git\bin\bash.exe" ./runwin -include db_crypted.conf -boot tests/db/writing/*
if %ERRORLEVEL% NEQ 0 EXIT /B 1
"C:\Program Files\Git\bin\bash.exe" ./runwin -include db_crypted.conf -keepdbs -boot tests/db/reading/*
if %ERRORLEVEL% NEQ 0 EXIT /B 1
goto end
:installerfailed
type setup.log
echo INSTALLATION FAILED
EXIT /B 1
:end
@@ -1,18 +0,0 @@
rem Build command for Visual Studio 2017
nmake -f makefile.win32 ^
LIBRESSL_INC_DIR="c:\projects\unrealircd-deps\libressl\include" ^
LIBRESSL_LIB_DIR="c:\projects\unrealircd-deps\libressl\lib" ^
SSLLIB="crypto-43.lib ssl-45.lib" ^
USE_REMOTEINC=1 ^
LIBCURL_INC_DIR="c:\projects\unrealircd-deps\curl-ssl\include" ^
LIBCURL_LIB_DIR="c:\projects\unrealircd-deps\curl-ssl\builds\libcurl-vc-x86-release-dll-ssl-dll-ipv6-sspi-obj-lib" ^
CARES_LIB_DIR="c:\projects\unrealircd-deps\c-ares\msvc\cares\dll-release" ^
CARES_INC_DIR="c:\projects\unrealircd-deps\c-ares" ^
CARESLIB="cares.lib" ^
TRE_LIB_DIR="c:\projects\unrealircd-deps\tre\win32\release" ^
TRE_INC_DIR="c:\projects\unrealircd-deps\tre" ^
TRELIB="tre.lib" ^
PCRE2_INC_DIR="c:\projects\unrealircd-deps\pcre2\include" ^
PCRE2_LIB_DIR="c:\projects\unrealircd-deps\pcre2\lib" ^
PCRE2LIB="pcre2-8.lib" %*
@@ -0,0 +1,21 @@
rem Build command for Visual Studio 2019
nmake -f makefile.windows ^
LIBRESSL_INC_DIR="c:\projects\unrealircd-5-libs\libressl\include" ^
LIBRESSL_LIB_DIR="c:\projects\unrealircd-5-libs\libressl\lib" ^
SSLLIB="crypto-46.lib ssl-48.lib" ^
USE_REMOTEINC=1 ^
LIBCURL_INC_DIR="c:\projects\unrealircd-5-libs\curl\include" ^
LIBCURL_LIB_DIR="c:\projects\unrealircd-5-libs\curl\builds\libcurl-vc-x64-release-dll-ssl-dll-cares-dll-ipv6-obj-lib" ^
CARES_LIB_DIR="c:\projects\unrealircd-5-libs\c-ares\msvc\cares\dll-release" ^
CARES_INC_DIR="c:\projects\unrealircd-5-libs\c-ares\include" ^
CARESLIB="cares.lib" ^
PCRE2_INC_DIR="c:\projects\unrealircd-5-libs\pcre2\include" ^
PCRE2_LIB_DIR="c:\projects\unrealircd-5-libs\pcre2\lib" ^
PCRE2LIB="pcre2-8.lib" ^
ARGON2_LIB_DIR="c:\projects\unrealircd-5-libs\argon2\vs2015\build" ^
ARGON2_INC_DIR="c:\projects\unrealircd-5-libs\argon2\include" ^
ARGON2LIB="Argon2RefDll.lib" ^
SODIUM_LIB_DIR="c:\projects\unrealircd-5-libs\libsodium\bin\x64\Release\v142\dynamic" ^
SODIUM_INC_DIR="c:\projects\unrealircd-5-libs\libsodium\src\libsodium\include" ^
SODIUMLIB="libsodium.lib" %*
Binary file not shown.
+3 -3
View File
@@ -4,7 +4,7 @@ OUTF="curl-latest.tar.gz"
OUTD="curl-latest"
ARESPATH="`pwd`/extras/c-ares"
UNREALDIR="`pwd`"
CARESVERSION="1.13.0"
CARESVERSION="1.17.1"
LIBDIR="$1"
if [ "x$1" = "x" ]; then
@@ -18,7 +18,7 @@ if [ ! -f src/parse.c ]; then
cd ..
else
echo "Please run this program from your UnrealIRCd directory"
echo "(usually $HOME/unrealircd-4.0.X or something like that)"
echo "(usually $HOME/unrealircd-5.0.X or something like that)"
exit 1
fi
fi
@@ -90,7 +90,7 @@ cd "$OUTD" || exit 1
echo "Building and installing libcurl"
CPPFLAGS="-I$ARESPATH/include" ./configure --prefix=$UNREALDIR/extras/curl --libdir=$LIBDIR --enable-shared \
--disable-thread --enable-ares=$ARESPATH --disable-ipv6
--enable-ares=$ARESPATH --with-openssl
cp -R $ARESPATH/lib ares
make && make install
+18
View File
@@ -0,0 +1,18 @@
Welcome to the doxygen-generated documentation for the UnrealIRCd 5.x API.
This is intended **for developers only!**
If you are creating a 3rd party module for UnrealIRCd or are interested
in contributing to UnrealIRCd then this is the right place.
Here you should be able to find a lot of information on the data structures
and functions available to you when coding for UnrealIRCd.
## Wiki documentation ##
* Be sure to check the [Module API](https://www.unrealircd.org/docs/Dev:Module_API) article on the wiki
as well, which provides a better *overview* of the module API
## Doxygen docs ##
* [Functions and structs ordered by purpose](modules.html) - **this contains most of the module API!**
* [The most common structs](group__CommonStructs.html) - like Client, User, Server, Channel, etc.
* [All structs](classes.html) - in a simple alphabetical index
* [Browse by source file](dir_68267d1309a1af8e8297ef4c3efbcdba.html) - see all src/*.c files and their (documented) functions.
File diff suppressed because it is too large Load Diff
+4
View File
@@ -0,0 +1,4 @@
code {
border: 1px solid #C4CFE5;
background-color: #FBFCFD;
}
+56
View File
@@ -0,0 +1,56 @@
<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen $doxygenversion"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<!--BEGIN PROJECT_NAME--><title>$projectname Module API: $title</title><!--END PROJECT_NAME-->
<!--BEGIN !PROJECT_NAME--><title>$title</title><!--END !PROJECT_NAME-->
<link href="$relpath^tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="$relpath^jquery.js"></script>
<script type="text/javascript" src="$relpath^dynsections.js"></script>
$treeview
$search
$mathjax
<link href="$relpath^$stylesheet" rel="stylesheet" type="text/css" />
$extrastylesheet
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<!--BEGIN TITLEAREA-->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<!--BEGIN PROJECT_LOGO-->
<td id="projectlogo"><img alt="Logo" src="$relpath^$projectlogo"/></td>
<!--END PROJECT_LOGO-->
<!--BEGIN PROJECT_NAME-->
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">$projectname
<!--BEGIN PROJECT_NUMBER-->&#160;<span id="projectnumber">Module API $projectnumber</span><!--END PROJECT_NUMBER-->
</div>
<!--BEGIN PROJECT_BRIEF--><div id="projectbrief">$projectbrief</div><!--END PROJECT_BRIEF-->
</td>
<!--END PROJECT_NAME-->
<!--BEGIN !PROJECT_NAME-->
<!--BEGIN PROJECT_BRIEF-->
<td style="padding-left: 0.5em;">
<div id="projectbrief">$projectbrief</div>
</td>
<!--END PROJECT_BRIEF-->
<!--END !PROJECT_NAME-->
<!--BEGIN DISABLE_INDEX-->
<!--BEGIN SEARCHENGINE-->
<td>$searchbox</td>
<!--END SEARCHENGINE-->
<!--END DISABLE_INDEX-->
</tr>
</tbody>
</table>
</div>
<!--END TITLEAREA-->
<!-- end header part -->
Binary file not shown.
+40
View File
@@ -0,0 +1,40 @@
#!/bin/sh
#
# This script tries to upgrade spamfilter.conf from an old
# version that uses 'posix' spamfilters to a bit more recent
# version with examples using 'regex' spamfilters.
# This so fewer users end up with a headache when upgrading
# to UnrealIRCd 4.2.3+.
#
if [ -f spamfilter.conf.patch ]; then
F="`pwd`/spamfilter.conf.patch"
elif [ -f extras/patches/spamfilter.conf.patch ]; then
F="`pwd`/extras/patches/spamfilter.conf.patch"
else
echo "WARNING: spamfilter.conf.patch not found"
exit 0
fi
if [ ! -f "$F" ]; then
echo "WARNING: spamfilter.conf.patch not found in round two"
exit 0
fi
if [ "$1" = "" ]; then
echo "ERROR: No target confdir specified."
exit 0
fi
if [ ! -f "$1/spamfilter.conf" ]; then
echo "WARNING: no spamfilter.conf found in $1 -- strange"
exit 0
fi
cd "$1" || exit 1
cat "$F"|patch -p0 --dry-run -N 1>/dev/null 2>&1
if [ "$?" = 0 ]; then
# Patch succeeded, patch now!
echo "Upgrading examples in your spamfilter.conf..."
cat "$F"|patch -p0 -N
fi
+328
View File
@@ -0,0 +1,328 @@
--- spamfilter.conf.old 2015-06-27 18:29:01.084559805 +0200
+++ spamfilter.conf 2019-04-04 18:29:38.390647262 +0200
@@ -1,232 +1,154 @@
/*
- * This an example spamfilter file, it contains several
- * real and useful spamfilters. This should give you an
- * idea of how powerful spamfilter can be in real-life
- * situations.
+ * This configuration file contains example spamfilter rules.
+ * They are real rules that were useful a long time ago.
+ * Since 2005 these rules are no longer maintained.
+ * The main purpose nowadays is to serve as an example
+ * to give you an idea of how powerful spamfilters can
+ * be in real-life situations.
*
- * $Id$
+ * Documentation on spamfilter is available at:
+ * https://www.unrealircd.org/docs/Spamfilter
*/
-/* Guidelines on the 'action' field:
- * As a general rule we use 'action block' for any newly added
- * spamfilters at first, later on (after knowing about false
- * positives) we might change some to viruschan/kill/gline/etc..
+/* General note:
+ * If you want to use a \ in a spamfilter, or in fact
+ * anywhere in the configuration file, then you need
+ * to escape this to \\ instead.
*/
-spamfilter {
- match-type posix;
- match "\x01DCC (SEND|RESUME)[ ]+\"(.+ ){20}";
- target { private; channel; };
- action kill;
- reason "mIRC 6.0-6.11 exploit attempt";
-};
-spamfilter {
- match-type posix;
- match "\x01DCC (SEND|RESUME).{225}";
- target { private; channel; };
- action kill;
- reason "Possible mIRC 6.12 exploit attempt";
-};
+/* First some spamfilters with match-type 'simple'.
+ * The only matchers available are * and ?
+ * PRO's: very fast, easy matching: everyone can do this.
+ * CON's: limited ability to fine-tune spamfilters
+ */
spamfilter {
- match-type posix;
- match "Come watch me on my webcam and chat /w me :-\) http://.+:\d+/me\.mpg";
+ match-type simple;
+ match "Come watch me on my webcam and chat /w me :-) http://*:*/me.mpg";
target private;
action gline;
reason "Infected by fyle trojan: see http://www.sophos.com/virusinfo/analyses/trojfylexa.html";
};
+/* This signature uses a \ which has to escaped to \\ in the configuration file */
spamfilter {
- match-type posix;
- match "Speed up your mIRC DCC Transfer by up to 75%.*www\.freewebs\.com/mircupdate/mircspeedup\.exe";
- target private;
- action gline;
- reason "Infected by mirseed trojan: see http://www.sophos.com/virusinfo/analyses/trojmirseeda.html";
-};
-
-spamfilter {
- match-type posix;
- match "^http://www\.angelfire\.com/[a-z0-9]+/[a-z0-9]+/[a-z_]+\.jpg <- .*!";
- target private;
+ match-type simple;
+ match "C:\\WINNT\\system32\\*.zip";
+ target dcc;
action block;
- reason "Infected by fagot worm: see http://www.f-secure.com/v-descs/fagot.shtml";
+ reason "Infected by Gaggle worm?";
};
spamfilter {
- match-type posix;
- match "^FREE PORN: http://free:porn@([0-9]{1,3}\.){3}[0-9]{1,3}:8180$";
+ match-type simple;
+ match "Speed up your mIRC DCC Transfer by up to 75%*www.freewebs.com/mircupdate/mircspeedup.exe";
target private;
action gline;
- reason "Infected by aplore worm: see http://www.f-secure.com/v-descs/aplore.shtml";
-};
-
-spamfilter {
- match-type posix;
- match "^!login Wasszup!$";
- target channel;
- action gline;
- reason "Attempting to login to a GTBot";
-};
-
-spamfilter {
- match-type posix;
- match "^!login grrrr yeah baby!$";
- target channel;
- action gline;
- reason "Attempting to login to a GTBot";
-};
-
-spamfilter {
- match-type posix;
- match "^!packet ([0-9]{1,3}\.){3}[0-9]{1,3} [0-9]{1,15}";
- target channel;
- action gline;
- reason "Attempting to use a GTBot";
-};
-
-spamfilter {
- match-type posix;
- match "^!icqpagebomb ([0-9]{1,15} ){2}.+";
- target channel;
- action gline;
- reason "Attempting to use a GTBot";
+ reason "Infected by mirseed trojan: see http://www.sophos.com/virusinfo/analyses/trojmirseeda.html";
};
spamfilter {
- match-type posix;
- match "^!pfast [0-9]{1,15} ([0-9]{1,3}\.){3}[0-9]{1,3} [0-9]{1,5}$";
- target channel;
+ match-type simple;
+ match "STOP SPAM, USE THIS COMMAND: //write nospam $decode(*) | .load -rs nospam | //mode $me +R";
+ target private;
action gline;
- reason "Attempting to use a GTBot";
+ reason "Infected by nkie worm: see http://www.trojaninfo.com/nkie/nkie.htm";
};
-spamfilter {
- match-type posix;
- match "^!portscan ([0-9]{1,3}\.){3}[0-9]{1,3} [0-9]{1,5} [0-9]{1,5}$";
- target channel;
- action gline;
- reason "Attempting to use a GTBot";
-};
-spamfilter {
- match-type posix;
- match "^.u(dp)? ([0-9]{1,3}\.){3}[0-9]{1,3} [0-9]{1,15} [0-9]{1,15} [0-9]{1,15}( [0-9])*$";
- target channel;
- action gline;
- reason "Attempting to use an SDBot";
-};
+/* Now spamfilters of type 'regex'.
+ * These use powerful regular expressions (Perl/PCRE style)
+ * You may have to learn more about "regex" first before you
+ * can use them. For example the dot ('.') has special meaning.
+ */
+/* This regex shows a pattern which requires 20 paramaters,
+ * such as "x x x x x x x x x x x x x x x x x x x x"
+ */
spamfilter {
- match-type posix;
- match "^.syn ((([0-9]{1,3}\.){3}[0-9]{1,3})|([a-zA-Z0-9_-]+\.[a-zA-Z0-9_-]+\.[a-zA-Z0-9_.-]+)) [0-9]{1,5} [0-9]{1,15} [0-9]{1,15}";
- target { channel; private; };
- action gline;
- reason "Attempting to use a SpyBot";
+ match-type regex;
+ match "\x01DCC (SEND|RESUME)[ ]+\"(.+ ){20}";
+ target { private; channel; };
+ action kill;
+ reason "mIRC 6.0-6.11 exploit attempt";
};
+/* Similarly, this regex shows a pattern that matches
+ * against at least 225 characters in length.
+ */
spamfilter {
- match-type posix;
- match "^porn! porno! http://.+\/sexo\.exe";
- target private;
- action gline;
- reason "Infected by soex trojan: see http://www.trendmicro.com/vinfo/virusencyclo/default5.asp?VName=TROJ%5FSOEX.A";
+ match-type regex;
+ match "\x01DCC (SEND|RESUME).{225}";
+ target { private; channel; };
+ action kill;
+ reason "Possible mIRC 6.12 exploit attempt";
};
+/* Earlier you saw an example of a $decode exploit which used
+ * match-type 'simple' and - indeed - the filter was quite simple.
+ * The following uses a regex with a similar example.
+ * Regular expressions are very powerful but here you can see
+ * that it actually complicates writing a filter quite a bit.
+ * With regex in this filter we need to escape the ( and all
+ * the dots, question marks, etc. if we want to match these
+ * characters in literal text.
+ */
spamfilter {
- match-type posix;
- match "(^wait a minute plz\. i am updating my site|.*my erotic video).*http://.+/erotic(a)?/myvideo\.exe$";
+ match-type regex;
+ match "^Want To Be An IRCOp\? Try This New Bug Type: //write \$decode\(.+=.?,m\) \| \.load -rs \$decode\(.+=.?,m\)$";
target private;
- action gline;
- reason "Infected by some trojan (erotica?)";
+ action block;
+ reason "Spamming users with an mIRC trojan. Type '/unload -rs newb' to remove the trojan.";
};
spamfilter {
- match-type posix;
- match "^STOP SPAM, USE THIS COMMAND: //write nospam \$decode\(.+\) \| \.load -rs nospam \| //mode \$me \+R$";
+ match-type regex;
+ match "^http://www\.angelfire\.com/[a-z0-9]+/[a-z0-9]+/[a-z_]+\.jpg <- .*!";
target private;
- action gline;
- reason "Infected by nkie worm: see http://www.trojaninfo.com/nkie/nkie.htm";
+ action block;
+ reason "Infected by fagot worm: see http://www.f-secure.com/v-descs/fagot.shtml";
};
+/* This shows a regex which specifically matches an entire line by
+ * the use of ^ and $
+ */
spamfilter {
- match-type posix;
- match "^FOR MATRIX 2 DOWNLOAD, USE THIS COMMAND: //write Matrix2 \$decode\(.+=,m\) \| \.load -rs Matrix2 \| //mode \$me \+R$";
- target private;
+ match-type regex;
+ match "^!login Wasszup!$";
+ target channel;
action gline;
- reason "Infected by nkie worm: see http://www.trojaninfo.com/nkie/nkie.htm";
+ reason "Attempting to login to a GTBot";
};
+/* An example of how to match against an IP address in text (IPv4 only) */
spamfilter {
- match-type posix;
- match "^hey .* to get OPs use this hack in the chan but SHH! //\$decode\(.*,m\) \| \$decode\(.*,m\)$";
- target private;
+ match-type regex;
+ match "^!packet ([0-9]{1,3}\.){3}[0-9]{1,3} [0-9]{1,15}";
+ target channel;
action gline;
- reason "Infected by nkie worm: see http://www.trojaninfo.com/nkie/nkie.htm";
+ reason "Attempting to use a GTBot";
};
+/* A slightly more complex example with a partial OR matcher (|) */
spamfilter {
- match-type posix;
- match ".*(http://jokes\.clubdepeche\.com|http://horny\.69sexy\.net|http://private\.a123sdsdssddddgfg\.com).*";
+ match-type regex;
+ match "(^wait a minute plz\. i am updating my site|.*my erotic video).*http://.+/erotic(a)?/myvideo\.exe$";
target private;
action gline;
- reason "Infected by LOI trojan";
-};
-
-/* This is a 'general sig' which might have a tad more false positives, hence just 'block' is used */
-spamfilter {
- match-type posix;
- match "C:\\WINNT\\system32\\[][0-9a-z_-{|}`]+\.zip";
- target dcc;
- action block;
- reason "Infected by Gaggle worm?";
+ reason "Infected by some trojan (erotica?)";
};
+/* In regex a \ is special and needs to be escaped to \\
+ * However in this configuration file, \ is also special and
+ * needs to be escaped to \\ as well.
+ * The result is that we need double escaping:
+ * To match a \ you need to write \\\\ in the configuration file.
+ */
spamfilter {
- match-type posix;
- match "C:\\WINNT\\system32\\(notes|videos|xxx|ManualSeduccion|postal|hechizos|images|sex|avril)\.zip";
+ match-type regex;
+ match "C:\\\\WINNT\\\\system32\\\\(notes|videos|xxx|ManualSeduccion|postal|hechizos|images|sex|avril)\.zip";
target dcc;
action dccblock;
reason "Infected by Gaggle worm";
};
-
-spamfilter {
- match-type posix;
- match "http://.+\.lycos\..+/[iy]server[0-9]/[a-z]{4,11}\.(gif|jpg|avi|txt)";
- target { private; quit; };
- action block;
- reason "Infected by Gaggle worm";
-};
-
-spamfilter {
- match-type posix;
- match "^Free porn pic.? and movies (www\.sexymovies\.da\.ru|www\.girlporn\.org)";
- target private;
- action block;
- reason "Unknown virus. Site causes Backdoor.Delf.lq infection";
-};
-
-spamfilter {
- match-type posix;
- match "^LOL! //echo -a \$\(\$decode\(.+,m\),[0-9]\)$";
- target channel;
- action block;
- reason "$decode exploit";
-};
-
-/*
-spamfilter {
- regex "//write \$decode\(.+\|.+load -rs";
- target { private; channel; };
- reason "Generic $decode exploit";
- action block;
-};
-*/
-
-spamfilter {
- match-type posix;
- match "^Want To Be An IRCOp\? Try This New Bug Type: //write \$decode\(.+=.?,m\) \| \.load -rs \$decode\(.+=.?,m\)$";
- target private;
- action block;
- reason "Spamming users with an mIRC trojan. Type '/unload -rs newb' to remove the trojan.";
-};
Binary file not shown.
-98
View File
@@ -1,98 +0,0 @@
# Makefile for regex.
#
# Copyright (C) 1992, 1993 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
version = 0.12
# You can define CPPFLAGS on the command line. Aside from system-specific
# flags, you can define:
# -DREGEX_MALLOC to use malloc/realloc/free instead of alloca.
# -DDEBUG to enable the compiled pattern disassembler and execution
# tracing; code runs substantially slower.
# -DEXTRACT_MACROS to use the macros EXTRACT_* (as opposed to
# the corresponding C procedures). If not -DDEBUG, the macros
# are used.
CPPFLAGS =
# Likewise, you can override CFLAGS to optimize, use -Wall, etc.
CFLAGS = -g
# Ditto for LDFLAGS and LOADLIBES.
LDFLAGS =
LOADLIBES =
srcdir = @srcdir@
VPATH = @srcdir@
CC = @CC@
DEFS = @DEFS@
SHELL = /bin/sh
subdirs = moo
default all:: regex.o
.PHONY: default all
regex.o: regex.c regex.h
$(CC) $(CFLAGS) $(CPPFLAGS) $(DEFS) -I. -I$(srcdir) -c $<
clean mostlyclean::
rm -f *.o
distclean:: clean
rm -f Makefile config.status
extraclean:: distclean
rm -f patch* *~* *\#* *.orig *.rej *.bak core a.out
configure: configure.in
autoconf
config.status: configure
sh configure --no-create
Makefile: Makefile.in config.status
sh config.status
makeargs = $(MFLAGS) CPPFLAGS='$(CPPFLAGS)' CFLAGS='$(CFLAGS)' CC='$(CC)' \
DEFS='$(DEFS)' LDFLAGS='$(LDFLAGS)' LOADLIBES='$(LOADLIBES)'
default all install \
mostlyclean clean distclean extraclean realclean \
TAGS check::
for d in $(subdirs); do (cd $$d; $(MAKE) $(makeargs) $@); done
.PHONY: install mostlyclean clean distclean extraclean realclean TAGS check
# Prevent GNU make 3 from overflowing arg limit on system V.
.NOEXPORT:
distfiles = AUTHORS ChangeLog COPYING INSTALL NEWS README \
*.in configure regex.c regex.h
distdir = regex-$(version)
distargs = version=$(version) distdir=../$(distdir)/$$d
dist: TAGS configure
@echo "Version numbers in: Makefile.in, ChangeLog, NEWS,"
@echo " regex.c, regex.h,"
@echo " and doc/xregex.texi (if modified)."
rm -rf $(distdir)
mkdir $(distdir)
ln $(distfiles) $(distdir)
for d in $(subdirs); do (cd $$d; $(MAKE) $(distargs) dist); done
tar czhf $(distdir).tar.Z $(distdir)
rm -rf $(distdir)
.PHONY: dist
-60
View File
@@ -1,60 +0,0 @@
This directory contains the GNU regex library. It is compliant with
POSIX.2, except for internationalization features.
See the file NEWS for a list of major changes in the current release.
See the file INSTALL for compilation instructions. (The only thing
installed is the documentation; regex.c is compiled into regex.o, but
not installed anywhere.)
The subdirectory `doc' contains a (programmers') manual for the library.
It's probably out-of-date. Improvements are welcome.
The subdirectory `test' contains the various tests we've written.
We know this code is not as fast as it might be. If you have specific
suggestions, profiling results, or other such useful information to
report, please do.
Emacs 18 is not going use this revised regex (but Emacs 19 will). If
you want to try it with Emacs 18, apply the patch at the end of this
file first.
Mail bug reports to bug-gnu-utils@prep.ai.mit.edu.
Please include an actual regular expression that fails (and the syntax
used to compile it); without that, there's no way to reproduce the bug,
so there's no way we can fix it. Even if you include a patch, also
include the regular expression in error; otherwise, we can't know for
sure what you're trying to fix.
Here is the patch to make this version of regex work with Emacs 18.
*** ORIG/search.c Tue Jan 8 13:04:55 1991
--- search.c Sun Jan 5 10:57:00 1992
***************
*** 25,26 ****
--- 25,28 ----
#include "commands.h"
+
+ #include <sys/types.h>
#include "regex.h"
***************
*** 477,479 ****
/* really needed. */
! && *(searchbuf.buffer) == (char) exactn /* first item is "exact match" */
&& searchbuf.buffer[1] + 2 == searchbuf.used) /*first is ONLY item */
--- 479,482 ----
/* really needed. */
! /* first item is "exact match" */
! && *(searchbuf.buffer) == (char) RE_EXACTN_VALUE
&& searchbuf.buffer[1] + 2 == searchbuf.used) /*first is ONLY item */
***************
*** 1273,1275 ****
searchbuf.allocated = 100;
! searchbuf.buffer = (char *) malloc (searchbuf.allocated);
searchbuf.fastmap = search_fastmap;
--- 1276,1278 ----
searchbuf.allocated = 100;
! searchbuf.buffer = (unsigned char *) malloc (searchbuf.allocated);
searchbuf.fastmap = search_fastmap;
-462
View File
@@ -1,462 +0,0 @@
#!/bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf.
# Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
# Usage: configure [--srcdir=DIR] [--host=HOST] [--gas] [--nfp] [--no-create]
# [--prefix=PREFIX] [--exec-prefix=PREFIX] [--with-PACKAGE] [TARGET]
# Ignores all args except --srcdir, --prefix, --exec-prefix, --no-create, and
# --with-PACKAGE unless this script has special code to handle it.
for arg
do
# Handle --exec-prefix with a space before the argument.
if test x$next_exec_prefix = xyes; then exec_prefix=$arg; next_exec_prefix=
# Handle --host with a space before the argument.
elif test x$next_host = xyes; then next_host=
# Handle --prefix with a space before the argument.
elif test x$next_prefix = xyes; then prefix=$arg; next_prefix=
# Handle --srcdir with a space before the argument.
elif test x$next_srcdir = xyes; then srcdir=$arg; next_srcdir=
else
case $arg in
# For backward compatibility, also recognize exact --exec_prefix.
-exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* | --exec=* | --exe=* | --ex=* | --e=*)
exec_prefix=`echo $arg | sed 's/[-a-z_]*=//'` ;;
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- | --exec | --exe | --ex | --e)
next_exec_prefix=yes ;;
-gas | --gas | --ga | --g) ;;
-host=* | --host=* | --hos=* | --ho=* | --h=*) ;;
-host | --host | --hos | --ho | --h)
next_host=yes ;;
-nfp | --nfp | --nf) ;;
-no-create | --no-create | --no-creat | --no-crea | --no-cre | --no-cr | --no-c | --no- | --no)
no_create=1 ;;
-prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
prefix=`echo $arg | sed 's/[-a-z_]*=//'` ;;
-prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
next_prefix=yes ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=* | --s=*)
srcdir=`echo $arg | sed 's/[-a-z_]*=//'` ;;
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr | --s)
next_srcdir=yes ;;
-with-* | --with-*)
package=`echo $arg|sed 's/-*with-//'`
# Delete all the valid chars; see if any are left.
if test -n "`echo $package|sed 's/[-a-zA-Z0-9_]*//g'`"; then
echo "configure: $package: invalid package name" >&2; exit 1
fi
eval "with_`echo $package|sed s/-/_/g`=1" ;;
*) ;;
esac
fi
done
trap 'rm -f conftest* core; exit 1' 1 3 15
rm -f conftest*
compile='${CC-cc} $CFLAGS $DEFS conftest.c -o conftest $LIBS >/dev/null 2>&1'
# A filename unique to this package, relative to the directory that
# configure is in, which we can look for to find out if srcdir is correct.
unique_file=regex.c
# Find the source files, if location was not specified.
if test -z "$srcdir"; then
srcdirdefaulted=yes
# Try the directory containing this script, then `..'.
prog=$0
confdir=`echo $prog|sed 's%/[^/][^/]*$%%'`
test "X$confdir" = "X$prog" && confdir=.
srcdir=$confdir
if test ! -r $srcdir/$unique_file; then
srcdir=..
fi
fi
if test ! -r $srcdir/$unique_file; then
if test x$srcdirdefaulted = xyes; then
echo "configure: Can not find sources in \`${confdir}' or \`..'." 1>&2
else
echo "configure: Can not find sources in \`${srcdir}'." 1>&2
fi
exit 1
fi
# Preserve a srcdir of `.' to avoid automounter screwups with pwd.
# But we can't avoid them for `..', to make subdirectories work.
case $srcdir in
.|/*|~*) ;;
*) srcdir=`cd $srcdir; pwd` ;; # Make relative path absolute.
esac
if test -z "$CC"; then
echo checking for gcc
saveifs="$IFS"; IFS="${IFS}:"
for dir in $PATH; do
test -z "$dir" && dir=.
if test -f $dir/gcc; then
CC="gcc"
break
fi
done
IFS="$saveifs"
fi
test -z "$CC" && CC="cc"
# Find out if we are using GNU C, under whatever name.
cat > conftest.c <<EOF
#ifdef __GNUC__
yes
#endif
EOF
${CC-cc} -E conftest.c > conftest.out 2>&1
if egrep yes conftest.out >/dev/null 2>&1; then
GCC=1 # For later tests.
fi
rm -f conftest*
# Make sure to not get the incompatible SysV /etc/install and
# /usr/sbin/install, which might be in PATH before a BSD-like install,
# or the SunOS /usr/etc/install directory, or the AIX /bin/install,
# or the AFS install, which mishandles nonexistent args. (Sigh.)
if test -z "$INSTALL"; then
echo checking for install
saveifs="$IFS"; IFS="${IFS}:"
for dir in $PATH; do
test -z "$dir" && dir=.
case $dir in
/etc|/usr/sbin|/usr/etc|/usr/afsws/bin) ;;
*)
if test -f $dir/install; then
if grep dspmsg $dir/install >/dev/null 2>&1; then
: # AIX
else
INSTALL="$dir/install -c"
INSTALL_PROGRAM='$(INSTALL)'
INSTALL_DATA='$(INSTALL) -m 644'
break
fi
fi
;;
esac
done
IFS="$saveifs"
fi
INSTALL=${INSTALL-cp}
INSTALL_PROGRAM=${INSTALL_PROGRAM-'$(INSTALL)'}
INSTALL_DATA=${INSTALL_DATA-'$(INSTALL)'}
echo checking for AIX
echo checking how to run the C preprocessor
if test -z "$CPP"; then
CPP='${CC-cc} -E'
cat > conftest.c <<EOF
#include <stdio.h>
EOF
err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`
if test -z "$err"; then
:
else
CPP=/lib/cpp
fi
rm -f conftest*
fi
cat > conftest.c <<EOF
#ifdef _AIX
yes
#endif
EOF
eval "$CPP $DEFS conftest.c > conftest.out 2>&1"
if egrep "yes" conftest.out >/dev/null 2>&1; then
DEFS="$DEFS -D_ALL_SOURCE=1"
fi
rm -f conftest*
echo checking for DYNIX/ptx libseq
cat > conftest.c <<EOF
#if defined(_SEQUENT_)
yes
#endif
EOF
eval "$CPP $DEFS conftest.c > conftest.out 2>&1"
if egrep "yes" conftest.out >/dev/null 2>&1; then
SEQUENT=1
fi
rm -f conftest*
test -n "$SEQUENT" && test -f /usr/lib/libseq.a &&
LIBS="$LIBS -lseq"
echo checking for POSIXized ISC
if test -d /etc/conf/kconfig.d &&
grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
then
ISC=1 # If later tests want to check for ISC.
DEFS="$DEFS -D_POSIX_SOURCE=1"
if test -n "$GCC"; then
CC="$CC -posix"
else
CC="$CC -Xp"
fi
fi
echo checking for minix/config.h
cat > conftest.c <<EOF
#include <minix/config.h>
EOF
err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`
if test -z "$err"; then
MINIX=1
fi
rm -f conftest*
# The Minix shell can't assign to the same variable on the same line!
if test -n "$MINIX"; then
DEFS="$DEFS -D_POSIX_SOURCE=1"
DEFS="$DEFS -D_POSIX_1_SOURCE=2"
DEFS="$DEFS -D_MINIX=1"
fi
echo checking for ANSI C header files
cat > conftest.c <<EOF
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>
EOF
err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`
if test -z "$err"; then
# SunOS string.h does not declare mem*, contrary to ANSI.
echo '#include <string.h>' > conftest.c
eval "$CPP $DEFS conftest.c > conftest.out 2>&1"
if egrep "memchr" conftest.out >/dev/null 2>&1; then
# SGI's /bin/cc from Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
cat > conftest.c <<EOF
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#define XOR(e,f) (((e) && !(f)) || (!(e) && (f)))
int main () { int i; for (i = 0; i < 256; i++)
if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
eval $compile
if test -s conftest && (./conftest; exit) 2>/dev/null; then
DEFS="$DEFS -DSTDC_HEADERS=1"
fi
rm -f conftest*
fi
rm -f conftest*
fi
rm -f conftest*
for hdr in string.h
do
trhdr=HAVE_`echo $hdr | tr '[a-z]./' '[A-Z]__'`
echo checking for ${hdr}
cat > conftest.c <<EOF
#include <${hdr}>
EOF
err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`
if test -z "$err"; then
DEFS="$DEFS -D${trhdr}=1"
fi
rm -f conftest*
done
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo checking for working alloca.h
cat > conftest.c <<EOF
#include <alloca.h>
main() { exit(0); }
t() { char *p = alloca(2 * sizeof(int)); }
EOF
if eval $compile; then
DEFS="$DEFS -DHAVE_ALLOCA_H=1"
fi
rm -f conftest*
decl="#ifdef __GNUC__
#define alloca __builtin_alloca
#else
#if HAVE_ALLOCA_H
#include <alloca.h>
#else
#ifdef _AIX
#pragma alloca
#else
char *alloca ();
#endif
#endif
#endif
"
echo checking for alloca
cat > conftest.c <<EOF
$decl
main() { exit(0); }
t() { char *p = (char *) alloca(1); }
EOF
if eval $compile; then
:
else
alloca_missing=1
fi
rm -f conftest*
if test -n "$alloca_missing"; then
# The SVR3 libPW and SVR4 libucb both contain incompatible functions
# that cause trouble. Some versions do not even contain alloca or
# contain a buggy version. If you still want to use their alloca,
# use ar to extract alloca.o from them instead of compiling alloca.c.
ALLOCA=alloca.o
fi
prog='/* Ultrix mips cc rejects this. */
typedef int charset[2]; const charset x;
/* SunOS 4.1.1 cc rejects this. */
char const *const *p;
char **p2;
/* HPUX 7.0 cc rejects these. */
++p;
p2 = (char const* const*) p;'
echo checking for working const
cat > conftest.c <<EOF
main() { exit(0); }
t() { $prog }
EOF
if eval $compile; then
:
else
DEFS="$DEFS -Dconst="
fi
rm -f conftest*
if test -z "$prefix"
then
echo checking for gcc to derive installation directory prefix
saveifs="$IFS"; IFS="$IFS:"
for dir in $PATH; do
test -z "$dir" && dir=.
if test $dir != . && test -f $dir/gcc; then
# Not all systems have dirname.
prefix=`echo $dir|sed 's%/[^/][^/]*$%%'`
break
fi
done
IFS="$saveifs"
fi
if test -n "$prefix"; then
test -z "$exec_prefix" && exec_prefix='${prefix}'
prsub="s%^prefix\\([ ]*\\)=\\([ ]*\\).*$%prefix\\1=\\2$prefix%"
fi
if test -n "$exec_prefix"; then
prsub="$prsub
s%^exec_prefix\\([ ]*\\)=\\([ ]*\\).*$%\
exec_prefix\\1=\\2$exec_prefix%"
fi
trap 'rm -f config.status; exit 1' 1 3 15
echo creating config.status
rm -f config.status
cat > config.status <<EOF
#!/bin/sh
# Generated automatically by configure.
# Run this file to recreate the current configuration.
# This directory was configured as follows,
# on host `(hostname || uname -n) 2>/dev/null`:
#
# $0 $*
for arg
do
case "\$arg" in
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
exec /bin/sh $0 $* ;;
*) echo "Usage: config.status --recheck" 2>&1; exit 1 ;;
esac
done
trap 'rm -f Makefile; exit 1' 1 3 15
CC='$CC'
INSTALL='$INSTALL'
INSTALL_PROGRAM='$INSTALL_PROGRAM'
INSTALL_DATA='$INSTALL_DATA'
CPP='$CPP'
ALLOCA='$ALLOCA'
LIBS='$LIBS'
srcdir='$srcdir'
DEFS='$DEFS'
prefix='$prefix'
exec_prefix='$exec_prefix'
prsub='$prsub'
EOF
cat >> config.status <<\EOF
top_srcdir=$srcdir
for file in .. Makefile; do if [ "x$file" != "x.." ]; then
srcdir=$top_srcdir
# Remove last slash and all that follows it. Not all systems have dirname.
dir=`echo $file|sed 's%/[^/][^/]*$%%'`
if test "$dir" != "$file"; then
test "$top_srcdir" != . && srcdir=$top_srcdir/$dir
test ! -d $dir && mkdir $dir
fi
echo creating $file
rm -f $file
echo "# Generated automatically from `echo $file|sed 's|.*/||'`.in by configure." > $file
sed -e "
$prsub
s%@CC@%$CC%g
s%@INSTALL@%$INSTALL%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@CPP@%$CPP%g
s%@ALLOCA@%$ALLOCA%g
s%@LIBS@%$LIBS%g
s%@srcdir@%$srcdir%g
s%@DEFS@%$DEFS%
" $top_srcdir/${file}.in >> $file
fi; done
exit 0
EOF
chmod +x config.status
test -n "$no_create" || ./config.status
-23
View File
@@ -1,23 +0,0 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT(regex.c)
AC_PROG_CC
AC_PROG_INSTALL
dnl I'm not sure if AC_AIX and AC_DYNIX_SEQ are really necessary. The
dnl Autoconf documentation isn't specific about which BSD functions they
dnl provide.
AC_AIX
AC_DYNIX_SEQ
AC_ISC_POSIX
AC_MINIX
AC_STDC_HEADERS
AC_HAVE_HEADERS(string.h)
AC_ALLOCA
AC_CONST
AC_PREFIX(gcc)
AC_OUTPUT(Makefile doc/Makefile test/Makefile)
-4
View File
@@ -1,4 +0,0 @@
clean:
default:
all:
echo "."
-4940
View File
File diff suppressed because it is too large Load Diff
-490
View File
@@ -1,490 +0,0 @@
/* Definitions for data structures and routines for the regular
expression library, version 0.12.
Copyright (C) 1985, 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#ifndef __REGEXP_LIBRARY_H__
#define __REGEXP_LIBRARY_H__
/* POSIX says that <sys/types.h> must be included (by the caller) before
<regex.h>. */
#ifdef VMS
/* VMS doesn't have `size_t' in <sys/types.h>, even though POSIX says it
should be there. */
#include <stddef.h>
#endif
/* The following bits are used to determine the regexp syntax we
recognize. The set/not-set meanings are chosen so that Emacs syntax
remains the value 0. The bits are given in alphabetical order, and
the definitions shifted by one from the previous bit; thus, when we
add or remove a bit, only one other definition need change. */
typedef unsigned reg_syntax_t;
/* If this bit is not set, then \ inside a bracket expression is literal.
If set, then such a \ quotes the following character. */
#define RE_BACKSLASH_ESCAPE_IN_LISTS (1)
/* If this bit is not set, then + and ? are operators, and \+ and \? are
literals.
If set, then \+ and \? are operators and + and ? are literals. */
#define RE_BK_PLUS_QM (RE_BACKSLASH_ESCAPE_IN_LISTS << 1)
/* If this bit is set, then character classes are supported. They are:
[:alpha:], [:upper:], [:lower:], [:digit:], [:alnum:], [:xdigit:],
[:space:], [:print:], [:punct:], [:graph:], and [:cntrl:].
If not set, then character classes are not supported. */
#define RE_CHAR_CLASSES (RE_BK_PLUS_QM << 1)
/* If this bit is set, then ^ and $ are always anchors (outside bracket
expressions, of course).
If this bit is not set, then it depends:
^ is an anchor if it is at the beginning of a regular
expression or after an open-group or an alternation operator;
$ is an anchor if it is at the end of a regular expression, or
before a close-group or an alternation operator.
This bit could be (re)combined with RE_CONTEXT_INDEP_OPS, because
POSIX draft 11.2 says that * etc. in leading positions is undefined.
We already implemented a previous draft which made those constructs
invalid, though, so we haven't changed the code back. */
#define RE_CONTEXT_INDEP_ANCHORS (RE_CHAR_CLASSES << 1)
/* If this bit is set, then special characters are always special
regardless of where they are in the pattern.
If this bit is not set, then special characters are special only in
some contexts; otherwise they are ordinary. Specifically,
* + ? and intervals are only special when not after the beginning,
open-group, or alternation operator. */
#define RE_CONTEXT_INDEP_OPS (RE_CONTEXT_INDEP_ANCHORS << 1)
/* If this bit is set, then *, +, ?, and { cannot be first in an re or
immediately after an alternation or begin-group operator. */
#define RE_CONTEXT_INVALID_OPS (RE_CONTEXT_INDEP_OPS << 1)
/* If this bit is set, then . matches newline.
If not set, then it doesn't. */
#define RE_DOT_NEWLINE (RE_CONTEXT_INVALID_OPS << 1)
/* If this bit is set, then . doesn't match NUL.
If not set, then it does. */
#define RE_DOT_NOT_NULL (RE_DOT_NEWLINE << 1)
/* If this bit is set, nonmatching lists [^...] do not match newline.
If not set, they do. */
#define RE_HAT_LISTS_NOT_NEWLINE (RE_DOT_NOT_NULL << 1)
/* If this bit is set, either \{...\} or {...} defines an
interval, depending on RE_NO_BK_BRACES.
If not set, \{, \}, {, and } are literals. */
#define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1)
/* If this bit is set, +, ? and | aren't recognized as operators.
If not set, they are. */
#define RE_LIMITED_OPS (RE_INTERVALS << 1)
/* If this bit is set, newline is an alternation operator.
If not set, newline is literal. */
#define RE_NEWLINE_ALT (RE_LIMITED_OPS << 1)
/* If this bit is set, then `{...}' defines an interval, and \{ and \}
are literals.
If not set, then `\{...\}' defines an interval. */
#define RE_NO_BK_BRACES (RE_NEWLINE_ALT << 1)
/* If this bit is set, (...) defines a group, and \( and \) are literals.
If not set, \(...\) defines a group, and ( and ) are literals. */
#define RE_NO_BK_PARENS (RE_NO_BK_BRACES << 1)
/* If this bit is set, then \<digit> matches <digit>.
If not set, then \<digit> is a back-reference. */
#define RE_NO_BK_REFS (RE_NO_BK_PARENS << 1)
/* If this bit is set, then | is an alternation operator, and \| is literal.
If not set, then \| is an alternation operator, and | is literal. */
#define RE_NO_BK_VBAR (RE_NO_BK_REFS << 1)
/* If this bit is set, then an ending range point collating higher
than the starting range point, as in [z-a], is invalid.
If not set, then when ending range point collates higher than the
starting range point, the range is ignored. */
#define RE_NO_EMPTY_RANGES (RE_NO_BK_VBAR << 1)
/* If this bit is set, then an unmatched ) is ordinary.
If not set, then an unmatched ) is invalid. */
#define RE_UNMATCHED_RIGHT_PAREN_ORD (RE_NO_EMPTY_RANGES << 1)
/* This global variable defines the particular regexp syntax to use (for
some interfaces). When a regexp is compiled, the syntax used is
stored in the pattern buffer, so changing this does not affect
already-compiled regexps. */
extern reg_syntax_t re_syntax_options;
/* Define combinations of the above bits for the standard possibilities.
(The [[[ comments delimit what gets put into the Texinfo file, so
don't delete them!) */
/* [[[begin syntaxes]]] */
#define RE_SYNTAX_EMACS 0
#define RE_SYNTAX_AWK \
(RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DOT_NOT_NULL \
| RE_NO_BK_PARENS | RE_NO_BK_REFS \
| RE_NO_BK_VBAR | RE_NO_EMPTY_RANGES \
| RE_UNMATCHED_RIGHT_PAREN_ORD)
#define RE_SYNTAX_POSIX_AWK \
(RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS)
#define RE_SYNTAX_GREP \
(RE_BK_PLUS_QM | RE_CHAR_CLASSES \
| RE_HAT_LISTS_NOT_NEWLINE | RE_INTERVALS \
| RE_NEWLINE_ALT)
#define RE_SYNTAX_EGREP \
(RE_CHAR_CLASSES | RE_CONTEXT_INDEP_ANCHORS \
| RE_CONTEXT_INDEP_OPS | RE_HAT_LISTS_NOT_NEWLINE \
| RE_NEWLINE_ALT | RE_NO_BK_PARENS \
| RE_NO_BK_VBAR)
#define RE_SYNTAX_POSIX_EGREP \
(RE_SYNTAX_EGREP | RE_INTERVALS | RE_NO_BK_BRACES)
/* P1003.2/D11.2, section 4.20.7.1, lines 5078ff. */
#define RE_SYNTAX_ED RE_SYNTAX_POSIX_BASIC
#define RE_SYNTAX_SED RE_SYNTAX_POSIX_BASIC
/* Syntax bits common to both basic and extended POSIX regex syntax. */
#define _RE_SYNTAX_POSIX_COMMON \
(RE_CHAR_CLASSES | RE_DOT_NEWLINE | RE_DOT_NOT_NULL \
| RE_INTERVALS | RE_NO_EMPTY_RANGES)
#define RE_SYNTAX_POSIX_BASIC \
(_RE_SYNTAX_POSIX_COMMON | RE_BK_PLUS_QM)
/* Differs from ..._POSIX_BASIC only in that RE_BK_PLUS_QM becomes
RE_LIMITED_OPS, i.e., \? \+ \| are not recognized. Actually, this
isn't minimal, since other operators, such as \`, aren't disabled. */
#define RE_SYNTAX_POSIX_MINIMAL_BASIC \
(_RE_SYNTAX_POSIX_COMMON | RE_LIMITED_OPS)
#define RE_SYNTAX_POSIX_EXTENDED \
(_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \
| RE_CONTEXT_INDEP_OPS | RE_NO_BK_BRACES \
| RE_NO_BK_PARENS | RE_NO_BK_VBAR \
| RE_UNMATCHED_RIGHT_PAREN_ORD)
/* Differs from ..._POSIX_EXTENDED in that RE_CONTEXT_INVALID_OPS
replaces RE_CONTEXT_INDEP_OPS and RE_NO_BK_REFS is added. */
#define RE_SYNTAX_POSIX_MINIMAL_EXTENDED \
(_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \
| RE_CONTEXT_INVALID_OPS | RE_NO_BK_BRACES \
| RE_NO_BK_PARENS | RE_NO_BK_REFS \
| RE_NO_BK_VBAR | RE_UNMATCHED_RIGHT_PAREN_ORD)
/* [[[end syntaxes]]] */
/* Maximum number of duplicates an interval can allow. Some systems
(erroneously) define this in other header files, but we want our
value, so remove any previous define. */
#ifdef RE_DUP_MAX
#undef RE_DUP_MAX
#endif
#define RE_DUP_MAX ((1 << 15) - 1)
/* POSIX `cflags' bits (i.e., information for `regcomp'). */
/* If this bit is set, then use extended regular expression syntax.
If not set, then use basic regular expression syntax. */
#define REG_EXTENDED 1
/* If this bit is set, then ignore case when matching.
If not set, then case is significant. */
#define REG_ICASE (REG_EXTENDED << 1)
/* If this bit is set, then anchors do not match at newline
characters in the string.
If not set, then anchors do match at newlines. */
#define REG_NEWLINE (REG_ICASE << 1)
/* If this bit is set, then report only success or fail in regexec.
If not set, then returns differ between not matching and errors. */
#define REG_NOSUB (REG_NEWLINE << 1)
/* POSIX `eflags' bits (i.e., information for regexec). */
/* If this bit is set, then the beginning-of-line operator doesn't match
the beginning of the string (presumably because it's not the
beginning of a line).
If not set, then the beginning-of-line operator does match the
beginning of the string. */
#define REG_NOTBOL 1
/* Like REG_NOTBOL, except for the end-of-line. */
#define REG_NOTEOL (1 << 1)
/* If any error codes are removed, changed, or added, update the
`re_error_msg' table in regex.c. */
typedef enum
{
REG_NOERROR = 0, /* Success. */
REG_NOMATCH, /* Didn't find a match (for regexec). */
/* POSIX regcomp return error codes. (In the order listed in the
standard.) */
REG_BADPAT, /* Invalid pattern. */
REG_ECOLLATE, /* Not implemented. */
REG_ECTYPE, /* Invalid character class name. */
REG_EESCAPE, /* Trailing backslash. */
REG_ESUBREG, /* Invalid back reference. */
REG_EBRACK, /* Unmatched left bracket. */
REG_EPAREN, /* Parenthesis imbalance. */
REG_EBRACE, /* Unmatched \{. */
REG_BADBR, /* Invalid contents of \{\}. */
REG_ERANGE, /* Invalid range end. */
REG_ESPACE, /* Ran out of memory. */
REG_BADRPT, /* No preceding re for repetition op. */
/* Error codes we've added. */
REG_EEND, /* Premature end. */
REG_ESIZE, /* Compiled pattern bigger than 2^16 bytes. */
REG_ERPAREN /* Unmatched ) or \); not returned from regcomp. */
} reg_errcode_t;
/* This data structure represents a compiled pattern. Before calling
the pattern compiler, the fields `buffer', `allocated', `fastmap',
`translate', and `no_sub' can be set. After the pattern has been
compiled, the `re_nsub' field is available. All other fields are
private to the regex routines. */
struct re_pattern_buffer
{
/* [[[begin pattern_buffer]]] */
/* Space that holds the compiled pattern. It is declared as
`unsigned char *' because its elements are
sometimes used as array indexes. */
unsigned char *buffer;
/* Number of bytes to which `buffer' points. */
unsigned long allocated;
/* Number of bytes actually used in `buffer'. */
unsigned long used;
/* Syntax setting with which the pattern was compiled. */
reg_syntax_t syntax;
/* Pointer to a fastmap, if any, otherwise zero. re_search uses
the fastmap, if there is one, to skip over impossible
starting points for matches. */
char *fastmap;
/* Either a translate table to apply to all characters before
comparing them, or zero for no translation. The translation
is applied to a pattern when it is compiled and to a string
when it is matched. */
char *translate;
/* Number of subexpressions found by the compiler. */
size_t re_nsub;
/* Zero if this pattern cannot match the empty string, one else.
Well, in truth it's used only in `re_search_2', to see
whether or not we should use the fastmap, so we don't set
this absolutely perfectly; see `re_compile_fastmap' (the
`duplicate' case). */
unsigned can_be_null : 1;
/* If REGS_UNALLOCATED, allocate space in the `regs' structure
for `max (RE_NREGS, re_nsub + 1)' groups.
If REGS_REALLOCATE, reallocate space if necessary.
If REGS_FIXED, use what's there. */
#define REGS_UNALLOCATED 0
#define REGS_REALLOCATE 1
#define REGS_FIXED 2
unsigned regs_allocated : 2;
/* Set to zero when `regex_compile' compiles a pattern; set to one
by `re_compile_fastmap' if it updates the fastmap. */
unsigned fastmap_accurate : 1;
/* If set, `re_match_2' does not return information about
subexpressions. */
unsigned no_sub : 1;
/* If set, a beginning-of-line anchor doesn't match at the
beginning of the string. */
unsigned not_bol : 1;
/* Similarly for an end-of-line anchor. */
unsigned not_eol : 1;
/* If true, an anchor at a newline matches. */
unsigned newline_anchor : 1;
/* [[[end pattern_buffer]]] */
};
typedef struct re_pattern_buffer regex_t;
/* search.c (search_buffer) in Emacs needs this one opcode value. It is
defined both in `regex.c' and here. */
#define RE_EXACTN_VALUE 1
/* Type for byte offsets within the string. POSIX mandates this. */
typedef int regoff_t;
/* This is the structure we store register match data in. See
regex.texinfo for a full description of what registers match. */
struct re_registers
{
unsigned num_regs;
regoff_t *start;
regoff_t *end;
};
/* If `regs_allocated' is REGS_UNALLOCATED in the pattern buffer,
`re_match_2' returns information about at least this many registers
the first time a `regs' structure is passed. */
#ifndef RE_NREGS
#define RE_NREGS 30
#endif
/* POSIX specification for registers. Aside from the different names than
`re_registers', POSIX uses an array of structures, instead of a
structure of arrays. */
typedef struct
{
regoff_t rm_so; /* Byte offset from string's start to substring's start. */
regoff_t rm_eo; /* Byte offset from string's start to substring's end. */
} regmatch_t;
/* Declarations for routines. */
/* To avoid duplicating every routine declaration -- once with a
prototype (if we are ANSI), and once without (if we aren't) -- we
use the following macro to declare argument types. This
unfortunately clutters up the declarations a bit, but I think it's
worth it. */
#if __STDC__
#define _RE_ARGS(args) args
#else /* not __STDC__ */
#define _RE_ARGS(args) ()
#endif /* not __STDC__ */
/* Sets the current default syntax to SYNTAX, and return the old syntax.
You can also simply assign to the `re_syntax_options' variable. */
extern reg_syntax_t re_set_syntax _RE_ARGS ((reg_syntax_t syntax));
/* Compile the regular expression PATTERN, with length LENGTH
and syntax given by the global `re_syntax_options', into the buffer
BUFFER. Return NULL if successful, and an error string if not. */
extern const char *re_compile_pattern
_RE_ARGS ((const char *pattern, int length,
struct re_pattern_buffer *buffer));
/* Compile a fastmap for the compiled pattern in BUFFER; used to
accelerate searches. Return 0 if successful and -2 if was an
internal error. */
extern int re_compile_fastmap _RE_ARGS ((struct re_pattern_buffer *buffer));
/* Search in the string STRING (with length LENGTH) for the pattern
compiled into BUFFER. Start searching at position START, for RANGE
characters. Return the starting position of the match, -1 for no
match, or -2 for an internal error. Also return register
information in REGS (if REGS and BUFFER->no_sub are nonzero). */
extern int re_search
_RE_ARGS ((struct re_pattern_buffer *buffer, const char *string,
int length, int start, int range, struct re_registers *regs));
/* Like `re_search', but search in the concatenation of STRING1 and
STRING2. Also, stop searching at index START + STOP. */
extern int re_search_2
_RE_ARGS ((struct re_pattern_buffer *buffer, const char *string1,
int length1, const char *string2, int length2,
int start, int range, struct re_registers *regs, int stop));
/* Like `re_search', but return how many characters in STRING the regexp
in BUFFER matched, starting at position START. */
extern int re_match
_RE_ARGS ((struct re_pattern_buffer *buffer, const char *string,
int length, int start, struct re_registers *regs));
/* Relates to `re_match' as `re_search_2' relates to `re_search'. */
extern int re_match_2
_RE_ARGS ((struct re_pattern_buffer *buffer, const char *string1,
int length1, const char *string2, int length2,
int start, struct re_registers *regs, int stop));
/* Set REGS to hold NUM_REGS registers, storing them in STARTS and
ENDS. Subsequent matches using BUFFER and REGS will use this memory
for recording register information. STARTS and ENDS must be
allocated with malloc, and must each be at least `NUM_REGS * sizeof
(regoff_t)' bytes long.
If NUM_REGS == 0, then subsequent matches should allocate their own
register data.
Unless this function is called, the first search or match using
PATTERN_BUFFER will allocate its own register data, without
freeing the old data. */
extern void re_set_registers
_RE_ARGS ((struct re_pattern_buffer *buffer, struct re_registers *regs,
unsigned num_regs, regoff_t *starts, regoff_t *ends));
/* 4.2 bsd compatibility. */
extern char *re_comp _RE_ARGS ((const char *));
extern int re_exec _RE_ARGS ((const char *));
/* POSIX compatibility. */
extern int regcomp _RE_ARGS ((regex_t *preg, const char *pattern, int cflags));
extern int regexec
_RE_ARGS ((const regex_t *preg, const char *string, size_t nmatch,
regmatch_t pmatch[], int eflags));
extern size_t regerror
_RE_ARGS ((int errcode, const regex_t *preg, char *errbuf,
size_t errbuf_size));
extern void regfree _RE_ARGS ((regex_t *preg));
#endif /* not __REGEXP_LIBRARY_H__ */
/*
Local variables:
make-backup-files: t
version-control: t
trim-versions-without-asking: nil
End:
*/
+5 -6
View File
@@ -1,12 +1,12 @@
# AppArmor profile for UnrealIRCd 4.0.16+
# AppArmor profile for UnrealIRCd 5
#
# Note that you may still see some DENIED warnings in logs with
# operation="chmod". These are harmless and can be safely ignored.
#
# Tested on Ubuntu 16.x and 17.x
# Tested on Ubuntu 16.04 LTS and Ubuntu 18.04 LTS
#
# NOTE: you will have to modify the path to executable below
# if it's not /home/ircd/unrealircd/bin/unrealircd.
# IMPORTANT: you will have to modify the path to executable below
# if it's not /home/ircd/unrealircd/bin/unrealircd !
#include <tunables/global>
@@ -17,8 +17,7 @@
@{HOME}/unrealircd/conf/ r,
@{HOME}/unrealircd/conf/** r,
@{HOME}/unrealircd/data/ircd.tune rw,
@{HOME}/unrealircd/data/unrealircd.pid rw,
@{HOME}/unrealircd/data/** rw,
@{HOME}/unrealircd/lib/*.so* mr,
@{HOME}/unrealircd/logs/* rw,
@{HOME}/unrealircd/modules/**.so r,
@@ -0,0 +1,27 @@
Target: 127.0.0.1:5901
prio ciphersuite protocols pfs curves
1 ECDHE-ECDSA-AES256-GCM-SHA384 TLSv1.2 ECDH,P-521,521bits secp521r1,secp384r1
2 ECDHE-ECDSA-AES128-GCM-SHA256 TLSv1.2 ECDH,P-521,521bits secp521r1,secp384r1
3 ECDHE-ECDSA-AES256-SHA384 TLSv1.2 ECDH,P-521,521bits secp521r1,secp384r1
4 ECDHE-ECDSA-AES128-SHA256 TLSv1.2 ECDH,P-521,521bits secp521r1,secp384r1
5 ECDHE-ECDSA-AES256-SHA TLSv1,TLSv1.1,TLSv1.2 ECDH,P-521,521bits secp521r1,secp384r1
6 ECDHE-ECDSA-AES128-SHA TLSv1,TLSv1.1,TLSv1.2 ECDH,P-521,521bits secp521r1,secp384r1
Certificate: untrusted, 384 bits, ecdsa-with-SHA256 signature
TLS ticket lifetime hint: None
NPN protocols: None
OCSP stapling: not supported
Cipher ordering: server
Curves ordering: server - fallback: no
Server supports secure renegotiation
Server supported compression methods: NONE
TLS Tolerance: yes
Intolerance to:
SSL 3.254 : absent
TLS 1.0 : absent
TLS 1.1 : absent
TLS 1.2 : absent
TLS 1.3 : absent
TLS 1.4 : absent
@@ -0,0 +1,27 @@
Target: 127.0.0.1:5901
prio ciphersuite protocols pfs curves
1 ECDHE-ECDSA-AES256-GCM-SHA384 TLSv1.2 ECDH,P-256,256bits prime256v1
2 ECDHE-ECDSA-AES128-GCM-SHA256 TLSv1.2 ECDH,P-256,256bits prime256v1
3 ECDHE-ECDSA-AES256-SHA384 TLSv1.2 ECDH,P-256,256bits prime256v1
4 ECDHE-ECDSA-AES256-SHA TLSv1,TLSv1.1,TLSv1.2 ECDH,P-256,256bits prime256v1
5 ECDHE-ECDSA-AES128-SHA256 TLSv1.2 ECDH,P-256,256bits prime256v1
6 ECDHE-ECDSA-AES128-SHA TLSv1,TLSv1.1,TLSv1.2 ECDH,P-256,256bits prime256v1
Certificate: untrusted, 384 bits, ecdsa-with-SHA256 signature
TLS ticket lifetime hint: None
NPN protocols: None
OCSP stapling: not supported
Cipher ordering: server
Curves ordering: server - fallback: no
Server supports secure renegotiation
Server supported compression methods: NONE
TLS Tolerance: yes
Intolerance to:
SSL 3.254 : absent
TLS 1.0 : absent
TLS 1.1 : absent
TLS 1.2 : absent
TLS 1.3 : absent
TLS 1.4 : absent
@@ -0,0 +1,27 @@
Target: 127.0.0.1:5901
prio ciphersuite protocols pfs curves
1 ECDHE-ECDSA-AES256-GCM-SHA384 TLSv1.2 ECDH,P-521,521bits secp521r1,secp384r1
2 ECDHE-ECDSA-AES128-GCM-SHA256 TLSv1.2 ECDH,P-521,521bits secp521r1,secp384r1
3 ECDHE-ECDSA-AES256-SHA384 TLSv1.2 ECDH,P-521,521bits secp521r1,secp384r1
4 ECDHE-ECDSA-AES256-SHA TLSv1,TLSv1.1,TLSv1.2 ECDH,P-521,521bits secp521r1,secp384r1
5 ECDHE-ECDSA-AES128-SHA256 TLSv1.2 ECDH,P-521,521bits secp521r1,secp384r1
6 ECDHE-ECDSA-AES128-SHA TLSv1,TLSv1.1,TLSv1.2 ECDH,P-521,521bits secp521r1,secp384r1
Certificate: untrusted, 384 bits, ecdsa-with-SHA256 signature
TLS ticket lifetime hint: None
NPN protocols: None
OCSP stapling: not supported
Cipher ordering: server
Curves ordering: server - fallback: no
Server supports secure renegotiation
Server supported compression methods: NONE
TLS Tolerance: yes
Intolerance to:
SSL 3.254 : absent
TLS 1.0 : absent
TLS 1.1 : absent
TLS 1.2 : absent
TLS 1.3 : absent
TLS 1.4 : absent
+90
View File
@@ -0,0 +1,90 @@
#!/bin/bash
# We assume we are executed from extras/tests/tls
function fail()
{
echo "TLS TEST ERROR: $*"
exit 1
}
CIPHERSCAN="cipherscan"
OPENSSL="openssl"
if [ -x ~/cipherscan ]; then
CIPHERSCAN="$HOME/cipherscan/cipherscan"
OPENSSL="$HOME/cipherscan/openssl"
elif [ -x /home/travis/build/unrealircd/unrealircd/cipherscan/cipherscan ]; then
CIPHERSCAN="/home/travis/build/unrealircd/unrealircd/cipherscan/cipherscan"
OPENSSL="/home/travis/build/unrealircd/unrealircd/cipherscan/openssl"
elif [ -x ../../../cipherscan/ ]; then
CIPHERSCAN="`readlink -f ../../../cipherscan/cipherscan`"
OPENSSL="`readlink -f ../../../cipherscan/openssl`"
fi
$CIPHERSCAN --help >/dev/null || exit 1
# This is the basic cipherscan test.
# It compares the output against a reference .txt file and alarms us if there
# are any changes. These changes may not always be harmful, but at least we
# will get warned on any possible changes.
$CIPHERSCAN --no-colors 127.0.0.1:5901|grep -vF '.....' >cipherscan.test.txt
# Now check if profile matches, if so.. everything is ok.
# We have 1 or more baseline profiles
# And you can optionally add profile-specific, eg openssl-102.txt
# Yeah that was a great idea but maintaining that is a bit of a hassle.
# TODO: reintroduce it though, see below.
##for f in cipherscan_profiles/baseline*txt cipherscan_profiles/$BUILDCONFIG.txt
FAILED=1
for f in cipherscan_profiles/*.txt
do
diff -uab $f cipherscan.test.txt 1>/dev/null 2>&1
if [ "$?" -eq 0 ]; then
FAILED=0
echo "Cipherscan profile $f matched."
break
fi
done
if [ "$FAILED" -eq 1 ]; then
echo "*** Differences found between cipherscan scan and expected output ***"
if [ -f cipherscan_profiles/$BUILDCONFIG.txt ]; then
COMPARE_PROFILE="cipherscan_profiles/$BUILDCONFIG.txt"
else
COMPARE_PROFILE="cipherscan_profiles/baseline.txt"
fi
echo "== EXPECTED OUTPUT ($COMPARE_PROFILE) =="
cat $COMPARE_PROFILE
echo
echo "== ACTUAL TEST OUTPUT =="
cat cipherscan.test.txt
echo
echo "== DIFF =="
diff -uab $COMPARE_PROFILE cipherscan.test.txt
echo
echo "cipherscan test failed."
exit 1
else
echo "*** Cipherscan output was good ***"
cat cipherscan.test.txt
fi
# This checks for a couple of old ciphers that should never work:
for cipher in 3DES RC4
do
echo "Testing cipher $cipher (MUST FAIL!).."
(echo QUIT|$OPENSSL s_client -connect 127.0.0.1:5901 -cipher $cipher) &&
fail "UnrealIRCd allowed us to connect with cipher $cipher, BAD!"
done
# This checks older SSL/TLS versions that should not work:
for protocol in ssl2 ssl3
do
echo "Testing protocol $protocol (MUST FAIL!).."
(echo QUIT|$OPENSSL s_client -connect 127.0.0.1:5901 -$protocol) &&
fail "UnrealIRCd allowed us to connect with protocol $protocol, BAD!"
done
echo
echo "TLS tests ended (no issues)."
exit 0
+2 -4
View File
@@ -1,10 +1,8 @@
# create RSA certs - Server
RANDFILE = ssl.rnd
[ req ]
default_bits = 4096
encrypt_key = yes
# Note: RSA bits is ignored, as we use ECC now
default_bits = 2048
distinguished_name = req_dn
x509_extensions = cert_type
BIN
View File
Binary file not shown.
+105
View File
@@ -0,0 +1,105 @@
#!/bin/bash
#
# This is stage 1 of the UnrealIRCd upgrade script
# It downloads stage 2 online, verifies the integrity, and then
# passes control to it to proceed with the rest of the upgrade.
#
# This is a bash script, so it is less cross-platform than
# the rest of UnrealIRCd. We also mostly assume Linux here.
#
BUILDDIR="@BUILDDIR@"
SCRIPTDIR="@SCRIPTDIR@"
DOCDIR="@DOCDIR@"
TMPDIR="@TMPDIR@"
function warn()
{
echo
echo "WARNING: $*"
echo "This is for your information only. It is possible to continue."
echo "Press ENTER to continue, or CTRL+C to abort."
echo "If in doubt, see https://www.unrealircd.org/docs/FAQ#upgrade-verify-failed"
read xyz
}
function bigwarn()
{
echo
echo "[!!!] WARNING: $*"
echo "Check https://www.unrealircd.org/docs/FAQ#upgrade-verify-failed !"
echo "Type 'IGNORE' in uppercase to continue if you think it is safe."
echo "Type anything else to abort."
read answer
if [ "$answer" != "IGNORE" ]; then
exit 1
fi
}
function fail()
{
echo
echo "ERROR: $*"
echo "NOTE: Your existing UnrealIRCd is backed up to $BACKUPDIR"
echo "Perhaps check out the FAQ for common problems:"
echo "https://www.unrealircd.org/docs/FAQ#upgrade-failed"
echo "Otherwise, follow the manual upgrade procedure from"
echo "https://www.unrealircd.org/docs/Upgrading"
exit 1
}
if [ ! -d "$BUILDDIR" ]; then
echo "UnrealIRCd source not found at $BUILDDIR."
echo "Sorry, then it is not possible to know your existing settings and thus we cannot upgrade."
echo "Follow the manual upgrade procedure from https://www.unrealircd.org/docs/Upgrading"
exit 1
fi
if ! wget --help 1>/dev/null 2>&1; then
echo "The tool 'wget' is missing, which is used by this script."
echo "On Linux consider running 'sudo apt install wget' or 'sudo yum install wget'"
echo "and run this script again."
echo "Or, don't use this script and follow the manual upgrade procedure from"
echo "https://www.unrealircd.org/docs/Upgrading"
exit 1
fi
# Weird way to get version, but ok.
cd "$BUILDDIR" || fail "Could not cd to builddir"
UNREALVER="`./configure --version|head -n1|awk '{ print $3 }'`"
cd .. || fail "Could not cd back"
# Set and export all variables with settings
export UNREALVER BUILDDIR SCRIPTDIR DOCDIR TMPDIR
# Download the install script
wget -O unrealircd-upgrade-script.stage2 "https://www.unrealircd.org/downloads/unrealircd-upgrade-script.stage2?from=$UNREALVER" || fail "Could not download online installer"
wget -O unrealircd-upgrade-script.stage2.asc "https://www.unrealircd.org/downloads/unrealircd-upgrade-script.stage2.asc" || fail "Could not download online installer signature"
# GPG verification - if available
if gpg --version 1>/dev/null 2>&1; then
if [ -f "$DOCDIR/KEYS" ]; then
gpg --import "$DOCDIR/KEYS"
echo
if gpg --batch --exit-on-status-write-error --verify unrealircd-upgrade-script.stage2.asc unrealircd-upgrade-script.stage2; then
echo "GPG: Verification succeeded. Download is genuine."
export NOGPG=0
else
bigwarn "GPG/PGP verification failed. This could be a security issue."
export NOGPG=1
fi
else
warn "Unable to check download integrity with GPG/PGP. Missing $DOCDIR/KEYS file."
export NOGPG=1
fi
else
echo "WARNING: The GnuPG (GPG/PGP) verification tool 'gpg' is not installed."
echo "Consider running 'sudo apt install gpg' or 'yum install gnupg2'"
echo "When 'gpg' is installed then the UnrealIRCd upgrade script can"
echo "verify the digital signature of the download file."
warn "Unable to check download integrity"
export NOGPG=1
fi
chmod +x unrealircd-upgrade-script.stage2
./unrealircd-upgrade-script.stage2 $*
-39
View File
@@ -1,39 +0,0 @@
/************************************************************************
* Unreal Internet Relay Chat Daemon, include/auth.h
* Copyright (C) 2001 Carsten V. Munk (stskeeps@tspre.org)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 1, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Id$
*/
typedef struct {
char *data;
short type;
} anAuthStruct;
#define AUTHTYPE_PLAINTEXT 0
#define AUTHTYPE_UNIXCRYPT 1
#define AUTHTYPE_MD5 2
#define AUTHTYPE_SHA1 3
#define AUTHTYPE_SSL_CLIENTCERT 4
#define AUTHTYPE_RIPEMD160 5
#define AUTHTYPE_SSL_CLIENTCERTFP 6
#define AUTHTYPE_BCRYPT 7
#define AUTHTYPE_SPKIFP 8
#ifndef HAVE_CRYPT
#define crypt DES_crypt
#endif
-36
View File
@@ -1,36 +0,0 @@
#ifndef __BADWORDS_H
#define __BADWORDS_H
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "tre/regex.h"
#define MAX_MATCH 1
#define MAX_WORDLEN 64
#define PATTERN "\\w*%s\\w*"
#define REPLACEWORD "<censored>"
#define BADW_TYPE_INVALID 0x0
#define BADW_TYPE_FAST 0x1
#define BADW_TYPE_FAST_L 0x2
#define BADW_TYPE_FAST_R 0x4
#define BADW_TYPE_REGEX 0x8
#define BADWORD_REPLACE 1
#define BADWORD_BLOCK 2
typedef struct _configitem_badword ConfigItem_badword;
struct _configitem_badword {
ConfigItem_badword *prev, *next;
ConfigFlag flag;
char *word, *replace;
unsigned short type;
char action;
regex_t expr;
};
#endif
+1 -12
View File
@@ -26,18 +26,7 @@
#define MODEBUFLEN 200
#define CANNOT_SEND_MODERATED 1
#define CANNOT_SEND_NOPRIVMSGS 2
#define CANNOT_SEND_BAN 4
#define CANNOT_SEND_MODREG 6
#define CANNOT_SEND_SWEAR 7 /* This isn't actually used here */
#define CANNOT_SEND_NONOTICE 8
#define NullChn ((aChannel *)0)
#define ChannelExists(n) (find_channel(n, NullChn) != NullChn)
#define IsULine(sptr) (sptr->flags & FLAGS_ULINE)
#define ChannelExists(n) (find_channel(n, NULL))
/* NOTE: Timestamps will be added to MODE-commands, so never make
* RESYNCMODES and MODEPARAMS higher than MAXPARA-3. DALnet servers
-63
View File
@@ -1,63 +0,0 @@
/************************************************************************
* Unreal Internet Relay Chat Daemon, include/class.h
* Copyright (C) 1990 Darren Reed
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 1, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Id$
*/
#ifndef __class_include__
#define __class_include__
typedef struct Class {
int class;
int conFreq;
int pingFreq;
int maxLinks;
long maxSendq;
int links;
struct Class *next;
} aClass;
#define Class(x) ((x)->class)
#define ConFreq(x) ((x)->conFreq)
#define PingFreq(x) ((x)->pingFreq)
#define MaxLinks(x) ((x)->maxLinks)
#define MaxSendq(x) ((x)->maxSendq)
#define Links(x) ((x)->links)
#define ConfLinks(x) (Class(x)->links)
#define ConfMaxLinks(x) (Class(x)->maxLinks)
#define ConfClass(x) (Class(x)->class)
#define ConfConFreq(x) (Class(x)->conFreq)
#define ConfPingFreq(x) (Class(x)->pingFreq)
#define ConfSendq(x) (Class(x)->maxSendq)
#define FirstClass() classes
#define NextClass(x) ((x)->next)
extern aClass *classes;
extern aClass *find_class(int);
extern int get_conf_class(aConfItem *);
extern int get_client_class(aClient *);
extern int get_client_ping(aClient *);
extern int get_con_freq(aClass *);
extern void add_class(int, int, int, int, long);
extern void check_class(void);
extern void initclass(void);
#endif /* __class_include__ */
+12 -97
View File
@@ -25,19 +25,16 @@
#include <time.h>
#ifdef _WIN32
#include <malloc.h>
#define NTDDI_VERSION 0x0501
#define _WIN32_WINNT 0x0501
#include <winsock2.h>
#include <ws2tcpip.h>
#include <windows.h>
#include <io.h>
#include <direct.h>
#endif
#include "types.h"
#include "config.h"
#ifdef PARAMH
#include <sys/param.h>
#endif
#ifndef _WIN32
#include <sys/param.h>
#include <stdbool.h>
#else
typedef int bool;
@@ -60,6 +57,12 @@ typedef int bool;
#define BMAGIC 0x4675636B596F754661736369737473
#ifdef _WIN32
#define DEADBEEF_ADDR 0xDEADBEEFDEADBEEF
#else
#define DEADBEEF_ADDR 0xDEADBEEF
#endif
#define BASE_VERSION "UnrealIRCd"
#ifndef _WIN32
#define FDwrite(x,y,z) write(x, y, z)
@@ -85,19 +88,6 @@ typedef int bool;
#define UNSURE (2)
#endif
#if 0
#ifndef MALLOCH
char *malloc(), *calloc();
void free();
#else
#include MALLOCH
#endif
#endif
#define TS time_t
extern int match(const char *, const char *);
#define mycmp(a,b) \
( (toupper(a[0])!=toupper(b[0])) || smycmp((a)+1,(b)+1) )
extern int smycmp(const char *, const char *);
@@ -105,34 +95,13 @@ extern int smycmp(const char *, const char *);
extern int myncmp(const char *, const char *, int);
#endif
#ifdef NEED_STRTOK
extern char *strtok2(char *, char *);
#endif
#ifdef NEED_STRTOKEN
extern char *strtoken(char **, char *, char *);
#endif
#ifdef NEED_INET_ADDR
extern unsigned long inet_addr(char *);
#endif
#if defined(NEED_INET_NTOA) || defined(NEED_INET_NETOF) && !defined(_WIN32)
#include <netinet/in.h>
#endif
#ifdef NEED_INET_NTOA
extern char *inet_ntoa(struct in_addr);
#endif
#ifndef HAVE_INET_NTOP
const char *inet_ntop(int, const void *, char *, size_t);
#endif
#ifndef HAVE_INET_PTON
int inet_pton(int af, const char *src, void *dst);
#endif
extern MODVAR int global_count, max_global_count;
extern char *myctime(time_t);
extern char *strtoken(char **, char *, char *);
#ifdef _WIN32
extern int gettimeofday(struct timeval *tp, void *tzp);
#endif
#define PRECISE_CHECK
@@ -144,19 +113,10 @@ extern char *strtoken(char **, char *, char *);
#endif
extern MODVAR u_char tolowertab[], touppertab[];
#if defined(NICK_GB2312) || defined(NICK_GBK) || defined(NICK_GBK_JAP)
#define USE_LOCALE
#include <ctype.h>
#endif
#ifndef USE_LOCALE
#undef tolower
#define tolower(c) (tolowertab[(u_char)(c)])
#undef toupper
#define toupper(c) (touppertab[(u_char)(c)])
#undef isalpha
#undef isdigit
#undef isxdigit
@@ -169,7 +129,6 @@ extern MODVAR u_char tolowertab[], touppertab[];
#undef isupper
#undef isspace
#undef iscntrl
#endif
extern MODVAR unsigned char char_atribs[];
#define PRINT 1
@@ -189,7 +148,6 @@ extern MODVAR unsigned char char_atribs[];
#endif
#define isallowed(c) (char_atribs[(u_char)(c)]&ALLOW)
#ifndef USE_LOCALE
#define iscntrl(c) (char_atribs[(u_char)(c)]&CNTRL)
#define isalpha(c) (char_atribs[(u_char)(c)]&ALPHA)
#define isspace(c) (char_atribs[(u_char)(c)]&SPACE)
@@ -203,34 +161,8 @@ extern MODVAR unsigned char char_atribs[];
#define isascii(c) ((u_char)(c) >= 0 && (u_char)(c) <= 0x7f)
#define isgraph(c) ((char_atribs[(u_char)(c)]&PRINT) && ((u_char)(c) != 0x32))
#define ispunct(c) (!(char_atribs[(u_char)(c)]&(CNTRL|ALPHA|DIGIT)))
#endif
#define iswseperator(c) (!isalnum(c) && !((u_char)c >= 128))
#ifndef MALLOCD
#define MyFree free
#define MyMalloc malloc
#define MyRealloc realloc
#else
#define MyFree(x) do {debug(DEBUG_MALLOC, "%s:%i: free %02x", __FILE__, __LINE__, x); free(x); } while(0)
#define MyMalloc(x) StsMalloc(x, __FILE__, __LINE__)
#define MyRealloc realloc
static char *StsMalloc(size_t size, char *file, long line)
{
void *x;
x = malloc(size);
debug(DEBUG_MALLOC, "%s:%i: malloc %02x", file, line, x);
return x;
}
#endif
#define safestrdup(x,y) do { if (x) MyFree(x); if (!y) x = NULL; else x = strdup(y); } while(0)
#define safestrldup(x,y,sz) do { if (x) MyFree(x); if (!y) x = NULL; else x = strldup(y,sz); } while(0)
#define safefree(x) do { if (x) MyFree(x); x = NULL; } while(0)
extern struct SLink *find_user_link( /* struct SLink *, struct Client * */ );
/*
* Protocol support text. DO NO CHANGE THIS unless you know what
* you are doing.
@@ -255,23 +187,6 @@ extern struct SLink *find_user_link( /* struct SLink *, struct Client * */ );
#define CHPAR3 "l"
#define CHPAR4 "psmntir"
/* Server-Server PROTOCTL -Stskeeps
* This is the FIRST line only, please check send_proto() for more. -- Syzop
* Also take MAXPARA into account !
*/
#define PROTOCTL_SERVER "NOQUIT" \
" NICKv2" \
" SJOIN" \
" SJOIN2" \
" UMODE2" \
" VL" \
" SJ3" \
" TKLEXT" \
" TKLEXT2" \
" NICKIP" \
" ESVID"
#ifdef _WIN32
/*
* Used to display a string to the GUI interface.
@@ -291,7 +206,7 @@ extern int lu_noninv, lu_inv, lu_serv, lu_oper,
lu_unknown, lu_channel, lu_lu, lu_lulocal, lu_lserv,
lu_clu, lu_mlu, lu_cglobalu, lu_mglobalu;
extern MODVAR TS now;
extern MODVAR time_t now;
#ifndef _WIN32
#if defined(__STDC__)
+59 -239
View File
@@ -68,38 +68,9 @@
# define MODULE_SUFFIX ".dll"
#endif
/*
* If channel mode is +z, only send to secure links & people
*
*/
#undef SECURECHANMSGSONLYGOTOSECURE
/* If you want to support chinese and/or japanese nicks */
#undef NICK_GB2312
#undef NICK_GBK
#undef NICK_GBK_JAP
/* Permit remote /rehash */
#define REMOTE_REHASH
/*
* Special remote include caching, see this Changelog item:
* - Added special caching of remote includes. When a remote include fails to
* load (for example when the webserver is down), then the most recent
* version of that remote include will be used, and the ircd will still boot
* and be able to rehash. Even though this is quite a simple feature, it
* can make a key difference when deciding to roll out remote includes on
* your network. Previously, servers would be unable to boot or rehash when
* the webserver was down, which would be a big problem (often unacceptable).
* The latest version of fetched urls are cached in the cache/ directory as
* cache/<md5 hash of url>.
* Obviously, if there's no 'latest version' and an url fails, the ircd will
* still not be able to boot. This would be the case if you added or changed
* the path of a remote include and it's trying to fetch it for the first time.
* There usually is no reason to disable this.
*/
#define REMOTEINC_SPECIALCACHE
/*
** Freelinks garbage collector -Stskeeps
**
@@ -112,9 +83,6 @@
#define HOW_MANY_FREELINKS_ALLOWED 200 /* default: 200 */
/* NOTE: On some systems, valloc() causes many problems. */
#undef VALLOC /* Define this if you have valloc(3) */
/*
* read/write are restarted after signals defining this 1, gets
* siginterrupt call compiled, which attempts to remove this
@@ -124,19 +92,6 @@
#define RESTARTING_SYSTEMCALLS
#endif
/*
* If your host supports varargs and has vsprintf(), vprintf() and vscanf()
* C calls in its library, then you can define USE_VARARGS to use varargs
* instead of imitation variable arg passing.
*/
#define USE_VARARGS
/* NOTE: with current server code, varargs doesn't survive because it can't
* be used in a chain of 3 or more funtions which all have a variable
* number of params. If anyone has a solution to this, please notify
* the maintainer.
*/
/* DEBUGMODE: This should only be used when tracing a problem. It creates
* an insane amount of log output which can be very useful for debugging.
* You should *NEVER* enable this setting on production servers.
@@ -159,15 +114,6 @@
#define BPATH CONFDIR"/bot.motd" /* Bot MOTD */
#define IRCDTUNE PERMDATADIR"/ircd.tune" /* tuning .. */
/* SHOW_INVISIBLE_LUSERS
*
* As defined this will show the correct invisible count for anyone who does
* LUSERS on your server. On a large net this doesnt mean much, but on a
* small net it might be an advantage to undefine it.
* (This will get defined for you if you're using userload (stats w). -mlv)
*/
#define SHOW_INVISIBLE_LUSERS
/** FAKELAG_CONFIGURABLE makes it possible to make certain classes exempted
* from 'fake lag' (that is, the artificial delay that is added by the ircd
* to prevent flooding, which causes the messages/commands of the user to
@@ -182,29 +128,9 @@
*/
//#undef FAKELAG_CONFIGURABLE
/*
* Max amount of internal send buffering when socket is stuck (bytes)
*/
#ifndef MAXSENDQLENGTH
#define MAXSENDQLENGTH 3000000
#endif
/*
* BUFFERPOOL is the maximum size of the total of all sendq's.
* Recommended value is 2 * MAXSENDQLENGTH, for hubs, 5 *.
*/
#ifndef BUFFERPOOL
#define BUFFERPOOL (18 * MAXSENDQLENGTH)
#endif
/*
* DEFAULT_RECVQ
*
* this controls the number of bytes the server will allow a client to
* send to the server without processing before disconnecting the client for
* flooding it. Values greater than 8000 make no difference to the server.
* NOTE: you can now also set this in class::recvq, if that's not present,
* this default value will be used.
*/
/* The default value for class::sendq */
#define DEFAULT_SENDQ 3000000
/* The default value for class::recvq */
#define DEFAULT_RECVQ 8000
/* You can define the nickname of NickServ here (usually "NickServ").
@@ -215,24 +141,10 @@
*/
#define NickServ "NickServ"
/*
* How many open targets can one nick have for messaging nicks and
* inviting them?
*/
#define MAXTARGETS 20
#define TARGET_DELAY 15
/* STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP */
/* You shouldn't change anything below this line, unless absolutely needed. */
/*
* Port where ircd resides. NOTE: This *MUST* be greater than 1024 if you
* plan to run ircd under any other uid than root.
*/
#define PORTNUM 6667 /* 6667 is default */
/*
* Maximum number of network connections your server will allow.
* On *NIX this is configured via ./Config so don't set it here.
@@ -242,8 +154,36 @@
*
* 2004-10-13: 1024 -> 4096
*/
#ifndef MAXCONNECTIONS
#define MAXCONNECTIONS 10240
#ifdef _WIN32
#define MAXCONNECTIONS 10240
#else
/* Non-Windows: */
#if (!defined(MAXCONNECTIONS_REQUEST) || (MAXCONNECTIONS_REQUEST < 1)) && \
(defined(HAVE_POLL) || defined(HAVE_EPOLL) || defined(HAVE_KQUEUE))
/* Have poll/epoll/kqueue and either no --with-maxconnections or
* --with-maxconnections=0, either of which indicates 'automatic' mode.
* At the time of writing we will try a limit of 16384.
* It will automatically be lowered at boottime if we can only use
* 4096, 2048 or 1024. No problem.
*/
#define MAXCONNECTIONS 16384
#elif defined(MAXCONNECTIONS_REQUEST) && (MAXCONNECTIONS_REQUEST >= 1)
/* --with-maxconnections=something */
#define MAXCONNECTIONS MAXCONNECTIONS_REQUEST
#else
/* Automatic mode, but we only have select(). Bummer... */
#define MAXCONNECTIONS 1024
#endif
#endif
/* Number of file descriptors reserved for non-incoming-clients.
* One of which may be used by auth, the rest are really reserved.
* They can be used for outgoing server links, listeners, logging, etc.
*/
#if MAXCONNECTIONS > 1024
#define CLIENTS_RESERVE 8
#else
#define CLIENTS_RESERVE 4
#endif
/*
@@ -271,20 +211,17 @@
* This means any other events and such may be delayed up to this value
* when there is no socket data waiting for us (no clients sending anything).
* Was 2000ms in 3.2.x, 1000ms for versions below 3.4-alpha4.
* 500ms in UnrealIRCd 4 (?)
* 250ms in UnrealIRCd 5.
*/
#define SOCKETLOOP_MAX_DELAY 500
#define SOCKETLOOP_MAX_DELAY 250
/*
* Max time from the nickname change that still causes KILL
* automaticly to switch for the current nick of that user. (seconds)
*/
#define KILLCHASETIMELIMIT 90 /* Recommended value: 90 */
#define KILLCHASETIMELIMIT 30
/*
* Forces Unreal to use compressed IPv6 addresses rather than expanding them
*/
#undef IPV6_COMPRESSED
/* Detect slow spamfilters? This requires a little more cpu time when processing
* any spamfilter (like on text/connect/..) but will save you from slowing down
* your IRCd to a near-halt (well, in most cases.. there are still cases like when
@@ -295,17 +232,18 @@
#define SPAMFILTER_DETECTSLOW
#endif
/* Use TRE Regex Library (as well) ? */
#define USE_TRE
/* Maximum number of ModData objects that may be attached to an object */
/* UnrealIRCd 4.0.0 - 4.0.13: 8, 8, 4, 4
* UnrealIRCd 4.0.14+ : 12, 8, 4, 4
/* UnrealIRCd 4.0.0 - 4.0.13: 8, 8, 4, 4
* UnrealIRCd 4.0.14+ : 12, 8, 4, 4
* UnrealIRCd 5.0.0 : 12, 8, 8, 4, 4, 500, 500
*/
#define MODDATA_MAX_CLIENT 12
#define MODDATA_MAX_CHANNEL 8
#define MODDATA_MAX_MEMBER 4
#define MODDATA_MAX_MEMBERSHIP 4
#define MODDATA_MAX_CLIENT 12
#define MODDATA_MAX_LOCAL_CLIENT 8
#define MODDATA_MAX_CHANNEL 8
#define MODDATA_MAX_MEMBER 4
#define MODDATA_MAX_MEMBERSHIP 4
#define MODDATA_MAX_LOCAL_VARIABLE 500
#define MODDATA_MAX_GLOBAL_VARIABLE 500
/* If EXPERIMENTAL is #define'd then all users will receive a notice about
* this when they connect, along with a pointer to bugs.unrealircd.org where
@@ -316,7 +254,7 @@
/* Default SSL/TLS cipherlist (except for TLS1.3, see further down).
* This can be changed via set::ssl::options::ciphers in the config file.
*/
#define UNREALIRCD_DEFAULT_CIPHERS "TLS13-CHACHA20-POLY1305-SHA256 TLS13-AES-128-GCM-SHA256 TLS13-AES-256-GCM-SHA384 EECDH+CHACHA20 EECDH+AESGCM EECDH+AES AES128-GCM-SHA256 AES256-GCM-SHA384 AES128-SHA256 AES256-SHA256 AES128-SHA AES256-SHA"
#define UNREALIRCD_DEFAULT_CIPHERS "TLS13-CHACHA20-POLY1305-SHA256 TLS13-AES-256-GCM-SHA384 TLS13-AES-128-GCM-SHA256 EECDH+CHACHA20 EECDH+AESGCM EECDH+AES AES256-GCM-SHA384 AES128-GCM-SHA256 AES256-SHA256 AES128-SHA256 AES256-SHA AES128-SHA"
/* Default TLS 1.3 ciphersuites.
* This can be changed via set::ssl::options::ciphersuites in the config file.
@@ -341,97 +279,14 @@
#define CONFIGFILE CPATH
#define IRCD_PIDFILE PIDFILE
#ifdef __osf__
#define OSF
/* OSF defines BSD to be its version of BSD */
#undef BSD
#include <sys/param.h>
#ifndef BSD
#define BSD
#endif
#endif
#ifdef ultrix
#define ULTRIX
#endif
#ifdef __hpux
#define HPUX
#endif
#ifdef sgi
#define SGI
#endif
#ifndef KLINE_TEMP
#define KLINE_PERM 0
#define KLINE_TEMP 1
#define KLINE_AKILL 2
#define KLINE_EXCEPT 3
#endif
#ifdef DEBUGMODE
#ifndef _WIN32
extern void debug(int, char *, ...);
#define Debug(x) debug x
#define Debug(x) debug x
#define LOGFILE LPATH
#else
extern void debug(int, char *, ...);
#define Debug(x) debug x
#endif
#define LOGFILE LPATH
#else
#define Debug(x) ;
#if VMS
#define LOGFILE "NLA0:"
#else
#define LOGFILE "/dev/null"
#endif
#define Debug(x) ;
#define LOGFILE "/dev/null"
#endif
#if defined(mips) || defined(PCS)
#undef SYSV
#endif
#ifdef MIPS
#undef BSD
#define BSD 1 /* mips only works in bsd43 environment */
#endif
#ifdef BSD_RELIABLE_SIGNALS
# if defined(SYSV_UNRELIABLE_SIGNALS) || defined(POSIX_SIGNALS)
error You stuffed up config.h signals
#define use only one.
# endif
#define HAVE_RELIABLE_SIGNALS
#endif
#ifdef SYSV_UNRELIABLE_SIGNALS
# ifdef POSIX_SIGNALS
error You stuffed up config.h signals
#define use only one.
# endif
#undef HAVE_RELIABLE_SIGNALS
#endif
#ifdef POSIX_SIGNALS
#define HAVE_RELIABLE_SIGNALS
#endif
/*
* safety margin so we can always have one spare fd, for motd/authd or
* whatever else. -4 allows "safety" margin of 1 and space reserved.
*/
#define MAXCLIENTS (MAXCONNECTIONS-4)
#ifdef HAVECURSES
# define DOCURSES
#else
# undef DOCURSES
#endif
#ifdef HAVETERMCAP
# define DOTERMCAP
#else
# undef DOTERMCAP
#endif
# define stricmp strcasecmp
# define strnicmp strncasecmp
#if defined(DEFAULT_RECVQ)
# if (DEFAULT_RECVQ < 512)
error DEFAULT_RECVQ needs redefining.
@@ -442,48 +297,6 @@ error You stuffed up config.h signals
#if (NICKNAMEHISTORYLENGTH < 100)
# define NICKNAMEHISTORYLENGTH 100
#endif
/*
* Some ugliness for AIX platforms.
*/
#ifdef AIX
# include <sys/machine.h>
# if BYTE_ORDER == BIG_ENDIAN
# define BIT_ZERO_ON_LEFT
# endif
# if BYTE_ORDER == LITTLE_ENDIAN
# define BIT_ZERO_ON_RIGHT
# endif
/*
* this one is used later in sys/types.h (or so i believe). -avalon
*/
# define BSD_INCLUDES
#endif
/*
* This is just to make Solaris porting easier -- codemastr
*/
#if defined(SOL20) || defined(SOL25) || defined(SOL26) || defined(SOL27)
#define _SOLARIS
#endif
/*
* Cleaup for WIN32 platform.
*/
#ifdef _WIN32
# undef FORCE_CORE
#endif
#ifdef NEED_BCMP
#define bcmp memcmp
#endif
#ifdef NEED_BCOPY
#define bcopy(a,b,c) memcpy(b,a,c)
#endif
#ifdef NEED_BZERO
#define bzero(a,b) memset(a,0,b)
#endif
#if defined(AIX) && defined(_XOPEN_SOURCE_EXTENDED) && _XOPEN_SOURCE_EXTENDED
# define SOCK_LEN_TYPE size_t
#else
# define SOCK_LEN_TYPE int
#endif
#if defined(__GNUC__) && defined(__GNUC_MINOR__) && \
((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) && \
@@ -503,5 +316,12 @@ error You stuffed up config.h signals
id(void) { __asm__(""); }
#endif
#ifndef __has_feature
#define __has_feature(x) 0 // Compatibility with non-clang compilers.
#endif
#ifndef __has_extension
#define __has_extension __has_feature // Compatibility with pre-3.0 compilers.
#endif
#endif /* __config_include__ */
+1 -1
View File
@@ -45,7 +45,7 @@
*/
typedef struct dbuf {
u_int length; /* Current number of bytes stored */
u_int offset; /* Offset to the first byte */
// u_int offset; /* Offset to the first byte */
struct list_head dbuf_list;
} dbuf;
+8 -18
View File
@@ -1,16 +1,6 @@
/* OMG... OMG! WHAT AN INCLUDE HORROR !!! */
#undef strcasecmp
#undef strncasecmp
#include <ares.h>
#include <ares_version.h>
#undef strcasecmp
#undef strncasecmp
#ifndef GOT_STRCASECMP
#define strcasecmp mycmp
#define strncasecmp myncmp
#endif
typedef enum {
DNSREQ_CLIENT = 1,
@@ -18,25 +8,25 @@ typedef enum {
DNSREQ_CONNECT = 3
} DNSReqType;
typedef struct _dnsreq DNSReq;
typedef struct DNSReq DNSReq;
/* Depending on the request type, some fields are filled in:
* cptr: DNSREQ_CLIENT, DNSREQ_CONNECT
* link: DNSREQ_LINKCONF, DNSREQ_CONNECT
*/
struct _dnsreq {
struct DNSReq {
DNSReq *prev, *next;
char *name; /**< Name being resolved (only for DNSREQ_LINKCONF and DNSREQ_CONNECT) */
char ipv6; /**< Resolving for ipv6 or ipv4? */
DNSReqType type; /**< DNS Request type (DNSREQ_*) */
aClient *cptr; /**< Client the request is for, NULL if client died OR unavailable */
Client *client; /**< Client the request is for, NULL if client died OR unavailable */
ConfigItem_link *linkblock; /**< Linkblock */
};
typedef struct _dnscache DNSCache;
typedef struct DNSCache DNSCache;
struct _dnscache {
struct DNSCache {
DNSCache *prev, *next; /**< Previous and next in linked list */
DNSCache *hprev, *hnext; /**< Previous and next in hash list */
char *name; /**< The hostname */
@@ -44,9 +34,9 @@ struct _dnscache {
time_t expires; /**< When record expires */
};
typedef struct _dnsstats DNSStats;
typedef struct DNSStats DNSStats;
struct _dnsstats {
struct DNSStats {
unsigned int cache_hits;
unsigned int cache_misses;
unsigned int cache_adds;
@@ -76,7 +66,7 @@ extern ares_channel resolver_channel;
extern void init_resolver(int);
struct hostent *unrealdns_doclient(aClient *cptr);
struct hostent *unrealdns_doclient(Client *cptr);
extern void unreal_gethostbyname(const char *name, int family, ares_host_callback callback, void *arg);
+79 -76
View File
@@ -1,6 +1,7 @@
/************************************************************************
* Unreal Internet Relay Chat Daemon, include/dynconf.h
* Copyright (C) 1999 Carsten Munk
* Copyright (C) 1999-2003 Carsten Munk
* Copyright (C) 2003-2021 Bram Matthys
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -21,12 +22,18 @@
#define DYNCONF_H
/* config level */
#define DYNCONF_CONF_VERSION "1.5"
#define DYNCONF_NETWORK_VERSION "2.2"
typedef struct zNetwork aNetwork;
struct zNetwork {
typedef struct FloodSettings FloodSettings;
struct FloodSettings {
FloodSettings *prev, *next;
char *name;
int limit[MAXFLOODOPTIONS];
long period[MAXFLOODOPTIONS];
};
typedef struct NetworkConfiguration NetworkConfiguration;
struct NetworkConfiguration {
unsigned x_inah:1;
char *x_ircnetwork;
char *x_ircnet005;
@@ -47,13 +54,22 @@ struct ChMode {
char *extparams[EXTCMODETABLESZ];
};
typedef struct _OperStat {
struct _OperStat *prev, *next;
typedef struct OperStat {
struct OperStat *prev, *next;
char *flag;
} OperStat;
typedef struct zConfiguration aConfiguration;
struct zConfiguration {
typedef enum BroadcastChannelMessagesOption { BROADCAST_CHANNEL_MESSAGES_AUTO=1, BROADCAST_CHANNEL_MESSAGES_ALWAYS=2, BROADCAST_CHANNEL_MESSAGES_NEVER=3 } BroadcastChannelMessagesOption;
typedef enum AllowedChannelChars { ALLOWED_CHANNELCHARS_ANY=1, ALLOWED_CHANNELCHARS_ASCII=2, ALLOWED_CHANNELCHARS_UTF8=3 } AllowedChannelChars;
typedef enum BanTarget { BAN_TARGET_IP=1, BAN_TARGET_USERIP=2, BAN_TARGET_HOST=3, BAN_TARGET_USERHOST=4, BAN_TARGET_ACCOUNT=5, BAN_TARGET_CERTFP=6 } BanTarget;
typedef enum HideIdleTimePolicy { HIDE_IDLE_TIME_NEVER=1, HIDE_IDLE_TIME_ALWAYS=2, HIDE_IDLE_TIME_USERMODE=3, HIDE_IDLE_TIME_OPER_USERMODE=4 } HideIdleTimePolicy;
/** The set { } block configuration */
typedef struct Configuration Configuration;
struct Configuration {
unsigned som:1;
unsigned hide_ulines:1;
unsigned flat_map:1;
@@ -61,7 +77,7 @@ struct zConfiguration {
unsigned ident_check:1;
unsigned fail_oper_warn:1;
unsigned show_connect_info:1;
unsigned no_connect_ssl_info:1;
unsigned no_connect_tls_info:1;
unsigned dont_resolve:1;
unsigned use_ban_version:1;
unsigned mkpasswd_for_everyone:1;
@@ -80,44 +96,44 @@ struct zConfiguration {
long conn_modes;
long oper_modes;
char *oper_snomask;
char *user_snomask;
char *auto_join_chans;
char *oper_auto_join_chans;
char *oper_only_stats;
OperStat *oper_only_stats_ext;
char *allow_user_stats;
OperStat *allow_user_stats_ext;
int ping_warning;
int maxchannelsperuser;
int maxdccallow;
int anti_spam_quit_message_time;
char *egd_path;
char *static_quit;
char *static_part;
SSLOptions *ssl_options;
PlaintextPolicy plaintext_policy_user;
char *plaintext_policy_user_message;
PlaintextPolicy plaintext_policy_oper;
char *plaintext_policy_oper_message;
PlaintextPolicy plaintext_policy_server;
TLSOptions *tls_options;
Policy plaintext_policy_user;
MultiLine *plaintext_policy_user_message;
Policy plaintext_policy_oper;
MultiLine *plaintext_policy_oper_message;
Policy plaintext_policy_server;
Policy outdated_tls_policy_user;
char *outdated_tls_policy_user_message;
Policy outdated_tls_policy_oper;
char *outdated_tls_policy_oper_message;
Policy outdated_tls_policy_server;
enum UHAllowed userhost_allowed;
char *restrict_usermodes;
char *restrict_channelmodes;
char *restrict_extendedbans;
int new_linking_protocol;
char *channel_command_prefix;
long unknown_flood_bantime;
long unknown_flood_amount;
long handshake_data_flood_amount;
long handshake_data_flood_ban_time;
int handshake_data_flood_ban_action;
struct ChMode modes_on_join;
int level_on_join;
unsigned char away_count;
long away_period;
unsigned char nick_count;
long nick_period;
FloodSettings *floodsettings;
int ident_connect_timeout;
int ident_read_timeout;
long default_bantime;
int who_limit;
int silence_limit;
unsigned char modef_default_unsettime;
unsigned char modef_max_unsettime;
long ban_version_tkl_time;
long spamfilter_ban_time;
char *spamfilter_ban_reason;
@@ -130,42 +146,52 @@ struct zConfiguration {
int spamfilter_stop_on_first_match;
int maxbans;
int maxbanlength;
int timesynch_enabled;
int timesynch_timeout;
char *timesynch_server;
int watch_away_notification;
int uhnames;
aNetwork network;
NetworkConfiguration network;
unsigned short default_ipv6_clone_mask;
int ping_cookie;
int nicklen;
int min_nick_length;
int nick_length;
int topic_length;
int kick_length;
int quit_length;
int away_length;
int hide_list;
int max_unknown_connections_per_ip;
long handshake_timeout;
long sasl_timeout;
long handshake_delay;
int ban_include_username;
char *reject_message_password_mismatch;
BanTarget automatic_ban_target;
BanTarget manual_ban_target;
char *reject_message_too_many_connections;
char *reject_message_server_full;
char *reject_message_unauthorized;
char *reject_message_kline;
char *reject_message_gline;
int topic_setter;
int ban_setter;
int ban_setter_sync;
int part_instead_of_quit_on_comment_change;
BroadcastChannelMessagesOption broadcast_channel_messages;
AllowedChannelChars allowed_channelchars;
HideIdleTimePolicy hide_idle_time;
};
#ifndef DYNCONF_C
extern MODVAR aConfiguration iConf;
extern MODVAR aConfiguration tempiConf;
extern MODVAR Configuration iConf;
extern MODVAR Configuration tempiConf;
extern MODVAR int ipv6_disabled;
#endif
#define KLINE_ADDRESS iConf.kline_address
#define GLINE_ADDRESS iConf.gline_address
#define CONN_MODES iConf.conn_modes
#define OPER_MODES iConf.oper_modes
#define OPER_SNOMASK iConf.oper_snomask
#define CONNECT_SNOMASK iConf.user_snomask
#define SHOWOPERMOTD iConf.som
#define HIDE_ULINES iConf.hide_ulines
#define FLAT_MAP iConf.flat_map
#define ALLOW_CHATOPS iConf.allow_chatops
#define PINGWARNING iConf.ping_warning
#define MAXCHANNELSPERUSER iConf.maxchannelsperuser
#define MAXDCCALLOW iConf.maxdccallow
#define DONT_RESOLVE iConf.dont_resolve
@@ -176,8 +202,8 @@ extern MODVAR int ipv6_disabled;
#define IDENT_CHECK iConf.ident_check
#define FAILOPER_WARN iConf.fail_oper_warn
#define SHOWCONNECTINFO iConf.show_connect_info
#define NOCONNECTSSLINFO iConf.no_connect_ssl_info
#define OPER_ONLY_STATS iConf.oper_only_stats
#define NOCONNECTTLSLINFO iConf.no_connect_tls_info
#define ALLOW_USER_STATS iConf.allow_user_stats
#define ANTI_SPAM_QUIT_MSG_TIME iConf.anti_spam_quit_message_time
#ifdef HAVE_RAND_EGD
#define USE_EGD iConf.use_egd
@@ -203,20 +229,12 @@ extern MODVAR int ipv6_disabled;
#define RESTRICT_USERMODES iConf.restrict_usermodes
#define RESTRICT_CHANNELMODES iConf.restrict_channelmodes
#define RESTRICT_EXTENDEDBANS iConf.restrict_extendedbans
#define NEW_LINKING_PROTOCOL iConf.new_linking_protocol
#define THROTTLING_PERIOD iConf.throttle_period
#define THROTTLING_COUNT iConf.throttle_count
#define USE_BAN_VERSION iConf.use_ban_version
#define UNKNOWN_FLOOD_BANTIME iConf.unknown_flood_bantime
#define UNKNOWN_FLOOD_AMOUNT iConf.unknown_flood_amount
#define MODES_ON_JOIN iConf.modes_on_join.mode
#define LEVEL_ON_JOIN iConf.level_on_join
#define AWAY_PERIOD iConf.away_period
#define AWAY_COUNT iConf.away_count
#define NICK_PERIOD iConf.nick_period
#define NICK_COUNT iConf.nick_count
#define IDENT_CONNECT_TIMEOUT iConf.ident_connect_timeout
#define IDENT_READ_TIMEOUT iConf.ident_read_timeout
@@ -228,9 +246,6 @@ extern MODVAR int ipv6_disabled;
#define DEFAULT_BANTIME iConf.default_bantime
#define WHOLIMIT iConf.who_limit
#define MODEF_DEFAULT_UNSETTIME iConf.modef_default_unsettime
#define MODEF_MAX_UNSETTIME iConf.modef_max_unsettime
#define ALLOW_PART_IF_SHUNNED iConf.allow_part_if_shunned
#define DISABLE_CAP iConf.disable_cap
@@ -254,15 +269,13 @@ extern MODVAR int ipv6_disabled;
#define MAXBANS iConf.maxbans
#define MAXBANLENGTH iConf.maxbanlength
#define TIMESYNCH iConf.timesynch_enabled
#define TIMESYNCH_TIMEOUT iConf.timesynch_timeout
#define TIMESYNCH_SERVER iConf.timesynch_server
#define WATCH_AWAY_NOTIFICATION iConf.watch_away_notification
#define UHNAMES_ENABLED iConf.uhnames
/* Used for "is present?" and duplicate checking */
/** Used for testing the set { } block configuration.
* It tests if a setting is present and is also used for duplicate checking.
*/
struct SetCheck {
unsigned has_show_opermotd:1;
unsigned has_hide_ulines:1;
@@ -274,9 +287,8 @@ struct SetCheck {
unsigned has_dont_resolve:1;
unsigned has_mkpasswd_for_everyone:1;
unsigned has_allow_part_if_shunned:1;
unsigned has_ssl_egd:1;
unsigned has_ssl_server_cipher_list :1;
unsigned has_ssl_protocols :1;
unsigned has_tls_server_cipher_list :1;
unsigned has_tls_protocols :1;
unsigned has_dns_bind_ip:1;
unsigned has_link_bind_ip:1;
unsigned has_throttle_period:1;
@@ -292,7 +304,8 @@ struct SetCheck {
unsigned has_check_target_nick_bans:1;
unsigned has_watch_away_notification:1;
unsigned has_uhnames:1;
unsigned has_oper_only_stats:1;
unsigned has_allow_user_stats:1;
unsigned has_ping_warning:1;
unsigned has_maxchannelsperuser:1;
unsigned has_maxdccallow:1;
unsigned has_anti_spam_quit_message_time:1;
@@ -303,16 +316,9 @@ struct SetCheck {
unsigned has_restrict_usermodes:1;
unsigned has_restrict_channelmodes:1;
unsigned has_restrict_extendedbans:1;
unsigned has_new_linking_protocol:1;
unsigned has_channel_command_prefix:1;
unsigned has_anti_flood_unknown_flood_bantime:1;
unsigned has_anti_flood_unknown_flood_amount:1;
unsigned has_modes_on_join:1;
unsigned has_level_on_join:1;
unsigned has_anti_flood_away_count:1;
unsigned has_anti_flood_away_period:1;
unsigned has_anti_flood_nick_flood:1;
unsigned has_anti_flood_connect_flood:1;
unsigned has_ident_connect_timeout:1;
unsigned has_ident_read_timeout:1;
unsigned has_default_bantime:1;
@@ -320,8 +326,6 @@ struct SetCheck {
unsigned has_maxbans:1;
unsigned has_maxbanlength:1;
unsigned has_silence_limit:1;
unsigned has_modef_default_unsettime:1;
unsigned has_modef_max_unsettime:1;
unsigned has_ban_version_tkl_time:1;
unsigned has_spamfilter_ban_time:1;
unsigned has_spamfilter_ban_reason:1;
@@ -344,15 +348,14 @@ struct SetCheck {
unsigned has_options_fail_oper_warn:1;
unsigned has_options_dont_resolve:1;
unsigned has_options_show_connect_info:1;
unsigned has_options_no_connect_ssl_info:1;
unsigned has_options_no_connect_tls_info:1;
unsigned has_options_mkpasswd_for_everyone:1;
unsigned has_options_allow_insane_bans:1;
unsigned has_options_allow_part_if_shunned:1;
unsigned has_options_disable_cap:1;
unsigned has_options_disable_ipv6:1;
unsigned has_ping_cookie:1;
unsigned has_nicklen:1;
unsigned has_min_nick_length:1;
unsigned has_nick_length:1;
unsigned has_hide_ban_reason:1;
};
-4
View File
@@ -11,9 +11,7 @@ typedef struct fd_entry {
int fd;
char desc[FD_DESC_SZ];
IOCallbackFunc read_callback;
unsigned char read_oneshot;
IOCallbackFunc write_callback;
unsigned char write_oneshot;
void *data;
time_t deadline;
unsigned char is_open;
@@ -33,8 +31,6 @@ extern int fd_fileopen(const char *path, unsigned int flags);
#define FD_SELECT_READ 0x1
#define FD_SELECT_WRITE 0x2
#define FD_SELECT_ONESHOT 0x4
#define FD_SELECT_NOWRITE 0x8
extern void fd_setselect(int fd, int flags, IOCallbackFunc iocb, void *data);
extern void fd_select(time_t delay); /* backend-specific */
+688 -416
View File
File diff suppressed because it is too large Load Diff
-73
View File
@@ -1,73 +0,0 @@
/************************************************************************
* Unreal Internet Relay Chat Daemon, include/hash.h
* Copyright (C) 1991 Darren Reed
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 1, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Id$
*/
#ifndef __hash_include__
#define __hash_include__
typedef struct hashentry {
int hits;
int links;
void *list;
} aHashEntry;
/* Taner had BITS_PER_COL 4 BITS_PER_COL_MASK 0xF - Dianora */
#define BITS_PER_COL 3
#define BITS_PER_COL_MASK 0x7
#define MAX_SUB (1<<BITS_PER_COL)
/* Client hash table
* used in hash.c
*/
#define U_MAX_INITIAL 2048
#define U_MAX_INITIAL_MASK (U_MAX_INITIAL-1)
#define U_MAX (U_MAX_INITIAL*MAX_SUB)
/* Channel hash table
* used in hash.c
*/
#define CH_MAX_INITIAL 2048
#define CH_MAX_INITIAL_MASK (CH_MAX_INITIAL-1)
#define CH_MAX (CH_MAX_INITIAL*MAX_SUB)
/* Who was hash table
* used in whowas.c
*/
#define WW_MAX_INITIAL 16
#define WW_MAX_INITIAL_MASK (WW_MAX_INITIAL-1)
#define WW_MAX (WW_MAX_INITIAL*MAX_SUB)
#define WATCHHASHSIZE 10007 /* prime number */
/*
* Throttling
*/
#define THROTTLING_HASH_SIZE 1019 /* prime number */
#define NullChn ((aChannel *)0)
#define find_channel hash_find_channel
#endif /* __hash_include__ */
-62
View File
@@ -1,62 +0,0 @@
/*
* Copyright (c) 1983 Regents of the University of California.
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted
* provided that: (1) source distributions retain this entire copyright
* notice and comment, and (2) distributions including binaries display
* the following acknowledgement: ``This product includes software
* developed by the University of California, Berkeley and its contributors''
* in the documentation or other materials provided with the distribution
* and in all advertising materials mentioning features or use of this
* software. Neither the name of the University nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* $Id$
*
* @(#)inet.h 5.4 (Berkeley) 6/1/90
*/
/* External definitions for functions in inet(3) */
#include "config.h" /* for system definitions */
#ifdef __alpha
#define __u_l unsigned int
#else
#define __u_l unsigned long
#endif
extern int inet_pton(int af, const char *src, void *dst);
extern const char *inet_ntop(int af, const void *src, char *dst, size_t cnt);
#ifdef __STDC__
# ifndef _WIN32
extern __u_l inet_addr(char *);
extern char *inet_ntoa(struct in_addr);
extern int inet_aton(const char *, struct in_addr *);
# endif
extern __u_l inet_makeaddr(int, int);
extern __u_l inet_network(char *);
extern __u_l inet_lnaof(struct in_addr);
#else
# ifndef _WIN32
extern __u_l inet_addr();
extern char *inet_ntoa();
# endif
#ifndef HPUX
extern __u_l inet_makeaddr();
#endif
#endif
#ifndef HPUX
extern __u_l inet_network();
extern __u_l inet_lnaof();
#endif
#undef __u_l
#ifndef INADDR_NONE
#define INADDR_NONE 0xffffffff
#endif

Some files were not shown because too many files have changed in this diff Show More