if(MyClient(source_p) && !IsOper(source_p))
{
/* Check the user is actually allowed to do /stats, and isnt flooding */
- if((last_used + ConfigFileEntry.pace_wait) > CurrentTime)
+ if((last_used + ConfigFileEntry.pace_wait) > rb_current_time())
{
/* safe enough to give this on a local connect only */
sendto_one(source_p, form_str(RPL_LOAD2HI),
return 0;
}
else
- last_used = CurrentTime;
+ last_used = rb_current_time();
}
if(hunt_server (client_p, source_p, ":%s STATS %s :%s", 2, parc, parv) != HUNTED_ISME)
}}
-static void\r
-stats_events_cb(char *str, void *ptr)\r
-{\r
- sendto_one_numeric(ptr, RPL_STATSDEBUG, "E :%s", str);\r
-}\r
-\r
-static void\r
-stats_events (struct Client *source_p)\r
-{\r
- rb_dump_events(stats_events_cb, source_p);\r
- send_pop_queue(source_p);\r
+static void
+stats_events_cb(char *str, void *ptr)
+{
+ sendto_one_numeric(ptr, RPL_STATSDEBUG, "E :%s", str);
+}
+
+static void
+stats_events (struct Client *source_p)
+{
+ rb_dump_events(stats_events_cb, source_p);
+ send_pop_queue(source_p);
}
/* stats_pending_glines()
if(0 == secs)
secs = 1;
- rup = (CurrentTime - startup_time) * hzz;
+ rup = (rb_current_time() - startup_time) * hzz;
if(0 == rup)
rup = 1;
{
time_t now;
- now = CurrentTime - startup_time;
+ now = rb_current_time() - startup_time;
sendto_one_numeric(source_p, RPL_STATSUPTIME,
form_str (RPL_STATSUPTIME),
now / 86400, (now / 3600) % 24,
target_p = ptr->data;
j++;
- seconds = CurrentTime - target_p->localClient->firsttime;
+ seconds = rb_current_time() - target_p->localClient->firsttime;
days = (int) (seconds / 86400);
seconds %= 86400;
"Connected: %d day%s, %d:%02d:%02d",
target_p->name,
(target_p->serv->by[0] ? target_p->serv->by : "Remote."),
- (int) (CurrentTime - target_p->localClient->lasttime),
+ (int) (rb_current_time() - target_p->localClient->lasttime),
(int) rb_linebuf_len (&target_p->localClient->buf_sendq),
days, (days == 1) ? "" : "s", hours, minutes,
(int) seconds);
sendto_one(source_p, Sformat,
get_id(&me, source_p), RPL_STATSLINKINFO, get_id(source_p, source_p),
get_server_name(target_p, SHOW_IP),
- (int) linebuf_len (&target_p->localClient->buf_sendq),
+ (int) rb_linebuf_len (&target_p->localClient->buf_sendq),
(int) target_p->localClient->sendM,
(int) target_p->localClient->sendK,
(int) target_p->localClient->receiveM,
(int) target_p->localClient->receiveK,
- CurrentTime - target_p->localClient->firsttime,
- (CurrentTime > target_p->localClient->lasttime) ?
- (CurrentTime - target_p->localClient->lasttime) : 0,
+ rb_current_time() - target_p->localClient->firsttime,
+ (rb_current_time() > target_p->localClient->lasttime) ?
+ (rb_current_time() - target_p->localClient->lasttime) : 0,
IsOper (source_p) ? show_capabilities (target_p) : "TS");
}
"? :Recv total : %7.2f %s",
_GMKv (receiveK), _GMKs (receiveK));
- uptime = (CurrentTime - startup_time);
+ uptime = (rb_current_time() - startup_time);
sendto_one_numeric(source_p, RPL_STATSDEBUG,
"? :Server send: %7.2f %s (%4.1f K/s)",
{
sendto_one_numeric(source_p, RPL_STATSLINKINFO, Lformat,
get_server_name(target_p, SHOW_IP),
- (int) linebuf_len(&target_p->localClient->buf_sendq),
+ (int) rb_linebuf_len(&target_p->localClient->buf_sendq),
(int) target_p->localClient->sendM,
(int) target_p->localClient->sendK,
(int) target_p->localClient->receiveM,
(int) target_p->localClient->receiveK,
- CurrentTime - target_p->localClient->firsttime,
- (CurrentTime > target_p->localClient->lasttime) ?
- (CurrentTime - target_p->localClient->lasttime) : 0,
+ rb_current_time() - target_p->localClient->firsttime,
+ (rb_current_time() > target_p->localClient->lasttime) ?
+ (rb_current_time() - target_p->localClient->lasttime) : 0,
IsOper(source_p) ? show_capabilities(target_p) : "-");
}
get_client_name(target_p, SHOW_IP) :
get_client_name(target_p, HIDE_IP)) :
get_client_name(target_p, MASK_IP),
- (int) linebuf_len(&target_p->localClient->buf_sendq),
+ (int) rb_linebuf_len(&target_p->localClient->buf_sendq),
(int) target_p->localClient->sendM,
(int) target_p->localClient->sendK,
(int) target_p->localClient->receiveM,
(int) target_p->localClient->receiveK,
- CurrentTime - target_p->localClient->firsttime,
- (CurrentTime > target_p->localClient->lasttime) ?
- (CurrentTime - target_p->localClient->lasttime) : 0,
+ rb_current_time() - target_p->localClient->firsttime,
+ (rb_current_time() > target_p->localClient->lasttime) ?
+ (rb_current_time() - target_p->localClient->lasttime) : 0,
"-");
}
}
-static void\r
-rb_dump_fd_callback(int fd, const char *desc, void *data)\r
-{\r
- struct Client *source_p = data;\r
- sendto_one_numeric(source_p, RPL_STATSDEBUG, "F :fd %-3d desc '%s'", fd, desc);\r
-}\r
-\r
-static void\r
-stats_comm(struct Client *source_p)\r
-{\r
- rb_dump_fd(rb_dump_fd_callback, source_p);\r
- send_pop_queue(source_p);\r
+static void
+rb_dump_fd_callback(int fd, const char *desc, void *data)
+{
+ struct Client *source_p = data;
+ sendto_one_numeric(source_p, RPL_STATSDEBUG, "F :fd %-3d desc '%s'", fd, desc);
+}
+
+static void
+stats_comm(struct Client *source_p)
+{
+ rb_dump_fd(rb_dump_fd_callback, source_p);
+ send_pop_queue(source_p);
}
/*