Merge branch 'unreal60_dev' into piss60

piss60
Ron Nazarov 3 months ago
commit 8587105cf2
Signed by: noisytoot
GPG Key ID: 1D43EF4F4492268B

@ -379,6 +379,7 @@ DLL_FILES=\
src/modules/time.dll \
src/modules/tkl.dll \
src/modules/tkldb.dll \
src/modules/tline.dll \
src/modules/tls_antidos.dll \
src/modules/tls_cipher.dll \
src/modules/topic.dll \
@ -1224,6 +1225,9 @@ src/modules/tkl.dll: src/modules/tkl.c $(INCLUDES)
src/modules/tkldb.dll: src/modules/tkldb.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/tkldb.c /Fesrc/modules/ /Fosrc/modules/ /Fdsrc/modules/tkldb.pdb $(MODLFLAGS)
src/modules/tline.dll: src/modules/tline.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/tline.c /Fesrc/modules/ /Fosrc/modules/ /Fdsrc/modules/tline.pdb $(MODLFLAGS)
src/modules/tls_antidos.dll: src/modules/tls_antidos.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/tls_antidos.c /Fesrc/modules/ /Fosrc/modules/ /Fdsrc/modules/tls_antidos.pdb $(MODLFLAGS)

@ -4,8 +4,30 @@ This is work in progress. Current git is NOT stable.
If you want a stable IRCd, download 6.0.4 or upgrade to it via `./unrealircd upgrade`
### Enhancements:
* Internally the websocket module has been split up into `websocket_common`,
`webserver` and `websocket`. The websocket_common one is loaded through
modules.default.conf. Important: if you use websockets then you need to
load two modules now (and not just one):
```
loadmodule "websocket";
loadmodule "webserver";
```
* [JSON-RPC](https://www.unrealircd.org/docs/JSON-RPC) API for UnrealIRCd.
This is work in progress, only listing users and channels at the moment.
This is work in progress.
UnrealIRCd 6.0.4.2
-------------------
Another small update to 6.0.4.x:
* Fix crash when linking. This requires a certain sequence of events: first
a server is linked in successfully, then we need to REHASH, and then a new
link attempt has to come in with the same server name (for example because
there is a network issue and the old link has not timed out yet).
If all that happens, then an UnreaIRCd 6 server may crash, but not always.
* Two IRCv3 specifications were ratified which we already supported as drafts:
* Change CAP `draft/extended-monitor` to `extended-monitor`
* Add message-tag `bot` next to existing (for now) `draft/bot`
* Update Turkish translations
UnrealIRCd 6.0.4.1
-------------------

@ -59,12 +59,12 @@ help Opercmds {
" ADDOMOTD GLINE OPERMOTD SPAMFILTER";
" GLOBOPS REHASH SQUIT";
" CHGHOST GZLINE RESTART TEMPSHUN";
" CHGIDENT KILL TRACE";
" CHGNAME KLINE SAJOIN TSCTL";
" CLOSE LAG SAMODE UNDCCDENY";
" CONNECT LOCOPS SAPART WALLOPS";
" DCCDENY MKPASSWD SDESC ZLINE";
" DIE MODULE SETHOST";
" CHGIDENT KILL TLINE";
" CHGNAME KLINE SAJOIN TRACE";
" CLOSE LAG SAMODE TSCTL";
" CONNECT LOCOPS SAPART UNDCCDENY";
" DCCDENY MKPASSWD SDESC WALLOPS";
" DIE MODULE SETHOST ZLINE";
" ==-------------------------oOo-------------------------==";
}
@ -1000,6 +1000,21 @@ help Eline {
" S - SSL/TLS client certificate fingerprint";
}
help Tline {
" Shows number of clients matching a server ban mask.";
" IRC Operator only command.";
" Syntax: TLINE <nick!user@host>";
" Example: TLINE *!*@127.0.0.0/8";
" -";
" Extended server bans (more info at https://www.unrealircd.org/docs/Extended_server_bans)";
" Syntax: TLINE ~<flag>:<mask>";
" Example: TLINE ~a:0";
" Supported <flags> are:";
" a - Services account name";
" r - gecos/realname string";
" S - SSL/TLS client certificate fingerprint";
}
help Rehash {
" Prompts the server to reread the configuration files.";
" IRC Operator only command.";

@ -99,6 +99,7 @@ loadmodule "sethost";
loadmodule "setident";
loadmodule "stats";
loadmodule "tkl"; /* also server-to-server */
loadmodule "tline";
loadmodule "trace";
loadmodule "tsctl";
loadmodule "unsqline";

@ -80,7 +80,7 @@ MODULES= \
monitor.so slog.so tls_cipher.so operinfo.so creationtime.so \
unreal_server_compat.so \
extended-monitor.so geoip_csv.so \
geoip_base.so extjwt.so \
geoip_base.so extjwt.so tline.so \
$(GEOIP_CLASSIC_OBJECTS) $(GEOIP_MAXMIND_OBJECTS)
MODULEFLAGS=@MODULEFLAGS@

@ -785,12 +785,15 @@ void blacklist_hit(Client *client, Blacklist *bl, int reply)
value[0] = GetIP(client);
name[1] = "server";
value[1] = me.name;
name[2] = "name";
value[2] = bl->backend->dns->name;
name[3] = "reply";
value[3] = reply_num;
name[4] = NULL;
value[4] = NULL;
name[2] = "blacklist";
value[2] = bl->name;
name[3] = "dnsname";
value[3] = bl->backend->dns->name;
name[4] = "dnsreply";
value[4] = reply_num;
name[5] = NULL;
value[5] = NULL;
/* when adding more, be sure to update the array elements number in the definition of const char *name[] and value[] */
buildvarstring(bl->reason, banbuf, sizeof(banbuf), name, value);

@ -0,0 +1,87 @@
/*
* IRC - Internet Relay Chat, src/modules/tline.c
* (C) 2022 Noisytoot & The UnrealIRCd Team
*
* See file AUTHORS in IRC package for additional names of
* the programmers.
*
* 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.
*/
#include "unrealircd.h"
#define MSG_TLINE "TLINE"
CMD_FUNC(cmd_tline);
ModuleHeader MOD_HEADER
= {
"tline",
"1.0",
"TLINE command to show amount of clients matching a server ban mask",
"UnrealIRCd team",
"unrealircd-6",
};
MOD_INIT()
{
CommandAdd(modinfo->handle, MSG_TLINE, cmd_tline, 1, CMD_OPER);
MARK_AS_OFFICIAL_MODULE(modinfo);
return MOD_SUCCESS;
}
MOD_LOAD()
{
return MOD_SUCCESS;
}
MOD_UNLOAD()
{
return MOD_SUCCESS;
}
/*
** cmd_tline
** parv[1] = mask to test
*/
CMD_FUNC(cmd_tline)
{
Client *acptr;
int matching_lclients = 0;
int matching_clients = 0;
if ((parc < 1) || BadPtr(parv[1]))
{
sendnumeric(client, ERR_NEEDMOREPARAMS, MSG_TLINE);
return;
}
list_for_each_entry(acptr, &client_list, client_node)
{
if (match_user(parv[1], acptr, MATCH_CHECK_REAL))
{
if (MyUser(acptr))
matching_lclients++;
matching_clients++;
}
}
sendnotice(client,
"*** TLINE: Users matching mask '%s': global: %d/%d (%.2f%%), local: %d/%d (%.2f%%).",
parv[1], matching_clients, irccounts.clients,
(double)matching_clients / irccounts.clients * 100,
matching_lclients, irccounts.me_clients,
(double)matching_lclients / irccounts.me_clients * 100);
}
Loading…
Cancel
Save