… | |
… | |
3 | * Rights to this code are documented in doc/pod/license.pod. |
3 | * Rights to this code are documented in doc/pod/license.pod. |
4 | * |
4 | * |
5 | * Copyright © 2005-2007 Atheme Project (http://www.atheme.org) |
5 | * Copyright © 2005-2007 Atheme Project (http://www.atheme.org) |
6 | */ |
6 | */ |
7 | |
7 | |
8 | static char const rcsid[] = "$Id: ptasks.C,v 1.5 2007/08/29 21:01:19 pippijn Exp $"; |
8 | static char const rcsid[] = "$Id: ptasks.C,v 1.6 2007/08/30 19:56:26 pippijn Exp $"; |
9 | |
9 | |
10 | #include "atheme.h" |
10 | #include "atheme.h" |
11 | #include <account/myuser.h> |
11 | #include <account/myuser.h> |
12 | #include <account/mynick.h> |
12 | #include <account/mynick.h> |
13 | #include <account/kline.h> |
13 | #include <account/kline.h> |
14 | #include <account/svsignore.h> |
14 | #include <account/svsignore.h> |
15 | #include <common/random.h> |
15 | #include <common/random.h> |
16 | #include "uplink.h" |
16 | #include "uplink.h" |
17 | #include "pmodule.h" |
17 | #include "pmodule.h" |
18 | #include "privs.h" |
18 | #include "privs.h" |
|
|
19 | #include "connection.h" |
19 | |
20 | |
20 | void |
21 | void |
21 | handle_info (user_t *u) |
22 | handle_info (user_t *u) |
22 | { |
23 | { |
23 | unsigned int i; |
24 | unsigned int i; |
… | |
… | |
125 | case 'f': |
126 | case 'f': |
126 | case 'F': |
127 | case 'F': |
127 | if (!has_priv_user (u, PRIV_SERVER_AUSPEX)) |
128 | if (!has_priv_user (u, PRIV_SERVER_AUSPEX)) |
128 | break; |
129 | break; |
129 | |
130 | |
130 | connection_stats (connection_stats_cb, u); |
131 | connection_t::stats (connection_stats_cb, u); |
131 | break; |
132 | break; |
132 | |
133 | |
133 | case 'H': |
134 | case 'H': |
134 | case 'h': |
135 | case 'h': |
135 | if (!has_priv_user (u, PRIV_SERVER_AUSPEX)) |
136 | if (!has_priv_user (u, PRIV_SERVER_AUSPEX)) |
… | |
… | |
188 | if (!has_priv_user (u, PRIV_SERVER_AUSPEX)) |
189 | if (!has_priv_user (u, PRIV_SERVER_AUSPEX)) |
189 | break; |
190 | break; |
190 | |
191 | |
191 | phandler->numeric_sts (me.name, 249, u->nick, "T :event %7d", system_state.event); |
192 | phandler->numeric_sts (me.name, 249, u->nick, "T :event %7d", system_state.event); |
192 | phandler->numeric_sts (me.name, 249, u->nick, "T :node %7d", system_state.node); |
193 | phandler->numeric_sts (me.name, 249, u->nick, "T :node %7d", system_state.node); |
193 | phandler->numeric_sts (me.name, 249, u->nick, "T :connection %7d", connection_count ()); |
194 | phandler->numeric_sts (me.name, 249, u->nick, "T :connection %7d", connection_t::count ()); |
194 | phandler->numeric_sts (me.name, 249, u->nick, "T :operclass %7d", cnt.operclass); |
195 | phandler->numeric_sts (me.name, 249, u->nick, "T :operclass %7d", cnt.operclass); |
195 | phandler->numeric_sts (me.name, 249, u->nick, "T :soper %7d", cnt.soper); |
196 | phandler->numeric_sts (me.name, 249, u->nick, "T :soper %7d", cnt.soper); |
196 | phandler->numeric_sts (me.name, 249, u->nick, "T :tld %7d", cnt.tld); |
197 | phandler->numeric_sts (me.name, 249, u->nick, "T :tld %7d", cnt.tld); |
197 | phandler->numeric_sts (me.name, 249, u->nick, "T :kline %7d", cnt.kline); |
198 | phandler->numeric_sts (me.name, 249, u->nick, "T :kline %7d", cnt.kline); |
198 | phandler->numeric_sts (me.name, 249, u->nick, "T :server %7d", cnt.server); |
199 | phandler->numeric_sts (me.name, 249, u->nick, "T :server %7d", cnt.server); |