aboutsummaryrefslogtreecommitdiffstats
path: root/modules/m_stats.c
Commit message (Expand)AuthorAgeFilesLines
* Batch labeled-response multiline responses•••Add calls to generate local or remote labeled-response batches to all modules which generate multiple lines of response. In general, this is only done once we've confirmed we will be sending multiple lines, to avoid spurious batches which only contain single lines inside of the batch, however some cases will always generate a batch regardless due to ease of implementation. This patch covers all of the "easy" cases; future patches will cover the complicated ones: m_batch, m_message, and m_list. Gravatar Ryan Schmidt2026-05-131-1/+5
* Expand `STATS t` to include batch info•••Two new lines were added at the end of STATS t output to list the number of pending client-initiated batches (and pending lines in those batches) as well as the number of pending remote labeled-response batches. Gravatar Ryan Schmidt2026-05-131-0/+8
* modules/m_stats: fix hooks not being called (#458)•••Some modules rely on stats hooks being called (e.g. extensions/helpops). These calls were removed accidentally by commit 4e89f6603d63b2f8dfde. Additionally, the last vestiges of the spy-only doing_stats_p hook were left around. No module has ever used this hook. Remove it.Gravatar Aaron Jones2025-08-181-2/+12
* modules: remove unused spy code.Gravatar RealKindOne2024-07-241-59/+1
* m_stats: correct format specifiers and types•••These format specifiers were all wrong. Use the right ones. Musl time_t is always 64 bits, so promote all rb_current_time usage to 64 bits. Fixes #437Gravatar Doug Freed2024-07-241-26/+26
* authd: fix crash/restart breaking DNSBL lookups (#394)•••authd child processes are only told about configured DNSBLs when the configuration is being parsed. This is bad, because when authd crashes or is killed, IRCd will restart it, but will not tell it about any configured DNSBLs until IRCd is next rehashed. We already have a dictionary that stores configured DNSBLs (for hit statistics for `STATS n'), so store the additional needed fields in that structure, and loop over that dictionary's entries when authd is restarted, sending the fields just as if the configuration were being reloaded. Reported-By: @Unit193Gravatar Aaron Jones2023-01-111-3/+3
* Remove the unused COMPRESSED flag and stats handler•••- Null "compress" handler left as-is in newconf.c Gravatar JailBird2022-12-221-2/+0
* Add umode +I to allow users to hide their idle time (#220)Gravatar David Schultz2022-08-301-6/+16
* m_stats: z: remove unnecessary casting and fix format stringsGravatar Doug Freed2022-08-241-29/+29
* m_stats: z: restore total memory displayGravatar Doug Freed2022-08-241-0/+4
* Cast time_t to long long when printingGravatar Matthew Martin2022-07-011-2/+2
* Illumos fixes•••- getexecname(3) returns const char * - pid_t is long Gravatar JailBird2022-06-291-2/+2
* Add description parameter to auth blocks (#327)Gravatar Eric Mertens2022-04-141-5/+5
* Remove Windows supportGravatar jailbird7772021-07-301-2/+0
* Remove ziplinks (#218)Gravatar Ariadne Conill2021-06-261-34/+0
* Keep propagated bans in a dictionary, not a listGravatar Ed Kellett2021-06-081-5/+3
* Get rid of hub_mask/leaf_maskGravatar Ed Kellett2020-11-141-34/+0
* Add /stats s to list secure blocks•••`s` and `S` were both used for ssld stats, but only `S` was documented, so I'm taking `s`. You can't stop me! Gravatar Ed Kellett2020-11-091-2/+24
* Add general::stats_l_oper_onlyGravatar Ed Kellett2020-11-081-7/+28
* Remove shared blocksGravatar Ed Kellett2020-11-011-81/+0
* Combine stats A output parameters (#35)•••Every other use of RPL_STATSDEBUG follows the format: <letter> :<text> This case appeared to slip through because it's two-word argument is encoded in a single `->data` buffer.Gravatar Eric Mertens2020-10-271-1/+1
* Merge pull request #288 from edk0/umode-o-split•••Split oper privs up a bitGravatar Aaron Jones2020-08-061-81/+90
|\
| * m_stats: Remove outdated commentGravatar Ed Kellett2020-08-041-3/+0
| * m_stats: use oper:privs for /stats OGravatar Ed Kellett2020-08-041-8/+1
| * m_stats: Rework privilege requirements•••.need_oper is replaced with a generic mechanism for requiring any privilege. need_admin remains because I think it's the least horrible way to deal with oper:hidden_admin. All need_oper requirements have been changed to oper:general requirements. Gravatar Ed Kellett2020-08-041-61/+71
| * m_stats: use designated initializersGravatar Ed Kellett2020-08-041-2/+4
| * Add oper:privsGravatar Ed Kellett2020-08-041-1/+8
| * Replace most checks for +o with oper:general•••I'm preparing to PR a succession of privs changes with the ultimate goal of severely limiting the scope of the binary oper/user dichotomy and move conceptually distinct oper functions into their own privs. Accomplishing this is a non-trivial task, and can wait, but it's inconvenient now to have such functions enabled by the same mechanism that grants any privs at all--so I'm moving all of them to a transitional priv with the intention of eroding that later. Gravatar Ed Kellett2020-08-041-20/+20
* | m_stats: Make /stats l respect oper hiding•••found by @jesopo Gravatar Ed Kellett2020-08-031-5/+5
|/
* ircd: rename DNSBL entries from blacklist to dnsbl_entry.Gravatar Ariadne Conill2020-07-051-3/+3
* m_stats: don't ratelimit with no server argumentGravatar Ed Kellett2019-09-151-2/+2
* Rework oper hiding•••As it stands, oper hiding is rather messy and inconsistent. Add SeesOper(target, source), which is true iff target should appear as an oper to source. If I haven't missed something, all commands that reveal oper status now use the same logic. general::hide_opers_in_whois is a special case, and affects /whois only. general::hide_opers is introduced, and has the same effect as giving everyone oper:hidden. All commands that reveal oper status respect both. Gravatar Ed Kellett2019-09-121-1/+1
* Add outgoing SCTP connect supportGravatar Simon Arlott2017-08-241-1/+3
* msgbuf: s_assert is not a substitute for proper code•••(dns, m_alias, m_stats updated as msgbuf no longer includes s_assert.h) Gravatar Simon Arlott2017-07-261-0/+1
* cppcheck: fix various warnings/errors•••[ircd/match.c:316]: (error) Shifting a negative value is undefined behaviour [librb/src/patricia.c:55]: (error) Shifting a negative value is undefined behaviour [modules/m_alias.c:64]: (portability) '(void*)message' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [modules/m_time.c:111]: (warning) %u in format string (no. 9) requires 'unsigned int' but the argument type is 'signed int'. [modules/m_time.c:111]: (warning) %u in format string (no. 10) requires 'unsigned int' but the argument type is 'signed int'. [librb/src/dictionary.c:819]: (warning) %d in format string (no. 3) requires 'int' but the argument type is 'unsigned int'. [librb/src/radixtree.c:1080]: (warning) %d in format string (no. 3) requires 'int' but the argument type is 'unsigned int'. [ircd/s_user.c:351] -> [ircd/s_user.c:357]: (warning) Either the condition '0!=source_p' is redundant or there is possible null pointer dereference: source_p. [extensions/ip_cloaking_3.0.c:109]: (warning, inconclusive) The buffer 'buf' may not be null-terminated after the call to strncpy(). [ircd/chmode.c:256]: (style) Clarify calculation precedence for '&' and '?'. [modules/m_help.c:100]: (style) Clarify calculation precedence for '&' and '?'. [modules/m_knock.c:169]: (style) Clarify calculation precedence for '&' and '?'. [modules/m_stats.c:628]: (style) Clarify calculation precedence for '&' and '?'. [modules/m_stats.c:727]: (style) Clarify calculation precedence for '&' and '?'. [librb/src/radixtree.c:601]: (style) Clarify calculation precedence for '&' and '?'. [librb/src/radixtree.c:704]: (style) Clarify calculation precedence for '&' and '?'. [librb/src/radixtree.c:739]: (style) Clarify calculation precedence for '&' and '?'. [librb/src/radixtree.c:763]: (style) Clarify calculation precedence for '&' and '?'. [librb/src/radixtree.c:768]: (style) Clarify calculation precedence for '&' and '?'. [librb/src/radixtree.c:774]: (style) Clarify calculation precedence for '&' and '?'. [librb/src/radixtree.c:781]: (style) Clarify calculation precedence for '&' and '?'. [librb/src/radixtree.c:786]: (style) Clarify calculation precedence for '&' and '?'. [librb/src/radixtree.c:791]: (style) Clarify calculation precedence for '&' and '?'. [librb/src/radixtree.c:804]: (style) Clarify calculation precedence for '&' and '?'. [ircd/wsproc.c:372]: (style) Unused variable: len [modules/core/m_modules.c:382]: (style) Unused variable: i [modules/m_stats.c:741]: (style) Unused variable: amsg [ircd/authproc.c:390]: (style) Unused variable: iter [ircd/authproc.c:391]: (style) Unused variable: client_p Gravatar Simon Arlott2016-10-281-3/+2
* m_stats: don't try to access bl_stats if it doesn't existGravatar Simon Arlott2016-04-301-0/+3
* m_stats: display certificate fingerprint in STATS CGravatar Simon Arlott2016-04-241-1/+2
* Change the way authd configures opm•••It's a bit of a hack, but better than before. Rather than rehashing (which could get us into an endless loop), we now segregate the configuration phase (creating entries ircd-side in case we restart authd later) and sending phases (when configure_authd() is called). Since we have to call configure_authd() no matter what (to send timeouts etc.) and we have to send this data to configure authd anyway, and sending duplicate data is bad, this is the only way I can think of for now. Gravatar Elizabeth Myers2016-04-121-1/+1
* m_stats: use macros to clean up generating the stats tableGravatar Elizabeth Myers2016-04-071-48/+51
* m_stats: don't list alias entries twice.Gravatar Elizabeth Myers2016-04-061-8/+0
* Replace s_auth/blacklist stuff with authd calls•••This also does a lot of surgery on the conf system to reconfigure authd. /!\ WARNING! ACHTUNG! ADVERTENCIA! ATTENTION! AVVERTIMENTO! /!\ This code has not been run-time tested yet (though it compiles)! Gravatar Elizabeth Myers2016-03-281-45/+39
* common.h: raison d'être is gone, so out it goes.•••Fold whatever was left into ircd_defs.h Gravatar Elizabeth Myers2016-03-231-1/+0
* typedef-ify rb_radixtree for consistency.Gravatar Elizabeth Myers2016-03-231-2/+2
* Change struct Dictionary(*) to rb_dictionary(_\1).•••This cleans things up a slightly and puts the dictionary stuff in its own namespace. Gravatar Elizabeth Myers2016-03-231-2/+2
* DICTIONARY_FOREACH → RB_DICTIONARY_FOREACH•••This is in librb and therefore should be prefixed. Gravatar Elizabeth Myers2016-03-231-3/+3
* Cleanup warningsGravatar Matt Ullman2016-03-211-51/+48
* m_stats: win32 fixesGravatar William Pitcock2016-03-201-3/+5
* m_stats: eliminate special casing of calling the stats L handler.Gravatar Elizabeth Myers2016-03-091-64/+67
* authd, m_stats: fix command table sizes•••There are 256 possible byte values. Gravatar Mantas Mikulėnas2016-03-091-1/+1
* Message handlers should return void.•••Also fix up some return values and stuff to use bool (or void if nothing). I just did it whilst I was here. According to jilles, the return value used to signify whether or not the client had exited. This was error-prone and was fixed a long, long time ago, but the return value was left int for historical reasons. Since the return type is not used (and has no clear use case anyway), it's safe to just get rid of it. Gravatar Elizabeth Myers2016-03-091-23/+14