mirror of
https://github.com/pissnet/pissircd.git
synced 2025-08-13 21:51:36 +01:00
multiple changes...
- Updated example.conf with a more strict default oper-only-stats. - Made '/stats S' and '/stats Z' oper only again (always). - Hopefully fixed incoming/outgoing rate in /stats T. Only the stats of the first listener was counted instead of the total. This also explains why on some (many?) ircd configurations it always showed 0.00 kb/s and why HTM (high traffic mode) was never kicking in.
This commit is contained in:
parent
61fed28198
commit
1681fce504
5 changed files with 27 additions and 6 deletions
7
Changes
7
Changes
|
@ -2329,4 +2329,9 @@ seen. gmtime warning still there
|
|||
can use them (they are not defined in the header files [yet] however).
|
||||
- fixed 2 minor oob write issues
|
||||
- Fixed a bug with stats l/L
|
||||
|
||||
- Updated example.conf with a more strict default oper-only-stats.
|
||||
- Made '/stats S' and '/stats Z' oper only again (always).
|
||||
- Hopefully fixed incoming/outgoing rate in /stats T. Only the stats of the first
|
||||
listener was counted instead of the total. This also explains why on some (many?)
|
||||
ircd configurations it always showed 0.00 kb/s and why HTM (high traffic mode)
|
||||
was never kicking in.
|
||||
|
|
|
@ -734,9 +734,12 @@ set {
|
|||
/* Make the message in static-quit show in all quits - meaning no
|
||||
custom quits are allowed on local server */
|
||||
/* static-quit "Client quit"; */
|
||||
/* This allows you to make certain stats oper only, use * for all stats or leave this out to allow
|
||||
* all users to use any stats. */
|
||||
oper-only-stats "okG";
|
||||
/* This allows you to make certain stats oper only, use * for all stats,
|
||||
* leave it out to allow users to see all stats. Type '/stats' for a full list.
|
||||
* Some admins might want to remove the 'kGs' to allow normal users to list
|
||||
* klines, glines and shuns.
|
||||
*/
|
||||
oper-only-stats "okGsMRUEelLCX";
|
||||
|
||||
/* Throttling: this example sets a limit of 3 connections per 60s. */
|
||||
throttle {
|
||||
|
|
|
@ -70,7 +70,7 @@ int dopacket(aClient *cptr, char *buffer, int length)
|
|||
acpt->receiveB &= 0x03ff;
|
||||
}
|
||||
}
|
||||
else if (me.receiveB > 1023)
|
||||
if (me.receiveB > 1023)
|
||||
{
|
||||
me.receiveK += (me.receiveB >> 10);
|
||||
me.receiveB &= 0x03ff;
|
||||
|
|
|
@ -734,6 +734,12 @@ int stats_mem(aClient *sptr, char *para)
|
|||
rm = 0, /* res memory used */
|
||||
totcl = 0, totch = 0, totww = 0, tot = 0;
|
||||
|
||||
if (!IsAnOper(sptr))
|
||||
{
|
||||
sendto_one(sptr, err_str(ERR_NOPRIVILEGES), me.name, sptr->name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
count_whowas_memory(&wwu, &wwam);
|
||||
count_watch_memory(&wlh, &wlhm);
|
||||
wwm = sizeof(aName) * NICKNAMEHISTORYLENGTH;
|
||||
|
@ -1049,6 +1055,13 @@ int stats_shun(aClient *sptr, char *para)
|
|||
int stats_set(aClient *sptr, char *para)
|
||||
{
|
||||
char *uhallow;
|
||||
|
||||
if (!IsAnOper(sptr))
|
||||
{
|
||||
sendto_one(sptr, err_str(ERR_NOPRIVILEGES), me.name, sptr->name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
sendto_one(sptr, ":%s %i %s :*** Configuration Report ***",
|
||||
me.name, RPL_TEXT, sptr->name);
|
||||
sendto_one(sptr, ":%s %i %s :network-name: %s", me.name, RPL_TEXT,
|
||||
|
|
|
@ -163,7 +163,7 @@ int deliver_it(aClient *cptr, char *str, int len)
|
|||
acpt->sendB &= 0x03ff;
|
||||
}
|
||||
}
|
||||
else if (me.sendB > 1023)
|
||||
if (me.sendB > 1023)
|
||||
{
|
||||
me.sendK += (me.sendB >> 10);
|
||||
me.sendB &= 0x03ff;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue