mirror of
git://git.psyced.org/git/psyced
synced 2024-08-15 03:25:10 +00:00
_amount_users_loaded
This commit is contained in:
parent
227eb4fbfd
commit
1b9b468ecf
10 changed files with 85 additions and 90 deletions
|
@ -102,8 +102,9 @@ int msg(string source, string mc, string data,
|
|||
break;
|
||||
}
|
||||
}
|
||||
return ({ $1, "_status_user_amount",
|
||||
"There are [_amount_users] people online, [_amount_users_registered] accounts on this server.",
|
||||
return ({ $1, "_status_user_amount", 0,
|
||||
// generic formats shouldn't be hanging around in net/jabber...!?
|
||||
// "There are [_amount_users_loaded] people loaded, [_amount_users_registered] accounts on this server.",
|
||||
$2 });
|
||||
} else
|
||||
return ({ $1, "_error_request_users_amount",
|
||||
|
|
|
@ -1982,7 +1982,7 @@ case "_notice_presence_here_busy":
|
|||
t = v("locations")[0];
|
||||
if (t && t != source) {
|
||||
// no psyctext rendering happening in this variant
|
||||
# ifndef _flag_disable_circuit_proxy_multiplexing
|
||||
# ifdef _flag_enable_circuit_proxy_multiplexing
|
||||
vars["_target_forward"] = t;
|
||||
# endif
|
||||
sendmsg(t, mc, data, vars, source);
|
||||
|
|
|
@ -110,17 +110,27 @@ msg(source, mc, data, vars, showingLog, target) {
|
|||
case "_query_users_amount": // old, please remove
|
||||
case "_request_user_amount":
|
||||
# ifdef _flag_disable_query_amount_users_online
|
||||
rv["_amount_users_online"] = -1;
|
||||
rv["_amount_users_loaded"] = -1;
|
||||
# else
|
||||
rv["_amount_users_online"] = amount_people();
|
||||
// this actually shows the number of loaded user entities
|
||||
// which is higher than the actual number of users online
|
||||
rv["_amount_users_loaded"] = amount_people();
|
||||
# endif
|
||||
rv["_amount_users_registered"] = -1; // how to get this?
|
||||
// <kuchn> maybe read in the user directory so you have the amount of registered users.
|
||||
// <lynX> i think it isn't anybody's business...
|
||||
// in the name of privacy we should be
|
||||
// giving out random numbers instead of -1.. ;)
|
||||
sendmsg(source, "_status_user_amount",
|
||||
"[_source] has [_amount_users_online] users online.", rv);
|
||||
sendmsg(source, "_status_user_amount", 0, rv);
|
||||
// ircds tell a lot of things in reply to /lusers:
|
||||
//
|
||||
// 251 x :There are 25079 listed and 22070 unlisted users on 38 servers
|
||||
// 252 x 39 :flagged staff members
|
||||
// 254 x 22434 :channels formed
|
||||
// 255 x :I have 2180 clients and 0 servers
|
||||
// 265 x :Current local users: 2180 Max: 2714
|
||||
// 266 x :Current global users: 47149 Max: 55541
|
||||
// 250 x :Highest connection count: 2715 (2714 clients) (228789 since server was (re)started)
|
||||
return 1;
|
||||
#endif // _flag_disable_query_server
|
||||
case "_error":
|
||||
|
|
|
@ -1338,7 +1338,7 @@ w(string mc, string data, mapping vars, mixed source, int showingLog) {
|
|||
#else
|
||||
# echo No LPC? Wow. Good luck!
|
||||
#endif
|
||||
#ifndef _flag_disable_circuit_proxy_multiplexing
|
||||
#ifdef _flag_enable_circuit_proxy_multiplexing
|
||||
// this is necessary when a single proxy is emulating
|
||||
// several clients for several users. to figure out
|
||||
// which context stuff is forwarded to which client
|
||||
|
@ -1349,8 +1349,8 @@ w(string mc, string data, mapping vars, mixed source, int showingLog) {
|
|||
// for them instead of accepting forwards from each UNI
|
||||
vars["_target_forward"] = loc;
|
||||
// maybe this can be avoided when no _context is set...?
|
||||
#endif
|
||||
P3(("%O user:w forwarding %O to %O\n", ME, mc, vars["_target_forward"]))
|
||||
#endif
|
||||
sendmsg(loc, mc, nudata, vars);
|
||||
// PT(("PSYCW: %s -> %O (%O)\n", mc, loc, vars))
|
||||
#if DEBUG > 1
|
||||
|
|
|
@ -266,9 +266,8 @@ cmd(a, args, dest, command) {
|
|||
// erzeugen sollte.. no? ausserdem sind die vars und
|
||||
// das fmt unterschiedlich. und fast derselbe käse steht
|
||||
// nochmal in net/irc/common... TODO
|
||||
w("_status_user_amount",
|
||||
"There are [_amount_users] users on this server.",
|
||||
([ "_amount_users" : amount_people() ]) );
|
||||
w("_status_user_amount", 0,
|
||||
([ "_amount_users_loaded" : amount_people() ]) );
|
||||
}
|
||||
#else
|
||||
if (sizeof(args) > 1 && is_formal(args[1])) t = args[1];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue