Commit Graph

855 Commits

Author SHA1 Message Date
William Pitcock be29ec793d ircd: import hidden channel modes framework, from ircd-seven
This allows for modules to define channel modes which are only visible to opers.
2016-01-13 16:34:27 -06:00
William Pitcock 15feac531c ircd: implement support for remote module load/unload/etc commands 2016-01-12 00:37:54 -06:00
William Pitcock cc7ae51cdc Allow remote DIE and RESTART (from ircd-seven) 2016-01-12 00:04:54 -06:00
William Pitcock a4721f5e9f ircd: implement EXTENDCHANS, based on ircd-seven (with some improvements from chatircd) 2016-01-11 23:32:23 -06:00
William Pitcock fe749d3709 ircd: implement GRANT subsystem based on ircd-seven 2016-01-11 23:02:03 -06:00
William Pitcock b870a5f8e9 extensions/override: display mode-change string in override messages 2016-01-11 22:40:32 -06:00
William Pitcock 7abb4a4f0d parse: add missing semicolon 2016-01-11 22:31:19 -06:00
William Pitcock e4603e3d27 parse: implement reconstruct_parv() 2016-01-11 22:28:55 -06:00
William Pitcock 9b74b99268 ircd: hash: channels are no longer a hashtable 2016-01-09 23:47:50 -06:00
William Pitcock 730b914c17 LIST: more cleanups 2016-01-09 23:34:52 -06:00
William Pitcock 9a5958119c ircd: rework sendq limits a bit.
The sendq limit is now soft, now we halt processing if a sendq is exceeded, until it is sufficiently drained.
This allows us to implement SAFELIST and other floody commands without hacks.
2016-01-09 23:14:04 -06:00
William Pitcock bb4ac31447 ircd: hash: use an irc_radixtree for client names 2016-01-09 05:30:13 -06:00
William Pitcock 3eeccbe3ce ircd: hash: use an irc_radixtree for IDs 2016-01-09 05:13:10 -06:00
William Pitcock 46be39faab ircd: hash: use an irc_radixtree for storing resv's 2016-01-09 04:59:02 -06:00
William Pitcock 5c7c7d65c2 ircd: hash: client connection id hashtables are now dictionaries keyed by uint32 2016-01-09 04:25:41 -06:00
William Pitcock 45dfdf46c8 ircd: irc_dictionary: allow storage of non-string types as keys 2016-01-09 04:09:40 -06:00
William Pitcock 21d5a11cb8 ircd: irc_dictionary: also show dictionary stats 2016-01-09 01:34:37 -06:00
William Pitcock 99b461bb2f ircd: ensure irc_dictionary users have names, for stats tracking. 2016-01-09 01:22:11 -06:00
William Pitcock db891ac3ca ircd: irc_radixtree: add irc_radixtree_irccasecanon and irc_radixtree_strcasecanon helpers 2016-01-09 01:00:55 -06:00
William Pitcock 325cc939b7 ircd: irc_radixtree: add some convenience functions for tracking radix tree stats 2016-01-09 00:54:57 -06:00
William Pitcock 8e6ba6f9ce ircd: add irc_radixtree, which is like irc_dictionary but uses a radix tree as the backing store 2016-01-09 00:44:39 -06:00
William Pitcock e575ed5193 libratbox: disable the block allocator, but keep it as a stub for now 2016-01-08 07:16:23 -06:00
William Pitcock 1eeb046930 ircd: remove internal resolver, no longer used 2016-01-08 06:39:51 -06:00
William Pitcock 1d02144f8b ircd: move DNS resolution over to authd 2016-01-08 06:31:08 -06:00
Aaron Jones d8c4154da2 Fix LTDL conditional, remove some unnecessary and/or ugly configure tests 2016-01-07 17:15:55 +00:00
William Pitcock fb7d74efef ircd/authd: split out authd lifecycle functions from actual DNS functions 2016-01-06 04:41:57 -06:00
William Pitcock 7d2852b4d1 dns: new WIP client which queries authd for DNS records, not yet in use 2016-01-06 04:28:34 -06:00
William Pitcock d610d3f344 config.h: fix SPATH 2016-01-06 02:00:12 -06:00
William Pitcock 2a19fc3f57 general: remove last vestiges of static modules support (this hasn't ever actually worked...) 2016-01-06 01:28:20 -06:00
William Pitcock f272e7abc7 modules: use libltdl to load the modules 2016-01-05 21:39:09 -06:00
William Pitcock c52df12552 buildsystem: convert to automake + libtool 2016-01-05 21:20:25 -06:00
William Pitcock 9e07c8f70b whois: add a hook allowing for ShowChannel() behaviour to be overridden for channel visibility 2016-01-05 18:45:07 -06:00
Juuso Lapinlampi 6eb0267a90 messages.h: Remove 900-902 IRCv3.1 SASL trailing period
The IRCv3.1 SASL specification [1] has been updated today, and brings a
level of consistency with the trailing periods (or the lack of).

This implements the change made in
ircv3/ircv3-specifications@6d2ca77ffd.

[1]: http://ircv3.net/specs/extensions/sasl-3.1.html
2015-12-30 12:51:48 +02:00
Juuso Lapinlampi e0160ec5a4 messages.h: Standardize 256 (RPL_ADMINME) with RFC 1459
RPL_ADMINME is a response the client receives using the ADMIN command.
Charybdis used to implement a non-standard version of this.

The RFC 1459 standard [1] says in section "6.2 Command responses.":

            256     RPL_ADMINME
                            "<server> :Administrative info"

This commit corrects the behavior to follow the standard.

[1]: https://tools.ietf.org/html/rfc1459
2015-12-28 21:19:47 -06:00
William Pitcock 0817ad4cd0 messages.h: fix numeric 320 2015-12-28 01:36:40 -06:00
William Pitcock 72ad5c04fe whois: list active operator block and privset when appropriate 2015-12-28 01:33:09 -06:00
William Pitcock d513218a9e LIST: allow channel display threshold to be configured (closes #109) 2015-12-26 22:23:28 -06:00
William Pitcock 2f9687c48c channel: cache duplicate calls to is_banned() and is_quieted() 2015-12-13 08:13:52 -06:00
Jilles Tjoelker 2d28539c68 Reduce clean_nick() code duplication further.
Side effect: hurt and monitor now allow nicks starting with a digit.
2015-12-13 00:22:21 +01:00
William Pitcock 72dee03d50 clean up some code duplication when checking nicks for validity 2015-12-12 08:41:09 -06:00
William Pitcock c1725bda3c ssl: allow cipher list to be overridden (closes #67) 2015-12-12 07:50:48 -06:00
William Pitcock b5b4a0e79b client: use sequential connection ids for ssld connections in ssld RPC, instead of the file descriptor
this avoids race conditions when a file descriptor is reused and an ssld worker has not acked that the previous
connection was closed, which results in the new client being kicked.
2015-12-12 05:20:51 -06:00
William Pitcock 63eb8567cb implement configurable channel modes (closes #31)
While functionally compatible with the implementation in ElementalIRCd, our approach is different,
specifically pre-calculating the bitmask at config load time.  This is more efficient, and allows us
to report errors as part of the configuration phase.
2015-12-11 15:36:53 -06:00
William Pitcock bac8c4829f config.h.dist: resync with config.h (closes #14) 2015-12-11 12:14:34 -06:00
William Pitcock 427a8d5dbb WHOIS: use cipher string if available 2015-12-11 08:20:11 -06:00
William Pitcock ebe33dbfab sslproc: set Client.localClient.cipher_string if sent by ssld 2015-12-11 08:19:50 -06:00
William Pitcock 196740c42b sslproc: likewise 2015-12-10 23:44:31 -06:00
William Pitcock 7801d174d7 Revert "extban: implement helper functions for stackable extbans (part 1) (ref #74)"
This reverts commit 304bd0d095.
2015-12-10 02:19:21 -06:00
William Pitcock 304bd0d095 extban: implement helper functions for stackable extbans (part 1) (ref #74) 2015-12-10 01:33:30 -06:00
William Pitcock 202d496644 override: only engage override code if we're needing to authorize a WRITE to a channel's state (closes #65) 2015-12-10 01:00:32 -06:00
William Pitcock 13d8f0edba allow certfp method to be configured 2015-12-07 01:49:30 -06:00
William Pitcock 4a5330bb4d cap: implement ircv3.2 chghost cap 2015-11-19 22:53:55 -06:00
William Pitcock 583f064fef send: add negation argument to sendto_common_channels_local() and friends 2015-11-19 22:43:45 -06:00
Andrew Wilcox 5f8fb56d02 Revert "remove MONITOR for now pending a complete rewrite"
This reverts commit 87fa262fec.
2015-10-15 17:31:55 -05:00
William Pitcock 87fa262fec remove MONITOR for now pending a complete rewrite 2015-10-15 09:39:48 -05:00
William Pitcock d09bde15a1 monitor: additional cleanup pointed out by mr_flea 2015-10-11 19:32:31 -05:00
William Pitcock d5f856c68e monitor: fix the resource leak properly, unlike the moronic elemental-ircd developers 2015-10-11 18:48:53 -05:00
Jilles Tjoelker 2125182293 Remove the unneeded username parameter to register_local_user(). 2015-09-13 22:59:03 +02:00
Elizabeth Myers 34c10ca8b7 Relocate report_Klines to proper home
This function is not used anywhere else but m_stats, so should be put
there.
2015-08-08 17:25:29 -05:00
Jail Bird 29c92cf95f Spring cleaning redux:
- Implemented changes suggested by Jilles
- Remove some unused parameters in functions
- Remove some unused ssl procs
- 63-bit time_t support in TS deltas
- const char * vs char * cleanup
- struct alignment (void *) casts
- signed vs unsigned fixes
- bad memset() call
- Bad LT_MAIN in libratbox
- char -> unsigned char casts for isdigit/isspace/etc calls

Thanks Jilles!
2015-04-20 00:55:20 -05:00
Aaron Jones c9b5cd623b Remove network_desc configuration option, never actually used anywhere 2015-03-26 14:46:54 -05:00
William Pitcock bb2a50509a config: further EGD removal 2015-03-01 01:06:58 -06:00
William Pitcock 984d80c988 cap-notify: add sendto_local_clients_with_capability() (ref #84) 2015-03-01 00:44:34 -06:00
William Pitcock 13de708352 cap-notify: add cap-notify cap 2015-03-01 00:26:23 -06:00
Max Teufel 1b54aa5c3b src/channel: add support for IRCv3.2 userhost-in-names 2015-02-28 01:06:38 -06:00
William Pitcock 6e3d57dc6b cap: remove SASL_REAUTH capability 2015-02-28 01:01:08 -06:00
William Pitcock 74bae4c6ff remove references to LIBPATH (closes #26). 2015-02-24 20:25:34 -06:00
William Pitcock 95cce5f358 Revert "m_invite: add support for CAP invite-notify"
This reverts commit 93eb76cc32.
2015-02-16 17:50:51 -06:00
Max Teufel 93eb76cc32 m_invite: add support for CAP invite-notify
Specification:
<https://github.com/ircv3/ircv3-specifications/blob/master/extensions/invite-notify-3.2.md>
2015-02-16 15:40:34 -06:00
William Pitcock c6bc97fdcd m_sasl: move some struct members around for sasl-reauth 2015-02-16 15:39:36 -06:00
William Pitcock ef3ab8e3a5 cap: allow clients to do sasl reauth if they requested sasl and sasl-reauth (ref ircv3/ircv3#103). 2015-02-15 17:11:28 -06:00
Max Teufel 7d33cce8ef m_sasl: add configuration option for the nick of the SASL agent
This allows multiple improvements to m_sasl. With this change, the SASL
authentication gets aborted immediately when services are offline.
Additionally, we send the SASL ENCAP messages directly to the specified
SASL agent.
2015-02-14 20:31:25 +01:00
Jilles Tjoelker 483987a464 Explicitly pass the current time to deactivate_conf().
Some places depend on the ban not being destroyed.
2014-09-21 15:02:43 +02:00
Jilles Tjoelker 0f8db0552e channel: Remove write-only field. 2014-05-29 17:41:35 +02:00
Jilles Tjoelker 51452a370b channel: Stop pretending to support per-mode server capabilities.
After a change for dynamic server capabilities, the code to send out mode
changes was changed to use the capabilities belonging to the last mode
being sent out. This does not make sense; therefore, just use no
capabilities and remove supporting infrastructure.
2014-05-29 17:40:16 +02:00
Jilles Tjoelker 72ae8a1f7b Merge branch 'patch-1' of https://github.com/auscompgeek/charybdis 2014-05-29 15:42:47 +02:00
Mantas Mikulėnas c72f15bcf5 m_version: remove spaces from version string
"to make it machine parseable again", as in ircd-seven commit 03b2176b88a1.
2014-05-06 16:28:23 +03:00
auscompgeek bd96349c86 strip_colour: Strip '\x0F' (^O, formatting off)
Reported by ssbr on freenode:

chmode +c doesn't strip ^O, which turns off all previous formatting.
This can cause clients that internally use mIRC formatting to render messages weirdly,
e.g. highlighted messages in HexChat: <https://i.imgur.com/eDX8Aif.png>.
2014-04-17 13:12:11 +10:00
Keith Buck 55abcbb20a Remove trailing whitespace from all .c and .h files.
3134 bytes were removed.
2014-03-03 04:25:47 +00:00
Keith Buck dceac3e4fb conf parsing: Fix memory leaks and clean up code a bit.
Charybdis currently leaks about 45-50k per configuration parse,
including every rehash. This change plugs these leaks by properly
iterating through all conf_parm_t structures to seek all strings that
should be freed and also by freeing the conf_parm_t structures
themselves.

These leaks have been present since the original rewrite of the
configuration parsing system in ircd-ratbox r11953.

Additionally, this change also cleans up and documents the parsing code
a bit.
2014-02-28 17:35:51 +00:00
Jilles Tjoelker 26c6ac3dc7 Simplify module path list, removing strcpy use. 2014-02-23 23:47:27 +01:00
Jilles Tjoelker 77910830e3 Fix various printf arg types. 2014-02-23 23:01:59 +01:00
Jilles Tjoelker a9f1281448 modlist: Fix address display on 64-bit systems. 2014-02-23 22:55:40 +01:00
Rylee Elise Fowler 1870e06ad3 autotools: fix typo relating to ban db 2014-01-31 11:03:54 -05:00
Keith Buck 7f3382fe98 Remove duplicate default-value code.
Default values for default_floodcount and default_ident_timeout are set
in s_conf.c. Remove code that checks for missing values in ircd.c.
Additionally, reset default_ident_timeout to 5 if an invalid value (i.e.
0) is provided.
2013-10-29 09:32:28 +00:00
Jilles Tjoelker 364e59f82a whowas: Use the normal rules for IP visibility.
Add the flags (auth{} spoof, dynamic spoof) to struct Whowas and add a
show_ip_whowas().

Normal users now see IPs of unspoofed users, and remote opers can see IPs
behind dynamic spoofs. Also, general::hide_spoof_ips is now applied when
the IP is shown, not when the client exits.
2013-09-14 12:26:32 +02:00
Jilles Tjoelker 2635cc8089 Fix parameter name in header file for show_ip_conf(). 2013-09-14 12:26:24 +02:00
Keith Buck 77d3d2dbaf Remove s_assert definition from ircd_defs.h and add it to its own header.
s_assert requires some higher-level functionality that shouldn't be
present in ircd_defs.h. ircd_defs.h is used by ssld, which has no notion
of logging or sending IRC messages. Additionally, some of the headers
s_assert depends on result in conflicting definitions in ssld.c.

This change also fixes the compile when using --enable-assert=soft.
2013-09-10 06:10:14 +00:00
Elizabeth Myers 3c93d380e0 Add support for multiple forms of blacklist queries using matches.
It supports both literal and last octet matches from the dnsbl.
If matches is not present, the old behaviour is used.
2013-04-20 20:49:11 -05:00
Elizabeth Myers 9d745dbd21 Implement kill-cancelling hook.
With this comes an example module to block the killing of services.

NOTE: this will not cancel remote kills. Those are still accepted, per
the TS 6 specification.
2013-04-20 01:07:55 -05:00
William Pitcock 6f7b36d5d0 Mostly enable support for checking format strings with -Wformat.
Basically derived from Ratbox 3.1.
2013-02-21 05:46:04 -06:00
William Pitcock 3dae60ef47 cache: use rb_strdup() instead of a static buffer for cache lines.
BUFSIZE limitation is retained as there is no need to remove it, as all lines must be smaller than it
due to RFC1459 message requirements.
2013-01-15 16:24:33 -06:00
Jilles Tjoelker 22cae20f02 server: Make sure CAP_CAP and CAP_TS6 are non-zero.
A zero CAP_CAP caused duplicate CAPAB to go undetected, allowing a
mismatch between what is sent out via ENCAP GCAP and what applies locally.

A zero CAP_TS6 allowed server connections without SID (with a valid
connect block).
2012-12-18 17:03:59 +01:00
William Pitcock 1cf9ef50cd numeric: add 744 (ERR_TOPICLOCK) to list so we don't step on inspircd 2012-10-13 17:50:12 +00:00
Keith Buck 5bd79c2c56 res.c: Try other servers if errors or corrupt replies are encountered.
Currently, the resolver treats SERVFAIL, NOTIMP, and REFUSED queries the
same as NXDOMAIN, but this really should not be the case. Instead, if
the DNS server errors on our request or provides an invalid request, try
another server.

Also, count DNS server errors in addition to timeouts and avoid these
undesirable servers.
2012-10-09 05:58:02 +00:00
William Pitcock c4e81ae9e9 m_starttls: handle error condition with ERR_STARTTLS (691) numeric per tls-3.2 specification 2012-09-22 19:31:55 -05:00
William Pitcock 538d4d6188 m_cap: add 'tls' core capability 2012-09-22 14:15:45 -05:00
William Pitcock 3e54d7bfb0 Define RPL_STARTTLS. 2012-09-22 14:04:57 -05:00
Keith Buck 7d60375446 Add new conf_read_start and conf_read_end hooks. 2012-05-21 20:22:07 +00:00
Keith Buck 62cf5b4036 Call the privmsg_channel hook for part messages too. 2012-04-07 03:03:07 +00:00
William Pitcock f30a5ee4c4 Remove MODE_NOCTCP from core, in favor of chm_noctcp. 2012-03-31 22:48:36 -05:00
William Pitcock 67aeaba593 Remove MODE_NOCOLOR from core, replacing it with modules/chm_nocolour.so. 2012-03-31 22:26:45 -05:00
William Pitcock ca4c2a86ee Add support for hookifying PRIVMSG/NOTICE.
This will allow us to modularize message processing, e.g. having new modules to manipulate
channel and private messages in new ways.

Yes: it can be used to intercept messages, but such modules are already out in the wild for
charybdis anyway -- so this doesn't really change anything there.

If you are changing the text, then it is your responsibility to provide a pointer to a new
buffer.  This buffer should be statically allocated and stored in your module's BSS segment.
We will not, and cannot, free your buffer in core, so dynamically allocated buffers will
cause a memory leak.

This will allow us to simplify m_message considerably, by moving channel mode logic out to
their own modules.
2012-03-31 21:23:01 -05:00
Keith Buck 330692a1f2 Add option to immediately apply nick RESVs by FNC'ing. 2012-03-25 01:34:45 +00:00
William Pitcock 02270e9602 Add listen::defer_accept option for controlling usage of TCP_DEFER_ACCEPT option. 2012-03-17 10:00:39 -05:00
Jilles Tjoelker 57b1cd5f6b strip_colour: Prefer IsDigit to isdigit.
Unlike isdigit, IsDigit can safely be applied to 'char's.
Arguments to isdigit needs a character cast to 'unsigned char' or EOF.
2012-03-15 00:58:56 +01:00
Jilles Tjoelker aba43ba823 When stripping colour/control codes, also strip \004.
Some clients such as irssi interpret \004 as colour or other markup.
2012-03-15 00:17:40 +01:00
Nathan Phillip Brink 9f9b7042fb Run autoconf and autoheader. 2012-03-01 03:49:35 +00:00
Nathan Phillip Brink c74836dc4a Add explicit support for being installed into a system triggered with --enable-fhs-paths.
Add two mechanism for avoiding name-collisions in a system-wide
installation of charybdis. The ssld and bandb daemons, intended to be
directly used by ircd and not the user, install into libexec when
--enable-fhs-paths is set. For binaries which are meant to be in PATH
(bindir), such as ircd and viconf, there is now an option
--with-program-prefix=progprefix inspired by automake. If the user
specifies --with-program-prefix=charybdis, the ircd binary is named
charybdisircd when installed.

Add support for saving the pidfile to a rundir and storing the ban
database in localstatedir instead of in sysconfdir. This is, again,
conditional on --enable-fhs-paths.

Fix(?) genssl.sh to always write created SSL key/certificate/dh
parameters to the sysconfdir specified during ./configure. The
previous behavior was to assume that the user ran genssl.sh after
ensuring that his current working directory was either sysconfdir or a
sibling directory of sysconfdir.
2012-03-01 02:41:09 +00:00
Jilles Tjoelker f8e43a0b8f Remove dummies, given that ratelimit already broke the ABI once.
As with ratelimit, ircd/modules before and after this commit
are incompatible, but not detected as such.
2012-02-21 21:02:20 +01:00
William Pitcock 63a0ed0604 numeric: reserve RPL_SASLMECHS (908) 2012-02-21 09:15:15 -06:00
Jilles Tjoelker d42e6915cf Pace aways.
This becomes important because of away-notify sending aways to common
channels much like nick changes (which are also paced).

Marking as unaway is not limited (but obviously only does something if the
user was away before). To allow users to fix typos in away messages, two
aways are allowed in sequence if away has not been used recently.
2012-02-18 16:32:57 +01:00
Keith Buck e88a1f1b15 Add ratelimit for high-bandwidth commands. 2012-02-18 03:54:44 +00:00
Keith Buck c5bbc60375 Add away-notify client capability. 2012-02-14 14:15:44 +00:00
William Pitcock a16910aa4e capability: add capability_index_stats() for getting statistics about the capability broker system 2012-02-04 21:27:43 -06:00
William Pitcock 885cd603b5 capability: add global list of capability indexes, and name all capability indexes 2012-02-04 21:16:40 -06:00
Jilles Tjoelker bde42c6063 Don't shadow the name "index". 2012-02-04 15:15:26 +01:00
William Pitcock f01f67f0ad capability: add capability_require(). 2012-02-04 02:00:33 -06:00
William Pitcock 346fba9252 Migrate capability negotiation code to new dynamic capability management API.
This needs a lot of testing, obviously.
2012-02-04 01:47:46 -06:00
William Pitcock ec3a9055f2 capability: add capability_index_mask() which calculates old CAP_MASK 2012-02-04 00:39:53 -06:00
William Pitcock 5e773521a9 capability: add capability_index_list() to build a list of capabilities given an index and mask 2012-02-04 00:36:42 -06:00
William Pitcock 64b56afd8c Add a new dynamic capability manager.
Specifically, what this capability manager does, is map keywords to
calculated bitmasks.  These bitmasks are allocated at runtime, so that
the any managed capability index can be manipulated by modules.

Modules should call capability_orphan() when orphaning capabilities.  This
makes it so that bitmasks aren't reallocated, except for cases where the
capability is the same.
2012-02-04 00:05:13 -06:00
Jilles Tjoelker fe74401bf0 Add one more const. 2012-01-08 16:25:34 +01:00
Jilles Tjoelker d9af501aa8 Fix a warning about const with forward channels. 2012-01-08 16:23:18 +01:00
Jilles Tjoelker ae52fe0ff7 Show underlying IPv4 in a remote whois. 2012-01-08 15:51:48 +01:00
Jilles Tjoelker 524a5b3ac7 Add code to get IPv4 addresses from 6to4 and Teredo IPv6 addresses.
It is not used yet.
2012-01-08 15:51:44 +01:00
Jilles Tjoelker be0365e152 Add an error message if a ban mask is invalid.
This is given if the ban mask is too long, it is an invalid extban or the
forward channel is invalid and no other message has been given about that.
2011-12-18 23:24:22 +01:00
William Pitcock b583faf970 Add support for customizing the usable nick length.
This adds a new ISUPPORT token, NICKLEN_USABLE which is strictly an informative value.
NICKLEN is always the maximum runtime NICKLEN supported by the IRCd, as other servers may
have their own usable NICKLEN settings.  As NICKLEN_USABLE is strictly informative, and
NICKLEN is always the maximum possible NICKLEN, any clients which depend on NICKLEN for
memory preallocation will be unaffected by runtime changes to NICKLEN_USABLE.

The default NICKLEN is 50; the default serverinfo::nicklen in the config file is set to
30, which is the NICKLEN presently used on StaticBox.
2011-11-29 16:10:21 -06:00
Stephen Bennett a695b0e40e Apply extended-join client cap to QJM joins 2011-11-12 14:41:01 +00:00
Jilles Tjoelker d74fa5b502 Prefer PATH_MAX to non-standard MAXPATHLEN. 2011-10-28 16:45:18 +02:00
Jilles Tjoelker d182b85454 Minor cleanup to command throttling code:
* Deduce allow_read from the client's state (IsFloodDone) rather than
   storing it in LocalUser.
 * Fix the documentation (in oper /info), however strange
   client_flood_burst_rate and client_flood_burst_max may seem, that is
   how they currently work.
2011-10-04 00:46:00 +02:00
Jilles Tjoelker f9dda63969 Disable LocalUser.actually_read (write-only field). 2011-10-04 00:25:22 +02:00
Jilles Tjoelker c598ff7b04 Fold client_flood_burst_rate check into MAX_FLOOD_BURST.
The original definition of floodgrace was MAX_FLOOD_BURST lines per second.
A second check for another number of lines per second makes no sense.
2011-10-04 00:21:19 +02:00
Jilles Tjoelker 2da6f6ebd7 Put back use_forward. 2011-09-25 16:22:29 +02:00
Elizabeth Jennifer Myers 765d839d3c Port ircd-seven banfowards to charybdis.
nenolod gave the thumbs-up to port ircd-seven banfowards to charybdis to spb
for a while, and people have asked about it. Might as well do it since it's a
slow weekend.

Note that as a side effect use_forward is removed from the config and
unconditionally enabled!
2011-08-12 20:33:10 -04:00
Elizabeth Jennifer Myers 7eec45bc9d Back out chanroles.
While what chanroles are trying to accomplish is a good idea, it is
apparently unclear this is the proper way to do it. Until we figure out
the exact way we wish to do this, it should be reverted for now.
2011-07-07 21:24:14 -04:00
William Pitcock f3bfe2c271 chanroles: instead of checking for chanop + CHANROLE_UNSET combination, grant a default set of flags.
this allows ops with zero effective privilege.
2011-07-06 15:12:46 -05:00
William Pitcock ae79dab6ae chanroles: grant initial set of flags to people added to a channel with CHFL_CHANOP.
this allows us to, later on, add a hook that will enable us to disable channel ops entirely
without causing permissions revocation.
2011-07-06 15:00:32 -05:00
Elizabeth Jennifer Myers 8aabb973c0 Implement chanroles, as discussed with nenolod.
The theory behind this is that services sends an ENCAP * GRANT #channel
UID :+flagspec message specifying the chanroles the user has. They are
mapped into flag bits and applied to the membership of the user. They
then are restricted or permitted to what they can do based on the
permissions mask regardless of rank.

For backwards compatibility, the default permission bit (without a GRANT
statement) allows a user to to anything an existing op can do ONLY if
they are an op.

Todo: make CHANROLE_STATUS work (the ability to apply +ov to people),
which is at the moment controlled by CHANROLE_MODE.
2011-07-06 13:46:22 -04:00
Keith Buck ab894d74fe Add target change spam notice. 2011-05-16 15:29:09 -07:00
William Pitcock f5493691ed branding: if CUSTOM_BRANDING is defined, display charybdis version in /info
(based on ircd-seven rebrand patch)
2011-05-08 09:06:19 -05:00
William Pitcock b6d0720c1c configure: Add --with-custom-branding and --with-custom-version options. 2011-05-08 08:55:32 -05:00
Stephen Bennett e6e54763d9 Make flood control settings configurable by those who know exactly what they're doing.
From ircd-seven git changeset 29aa4203150337925a4f5c6e7da47be5394c2125 .
2011-03-27 16:35:26 -04:00
Elizabeth Jennifer Myers 0a1e77c27c Support IPv6 blacklists. Also add a conf file option allowing the use of IPv4, IPv6, or both for a blacklist.
Although few blacklists currently support IPv6 lookups, they will likely begin to do so in the near future as more net trash begins using IPv6.
2011-02-27 16:38:05 -05:00
Keith Buck 096570b9f8 Add topic TS and channel TS constraints for /LIST. 2011-01-05 21:15:36 -08:00
Keith Buck bb55ebebe9 Implement operspy for /LIST. 2011-01-05 18:57:27 -08:00
Stephen Bennett 341f971efa Bring across disable_local_channels config option from ircd-seven 2010-12-21 20:38:04 +00:00
William Pitcock 92052a5c24 Add extended-join client capability.
The extended-join client capability extends the JOIN message with information clients typically
query using WHO including accountname, signon TS and realname.
2010-12-16 00:24:54 -06:00
William Pitcock 99cca61ed6 Add sendto_channel_local_with_capability(). 2010-12-16 00:19:24 -06:00
William Pitcock 27912fd4ff Add send_channel_join(). 2010-12-16 00:09:29 -06:00
William Pitcock 7a7f86d344 Rough implementation of the new account-notify client capability.
This replaces identify-msg in ircd-seven.
2010-12-15 23:04:57 -06:00
William Pitcock 7a948bdaa7 Add capability parameter to sendto_common_channels_local() and sendto_common_channels_local_butone(). 2010-12-15 22:55:05 -06:00
William Pitcock ff0cc1e616 Add support for linking using SSL certificate fingerprints as the link credential rather than the traditional server-password pair. 2010-12-13 23:14:00 -06:00
B.Greenham 15484f02bd Move flood_attack_channel to channel.c so it can be used outside m_message.c 2010-12-09 18:29:56 -05:00
B.Greenham 87d38e8cf1 Add strip_unprintable, a function that strips all unprintable characters from a string. 2010-12-09 12:02:24 -05:00
William Pitcock a0626e7ce3 Reorder CHFL flags so that they can be used as ranks. 2010-12-07 00:11:53 -06:00
William Pitcock 6ca4dec95a Extend hook_data_channel_activity moduledata with membership struct. 2010-12-06 22:57:04 -06:00
William Pitcock 83b72f917a chmode: Remove chm_regonly, a vestige from ratbox which doesn't apply to native charybdis networks. 2010-12-06 22:46:37 -06:00
JD Horelick f26e8b67e2 Remove all the DEFINE's and the random places they were used for the .conf-based ban stuff. 2010-12-04 17:26:14 -05:00
Jilles Tjoelker 01b7a527a3 Show the services login name in WHOWAS.
The numeric is the same (330) as used in WHOIS.

This takes at most half a megabyte of memory (large network, 30 char nicks).
2010-08-29 22:30:54 +02:00
Jilles Tjoelker 717238d2a2 Add target change for channels.
This has a separate enabling option channel::channel_target_change.

It applies to PRIVMSG, NOTICE and TOPIC by unvoiced unopped non-opers.

The same slots are used for channels and users.
2010-08-29 01:26:00 +02:00
Jilles Tjoelker 2fb6379693 Change ERR_MLOCKRESTRICTED to 742 as 735-739 seem for MONITOR extensions. 2010-08-24 22:51:20 +02:00
Stephen Bennett 51269a8737 Merge backout of 8939a7e03d15 2010-08-24 21:31:55 +01:00
Stephen Bennett 0f1ab797e4 Backed out changeset 8939a7e03d15
The code behind this capability was never implemented, and subsequent
discussions have agreed to approach the problem differently. There seems no
reason to continue advertising a capability that does nothing.
2010-08-24 21:30:56 +01:00
William Pitcock 6fb6bd15ae Enforce TS rules on MLOCKs. 2010-08-23 20:22:59 -05:00
William Pitcock 32de9f4e67 Add ERR_MLOCKRESTRICTED (735) to reflect bounces caused by MLOCK. 2010-08-23 18:59:32 -05:00
Jilles Tjoelker f5455d2cd5 Tweak auto-accept:
* does not apply to NOTICE (as those may well be automated)
* mirrors +g behaviour so that no useless accept entries are added for services
* respects max_accept, if it would be exceeded the message is dropped with numeric 494
* check moved up so this is checked before floodcount/tgchange
2010-07-04 17:14:56 +02:00
William Pitcock 545f0a0f07 strip_colour(): strip ASCII 29 (mIRC 7 italics). 2010-06-19 16:53:56 -05:00
Stephen Bennett c71a6e3bed Branch merge 2010-05-02 21:36:32 +01:00
Stephen Bennett 3b8a6350f8 Backed out changeset c57955c5225e
Now that MLOCK is no longer stored as a struct Mode, this is unnecessary.
2010-05-02 21:29:22 +01:00
Stephen Bennett 6b8db2daf2 Allow the final parameter of MLOCK to be empty, to remove an existing mlock 2010-05-02 20:42:46 +01:00
Stephen Bennett 78e6b731e4 Rework ircd-side MLOCK enforcement: instead of trying to track modes locked on or off, instead keep a simple list of mode letters that are locked, and reject any change to those modes. 2010-04-30 22:01:21 +01:00
William Pitcock bd44fc7b09 Automated merge with ssh://hg.atheme.org//hg/charybdis 2010-04-06 17:14:51 -05:00
William Pitcock c239b97f68 Hook up source-account-hostmask client protocol extension. 2010-04-06 17:14:44 -05:00
JD Horelick 944b0584ea Change config option for ident_timeout to default_ident_timeout as jilles
recommended.
2010-04-05 16:29:11 -04:00
JD Horelick 0ffb810660 Add a configuration option for ident_timeout. 2010-04-05 15:28:44 -04:00
Jilles Tjoelker 19716b9fd6 New custom channel mode API allowing reloading such modules.
Additionally, attempting to use too many modes or two times
the same letter is now detected and prevented.

Modules now request that a channel mode be added/orphaned,
instead of ugly manipulation from which that request had
to be guessed.

Slight changes are needed to modules that provide channel modes.
From the old API, one important function has been made static,
the other important function has been renamed, so loading old
modules should fail safely.
2010-04-01 01:16:16 +02:00
Jilles Tjoelker dca9e55257 Add propagated resvs, like klines and xlines. 2010-03-27 16:13:57 +01:00
Jilles Tjoelker 3cbbfb2556 Add propagated xlines, like klines. 2010-03-16 23:05:50 +01:00
Jilles Tjoelker 1702b69419 Add option general::use_propagated_bans to allow disabling new KLINE.
If this option is yes (default), KLINE by itself sets global (propagated) bans.
If this option is no, KLINE by itself sets a local kline following cluster{},
compatible with 3.2 and older versions.
2010-03-14 17:21:20 +01:00
William Pitcock 8727cbe88a Add propagation of MLOCK state for simple modes.
Special modes like +j can be tracked easily just by adding the necessary
code to parse them to set_channel_mlock().  This will cover propagation
as well.
2010-03-07 23:13:39 -06:00
William Pitcock 82eac99fc0 Fix typo. 2010-03-07 22:30:30 -06:00
William Pitcock ec55bec527 Add MLOCK capability token. 2010-03-07 22:25:41 -06:00
William Pitcock a51c452643 Rename channel_modes() to channel_modes_real(), and use macros to build both the mode list, and the mlock list. 2010-03-07 22:22:14 -06:00
William Pitcock bafd5ea61c struct Channel: add mode_lock structure to the channel object. 2010-03-07 21:41:06 -06:00
William Pitcock a51b50c366 struct Mode: add off_mode bitfield to describe disabled channel modes. 2010-03-07 21:40:34 -06:00
William Pitcock dd0f1f5b88 Add RPL_CHANNELMLOCKIS for ircd-side MLOCK enforcement. 2010-03-07 21:35:54 -06:00
Jilles Tjoelker 5c2b9eaf48 BAN: Reject bans with insufficient non-wildcard characters.
Such bans are not applied locally, but are propagated normally.
They can only be removed on a server that applies them.

Note that normally KLINE will not accept such bans.
This is mainly for services, differing min_wildcard and
ircd changes.
2010-03-06 01:45:41 +01:00
Jilles Tjoelker 431a1a2784 Add propagated klines.
A KLINE command without the ON clause now sets a propagated
("global") ban. KLINE commands with the ON clause work as
before.

Propagated klines can only be removed with an UNKLINE command
without the ON clause, and this removes them everywhere.
In fact, they remain in a deactivated state until the latest
expiry ever used for the mask has passed.

Propagated klines are part of the netburst using a new BAN
message and capab. If such a burst has an effect, both the
server name and the original oper are shown in the server
notice.

No checks whatsoever are done on bursted klines at this time.

The system should be extended to XLINE and RESV later.

There is currently no way to list propagated klines,
but TESTLINE works normally.
2010-03-05 18:36:44 +01:00
Jilles Tjoelker 9197bc355e Add code to expire "propagated" bans.
The data structure is very simple: a dlink list of all propagated bans.
2010-03-04 00:21:22 +01:00
Jilles Tjoelker c2e7ab8c1e ConfItem.next is not used, remove it. 2010-03-03 23:36:28 +01:00
Jilles Tjoelker f9545a9b54 Make struct operhash_entry private. 2010-03-01 01:24:00 +01:00
Jilles Tjoelker 27f616ddf5 Track who set a dline/kline/xline/resv as in ratbox3.
Like in ratbox3, there is no way to query this information
(other than bandb's tables, but they worked before this
commit).
2010-03-01 01:23:22 +01:00
Jilles Tjoelker a12ad04472 Generate the "Temporary K-line %d min" part from aconf->hold - aconf->created. 2010-02-28 16:27:06 +01:00
Jilles Tjoelker b52c294986 Store the creation time of klines and dlines as a time_t instead of as text.
The value 0 indicates the creation time is unknown (currently the case
for bandb).
Also store a creation time for xlines and resvs, but do not use it yet.
2010-02-28 00:46:56 +01:00
Alexander F?r?y 51027be825 Use RPL_QUIETLIST and RPL_ENDOFQUIETLIST instead of RPL_BANLIST and
RPL_ENDOFBANLIST for channel mode +q.
2010-02-27 01:08:41 +01:00
Jilles Tjoelker 666de5311f Remove some obsolete paths from config.h. 2010-02-22 23:53:45 +01:00
Jilles Tjoelker 1815320d3b Remove more old kline.conf stuff.
Make sure to recompile modules, stuff has been removed
close to the start of ConfigFileEntry.
2010-02-22 19:31:05 +01:00
Jilles Tjoelker 22342cd11f Remove code to write bans to csv files. 2010-02-22 19:09:46 +01:00
William Pitcock ff31db8473 Add support for client certificate fingerprints in o:lines. 2010-02-17 06:41:41 -06:00
Jilles Tjoelker 4f2685f3e1 Move target change code to src/tgchange.c,
so we can use it for /invite as well.
2010-02-15 21:58:34 +01:00
Jilles Tjoelker c9f01c4f2f target change: Allow free replies.
When a user receives a private message, notice or RPL_UMODEGMSG,
add the source to a special set of 5 target slots.
These slots are checked in the normal way when sending messages,
allowing a reply without using up a free target.

This feature will not be very useful if a user is being messaged
by many different users; to help this, messages blocked entirely
by +g or +R do not affect the targets. CTCP replies also remain
free in terms of targets.
2010-02-15 01:07:07 +01:00
Jilles Tjoelker 179becdf5f target change: Overwrite the least recently used target with a new one. 2010-02-15 00:31:17 +01:00
Jilles Tjoelker ad1d39a76f Make the number of targets tracked for target change a #define. 2010-02-13 15:18:17 +01:00
Jilles Tjoelker 8eda114a78 Pass certfp to other servers and show it in whois. Do not show it on connect.
The server protocol for this is
:<uid> ENCAP * CERTFP :<40 hex chars>
both in new user introductions and in burst.

As in oftc-hybrid, only the user themselves and opers can see the certfp.

Displaying the certfp on connect seems unnecessary to me,
the user can whois themselves if needed.
2010-02-06 00:18:27 +01:00
Jilles Tjoelker 8f10356217 Remove remnants of <foo>_t typedefs. 2010-01-30 15:57:10 +01:00
William Pitcock 2e918bf515 Merge +C (no CTCP to channels) from ircd-seven. 2010-01-19 02:11:04 -06:00
William Pitcock 83595e6016 Add bandb IRCd APIs. 2010-01-07 17:10:16 -06:00
William Pitcock 0d781b9a4f Add DBPATH. 2010-01-07 16:55:34 -06:00
William Pitcock 7083c02121 Run autoreconf. 2010-01-07 16:51:32 -06:00
Jilles Tjoelker cef7a7bc4e Remove FLAGS_SENDQEX, fix sendq exceeded snotes for servers.
from ircd-ratbox
2009-12-21 16:58:25 +01:00
Jilles Tjoelker 01a7f6d4f9 Remove two obsolete constants. 2009-06-03 23:18:07 +02:00
Stephen Bennett 6657de63ac Merge 2009-12-08 19:23:32 +00:00
Stephen Bennett c127b45b83 Revert all presence-related changes 2009-12-08 19:22:55 +00:00
Jilles Tjoelker c2c25552ca Force part local users (not resv_exempt) on channel resv.
A notice will be sent to any force parted users that the channel
is temporarily/permanently unavailable on the server.
A new config option channel::resv_forcepart can be used to disable this.

from ircd-ratbox (dubkat)
2009-09-19 21:24:35 +02:00
Jilles Tjoelker 7919c03041 Add new constants for presence key/value lengths
instead of overloading NICKLEN/TOPICLEN.
2009-06-03 23:38:07 +02:00
Jilles Tjoelker 553aaaf4db Remove two obsolete constants. 2009-06-03 23:18:07 +02:00
William Pitcock 972e31192f presence: Add _butone() variant of sendto_common_channels_local_with_capability(). 2009-06-02 02:38:38 -05:00
William Pitcock 695cc4bc0c presence: Declare RPL_METADATACHG. 2009-06-02 02:32:07 -05:00
William Pitcock 62928328bf presence: Add sendto_common_channels_local_with_capability(), used for broadcasting presence updates. 2009-06-02 02:28:02 -05:00
William Pitcock 727bca6269 presence: Declare RPL_WHOISMETADATA. 2009-06-02 02:19:37 -05:00
William Pitcock 54ff698839 presence: Add CLICAP_PRESENCE.
This will enable broadcasting presence updates on channels.
2009-06-02 02:14:44 -05:00
William Pitcock 884b5d41c1 presence: Remove user.away, replaced by a metadata entry.
Cache the metadata retrieval value where feasible for minimal performance impact.
2009-06-02 02:03:51 -05:00
William Pitcock 75ea650c3c presence: Add get_metadata(). 2009-06-02 01:50:40 -05:00
William Pitcock e581ea8e3d presence: Add set_metadata() and delete_metadata(). 2009-06-02 01:41:44 -05:00
William Pitcock 195d10c293 presence: Declare RPL_METADATASET and RPL_METADATAREM. 2009-06-02 01:32:09 -05:00
William Pitcock f01154c478 presence: Declare MetadataEntry struct. 2009-06-02 01:29:58 -05:00
William Pitcock 0d3b24f9cf presence: Create presence metadata tracking structures where appropriate. 2009-05-30 13:30:57 -05:00
William Pitcock d7ca5991bc struct Client: add a dictionary to contain presence metadata. 2009-05-30 13:17:39 -05:00
William Pitcock 32a7faa104 Automated merge with ssh://hg.atheme.org//hg/charybdis 2009-05-30 13:16:01 -05:00
William Pitcock 8669b3b99c Add irc_dictionary.h to stdinc. I'm lazy. 2009-05-30 13:15:58 -05:00
Jilles Tjoelker 6dbb113478 Remove some obsolete unused definitions. 2009-05-21 16:01:46 +02:00
Jilles Tjoelker aa9c9ed268 Allow ctcp replies through floodcount after ctcp'ing a large group.
A large group is any $$ or $# or a channel with more than
floodcount/2 local members, checked on each server separately.
Note that floodcount checks are done on the sender's server.

The special treatment is active for 15 seconds.
2009-05-17 20:52:16 +02:00
Jilles Tjoelker 97c9dd8a26 Change xlines to store spaces as \s.
Spaces in xline.conf files are changed to \s in memory
and recognized on unxline, but are not changed in the
file. New xlines are added to xline.conf files with \s.

xline.conf written by this commit or newer will not work
properly with charybdis older than 1124:131254925f32 (which
introduced \s support in match_esc()).
2009-05-08 00:21:14 +02:00
William Pitcock c6240d7940 Allow for capabilities to be marked as "required".
If capability negotiation fails on these capabilities, then the server link is dropped.
2009-04-20 09:36:55 -05:00
William Pitcock 5f8d323c59 can_kick hook, based on the ircd-seven one. 2009-04-20 09:20:11 -05:00
Jilles Tjoelker c4d2d01419 Apply +z to messages blocked by +b and +q as well.
This adds a new server capab EOPMOD which will be used
for an extended topic command also.
2009-03-29 15:48:07 +02:00
Jilles Tjoelker 995f300eb1 Allow /rehash throttles to clear throttling. 2009-03-07 01:49:09 +01:00
Jilles Tjoelker ad13bb7556 Rework remote rehash messages to apply to all server notices during rehash.
Previously various notices such as those applying
to modules were not sent to the remote oper.
2009-03-07 01:27:05 +01:00
Jilles Tjoelker 6865c0b099 Add channel::only_ascii_channels config option
to restrict channel names to printable ascii only.
Like disable_fake_channels this only applies to joins
by local users; unlike disable_fake_channels it applies
to opers as well.
2009-02-22 00:12:21 +01:00
Jilles Tjoelker 53307da8ca Disable autoconnect for a server with excessive TS delta.
Note that in some cases (different TS delta settings,
heavy lag) it is possible only one of the servers
detects the problem and autoconnect may be left enabled.
The mechanism used for disabling is the same as
/quote set autoconn <server> 0; the A flag in /stats c
disappears and a rehash or /quote set autoconn can put
it back.
2009-02-05 23:43:07 +01:00
Jilles Tjoelker ad08ad1876 For remote rehashes, send error messages to the requesting oper as well. 2009-01-30 00:11:12 +01:00
Jilles Tjoelker 975c61928a Don't suggest putting values in an enum that are not in the enum.
Compilers may assume that variables of enumerated type
only contain values in the enumeration.
2009-01-28 01:02:34 +01:00
Jilles Tjoelker 161f040940 Update comments for parv[0] removal. 2009-01-18 18:22:43 +01:00
Jilles Tjoelker 3a17735469 Change /stats O to show privset blocks (oper only).
To show operator blocks, only /stats o (lowercase) now works.
2009-01-18 01:35:24 +01:00
Valeriy Yatsko 32eadd332e Update client.h. 2008-12-13 23:22:12 +03:00
Jilles Tjoelker 83235e9ed5 Show rejectcache/throttle in /testline output.
This adds more RPL_TESTLINE numerics with code '!'.
Different from the other results, the I/K line or
RESV will be shown as well.
2008-12-19 19:24:12 +01:00
Jilles Tjoelker ae09cb7dbe Show throttle info in /stats t.
from ircd-ratbox (androsyn)
2008-12-16 21:02:04 +01:00
Jilles Tjoelker 422bb0b553 Make rehashing privset{} change online oper privileges.
This also fixes memory leak due to multiple privsets
with the same name (added after each rehash).
2008-12-14 18:25:15 +01:00
Valeriy Yatsko b7a689d1e5 Remove irc_basename, replace it with rb_basename from libratbox. 2008-12-03 02:59:13 +03:00
Jilles Tjoelker e33e589cbf Split cidr_bitlen into cidr_ipv4_bitlen and cidr_ipv6_bitlen.
Taken from ircd-ratbox 3 via shadowircd.
2008-11-30 13:31:59 +01:00
Jilles Tjoelker d764f7ce5a Correct buffer without space for '\0', should have been safe due to padding. 2008-11-22 18:51:00 +01:00
Aaron Sethman 679ccbe5ef make is_cti/is_sti collect times connected in unsigned long long instead of time_t as well..on 32bit boxes that is going to wrap pretty quickly
committer: Valeriy Yatsko <dwr@it-penza.org>
2008-11-16 10:04:09 +03:00
Jilles Tjoelker db3efb7ac2 Allow the resolver to process longer hostnames,
for the benefit of some DNSBLs like the "TorDNSEL service".
2008-11-15 16:13:39 +01:00
Jilles Tjoelker 48957a4951 Add ircu-like /who format options.
Use  /quote help who  for details.
The format code "o" (oplevel) is not documented,
but implemented showing dummy information (999 for
chanop, n/a otherwise).
2008-11-09 00:12:56 +01:00
Jilles Tjoelker 10847f65d3 Remove old oper privilege flags. 2008-09-09 21:51:26 +02:00
Jilles Tjoelker b159441429 Add need_ssl to auth{} and operator{}.
Specifying need_ssl on auth{} denies the connection if
it is not SSL/TLS, much like need_ident or need_sasl.
Specifying need_ssl on operator{} refuses opering with
ERR_NOOPERHOST if the connection is not SSL/TLS.
from ircd-ratbox
2008-09-07 01:18:58 +02:00
William Pitcock 5d47bdca0f Make change_isupport() return the old value!!! 2008-08-29 15:36:41 -05:00
William Pitcock 474b0d3515 Add change_isupport() to change the value of an ISUPPORT token. 2008-08-29 15:27:34 -05:00
Jilles Tjoelker 3540120ad5 Fix ident for ssl connections. 2008-08-28 00:49:04 +02:00
William Pitcock f37fc9389b HasPrivilege(): check to make sure localClient and localClient.privset are non-NULL. 2008-08-17 08:52:04 -05:00
William Pitcock 6ac9e53ee4 All modules converted to use privsets by porting the macro over.
New macro, HasPrivilege() does most of the work here, the old IsOper*() macros
are deprecated, and will likely be removed later.
2008-08-17 08:36:17 -05:00
William Pitcock ef24271618 Make a reference to privset in Client.localClient. 2008-08-17 08:23:40 -05:00
William Pitcock 598b4cf10c privilegeset_ref(): return the privilegeset 2008-08-17 08:22:56 -05:00
Jilles Tjoelker 8c59a8403b Add 328 numeric (ChanServ channel URL) to the header files. 2008-08-17 14:49:01 +02:00
Jilles Tjoelker f11d08a405 Remove another servlink remnant. 2008-08-17 14:46:29 +02:00
William Pitcock a2e1310cbe oper_conf structure: add privset association. 2008-08-17 07:32:30 -05:00
William Pitcock 353f862553 Add privilegeset_extend(). 2008-08-17 06:35:49 -05:00
William Pitcock 9c3f080b99 Add basic PrivilegeSet API. 2008-08-17 06:27:59 -05:00
Valery V Yatsko 33e65f0004 no more servlink - removed 'servlink_path' from reference.conf and source files 2008-08-16 22:23:56 +04:00
Valery V Yatsko 392ae75ca9 Moved extern chmode_flags declaration from channel.h to chmode.h, as
it's actually declared in the second one
2008-08-04 21:51:15 +04:00
Jilles Tjoelker 43946961df Move to ratbox3 reject and throttle code.
Throttle replaces max_unknown_ip, reject is like before
(including the charybdis-specific unkline handling).
Both of these now apply before SSL negotiation.

This commit does not include the global_cidr and new dline code.

m_webirc is a bit nasty with throttling (unlike before
with max_unknown_ip), this may be fixed later (or
the webirc IP needs to be exempt{}ed).
2008-08-01 01:59:08 +02:00
Valery Yatsko 9bdd947118 channel.h cleaned up a bit - removed unused includes 2008-07-30 16:27:35 +04:00
Valery Yatsko 687ff2f994 Removed charybdis.h include - used nowhere 2008-07-30 16:19:56 +04:00
Valery Yatsko 104c6d469d rb_uint32_t -> uint32_t, rb_uint16_t -> uint16_t 2008-07-30 02:45:31 +04:00
Valery Yatsko adc7be98fc Removed unneeded includes from newconf.h 2008-07-28 23:14:51 +04:00
Valery Yatsko acdf71d9d2 A very draft version of extensions, which are adding can_join hooks for custom channel modes 2008-07-27 12:10:48 +04:00
Jilles Tjoelker c24efdc0b7 Also apply floodcount to messages to remote clients (except services).
As before, only local clients can have their message blocked.
2008-07-22 01:46:34 +02:00
Jilles Tjoelker ce3801b175 Remove some obsolete ConfItem flags. 2008-07-04 17:05:18 +02:00
Valery V Yatsko b2064202fb Removed SystemTime declaration 2008-06-28 14:38:27 +04:00
Valery V Yatsko b3ebc7ab9e Applied svn diff from ratbox3 r21458:21470 2008-06-28 14:13:50 +04:00
Valery V Yatsko b4407833bd Remove Channel->users_last, used nowhere 2008-06-28 12:25:53 +04:00
Valery V Yatsko b617afdc02 channel_heap,ban_heap,topic_heap,member_heap declared statically in channel.c instead of ircd.{c,h} 2008-06-28 11:54:51 +04:00
Valery V Yatsko 40c1fd4799 PASS selector:password for auth{}, based on spb's patch for ircd-seven 2008-06-26 10:18:58 +04:00
Valery V Yatsko c18cb68b91 Generating cflags bufs dynamically: one for RPL_MYINFO and one for
supported.c
2008-06-25 07:51:32 +04:00
Valery V Yatsko 33599ae783 Missed declaration of chm_orphaned 2008-06-24 22:08:24 +04:00
Valery V Yatsko 46d59e1138 A draft version of find_cmode_slot and orphaned concept for channel
flags
2008-06-24 21:26:49 +04:00
Valery V Yatsko efccc22c27 Applying dyn-cmodes.diff - first step in implementing channel module
addition in extensions
2008-06-24 20:45:19 +04:00
Jilles Tjoelker 1a53072881 Clean up s_auth a little. No functional changes. 2008-06-21 00:58:08 +02:00
Jilles Tjoelker 0c5cbb3b96 Remove unused field ip6_int. 2008-06-20 22:55:51 +02:00
Jilles Tjoelker a3143c9b6b Some const stuff for m_set. 2008-06-11 00:28:08 +02:00
William Pitcock 2a7872e9fb Merge with 'charybdis-ts6only' branch. 2008-06-08 01:09:04 -05:00
Jilles Tjoelker c42fb00e7f Remove dline flags from shared all.
This means dline/undline need to be specified
explicitly in a shared{} block.
2008-04-21 01:41:42 +02:00
Jilles Tjoelker 896755fe0d Move some declarations to header files, this enforces that they match. 2008-04-20 15:30:24 +02:00
Jilles Tjoelker 2e819b6b3e Fix various compiler warnings. 2008-04-20 15:20:10 +02:00
Valery Yatsko f5cb68d51d Remote d:lines implementation (based on ircd-seven's r230 by spb, Stephen Bennett <spb@attenuate.org>) 2008-04-20 11:26:37 +04:00
William Pitcock ab4285181c Remainder of irc_string.* is moved to new inline/stringops.h. 2008-04-20 01:03:11 -05:00
Valery Yatsko 4562c60489 irc_string.h -> match.h, irc_string.h; includes changed 2008-04-20 09:47:38 +04:00
Valery Yatsko decf0486cc strip_tabs() is related to s_conf.c ONLY - moved it there 2008-04-20 09:38:26 +04:00
Valery Yatsko e3b33fe3e6 clean_string() is related to m_links.c ONLY - moved it there 2008-04-20 09:35:22 +04:00