Showing with 1,918 additions and 2,199 deletions.
  1. +3 −1 .travis.yml
  2. +9 −0 NEWS
  3. +11 −11 configure
  4. +2 −2 configure.ac
  5. +1 −0 doc/modes.txt
  6. +2 −0 help/cmode
  7. +2 −0 help/extban
  8. +6 −5 include/channel.h
  9. +2 −1 include/channel_mode.h
  10. +2 −1 include/client.h
  11. +0 −2 include/defaults.h
  12. +1 −0 include/extban.h
  13. +1 −0 include/numeric.h
  14. +20 −19 include/parse.h
  15. +1 −1 include/patchlevel.h
  16. +1 −1 include/server.h
  17. +1 −1 include/whowas.h
  18. +3 −0 modules/Makefile.am
  19. +50 −32 modules/Makefile.in
  20. +8 −10 modules/core/m_bmask.c
  21. +5 −12 modules/core/m_die.c
  22. +7 −8 modules/core/m_error.c
  23. +39 −156 modules/core/m_join.c
  24. +10 −24 modules/core/m_kick.c
  25. +5 −19 modules/core/m_kill.c
  26. +13 −16 modules/core/m_message.c
  27. +11 −20 modules/core/m_mode.c
  28. +14 −23 modules/core/m_nick.c
  29. +6 −12 modules/core/m_part.c
  30. +5 −6 modules/core/m_quit.c
  31. +35 −46 modules/core/m_server.c
  32. +89 −162 modules/core/m_sjoin.c
  33. +9 −19 modules/core/m_squit.c
  34. +5 −7 modules/core/m_tmode.c
  35. +13 −19 modules/extra/m_opme.c
  36. +5 −6 modules/m_accept.c
  37. +7 −8 modules/m_admin.c
  38. +5 −6 modules/m_away.c
  39. +6 −16 modules/m_cap.c
  40. +5 −7 modules/m_capab.c
  41. +8 −10 modules/m_certfp.c
  42. +8 −11 modules/m_close.c
  43. +7 −21 modules/m_connect.c
  44. +5 −10 modules/m_dline.c
  45. +19 −23 modules/m_encap.c
  46. +5 −6 modules/m_eob.c
  47. +7 −8 modules/m_etrace.c
  48. +5 −16 modules/m_globops.c
  49. +5 −6 modules/m_hash.c
  50. +5 −6 modules/m_help.c
  51. +7 −8 modules/m_info.c
  52. +8 −13 modules/m_invite.c
  53. +5 −7 modules/m_ison.c
  54. +5 −10 modules/m_kline.c
  55. +12 −14 modules/m_knock.c
  56. +11 −10 modules/m_links.c
  57. +5 −6 modules/m_list.c
  58. +5 −16 modules/m_locops.c
  59. +7 −8 modules/m_lusers.c
  60. +5 −6 modules/m_map.c
  61. +90 −0 modules/m_metadata.c
  62. +5 −13 modules/m_module.c
  63. +7 −8 modules/m_motd.c
  64. +6 −7 modules/m_names.c
  65. +24 −35 modules/m_oper.c
  66. +5 −13 modules/m_pass.c
  67. +7 −8 modules/m_ping.c
  68. +6 −7 modules/m_pong.c
  69. +15 −18 modules/m_post.c
  70. +5 −13 modules/m_rehash.c
  71. +5 −12 modules/m_restart.c
  72. +5 −10 modules/m_resv.c
  73. +16 −12 modules/m_set.c
  74. +10 −22 modules/m_stats.c
  75. +5 −7 modules/m_svinfo.c
  76. +8 −9 modules/m_svshost.c
  77. +5 −10 modules/m_svsjoin.c
  78. +5 −7 modules/m_svskill.c
  79. +5 −7 modules/m_svsmode.c
  80. +7 −9 modules/m_svsnick.c
  81. +5 −10 modules/m_svspart.c
  82. +5 −7 modules/m_svstag.c
  83. +5 −7 modules/m_tburst.c
  84. +7 −8 modules/m_time.c
  85. +8 −24 modules/m_topic.c
  86. +7 −8 modules/m_trace.c
  87. +5 −16 modules/m_undline.c
  88. +5 −16 modules/m_unkline.c
  89. +5 −11 modules/m_unresv.c
  90. +5 −11 modules/m_unxline.c
  91. +5 −13 modules/m_user.c
  92. +5 −7 modules/m_userhost.c
  93. +7 −8 modules/m_version.c
  94. +5 −16 modules/m_wallops.c
  95. +5 −6 modules/m_watch.c
  96. +15 −14 modules/m_webirc.c
  97. +9 −10 modules/m_who.c
  98. +61 −53 modules/m_whois.c
  99. +13 −14 modules/m_whowas.c
  100. +5 −10 modules/m_xline.c
  101. +1 −0 src/Makefile.am
  102. +23 −18 src/Makefile.in
  103. +0 −2 src/auth.c
  104. +126 −65 src/channel.c
  105. +9 −6 src/channel_mode.c
  106. +3 −2 src/client.c
  107. +4 −1 src/conf.c
  108. +0 −1 src/conf_class.c
  109. +502 −503 src/conf_parser.c
  110. +0 −1 src/conf_parser.y
  111. +5 −7 src/conf_pseudo.c
  112. +1 −0 src/extban.c
  113. +5 −1 src/extban_channel.c
  114. +2 −2 src/extban_fingerprint.c
  115. +53 −0 src/extban_tlsinfo.c
  116. +3 −2 src/hash.c
  117. +5 −4 src/numeric.c
  118. +6 −6 src/packet.c
  119. +45 −44 src/parse.c
  120. +9 −14 src/s_bsd.c
  121. +62 −74 src/send.c
  122. +14 −14 src/server.c
  123. +9 −9 src/tls_gnutls.c
  124. +16 −12 src/tls_openssl.c
  125. +10 −10 src/tls_wolfssl.c
  126. +7 −5 src/user.c
  127. +6 −6 src/whowas.c
@@ -97,5 +97,7 @@ notifications:
- bugs@ircd-hybrid.org
irc:
channels:
- "irc.ircd-hybrid.org#ircd-coders"
- "irc.ircd-hybrid.org#ircd-coders"
on_success: change
on_failure: always
skip_join: true
9 NEWS
@@ -1,3 +1,12 @@
-- Noteworthy changes in version 8.2.32 (2020-08-16)
o) RESV couldn't be issued in case no reason has been supplied. This has been fixed.
o) Fixed possible RPL_WHOISCHANNELS line truncation of remote replies
o) Extban $t of type 'matching' has been implemented. This extban allows matching
based on TLS protocol version and/or cipher suite
o) Implemented channel mode 'K'. KNOCK cannot be used on channels with that mode set
o) "STATS ?" is now oper-only


-- Noteworthy changes in version 8.2.31 (2020-05-03)
o) macOS compatibility fixes
o) Removed 'spoof_notice' from auth::flags. With vhosts now this notice doesn't make
@@ -1,7 +1,7 @@
#! /bin/sh
# From configure.ac Id: configure.ac 9330 2020-04-11 12:55:09Z michael .
# From configure.ac Id: configure.ac 9366 2020-05-01 08:08:54Z michael .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for ircd-hybrid 8.2.31.
# Generated by GNU Autoconf 2.69 for ircd-hybrid 8.2.32.
#
# Report bugs to <bugs@ircd-hybrid.org>.
#
@@ -593,8 +593,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='ircd-hybrid'
PACKAGE_TARNAME='ircd-hybrid'
PACKAGE_VERSION='8.2.31'
PACKAGE_STRING='ircd-hybrid 8.2.31'
PACKAGE_VERSION='8.2.32'
PACKAGE_STRING='ircd-hybrid 8.2.32'
PACKAGE_BUGREPORT='bugs@ircd-hybrid.org'
PACKAGE_URL=''

@@ -1378,7 +1378,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures ircd-hybrid 8.2.31 to adapt to many kinds of systems.
\`configure' configures ircd-hybrid 8.2.32 to adapt to many kinds of systems.

Usage: $0 [OPTION]... [VAR=VALUE]...

@@ -1449,7 +1449,7 @@ fi

if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of ircd-hybrid 8.2.31:";;
short | recursive ) echo "Configuration of ircd-hybrid 8.2.32:";;
esac
cat <<\_ACEOF

@@ -1583,7 +1583,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
ircd-hybrid configure 8.2.31
ircd-hybrid configure 8.2.32
generated by GNU Autoconf 2.69

Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2052,7 +2052,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by ircd-hybrid $as_me 8.2.31, which was
It was created by ircd-hybrid $as_me 8.2.32, which was
generated by GNU Autoconf 2.69. Invocation command line was

$ $0 $@
@@ -2922,7 +2922,7 @@ fi

# Define the identity of the package.
PACKAGE='ircd-hybrid'
VERSION='8.2.31'
VERSION='8.2.32'


cat >>confdefs.h <<_ACEOF
@@ -17750,7 +17750,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by ircd-hybrid $as_me 8.2.31, which was
This file was extended by ircd-hybrid $as_me 8.2.32, which was
generated by GNU Autoconf 2.69. Invocation command line was

CONFIG_FILES = $CONFIG_FILES
@@ -17816,7 +17816,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
ircd-hybrid config.status 8.2.31
ircd-hybrid config.status 8.2.32
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"

@@ -3,11 +3,11 @@ dnl Process this file with autoconf to produce a configure script.
AC_REVISION([$Id$])

AC_PREREQ(2.69)
AC_INIT([ircd-hybrid], [8.2.31], [bugs@ircd-hybrid.org])
AC_INIT([ircd-hybrid], [8.2.32], [bugs@ircd-hybrid.org])
AM_INIT_AUTOMAKE(1.15 subdir-objects)
AM_MAINTAINER_MODE
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADER(config.h)
AC_CONFIG_HEADERS(config.h)
AC_CONFIG_SRCDIR(src/ircd.c)

# Checks for programs.
@@ -55,6 +55,7 @@ Channel Modes:
+k - key - Key/password for the channel
+l - limit - Limit the number of users in a channel
+m - moderated - Users without +v/h/o cannot send text to the channel
+K - noknock - KNOCK cannot be used on the channel
+L - extlimit - Channel can make use of the extended ban list limit. Can be set only by irc-operators,
servers and services.
+M - modreg - Unregistered/unidentified clients cannot send text to the channel
@@ -41,6 +41,8 @@ NO PARAMETERS:

+C - 'No CTCPs'. Prevent users from sending CTCPs to the channel.

+K - 'No KNOCK'. KNOCK cannot be used on the channel.

+L - 'Large ban list'. Channel can make use of the extended ban list
limit. Can be set only by irc-operators, servers and services.

@@ -21,6 +21,8 @@ Matching extbans:

$s:<server> Matches users that are connected to a server matching the mask.

$t:<tlsinfo> Matches users based on TLS protocol version and/or cipher suite.

$u:<modes> Matches users having the specified user modes set or not set.

$z:<certfp> Matches users having the given TLS certificate fingerprint.
@@ -30,7 +30,6 @@
#include "ircd_defs.h" /* KEYLEN, CHANNELLEN */
#include "extban.h"

#define IsMember(who, chan) ((find_channel_link(who, chan)) ? 1 : 0)
#define AddMemberFlag(x, y) ((x)->flags |= (y))
#define DelMemberFlag(x, y) ((x)->flags &= ~(y))

@@ -140,15 +139,17 @@ extern void channel_do_part(struct Client *, char *, const char *);
extern void remove_ban(struct Ban *, dlink_list *);
extern void add_user_to_channel(struct Channel *, struct Client *, unsigned int, bool);
extern void remove_user_from_channel(struct ChannelMember *);
extern void channel_member_names(struct Client *, struct Channel *, bool);
extern void channel_demote_members(struct Channel *, const struct Client *, unsigned int, const char);
extern void channel_send_namereply(struct Client *, struct Channel *);
extern void channel_send_modes(struct Client *, const struct Channel *);
extern void channel_modes(const struct Channel *, const struct Client *, char *, char *);
extern void channel_modes(const struct Channel *, const struct Client *, const struct ChannelMember *, char *, char *);
extern void check_spambot_warning(struct Client *, const char *);
extern void channel_free(struct Channel *);
extern void channel_set_topic(struct Channel *, const char *, const char *, uintmax_t, bool);

extern const char *get_member_status(const struct ChannelMember *, bool);
extern const char *member_get_prefix(const struct ChannelMember *, bool);
extern size_t member_get_prefix_len(const struct ChannelMember *, bool);

extern struct Channel *channel_make(const char *);
extern struct ChannelMember *find_channel_link(const struct Client *, const struct Channel *);
extern struct ChannelMember *member_find_link(const struct Client *, const struct Channel *);
#endif /* INCLUDED_channel_h */
@@ -86,7 +86,8 @@ enum
MODE_NONOTICE = 1 << 13, /**< Clients cannot send NOTICE to the channel */
MODE_HIDEBMASKS = 1 << 14, /**< Hides +b/+e/+I lists/changes for non-chanops everywhere */
MODE_EXTLIMIT = 1 << 15, /**< Channel can make use of the extended ban list limit */
MODE_NONICKCHANGE = 1 << 16 /**< User is prevented from changing their nick while in this channel */
MODE_NONICKCHANGE = 1 << 16, /**< User is prevented from changing their nick while in this channel */
MODE_NOKNOCK = 1 << 17 /**< Clients may not use KNOCK on this channel */
};

#define HasCMode(x, y) ((x)->mode.mode & (y))
@@ -376,7 +376,8 @@ struct Client

struct irc_ssaddr ip; /**< Real IP address */

char *certfp; /**< TLS certificate fingerprint */
char *tls_certfp; /**< TLS certificate fingerprint */
char *tls_cipher; /**< Exact copy of tls_get_cipher() */

char away[AWAYLEN + 1]; /**< Client's AWAY message. Can be set/unset via AWAY command */
char name[HOSTLEN + 1]; /**< Unique name for a client nick or host */
@@ -102,8 +102,6 @@
#define NETWORK_DESC_DEFAULT "2600net IRC Network" /* default for network_desc */

/* General defaults */
#define MAXIMUM_LINKS_DEFAULT 0 /* default for maximum_links */

#define LINKS_DELAY_DEFAULT 300

#define MAX_TARGETS_DEFAULT 4 /* default for max_targets */
@@ -89,5 +89,6 @@ extern struct Extban extban_mute;
extern struct Extban extban_nick;
extern struct Extban extban_operclass;
extern struct Extban extban_server;
extern struct Extban extban_tlsinfo;
extern struct Extban extban_usermode;
#endif /* INCLUDED_extban_h */
@@ -204,6 +204,7 @@ enum irc_numerics
ERR_NEEDREGGEDNICK = 477,
ERR_BANLISTFULL = 478,
ERR_BADCHANNAME = 479,
ERR_CANNOTKNOCK = 480,
ERR_NOPRIVILEGES = 481,
ERR_CHANOPRIVSNEEDED = 482,
ERR_CANTKILLSERVER = 483,
@@ -52,6 +52,9 @@ struct Client;
* non-NULL pointers.
*/

/** See 2.3 Messages in RFC1459 */
enum { MAXPARA = 15 };

/*
* MessageHandler
*/
@@ -65,35 +68,33 @@ typedef enum HandlerType
LAST_HANDLER_TYPE
} HandlerType;

struct MessageHandler
{
bool end_grace_period; /**< Handler ends the flood grace period */
bool empty_last_arg; /**< Last argument is allowed to be empty / NUL */
unsigned int args_min; /**< At least this many args must be passed or an error will
be sent to the user before the m_func is even called */
unsigned int args_max; /**< Maximum permitted parameters. If reached, the rest
of the message will be put into this last parameter */
void (*handler)(struct Client *, int, char *[]);
};

/*
* Message table structure
*/
struct Message
{
const char *cmd;
const char *cmd; /**< The actual command string */
void *extra;
unsigned int count; /* number of times command used */
unsigned int rcount; /* number of times command used by server */
unsigned int args_min; /* at least this many args must be passed
* or an error will be sent to the user
* before the m_func is even called
*/
unsigned int args_max; /* maximum permitted parameters */
unsigned int flags;
uintmax_t bytes; /* bytes received for this message */
unsigned int count; /**< Number of times command used */
unsigned int rcount; /**< Number of times command used by server */
unsigned int ecount; /**< Number of times command has been issued via ENCAP */
uintmax_t bytes; /**< Bytes received for this message */

/* handlers:
* UNREGISTERED, CLIENT, SERVER, ENCAP, OPER, LAST
*/
void (*handlers[LAST_HANDLER_TYPE])(struct Client *, int, char *[]);
};

#define MAXPARA 15

enum
{
MFLG_EXTRA = 1 << 0,
MFLG_ENDGRACE = 1 << 1
struct MessageHandler handlers[LAST_HANDLER_TYPE];
};

extern void parse(struct Client *, char *, char *);
@@ -25,5 +25,5 @@
*/

#ifndef PATCHLEVEL
#define PATCHLEVEL "hybrid-8.2.31"
#define PATCHLEVEL "hybrid-8.2.32"
#endif
@@ -47,7 +47,7 @@ struct server_hunt
};

extern bool server_valid_name(const char *);
extern const struct server_hunt *server_hunt(struct Client *, const char *, const int, const int, char *[]);
extern const struct server_hunt *server_hunt(struct Client *, const char *, const int, char *[]);
extern void write_links_file(void *);
extern void read_links_file(void);
extern void try_connections(void *);
@@ -47,7 +47,7 @@ struct Whowas
char sockhost[HOSTIPLEN + 1]; /**< Client's IP address as string */
char realname[REALLEN + 1]; /**< Client's real name/gecos */
char servername[HOSTLEN + 1]; /**< Name of the server the client is using */
struct Client *online; /**< Pointer to new nick name for chasing or NULL */
struct Client *client; /**< Pointer to new nick name for chasing or NULL */
};

extern const dlink_list *whowas_get_hash(unsigned int);
@@ -30,6 +30,7 @@ modules_LTLIBRARIES = m_accept.la \
m_locops.la \
m_lusers.la \
m_map.la \
m_metadata.la \
m_module.la \
m_motd.la \
m_names.la \
@@ -96,6 +97,7 @@ m_list_la_LDFLAGS = $(MODULE_FLAGS)
m_locops_la_LDFLAGS = $(MODULE_FLAGS)
m_lusers_la_LDFLAGS = $(MODULE_FLAGS)
m_map_la_LDFLAGS = $(MODULE_FLAGS)
m_metadata_la_LDFLAGS = $(MODULE_FLAGS)
m_module_la_LDFLAGS = $(MODULE_FLAGS)
m_motd_la_LDFLAGS = $(MODULE_FLAGS)
m_names_la_LDFLAGS = $(MODULE_FLAGS)
@@ -161,6 +163,7 @@ m_list_la_SOURCES = m_list.c
m_locops_la_SOURCES = m_locops.c
m_lusers_la_SOURCES = m_lusers.c
m_map_la_SOURCES = m_map.c
m_metadata_la_SOURCES = m_metadata.c
m_module_la_SOURCES = m_module.c
m_motd_la_SOURCES = m_motd.c
m_names_la_SOURCES = m_names.c