From e3354945168e45e49cc0716349d44837eef96db1 Mon Sep 17 00:00:00 2001 From: Valery Yatsko Date: Wed, 2 Apr 2008 03:53:20 +0400 Subject: [PATCH] CurrentTime -> rb_currenttime(); --- include/ircd.h | 4 ---- modules/core/m_join.c | 14 +++++++------- modules/core/m_message.c | 34 +++++++++++++++++----------------- modules/core/m_nick.c | 12 ++++++------ modules/core/m_part.c | 2 +- modules/core/m_quit.c | 2 +- modules/m_admin.c | 8 ++++---- modules/m_challenge.c | 4 ++-- modules/m_cmessage.c | 6 +++--- modules/m_dline.c | 2 +- modules/m_gline.c | 10 +++++----- modules/m_info.c | 4 ++-- modules/m_kline.c | 2 +- modules/m_knock.c | 8 ++++---- modules/m_list.c | 4 ++-- modules/m_lusers.c | 4 ++-- modules/m_motd.c | 4 ++-- modules/m_names.c | 4 ++-- modules/m_pong.c | 2 +- modules/m_resv.c | 4 ++-- modules/m_services.c | 6 +++--- modules/m_signon.c | 2 +- modules/m_stats.c | 32 ++++++++++++++++---------------- modules/m_svinfo.c | 12 ++++++------ modules/m_testline.c | 12 ++++++------ modules/m_time.c | 2 +- modules/m_topic.c | 2 +- modules/m_trace.c | 12 ++++++------ modules/m_version.c | 4 ++-- modules/m_who.c | 4 ++-- modules/m_whois.c | 6 +++--- modules/m_whowas.c | 4 ++-- modules/m_xline.c | 4 ++-- src/blacklist.c | 4 ++-- src/channel.c | 14 +++++++------- src/chmode.c | 2 +- src/client.c | 24 ++++++++++++------------ src/hash.c | 2 +- src/ircd.c | 8 ++++---- src/listener.c | 4 ++-- src/packet.c | 4 ++-- src/reject.c | 8 ++++---- src/res.c | 6 +++--- src/s_auth.c | 6 +++--- src/s_conf.c | 26 +++++++++++++------------- src/s_gline.c | 4 ++-- src/s_log.c | 2 +- src/s_newconf.c | 12 ++++++------ src/s_serv.c | 8 ++++---- src/s_stats.c | 4 ++-- src/s_user.c | 2 +- src/scache.c | 12 ++++++------ src/whowas.c | 4 ++-- 53 files changed, 194 insertions(+), 198 deletions(-) diff --git a/include/ircd.h b/include/ircd.h index d3d0e0f1..f026f3d0 100644 --- a/include/ircd.h +++ b/include/ircd.h @@ -80,11 +80,7 @@ extern struct Client me; extern rb_dlink_list global_client_list; extern struct Client *local[]; extern struct Counter Count; -#if 0 -extern time_t CurrentTime; -#endif extern struct timeval SystemTime; -#define CurrentTime SystemTime.tv_sec extern int default_server_capabs; extern time_t startup_time; diff --git a/modules/core/m_join.c b/modules/core/m_join.c index fbb2e4ad..7c5d3846 100644 --- a/modules/core/m_join.c +++ b/modules/core/m_join.c @@ -262,7 +262,7 @@ m_join(struct Client *client_p, struct Client *source_p, int parc, const char *p sendto_one(source_p, form_str(ERR_TOOMANYCHANNELS), me.name, source_p->name, name); if(successful_join_count) - source_p->localClient->last_join_time = CurrentTime; + source_p->localClient->last_join_time = rb_current_time(); return 0; } @@ -303,10 +303,10 @@ m_join(struct Client *client_p, struct Client *source_p, int parc, const char *p /* add the user to the channel */ add_user_to_channel(chptr, source_p, flags); if (chptr->mode.join_num && - CurrentTime - chptr->join_delta >= chptr->mode.join_time) + rb_current_time() - chptr->join_delta >= chptr->mode.join_time) { chptr->join_count = 0; - chptr->join_delta = CurrentTime; + chptr->join_delta = rb_current_time(); } chptr->join_count++; @@ -320,7 +320,7 @@ m_join(struct Client *client_p, struct Client *source_p, int parc, const char *p /* its a new channel, set +nt and burst. */ if(flags & CHFL_CHANOP) { - chptr->channelts = CurrentTime; + chptr->channelts = rb_current_time(); chptr->mode.mode |= MODE_TOPICLIMIT; chptr->mode.mode |= MODE_NOPRIVMSGS; @@ -367,7 +367,7 @@ m_join(struct Client *client_p, struct Client *source_p, int parc, const char *p channel_member_names(chptr, source_p, 1); if(successful_join_count) - source_p->localClient->last_join_time = CurrentTime; + source_p->localClient->last_join_time = rb_current_time(); hook_info.client = source_p; hook_info.chptr = chptr; @@ -494,10 +494,10 @@ ms_join(struct Client *client_p, struct Client *source_p, int parc, const char * { add_user_to_channel(chptr, source_p, CHFL_PEON); if (chptr->mode.join_num && - CurrentTime - chptr->join_delta >= chptr->mode.join_time) + rb_current_time() - chptr->join_delta >= chptr->mode.join_time) { chptr->join_count = 0; - chptr->join_delta = CurrentTime; + chptr->join_delta = rb_current_time(); } chptr->join_count++; sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@%s JOIN :%s", diff --git a/modules/core/m_message.c b/modules/core/m_message.c index 651f395c..95a68fc7 100644 --- a/modules/core/m_message.c +++ b/modules/core/m_message.c @@ -446,7 +446,7 @@ msg_channel(int p_or_n, const char *command, { /* idle time shouldnt be reset by notices --fl */ if(p_or_n != NOTICE) - source_p->localClient->last = CurrentTime; + source_p->localClient->last = rb_current_time(); } if(chptr->mode.mode & MODE_NOCOLOR) @@ -530,7 +530,7 @@ msg_channel_flags(int p_or_n, const char *command, struct Client *client_p, { /* idletime shouldnt be reset by notice --fl */ if(p_or_n != NOTICE) - source_p->localClient->last = CurrentTime; + source_p->localClient->last = rb_current_time(); } sendto_channel_flags(client_p, type, source_p, chptr, "%s %c%s :%s", @@ -551,7 +551,7 @@ expire_tgchange(void *unused) { target = ptr->data; - if(target->expiry < CurrentTime) + if(target->expiry < rb_current_time()) { rb_dlinkDelete(ptr, &tgchange_list); rb_patricia_remove(tgchange_tree, target->pnode); @@ -576,7 +576,7 @@ add_target(struct Client *source_p, struct Client *target_p) * * XXX: is this controversial? */ - if(source_p->localClient->target_last > CurrentTime && IsOper(target_p)) + if(source_p->localClient->target_last > rb_current_time() && IsOper(target_p)) return 1; hashv = fnv_hash_upper((const unsigned char *)use_id(target_p), 32); @@ -597,17 +597,17 @@ add_target(struct Client *source_p, struct Client *target_p) if(!IsTGChange(source_p)) { SetTGChange(source_p); - source_p->localClient->target_last = CurrentTime; + source_p->localClient->target_last = rb_current_time(); } /* clear as many targets as we can */ - else if((i = (CurrentTime - source_p->localClient->target_last) / 60)) + else if((i = (rb_current_time() - source_p->localClient->target_last) / 60)) { if(i > USED_TARGETS(source_p)) USED_TARGETS(source_p) = 0; else USED_TARGETS(source_p) -= i; - source_p->localClient->target_last = CurrentTime; + source_p->localClient->target_last = rb_current_time(); } /* cant clear any, full target list */ else if(USED_TARGETS(source_p) == 10) @@ -622,7 +622,7 @@ add_target(struct Client *source_p, struct Client *target_p) */ else { - source_p->localClient->target_last = CurrentTime; + source_p->localClient->target_last = rb_current_time(); SetTGChange(source_p); } @@ -653,7 +653,7 @@ msg_client(int p_or_n, const char *command, /* reset idle time for message only if its not to self * and its not a notice */ if(p_or_n != NOTICE) - source_p->localClient->last = CurrentTime; + source_p->localClient->last = rb_current_time(); /* target change stuff, dont limit ctcp replies as that * would allow people to start filling up random users @@ -716,7 +716,7 @@ msg_client(int p_or_n, const char *command, } if((target_p->localClient->last_caller_id_time + - ConfigFileEntry.caller_id_wait) < CurrentTime) + ConfigFileEntry.caller_id_wait) < rb_current_time()) { if(p_or_n != NOTICE) sendto_one_numeric(source_p, RPL_TARGNOTIFY, @@ -727,7 +727,7 @@ msg_client(int p_or_n, const char *command, me.name, target_p->name, source_p->name, source_p->username, source_p->host); - target_p->localClient->last_caller_id_time = CurrentTime; + target_p->localClient->last_caller_id_time = rb_current_time(); } /* Only so opers can watch for floods */ (void) flood_attack_client(p_or_n, source_p, target_p); @@ -768,11 +768,11 @@ flood_attack_client(int p_or_n, struct Client *source_p, struct Client *target_p if(GlobalSetOptions.floodcount && MyConnect(target_p) && IsClient(source_p)) { - if((target_p->localClient->first_received_message_time + 1) < CurrentTime) + if((target_p->localClient->first_received_message_time + 1) < rb_current_time()) { - delta = CurrentTime - target_p->localClient->first_received_message_time; + delta = rb_current_time() - target_p->localClient->first_received_message_time; target_p->localClient->received_number_of_privmsgs -= delta; - target_p->localClient->first_received_message_time = CurrentTime; + target_p->localClient->first_received_message_time = rb_current_time(); if(target_p->localClient->received_number_of_privmsgs <= 0) { target_p->localClient->received_number_of_privmsgs = 0; @@ -823,11 +823,11 @@ flood_attack_channel(int p_or_n, struct Client *source_p, struct Channel *chptr, if(GlobalSetOptions.floodcount && MyClient(source_p)) { - if((chptr->first_received_message_time + 1) < CurrentTime) + if((chptr->first_received_message_time + 1) < rb_current_time()) { - delta = CurrentTime - chptr->first_received_message_time; + delta = rb_current_time() - chptr->first_received_message_time; chptr->received_number_of_privmsgs -= delta; - chptr->first_received_message_time = CurrentTime; + chptr->first_received_message_time = rb_current_time(); if(chptr->received_number_of_privmsgs <= 0) { chptr->received_number_of_privmsgs = 0; diff --git a/modules/core/m_nick.c b/modules/core/m_nick.c index b8b6771e..02c27878 100644 --- a/modules/core/m_nick.c +++ b/modules/core/m_nick.c @@ -734,7 +734,7 @@ set_initial_nick(struct Client *client_p, struct Client *source_p, char *nick) char note[NICKLEN + 10]; /* This had to be copied here to avoid problems.. */ - source_p->tsinfo = CurrentTime; + source_p->tsinfo = rb_current_time(); if(source_p->name[0]) del_from_client_hash(source_p->name, source_p); @@ -774,10 +774,10 @@ change_local_nick(struct Client *client_p, struct Client *source_p, nick, chptr->chname); return; } - if((source_p->localClient->last_nick_change + ConfigFileEntry.max_nick_time) < CurrentTime) + if((source_p->localClient->last_nick_change + ConfigFileEntry.max_nick_time) < rb_current_time()) source_p->localClient->number_of_nick_changes = 0; - source_p->localClient->last_nick_change = CurrentTime; + source_p->localClient->last_nick_change = rb_current_time(); source_p->localClient->number_of_nick_changes++; if(ConfigFileEntry.anti_nick_flood && !IsOper(source_p) && @@ -796,10 +796,10 @@ change_local_nick(struct Client *client_p, struct Client *source_p, if(!samenick) { /* force the TS to increase -- jilles */ - if (source_p->tsinfo >= CurrentTime) + if (source_p->tsinfo >= rb_current_time()) source_p->tsinfo++; else - source_p->tsinfo = CurrentTime; + source_p->tsinfo = rb_current_time(); monitor_signoff(source_p); /* we only do bancache for local users -- jilles */ if(source_p->user) @@ -870,7 +870,7 @@ change_remote_nick(struct Client *client_p, struct Client *source_p, /* client changing their nick - dont reset ts if its same */ if(!samenick) { - source_p->tsinfo = newts ? newts : CurrentTime; + source_p->tsinfo = newts ? newts : rb_current_time(); monitor_signoff(source_p); } diff --git a/modules/core/m_part.c b/modules/core/m_part.c index 0557002d..d7536d76 100644 --- a/modules/core/m_part.c +++ b/modules/core/m_part.c @@ -127,7 +127,7 @@ part_one_client(struct Client *client_p, struct Client *source_p, char *name, ch if(reason[0] && (is_chanop(msptr) || !MyConnect(source_p) || ((can_send(chptr, source_p, msptr) > 0 && (source_p->localClient->firsttime + - ConfigFileEntry.anti_spam_exit_message_time) < CurrentTime)))) + ConfigFileEntry.anti_spam_exit_message_time) < rb_current_time())))) { sendto_server(client_p, chptr, CAP_TS6, NOCAPS, ":%s PART %s :%s", use_id(source_p), chptr->chname, reason); diff --git a/modules/core/m_quit.c b/modules/core/m_quit.c index 2f1afb67..c60214d4 100644 --- a/modules/core/m_quit.c +++ b/modules/core/m_quit.c @@ -74,7 +74,7 @@ m_quit(struct Client *client_p, struct Client *source_p, int parc, const char *p if(!IsOper(source_p) && (source_p->localClient->firsttime + ConfigFileEntry.anti_spam_exit_message_time) > - CurrentTime) + rb_current_time()) { exit_client(client_p, source_p, source_p, "Client Quit"); return 0; diff --git a/modules/m_admin.c b/modules/m_admin.c index 49d60f84..5e051a4d 100644 --- a/modules/m_admin.c +++ b/modules/m_admin.c @@ -68,7 +68,7 @@ mr_admin(struct Client *client_p, struct Client *source_p, int parc, const char { static time_t last_used = 0L; - if((last_used + ConfigFileEntry.pace_wait) > CurrentTime) + if((last_used + ConfigFileEntry.pace_wait) > rb_current_time()) { sendto_one(source_p, form_str(RPL_LOAD2HI), me.name, @@ -77,7 +77,7 @@ mr_admin(struct Client *client_p, struct Client *source_p, int parc, const char return 0; } else - last_used = CurrentTime; + last_used = rb_current_time(); do_admin(source_p); @@ -96,14 +96,14 @@ m_admin(struct Client *client_p, struct Client *source_p, int parc, const char * if(parc > 1) { - if((last_used + ConfigFileEntry.pace_wait) > CurrentTime) + if((last_used + ConfigFileEntry.pace_wait) > rb_current_time()) { sendto_one(source_p, form_str(RPL_LOAD2HI), me.name, source_p->name, "ADMIN"); return 0; } else - last_used = CurrentTime; + last_used = rb_current_time(); if(hunt_server(client_p, source_p, ":%s ADMIN :%s", 1, parc, parv) != HUNTED_ISME) return 0; diff --git a/modules/m_challenge.c b/modules/m_challenge.c index bb4ff39a..9c270115 100644 --- a/modules/m_challenge.c +++ b/modules/m_challenge.c @@ -128,7 +128,7 @@ m_challenge(struct Client *client_p, struct Client *source_p, int parc, const ch if(!source_p->localClient->challenge) return 0; - if((CurrentTime - source_p->localClient->chal_time) > CHALLENGE_EXPIRES) + if((rb_current_time() - source_p->localClient->chal_time) > CHALLENGE_EXPIRES) { sendto_one(source_p, form_str(ERR_PASSWDMISMATCH), me.name, source_p->name); ilog(L_FOPER, "EXPIRED CHALLENGE (%s) by (%s!%s@%s) (%s)", @@ -226,7 +226,7 @@ m_challenge(struct Client *client_p, struct Client *source_p, int parc, const ch if(!generate_challenge(&challenge, &(source_p->localClient->challenge), oper_p->rsa_pubkey)) { char *chal = challenge; - source_p->localClient->chal_time = CurrentTime; + source_p->localClient->chal_time = rb_current_time(); for(;;) { cnt = strlcpy(chal_line, chal, CHALLENGE_WIDTH); diff --git a/modules/m_cmessage.c b/modules/m_cmessage.c index d1a069e2..10fb40eb 100644 --- a/modules/m_cmessage.c +++ b/modules/m_cmessage.c @@ -143,7 +143,7 @@ m_cmessage(int p_or_n, const char *command, form_str(ERR_TARGUMODEG), target_p->name); if((target_p->localClient->last_caller_id_time + - ConfigFileEntry.caller_id_wait) < CurrentTime) + ConfigFileEntry.caller_id_wait) < rb_current_time()) { if(p_or_n != NOTICE) sendto_one_numeric(source_p, RPL_TARGNOTIFY, @@ -154,14 +154,14 @@ m_cmessage(int p_or_n, const char *command, me.name, target_p->name, source_p->name, source_p->username, source_p->host); - target_p->localClient->last_caller_id_time = CurrentTime; + target_p->localClient->last_caller_id_time = rb_current_time(); } return 0; } if(p_or_n != NOTICE) - source_p->localClient->last = CurrentTime; + source_p->localClient->last = rb_current_time(); sendto_anywhere(target_p, source_p, command, ":%s", parv[3]); return 0; diff --git a/modules/m_dline.c b/modules/m_dline.c index c7ede532..1cf22a07 100644 --- a/modules/m_dline.c +++ b/modules/m_dline.c @@ -204,7 +204,7 @@ mo_dline(struct Client *client_p, struct Client *source_p, "Temporary D-line %d min. - %s (%s)", (int) (tdline_time / 60), reason, current_date); aconf->passwd = rb_strdup(dlbuffer); - aconf->hold = CurrentTime + tdline_time; + aconf->hold = rb_current_time() + tdline_time; add_temp_dline(aconf); if(EmptyString(oper_reason)) diff --git a/modules/m_gline.c b/modules/m_gline.c index 9e8148ea..5e8db9d5 100644 --- a/modules/m_gline.c +++ b/modules/m_gline.c @@ -562,7 +562,7 @@ set_local_gline(struct Client *source_p, const char *user, aconf->passwd = rb_strdup(buffer); aconf->user = rb_strdup(user); aconf->host = rb_strdup(host); - aconf->hold = CurrentTime + ConfigFileEntry.gline_time; + aconf->hold = rb_current_time() + ConfigFileEntry.gline_time; add_gline(aconf); sendto_realops_snomask(SNO_GENERAL, L_ALL, @@ -651,8 +651,8 @@ majority_gline(struct Client *source_p, const char *user, sizeof(pending->oper_host2)); pending->reason2 = rb_strdup(reason); pending->oper_server2 = scache_get_name(source_p->servptr->serv->nameinfo); - pending->last_gline_time = CurrentTime; - pending->time_request2 = CurrentTime; + pending->last_gline_time = rb_current_time(); + pending->time_request2 = rb_current_time(); return NO; } } @@ -676,8 +676,8 @@ majority_gline(struct Client *source_p, const char *user, pending->reason1 = rb_strdup(reason); pending->reason2 = NULL; - pending->last_gline_time = CurrentTime; - pending->time_request1 = CurrentTime; + pending->last_gline_time = rb_current_time(); + pending->time_request1 = rb_current_time(); rb_dlinkAddAlloc(pending, &pending_glines); diff --git a/modules/m_info.c b/modules/m_info.c index 08d43957..5bbad557 100644 --- a/modules/m_info.c +++ b/modules/m_info.c @@ -623,7 +623,7 @@ m_info(struct Client *client_p, struct Client *source_p, int parc, const char *p { static time_t last_used = 0L; - 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), @@ -632,7 +632,7 @@ m_info(struct Client *client_p, struct Client *source_p, int parc, const char *p return 0; } else - last_used = CurrentTime; + last_used = rb_current_time(); if(hunt_server(client_p, source_p, ":%s INFO :%s", 1, parc, parv) != HUNTED_ISME) return 0; diff --git a/modules/m_kline.c b/modules/m_kline.c index 1fdac5b8..faa6ad79 100644 --- a/modules/m_kline.c +++ b/modules/m_kline.c @@ -508,7 +508,7 @@ static void apply_tkline(struct Client *source_p, struct ConfItem *aconf, const char *reason, const char *oper_reason, const char *current_date, int tkline_time) { - aconf->hold = CurrentTime + tkline_time; + aconf->hold = rb_current_time() + tkline_time; add_temp_kline(aconf); /* no oper reason.. */ diff --git a/modules/m_knock.c b/modules/m_knock.c index fce94690..55a688d6 100644 --- a/modules/m_knock.c +++ b/modules/m_knock.c @@ -137,13 +137,13 @@ m_knock(struct Client *client_p, struct Client *source_p, int parc, const char * * allow one knock per channel per knock_delay_channel */ if(!IsOper(source_p) && - (source_p->localClient->last_knock + ConfigChannel.knock_delay) > CurrentTime) + (source_p->localClient->last_knock + ConfigChannel.knock_delay) > rb_current_time()) { sendto_one(source_p, form_str(ERR_TOOMANYKNOCK), me.name, source_p->name, name, "user"); return 0; } - else if((chptr->last_knock + ConfigChannel.knock_delay_channel) > CurrentTime) + else if((chptr->last_knock + ConfigChannel.knock_delay_channel) > rb_current_time()) { sendto_one(source_p, form_str(ERR_TOOMANYKNOCK), me.name, source_p->name, name, "channel"); @@ -151,13 +151,13 @@ m_knock(struct Client *client_p, struct Client *source_p, int parc, const char * } /* ok, we actually can send the knock, tell client */ - source_p->localClient->last_knock = CurrentTime; + source_p->localClient->last_knock = rb_current_time(); sendto_one(source_p, form_str(RPL_KNOCKDLVR), me.name, source_p->name, name); } - chptr->last_knock = CurrentTime; + chptr->last_knock = rb_current_time(); if(ConfigChannel.use_knock) sendto_channel_local(chptr->mode.mode & MODE_FREEINVITE ? ALL_MEMBERS : ONLY_CHANOPS, diff --git a/modules/m_list.c b/modules/m_list.c index 9b15f811..e6aaff4e 100644 --- a/modules/m_list.c +++ b/modules/m_list.c @@ -124,14 +124,14 @@ static int m_list(struct Client *client_p, struct Client *source_p, int parc, co if (parc < 2 || !IsChannelName(parv[1])) { /* pace this due to the sheer traffic involved */ - if (((last_used + ConfigFileEntry.pace_wait) > CurrentTime)) + if (((last_used + ConfigFileEntry.pace_wait) > rb_current_time())) { sendto_one(source_p, form_str(RPL_LOAD2HI), me.name, source_p->name, "LIST"); sendto_one(source_p, form_str(RPL_LISTEND), me.name, source_p->name); return 0; } else - last_used = CurrentTime; + last_used = rb_current_time(); } return mo_list(client_p, source_p, parc, parv); diff --git a/modules/m_lusers.c b/modules/m_lusers.c index f819dbec..58dfdeed 100644 --- a/modules/m_lusers.c +++ b/modules/m_lusers.c @@ -63,7 +63,7 @@ m_lusers(struct Client *client_p, struct Client *source_p, int parc, const char if (parc > 2) { - 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), @@ -71,7 +71,7 @@ m_lusers(struct Client *client_p, struct Client *source_p, int parc, const char return 0; } else - last_used = CurrentTime; + last_used = rb_current_time(); if(hunt_server(client_p, source_p, ":%s LUSERS %s :%s", 2, parc, parv) != HUNTED_ISME) diff --git a/modules/m_motd.c b/modules/m_motd.c index 6b17c31c..15742ff3 100644 --- a/modules/m_motd.c +++ b/modules/m_motd.c @@ -67,7 +67,7 @@ m_motd(struct Client *client_p, struct Client *source_p, int parc, const char *p { static time_t last_used = 0; - 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), @@ -77,7 +77,7 @@ m_motd(struct Client *client_p, struct Client *source_p, int parc, const char *p return 0; } else - last_used = CurrentTime; + last_used = rb_current_time(); if(hunt_server(client_p, source_p, ":%s MOTD :%s", 1, parc, parv) != HUNTED_ISME) return 0; diff --git a/modules/m_names.c b/modules/m_names.c index bb4b238b..59c670a1 100644 --- a/modules/m_names.c +++ b/modules/m_names.c @@ -92,7 +92,7 @@ m_names(struct Client *client_p, struct Client *source_p, int parc, const char * { if(!IsOper(source_p)) { - if((last_used + ConfigFileEntry.pace_wait) > CurrentTime) + if((last_used + ConfigFileEntry.pace_wait) > rb_current_time()) { sendto_one(source_p, form_str(RPL_LOAD2HI), me.name, source_p->name, "NAMES"); @@ -101,7 +101,7 @@ m_names(struct Client *client_p, struct Client *source_p, int parc, const char * return 0; } else - last_used = CurrentTime; + last_used = rb_current_time(); } names_global(source_p); diff --git a/modules/m_pong.c b/modules/m_pong.c index 73220b1e..82ce37c4 100644 --- a/modules/m_pong.c +++ b/modules/m_pong.c @@ -89,7 +89,7 @@ ms_pong(struct Client *client_p, struct Client *source_p, int parc, const char * sendto_realops_snomask(SNO_GENERAL, L_ALL, "End of burst (emulated) from %s (%d seconds)", source_p->name, - (signed int) (CurrentTime - source_p->localClient->firsttime)); + (signed int) (rb_current_time() - source_p->localClient->firsttime)); SetEob(source_p); eob_count++; call_hook(h_server_eob, source_p); diff --git a/modules/m_resv.c b/modules/m_resv.c index d492c985..084f3f8e 100644 --- a/modules/m_resv.c +++ b/modules/m_resv.c @@ -230,7 +230,7 @@ parse_resv(struct Client *source_p, const char *name, if(temp_time > 0) { - aconf->hold = CurrentTime + temp_time; + aconf->hold = rb_current_time() + temp_time; sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s added temporary %d min. RESV for [%s] [%s]", @@ -288,7 +288,7 @@ parse_resv(struct Client *source_p, const char *name, if(temp_time > 0) { - aconf->hold = CurrentTime + temp_time; + aconf->hold = rb_current_time() + temp_time; sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s added temporary %d min. RESV for [%s] [%s]", diff --git a/modules/m_services.c b/modules/m_services.c index 899c1a36..af0e9c30 100644 --- a/modules/m_services.c +++ b/modules/m_services.c @@ -204,8 +204,8 @@ me_rsfnc(struct Client *client_p, struct Client *source_p, newts = atol(parv[3]); /* timestamp is older than 15mins, ignore it */ - if(newts < (CurrentTime - 900)) - newts = CurrentTime - 900; + if(newts < (rb_current_time() - 900)) + newts = rb_current_time() - 900; target_p->tsinfo = newts; @@ -270,7 +270,7 @@ me_nickdelay(struct Client *client_p, struct Client *source_p, int parc, const c add_nd_entry(parv[2]); nd = irc_dictionary_retrieve(nd_dict, parv[2]); if (nd != NULL) - nd->expire = CurrentTime + duration; + nd->expire = rb_current_time() + duration; } return 0; diff --git a/modules/m_signon.c b/modules/m_signon.c index 16b13ccf..5e56f240 100644 --- a/modules/m_signon.c +++ b/modules/m_signon.c @@ -257,7 +257,7 @@ me_svslogin(struct Client *client_p, struct Client *source_p, { char note[NICKLEN + 10]; - send_signon(NULL, target_p, nick, user, host, CurrentTime, login); + send_signon(NULL, target_p, nick, user, host, rb_current_time(), login); rb_snprintf(note, NICKLEN + 10, "Nick: %s", target_p->name); rb_note(target_p->localClient->F, note); diff --git a/modules/m_stats.c b/modules/m_stats.c index af32d13d..f264e35f 100644 --- a/modules/m_stats.c +++ b/modules/m_stats.c @@ -195,7 +195,7 @@ m_stats(struct Client *client_p, struct Client *source_p, int parc, const char * 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), @@ -205,7 +205,7 @@ m_stats(struct Client *client_p, struct Client *source_p, int parc, const char * 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) @@ -894,7 +894,7 @@ stats_usage (struct Client *source_p) if(0 == secs) secs = 1; - rup = (CurrentTime - startup_time) * hzz; + rup = (rb_current_time() - startup_time) * hzz; if(0 == rup) rup = 1; @@ -935,7 +935,7 @@ stats_uptime (struct Client *source_p) { 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, @@ -1049,7 +1049,7 @@ stats_servers (struct Client *source_p) 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; @@ -1063,7 +1063,7 @@ stats_servers (struct Client *source_p) "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); @@ -1194,9 +1194,9 @@ stats_servlinks (struct Client *source_p) (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"); } @@ -1210,7 +1210,7 @@ stats_servlinks (struct Client *source_p) "? :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)", @@ -1347,9 +1347,9 @@ stats_l_client(struct Client *source_p, struct Client *target_p, (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) : "-"); } @@ -1366,9 +1366,9 @@ stats_l_client(struct Client *source_p, struct Client *target_p, (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, "-"); } } diff --git a/modules/m_svinfo.c b/modules/m_svinfo.c index 10f06eb0..0d8d90ce 100644 --- a/modules/m_svinfo.c +++ b/modules/m_svinfo.c @@ -78,11 +78,11 @@ ms_svinfo(struct Client *client_p, struct Client *source_p, int parc, const char } /* - * since we're here, might as well set CurrentTime while we're at it + * since we're here, might as well set rb_current_time() while we're at it */ set_time(); theirtime = atol(parv[4]); - deltat = abs(theirtime - CurrentTime); + deltat = abs(theirtime - rb_current_time()); if(deltat > ConfigFileEntry.ts_max_delta) { @@ -90,13 +90,13 @@ ms_svinfo(struct Client *client_p, struct Client *source_p, int parc, const char "Link %s dropped, excessive TS delta" " (my TS=%ld, their TS=%ld, delta=%d)", get_server_name(source_p, SHOW_IP), - (long) CurrentTime, (long) theirtime, deltat); + (long) rb_current_time(), (long) theirtime, deltat); ilog(L_SERVER, "Link %s dropped, excessive TS delta" " (my TS=%ld, their TS=%ld, delta=%d)", - log_client_name(source_p, SHOW_IP), (long) CurrentTime, (long) theirtime, deltat); + log_client_name(source_p, SHOW_IP), (long) rb_current_time(), (long) theirtime, deltat); snprintf(squitreason, sizeof squitreason, "Excessive TS delta (my TS=%ld, their TS=%ld, delta=%d)", - (long) CurrentTime, (long) theirtime, deltat); + (long) rb_current_time(), (long) theirtime, deltat); exit_client(source_p, source_p, source_p, squitreason); return 0; } @@ -106,7 +106,7 @@ ms_svinfo(struct Client *client_p, struct Client *source_p, int parc, const char sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "Link %s notable TS delta" " (my TS=%ld, their TS=%ld, delta=%d)", - source_p->name, (long) CurrentTime, (long) theirtime, deltat); + source_p->name, (long) rb_current_time(), (long) theirtime, deltat); } return 0; diff --git a/modules/m_testline.c b/modules/m_testline.c index fbecbe8d..53e698b3 100644 --- a/modules/m_testline.c +++ b/modules/m_testline.c @@ -81,7 +81,7 @@ mo_testline(struct Client *client_p, struct Client *source_p, int parc, const ch sendto_one(source_p, form_str(RPL_TESTLINE), me.name, source_p->name, resv_p->hold ? 'q' : 'Q', - resv_p->hold ? (long) ((resv_p->hold - CurrentTime) / 60) : 0L, + resv_p->hold ? (long) ((resv_p->hold - rb_current_time()) / 60) : 0L, resv_p->name, resv_p->passwd); /* this is a false positive, so make sure it isn't counted in stats q * --nenolod @@ -132,7 +132,7 @@ mo_testline(struct Client *client_p, struct Client *source_p, int parc, const ch me.name, source_p->name, (aconf->flags & CONF_FLAGS_TEMPORARY) ? 'd' : 'D', (aconf->flags & CONF_FLAGS_TEMPORARY) ? - (long) ((aconf->hold - CurrentTime) / 60) : 0L, + (long) ((aconf->hold - rb_current_time()) / 60) : 0L, aconf->host, aconf->passwd); return 0; @@ -168,7 +168,7 @@ mo_testline(struct Client *client_p, struct Client *source_p, int parc, const ch me.name, source_p->name, (aconf->flags & CONF_FLAGS_TEMPORARY) ? 'k' : 'K', (aconf->flags & CONF_FLAGS_TEMPORARY) ? - (long) ((aconf->hold - CurrentTime) / 60) : 0L, + (long) ((aconf->hold - rb_current_time()) / 60) : 0L, buf, aconf->passwd); return 0; } @@ -178,7 +178,7 @@ mo_testline(struct Client *client_p, struct Client *source_p, int parc, const ch aconf->user, aconf->host); sendto_one(source_p, form_str(RPL_TESTLINE), me.name, source_p->name, - 'G', (long) ((aconf->hold - CurrentTime) / 60), + 'G', (long) ((aconf->hold - rb_current_time()) / 60), buf, aconf->passwd); return 0; } @@ -190,7 +190,7 @@ mo_testline(struct Client *client_p, struct Client *source_p, int parc, const ch sendto_one(source_p, form_str(RPL_TESTLINE), me.name, source_p->name, resv_p->hold ? 'q' : 'Q', - resv_p->hold ? (long) ((resv_p->hold - CurrentTime) / 60) : 0L, + resv_p->hold ? (long) ((resv_p->hold - rb_current_time()) / 60) : 0L, resv_p->name, resv_p->passwd); /* this is a false positive, so make sure it isn't counted in stats q @@ -230,7 +230,7 @@ mo_testgecos(struct Client *client_p, struct Client *source_p, int parc, const c sendto_one(source_p, form_str(RPL_TESTLINE), me.name, source_p->name, aconf->hold ? 'x' : 'X', - aconf->hold ? (long) ((aconf->hold - CurrentTime) / 60) : 0L, + aconf->hold ? (long) ((aconf->hold - rb_current_time()) / 60) : 0L, aconf->name, aconf->passwd); return 0; } diff --git a/modules/m_time.c b/modules/m_time.c index 69403699..19a83225 100644 --- a/modules/m_time.c +++ b/modules/m_time.c @@ -93,7 +93,7 @@ date(void) time_t lclock; int minswest; - lclock = CurrentTime; + lclock = rb_current_time(); gm = gmtime(&lclock); memcpy((void *) &gmbuf, (void *) gm, sizeof(gmbuf)); gm = &gmbuf; diff --git a/modules/m_topic.c b/modules/m_topic.c index 1aabf4bb..fb558fb1 100644 --- a/modules/m_topic.c +++ b/modules/m_topic.c @@ -103,7 +103,7 @@ m_topic(struct Client *client_p, struct Client *source_p, int parc, const char * char topic_info[USERHOST_REPLYLEN]; rb_sprintf(topic_info, "%s!%s@%s", source_p->name, source_p->username, source_p->host); - set_channel_topic(chptr, parv[2], topic_info, CurrentTime); + set_channel_topic(chptr, parv[2], topic_info, rb_current_time()); sendto_server(client_p, chptr, CAP_TS6, NOCAPS, ":%s TOPIC %s :%s", diff --git a/modules/m_trace.c b/modules/m_trace.c index 2f95f5d6..d04efd19 100644 --- a/modules/m_trace.c +++ b/modules/m_trace.c @@ -369,7 +369,7 @@ report_this_status(struct Client *source_p, struct Client *target_p, sendto_one_numeric(source_p, RPL_TRACEUNKNOWN, form_str(RPL_TRACEUNKNOWN), class_name, name, ip, - CurrentTime - target_p->localClient->firsttime); + rb_current_time() - target_p->localClient->firsttime); cnt++; break; @@ -386,16 +386,16 @@ report_this_status(struct Client *source_p, struct Client *target_p, form_str(RPL_TRACEOPERATOR), class_name, name, show_ip(source_p, target_p) ? ip : "255.255.255.255", - CurrentTime - target_p->localClient->lasttime, - CurrentTime - target_p->localClient->last); + rb_current_time() - target_p->localClient->lasttime, + rb_current_time() - target_p->localClient->last); else sendto_one_numeric(source_p, RPL_TRACEUSER, form_str(RPL_TRACEUSER), class_name, name, show_ip(source_p, target_p) ? ip : "255.255.255.255", - CurrentTime - target_p->localClient->lasttime, - CurrentTime - target_p->localClient->last); + rb_current_time() - target_p->localClient->lasttime, + rb_current_time() - target_p->localClient->last); cnt++; } break; @@ -410,7 +410,7 @@ report_this_status(struct Client *source_p, struct Client *target_p, sendto_one_numeric(source_p, RPL_TRACESERVER, form_str(RPL_TRACESERVER), class_name, servcount, usercount, name, *(target_p->serv->by) ? target_p->serv->by : "*", "*", - me.name, CurrentTime - target_p->localClient->lasttime); + me.name, rb_current_time() - target_p->localClient->lasttime); cnt++; } diff --git a/modules/m_version.c b/modules/m_version.c index 08b918aa..e9446076 100644 --- a/modules/m_version.c +++ b/modules/m_version.c @@ -61,7 +61,7 @@ m_version(struct Client *client_p, struct Client *source_p, int parc, const char if(parc > 1) { - 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), @@ -69,7 +69,7 @@ m_version(struct Client *client_p, struct Client *source_p, int parc, const char return 0; } else - last_used = CurrentTime; + last_used = rb_current_time(); if(hunt_server(client_p, source_p, ":%s VERSION :%s", 1, parc, parv) != HUNTED_ISME) return 0; diff --git a/modules/m_who.c b/modules/m_who.c index bb882598..882a11a5 100644 --- a/modules/m_who.c +++ b/modules/m_who.c @@ -176,7 +176,7 @@ m_who(struct Client *client_p, struct Client *source_p, int parc, const char *pa /* it has to be a global who at this point, limit it */ if(!IsOper(source_p)) { - if((last_used + ConfigFileEntry.pace_wait) > CurrentTime) + if((last_used + ConfigFileEntry.pace_wait) > rb_current_time()) { sendto_one(source_p, form_str(RPL_LOAD2HI), me.name, source_p->name, "WHO"); @@ -185,7 +185,7 @@ m_who(struct Client *client_p, struct Client *source_p, int parc, const char *pa return 0; } else - last_used = CurrentTime; + last_used = rb_current_time(); } /* Note: operspy_dont_care_user_info does not apply to diff --git a/modules/m_whois.c b/modules/m_whois.c index 331630c7..044493b5 100644 --- a/modules/m_whois.c +++ b/modules/m_whois.c @@ -90,7 +90,7 @@ m_whois(struct Client *client_p, struct Client *source_p, int parc, const char * if(!IsOper(source_p)) { /* seeing as this is going across servers, we should limit it */ - if((last_used + ConfigFileEntry.pace_wait_simple) > CurrentTime) + if((last_used + ConfigFileEntry.pace_wait_simple) > rb_current_time()) { sendto_one(source_p, form_str(RPL_LOAD2HI), me.name, source_p->name, "WHOIS"); @@ -99,7 +99,7 @@ m_whois(struct Client *client_p, struct Client *source_p, int parc, const char * return 0; } else - last_used = CurrentTime; + last_used = rb_current_time(); } if(hunt_server(client_p, source_p, ":%s WHOIS %s :%s", 1, parc, parv) != @@ -345,7 +345,7 @@ single_whois(struct Client *source_p, struct Client *target_p, int operspy) sendto_one_numeric(source_p, RPL_WHOISIDLE, form_str(RPL_WHOISIDLE), target_p->name, - CurrentTime - target_p->localClient->last, + rb_current_time() - target_p->localClient->last, target_p->localClient->firsttime); } else diff --git a/modules/m_whowas.c b/modules/m_whowas.c index ecb47708..807f84a5 100644 --- a/modules/m_whowas.c +++ b/modules/m_whowas.c @@ -69,7 +69,7 @@ m_whowas(struct Client *client_p, struct Client *source_p, int parc, const char if(!IsOper(source_p)) { - if((last_used + ConfigFileEntry.pace_wait_simple) > CurrentTime) + if((last_used + ConfigFileEntry.pace_wait_simple) > rb_current_time()) { sendto_one(source_p, form_str(RPL_LOAD2HI), me.name, source_p->name, "WHOWAS"); @@ -78,7 +78,7 @@ m_whowas(struct Client *client_p, struct Client *source_p, int parc, const char return 0; } else - last_used = CurrentTime; + last_used = rb_current_time(); } diff --git a/modules/m_xline.c b/modules/m_xline.c index 4656ea37..98b46da6 100644 --- a/modules/m_xline.c +++ b/modules/m_xline.c @@ -321,7 +321,7 @@ apply_xline(struct Client *source_p, const char *name, const char *reason, if(temp_time > 0) { - aconf->hold = CurrentTime + temp_time; + aconf->hold = rb_current_time() + temp_time; sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s added temporary %d min. X-Line for [%s] [%s]", @@ -373,7 +373,7 @@ write_xline(struct Client *source_p, struct ConfItem *aconf) rb_sprintf(buffer, "\"%s\",\"0\",\"%s\",\"%s\",%ld\n", aconf->name, aconf->passwd, - get_oper_name(source_p), CurrentTime); + get_oper_name(source_p), rb_current_time()); if(fputs(buffer, out) == -1) { diff --git a/src/blacklist.c b/src/blacklist.c index c4dfe31f..50de9ade 100644 --- a/src/blacklist.c +++ b/src/blacklist.c @@ -82,12 +82,12 @@ static void blacklist_dns_callback(void *vptr, struct DNSReply *reply) if (reply->addr.ss_family == AF_INET && !memcmp(&((struct sockaddr_in *)&reply->addr)->sin_addr, "\177\0\0", 3)) listed = TRUE; - else if (blcptr->blacklist->lastwarning + 3600 < CurrentTime) + else if (blcptr->blacklist->lastwarning + 3600 < rb_current_time()) { sendto_realops_snomask(SNO_GENERAL, L_ALL, "Garbage reply from blacklist %s", blcptr->blacklist->host); - blcptr->blacklist->lastwarning = CurrentTime; + blcptr->blacklist->lastwarning = rb_current_time(); } } diff --git a/src/channel.c b/src/channel.c index b1b347bb..183a4e34 100644 --- a/src/channel.c +++ b/src/channel.c @@ -242,7 +242,7 @@ remove_user_from_channel(struct membership *msptr) if(client_p->servptr == &me) rb_dlinkDelete(&msptr->locchannode, &chptr->locmembers); - chptr->users_last = CurrentTime; + chptr->users_last = rb_current_time(); if(!(chptr->mode.mode & MODE_PERMANENT) && rb_dlink_list_length(&chptr->members) <= 0) destroy_channel(chptr); @@ -279,7 +279,7 @@ remove_user_from_channels(struct Client *client_p) if(client_p->servptr == &me) rb_dlinkDelete(&msptr->locchannode, &chptr->locmembers); - chptr->users_last = CurrentTime; + chptr->users_last = rb_current_time(); if(!(chptr->mode.mode & MODE_PERMANENT) && rb_dlink_list_length(&chptr->members) <= 0) destroy_channel(chptr); @@ -784,7 +784,7 @@ can_join(struct Client *source_p, struct Channel *chptr, char *key) /* join throttling stuff --nenolod */ else if(chptr->mode.join_num > 0 && chptr->mode.join_time > 0) { - if ((CurrentTime - chptr->join_delta <= + if ((rb_current_time() - chptr->join_delta <= chptr->mode.join_time) && (chptr->join_count >= chptr->mode.join_num)) i = ERR_THROTTLE; @@ -942,7 +942,7 @@ check_spambot_warning(struct Client *source_p, const char *name) else { if((t_delta = - (CurrentTime - source_p->localClient->last_leave_time)) > + (rb_current_time() - source_p->localClient->last_leave_time)) > JOIN_LEAVE_COUNT_EXPIRE_TIME) { decrement_count = (t_delta / JOIN_LEAVE_COUNT_EXPIRE_TIME); @@ -953,7 +953,7 @@ check_spambot_warning(struct Client *source_p, const char *name) } else { - if((CurrentTime - + if((rb_current_time() - (source_p->localClient->last_join_time)) < GlobalSetOptions.spam_time) { /* oh, its a possible spambot */ @@ -961,9 +961,9 @@ check_spambot_warning(struct Client *source_p, const char *name) } } if(name != NULL) - source_p->localClient->last_join_time = CurrentTime; + source_p->localClient->last_join_time = rb_current_time(); else - source_p->localClient->last_leave_time = CurrentTime; + source_p->localClient->last_leave_time = rb_current_time(); } } diff --git a/src/chmode.c b/src/chmode.c index d252f6f9..2e73cb95 100644 --- a/src/chmode.c +++ b/src/chmode.c @@ -129,7 +129,7 @@ add_id(struct Client *source_p, struct Channel *chptr, const char *banid, strlcpy(who, source_p->name, sizeof(who)); actualBan = allocate_ban(realban, who); - actualBan->when = CurrentTime; + actualBan->when = rb_current_time(); rb_dlinkAdd(actualBan, &actualBan->node, list); diff --git a/src/client.c b/src/client.c index c2ae4821..eee6db19 100644 --- a/src/client.c +++ b/src/client.c @@ -154,7 +154,7 @@ make_client(struct Client *from) SetMyConnect(client_p); client_p->localClient = localClient; - client_p->localClient->lasttime = client_p->localClient->firsttime = CurrentTime; + client_p->localClient->lasttime = client_p->localClient->firsttime = rb_current_time(); client_p->localClient->F = NULL; client_p->localClient->ctrlfd = -1; @@ -303,13 +303,13 @@ check_pings_list(rb_dlink_list * list) ping = get_client_ping(client_p); - if(ping < (CurrentTime - client_p->localClient->lasttime)) + if(ping < (rb_current_time() - client_p->localClient->lasttime)) { /* * If the client/server hasnt talked to us in 2*ping seconds * and it has a ping time, then close its connection. */ - if(((CurrentTime - client_p->localClient->lasttime) >= (2 * ping) + if(((rb_current_time() - client_p->localClient->lasttime) >= (2 * ping) && (client_p->flags & FLAGS_PINGSENT))) { if(IsServer(client_p)) @@ -323,7 +323,7 @@ check_pings_list(rb_dlink_list * list) } (void) rb_snprintf(scratch, sizeof(scratch), "Ping timeout: %d seconds", - (int) (CurrentTime - client_p->localClient->lasttime)); + (int) (rb_current_time() - client_p->localClient->lasttime)); exit_client(client_p, client_p, &me, scratch); continue; @@ -337,7 +337,7 @@ check_pings_list(rb_dlink_list * list) */ client_p->flags |= FLAGS_PINGSENT; /* not nice but does the job */ - client_p->localClient->lasttime = CurrentTime - ping; + client_p->localClient->lasttime = rb_current_time() - ping; sendto_one(client_p, "PING :%s", me.name); } } @@ -373,7 +373,7 @@ check_unknowns_list(rb_dlink_list * list) */ timeout = IsAnyServer(client_p) ? ConfigFileEntry.connect_timeout : 30; - if((CurrentTime - client_p->localClient->firsttime) > timeout) + if((rb_current_time() - client_p->localClient->firsttime) > timeout) { if(IsAnyServer(client_p)) { @@ -1553,10 +1553,10 @@ exit_local_server(struct Client *client_p, struct Client *source_p, struct Clien sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s was connected" " for %ld seconds. %d/%d sendK/recvK.", - source_p->name, CurrentTime - source_p->localClient->firsttime, sendk, recvk); + source_p->name, rb_current_time() - source_p->localClient->firsttime, sendk, recvk); ilog(L_SERVER, "%s was connected for %ld seconds. %d/%d sendK/recvK.", - source_p->name, CurrentTime - source_p->localClient->firsttime, sendk, recvk); + source_p->name, rb_current_time() - source_p->localClient->firsttime, sendk, recvk); if(has_id(source_p)) del_from_id_hash(source_p->id, source_p); @@ -1603,10 +1603,10 @@ exit_local_client(struct Client *client_p, struct Client *source_p, struct Clien show_ip(NULL, source_p) ? source_p->sockhost : "255.255.255.255", comment); - on_for = CurrentTime - source_p->localClient->firsttime; + on_for = rb_current_time() - source_p->localClient->firsttime; ilog(L_USER, "%s (%3lu:%02lu:%02lu): %s!%s@%s %d/%d", - myctime(CurrentTime), on_for / 3600, + myctime(rb_current_time()), on_for / 3600, (on_for % 3600) / 60, on_for % 60, source_p->name, source_p->username, source_p->host, source_p->localClient->sendK, source_p->localClient->receiveK); @@ -2026,7 +2026,7 @@ close_connection(struct Client *client_p) ServerStats->is_sbr += client_p->localClient->receiveB; ServerStats->is_sks += client_p->localClient->sendK; ServerStats->is_skr += client_p->localClient->receiveK; - ServerStats->is_sti += CurrentTime - client_p->localClient->firsttime; + ServerStats->is_sti += rb_current_time() - client_p->localClient->firsttime; if(ServerStats->is_sbs > 2047) { ServerStats->is_sks += (ServerStats->is_sbs >> 10); @@ -2064,7 +2064,7 @@ close_connection(struct Client *client_p) ServerStats->is_cbr += client_p->localClient->receiveB; ServerStats->is_cks += client_p->localClient->sendK; ServerStats->is_ckr += client_p->localClient->receiveK; - ServerStats->is_cti += CurrentTime - client_p->localClient->firsttime; + ServerStats->is_cti += rb_current_time() - client_p->localClient->firsttime; if(ServerStats->is_cbs > 2047) { ServerStats->is_cks += (ServerStats->is_cbs >> 10); diff --git a/src/hash.c b/src/hash.c index 48ed950a..41829bbe 100644 --- a/src/hash.c +++ b/src/hash.c @@ -600,7 +600,7 @@ get_or_create_channel(struct Client *client_p, const char *chname, int *isnew) rb_dlinkAdd(chptr, &chptr->node, &global_channel_list); - chptr->channelts = CurrentTime; /* doesn't hurt to set it here */ + chptr->channelts = rb_current_time(); /* doesn't hurt to set it here */ rb_dlinkAddAlloc(chptr, &channelTable[hashv]); diff --git a/src/ircd.c b/src/ircd.c index c3bffde0..5550df97 100644 --- a/src/ircd.c +++ b/src/ircd.c @@ -244,8 +244,8 @@ set_time(void) newtime.tv_sec = time(NULL); #endif - if(newtime.tv_sec < CurrentTime) - rb_set_back_events(CurrentTime - newtime.tv_sec); + if(newtime.tv_sec < rb_current_time()) + rb_set_back_events(rb_current_time() - newtime.tv_sec); SystemTime.tv_sec = newtime.tv_sec; SystemTime.tv_usec = newtime.tv_usec; @@ -291,7 +291,7 @@ charybdis_io_loop(void) */ delay = rb_event_next(); - if(delay <= CurrentTime) + if(delay <= rb_current_time()) rb_event_run(); @@ -634,7 +634,7 @@ main(int argc, char *argv[]) me.servptr = &me; SetMe(&me); make_server(&me); - startup_time = CurrentTime; + startup_time = rb_current_time(); add_to_client_hash(me.name, &me); add_to_id_hash(me.id, &me); me.serv->nameinfo = scache_connect(me.name, me.info, 0); diff --git a/src/listener.c b/src/listener.c index 304b51cf..e8647cfd 100644 --- a/src/listener.c +++ b/src/listener.c @@ -528,12 +528,12 @@ accept_connection(int pfd, void *data) /* * slow down the whining to opers bit */ - if((last_oper_notice + 20) <= CurrentTime) + if((last_oper_notice + 20) <= rb_current_time()) { sendto_realops_snomask(SNO_GENERAL, L_ALL, "All connections in use. (%s)", get_listener_name(listener)); - last_oper_notice = CurrentTime; + last_oper_notice = rb_current_time(); } write(fd, "ERROR :All connections in use\r\n", 32); diff --git a/src/packet.c b/src/packet.c index 038ddca3..d8afef07 100644 --- a/src/packet.c +++ b/src/packet.c @@ -374,8 +374,8 @@ read_packet(int fd, void *data) call_hook(h_iorecv_id, &hdata); #endif - if(client_p->localClient->lasttime < CurrentTime) - client_p->localClient->lasttime = CurrentTime; + if(client_p->localClient->lasttime < rb_current_time()) + client_p->localClient->lasttime = rb_current_time(); client_p->flags &= ~FLAGS_PINGSENT; /* diff --git a/src/reject.c b/src/reject.c index 86897b4d..a4374490 100644 --- a/src/reject.c +++ b/src/reject.c @@ -98,7 +98,7 @@ reject_expires(void *unused) pnode = ptr->data; rdata = pnode->data; - if(rdata->time + ConfigFileEntry.reject_duration > CurrentTime) + if(rdata->time + ConfigFileEntry.reject_duration > rb_current_time()) continue; rb_dlinkDelete(ptr, &reject_list); @@ -137,7 +137,7 @@ add_reject(struct Client *client_p, const char *mask1, const char *mask2) if((pnode = match_ip(reject_tree, (struct sockaddr *)&client_p->localClient->ip)) != NULL) { rdata = pnode->data; - rdata->time = CurrentTime; + rdata->time = rb_current_time(); rdata->count++; } else @@ -150,7 +150,7 @@ add_reject(struct Client *client_p, const char *mask1, const char *mask2) pnode = make_and_lookup_ip(reject_tree, (struct sockaddr *)&client_p->localClient->ip, bitlen); pnode->data = rdata = rb_malloc(sizeof(struct reject_data)); rb_dlinkAddTail(pnode, &rdata->rnode, &reject_list); - rdata->time = CurrentTime; + rdata->time = rb_current_time(); rdata->count = 1; } rdata->mask_hashv = hashv; @@ -172,7 +172,7 @@ check_reject(struct Client *client_p) { rdata = pnode->data; - rdata->time = CurrentTime; + rdata->time = rb_current_time(); if(rdata->count > ConfigFileEntry.reject_after_count) { ServerStats->is_rej++; diff --git a/src/res.c b/src/res.c index 356e838e..fff5abc6 100644 --- a/src/res.c +++ b/src/res.c @@ -212,7 +212,7 @@ static time_t timeout_query_list(time_t now) */ static void timeout_resolver(void *notused) { - timeout_query_list(CurrentTime); + timeout_query_list(rb_current_time()); } /* @@ -241,7 +241,7 @@ static void start_resolver(void) void init_resolver(void) { #ifdef HAVE_SRAND48 - srand48(CurrentTime); + srand48(rb_current_time()); #endif start_resolver(); } @@ -298,7 +298,7 @@ static struct reslist *make_request(struct DNSQuery *query) { struct reslist *request = rb_malloc(sizeof(struct reslist)); - request->sentat = CurrentTime; + request->sentat = rb_current_time(); request->retries = 3; request->resend = 1; request->timeout = 4; /* start at 4 and exponential inc. */ diff --git a/src/s_auth.c b/src/s_auth.c index af4ab14b..ebb8765f 100644 --- a/src/s_auth.c +++ b/src/s_auth.c @@ -116,7 +116,7 @@ make_auth_request(struct Client *client) client->localClient->auth_request = request; request->fd = -1; request->client = client; - request->timeout = CurrentTime + ConfigFileEntry.connect_timeout; + request->timeout = rb_current_time() + ConfigFileEntry.connect_timeout; return request; } @@ -433,7 +433,7 @@ timeout_auth_queries_event(void *notused) { auth = ptr->data; - if(auth->timeout < CurrentTime) + if(auth->timeout < rb_current_time()) { if(auth->fd >= 0) rb_close(auth->fd); @@ -452,7 +452,7 @@ timeout_auth_queries_event(void *notused) sendheader(auth->client, REPORT_FAIL_DNS); } - auth->client->localClient->lasttime = CurrentTime; + auth->client->localClient->lasttime = rb_current_time(); release_auth_client(auth); } } diff --git a/src/s_conf.c b/src/s_conf.c index 83f0c587..3951baf9 100644 --- a/src/s_conf.c +++ b/src/s_conf.c @@ -935,17 +935,17 @@ conf_connect_allowed(struct sockaddr *addr, int aftype) void add_temp_kline(struct ConfItem *aconf) { - if(aconf->hold >= CurrentTime + (10080 * 60)) + if(aconf->hold >= rb_current_time() + (10080 * 60)) { rb_dlinkAddAlloc(aconf, &temp_klines[TEMP_WEEK]); aconf->port = TEMP_WEEK; } - else if(aconf->hold >= CurrentTime + (1440 * 60)) + else if(aconf->hold >= rb_current_time() + (1440 * 60)) { rb_dlinkAddAlloc(aconf, &temp_klines[TEMP_DAY]); aconf->port = TEMP_DAY; } - else if(aconf->hold >= CurrentTime + (60 * 60)) + else if(aconf->hold >= rb_current_time() + (60 * 60)) { rb_dlinkAddAlloc(aconf, &temp_klines[TEMP_HOUR]); aconf->port = TEMP_HOUR; @@ -969,17 +969,17 @@ add_temp_kline(struct ConfItem *aconf) void add_temp_dline(struct ConfItem *aconf) { - if(aconf->hold >= CurrentTime + (10080 * 60)) + if(aconf->hold >= rb_current_time() + (10080 * 60)) { rb_dlinkAddAlloc(aconf, &temp_dlines[TEMP_WEEK]); aconf->port = TEMP_WEEK; } - else if(aconf->hold >= CurrentTime + (1440 * 60)) + else if(aconf->hold >= rb_current_time() + (1440 * 60)) { rb_dlinkAddAlloc(aconf, &temp_dlines[TEMP_DAY]); aconf->port = TEMP_DAY; } - else if(aconf->hold >= CurrentTime + (60 * 60)) + else if(aconf->hold >= rb_current_time() + (60 * 60)) { rb_dlinkAddAlloc(aconf, &temp_dlines[TEMP_HOUR]); aconf->port = TEMP_HOUR; @@ -1012,7 +1012,7 @@ expire_temp_kd(void *list) { aconf = ptr->data; - if(aconf->hold <= CurrentTime) + if(aconf->hold <= rb_current_time()) { /* Alert opers that a TKline expired - Hwy */ if(ConfigFileEntry.tkline_expire_notices) @@ -1037,7 +1037,7 @@ reorganise_temp_kd(void *list) { aconf = ptr->data; - if(aconf->hold < (CurrentTime + (60 * 60))) + if(aconf->hold < (rb_current_time() + (60 * 60))) { rb_dlinkMoveNode(ptr, list, (aconf->status == CONF_KILL) ? &temp_klines[TEMP_MIN] : &temp_dlines[TEMP_MIN]); @@ -1045,14 +1045,14 @@ reorganise_temp_kd(void *list) } else if(aconf->port > TEMP_HOUR) { - if(aconf->hold < (CurrentTime + (1440 * 60))) + if(aconf->hold < (rb_current_time() + (1440 * 60))) { rb_dlinkMoveNode(ptr, list, (aconf->status == CONF_KILL) ? &temp_klines[TEMP_HOUR] : &temp_dlines[TEMP_HOUR]); aconf->port = TEMP_HOUR; } else if(aconf->port > TEMP_DAY && - (aconf->hold < (CurrentTime + (10080 * 60)))) + (aconf->hold < (rb_current_time() + (10080 * 60)))) { rb_dlinkMoveNode(ptr, list, (aconf->status == CONF_KILL) ? &temp_klines[TEMP_DAY] : &temp_dlines[TEMP_DAY]); @@ -1377,18 +1377,18 @@ write_confitem(KlineType type, struct Client *source_p, char *user, rb_snprintf(buffer, sizeof(buffer), "\"%s\",\"%s\",\"%s\",\"%s\",\"%s\",\"%s\",%ld\n", user, host, reason, oper_reason, current_date, - get_oper_name(source_p), CurrentTime); + get_oper_name(source_p), rb_current_time()); } else if(type == DLINE_TYPE) { rb_snprintf(buffer, sizeof(buffer), "\"%s\",\"%s\",\"%s\",\"%s\",\"%s\",%ld\n", host, - reason, oper_reason, current_date, get_oper_name(source_p), CurrentTime); + reason, oper_reason, current_date, get_oper_name(source_p), rb_current_time()); } else if(type == RESV_TYPE) { rb_snprintf(buffer, sizeof(buffer), "\"%s\",\"%s\",\"%s\",%ld\n", - host, reason, get_oper_name(source_p), CurrentTime); + host, reason, get_oper_name(source_p), rb_current_time()); } if(fputs(buffer, out) == -1) diff --git a/src/s_gline.c b/src/s_gline.c index 8d7027b0..326c6da2 100644 --- a/src/s_gline.c +++ b/src/s_gline.c @@ -121,7 +121,7 @@ expire_glines() kill_ptr = gline_node->data; /* these are in chronological order */ - if(kill_ptr->hold > CurrentTime) + if(kill_ptr->hold > rb_current_time()) break; rb_dlinkDestroy(gline_node, &glines); @@ -151,7 +151,7 @@ expire_pending_glines() glp_ptr = pending_node->data; if(((glp_ptr->last_gline_time + GLINE_PENDING_EXPIRE) <= - CurrentTime) || find_is_glined(glp_ptr->host, glp_ptr->user)) + rb_current_time()) || find_is_glined(glp_ptr->host, glp_ptr->user)) { rb_free(glp_ptr->reason1); diff --git a/src/s_log.c b/src/s_log.c index 680b8b92..de696d3e 100644 --- a/src/s_log.c +++ b/src/s_log.c @@ -210,7 +210,7 @@ smalldate(void) { static char buf[MAX_DATE_STRING]; struct tm *lt; - time_t ltime = CurrentTime; + time_t ltime = rb_current_time(); lt = localtime(<ime); diff --git a/src/s_newconf.c b/src/s_newconf.c index c4ba39d6..061a9f65 100644 --- a/src/s_newconf.c +++ b/src/s_newconf.c @@ -693,7 +693,7 @@ expire_temp_rxlines(void *unused) { aconf = ptr->data; - if(aconf->hold && aconf->hold <= CurrentTime) + if(aconf->hold && aconf->hold <= rb_current_time()) { if(ConfigFileEntry.tkline_expire_notices) sendto_realops_snomask(SNO_GENERAL, L_ALL, @@ -710,7 +710,7 @@ expire_temp_rxlines(void *unused) { aconf = ptr->data; - if(aconf->hold && aconf->hold <= CurrentTime) + if(aconf->hold && aconf->hold <= rb_current_time()) { if(ConfigFileEntry.tkline_expire_notices) sendto_realops_snomask(SNO_GENERAL, L_ALL, @@ -725,7 +725,7 @@ expire_temp_rxlines(void *unused) { aconf = ptr->data; - if(aconf->hold && aconf->hold <= CurrentTime) + if(aconf->hold && aconf->hold <= rb_current_time()) { if(ConfigFileEntry.tkline_expire_notices) sendto_realops_snomask(SNO_GENERAL, L_ALL, @@ -754,7 +754,7 @@ add_nd_entry(const char *name) nd = BlockHeapAlloc(nd_heap); strlcpy(nd->name, name, sizeof(nd->name)); - nd->expire = CurrentTime + ConfigFileEntry.nick_delay; + nd->expire = rb_current_time() + ConfigFileEntry.nick_delay; /* this list is ordered */ rb_dlinkAddTail(nd, &nd->lnode, &nd_list); @@ -785,7 +785,7 @@ expire_nd_entries(void *unused) /* this list is ordered - we can stop when we hit the first * entry that doesnt expire.. */ - if(nd->expire > CurrentTime) + if(nd->expire > rb_current_time()) return; free_nd_entry(nd); @@ -808,7 +808,7 @@ add_tgchange(const char *host) target->pnode = pnode; target->ip = rb_strdup(host); - target->expiry = CurrentTime + (60*60*12); + target->expiry = rb_current_time() + (60*60*12); rb_dlinkAdd(target, &target->node, &tgchange_list); } diff --git a/src/s_serv.c b/src/s_serv.c index 361d546b..cd3a90f1 100644 --- a/src/s_serv.c +++ b/src/s_serv.c @@ -370,7 +370,7 @@ try_connections(void *unused) * made one successfull connection... [this algorithm is * a bit fuzzy... -- msa >;) ] */ - if(tmp_p->hold > CurrentTime) + if(tmp_p->hold > rb_current_time()) { if(next > tmp_p->hold || next == 0) next = tmp_p->hold; @@ -378,7 +378,7 @@ try_connections(void *unused) } confrq = get_con_freq(cltmp); - tmp_p->hold = CurrentTime + confrq; + tmp_p->hold = rb_current_time() + confrq; /* * Found a CONNECT config with port specified, scan clients @@ -1079,7 +1079,7 @@ server_estab(struct Client *client_p) SetServlink(client_p); } - sendto_one(client_p, "SVINFO %d %d 0 :%ld", TS_CURRENT, TS_MIN, CurrentTime); + sendto_one(client_p, "SVINFO %d %d 0 :%ld", TS_CURRENT, TS_MIN, rb_current_time()); client_p->servptr = &me; @@ -1113,7 +1113,7 @@ server_estab(struct Client *client_p) } client_p->serv->nameinfo = scache_connect(client_p->name, client_p->info, IsHidden(client_p)); - client_p->localClient->firsttime = CurrentTime; + client_p->localClient->firsttime = rb_current_time(); /* fixing eob timings.. -gnp */ if((rb_dlink_list_length(&lclient_list) + rb_dlink_list_length(&serv_list)) > diff --git a/src/s_stats.c b/src/s_stats.c index 4d0fc16b..0dd277ea 100644 --- a/src/s_stats.c +++ b/src/s_stats.c @@ -76,7 +76,7 @@ tstats(struct Client *source_p) sp->is_sbr += target_p->localClient->receiveB; sp->is_sks += target_p->localClient->sendK; sp->is_skr += target_p->localClient->receiveK; - sp->is_sti += CurrentTime - target_p->localClient->firsttime; + sp->is_sti += rb_current_time() - target_p->localClient->firsttime; sp->is_sv++; if(sp->is_sbs > 1023) { @@ -98,7 +98,7 @@ tstats(struct Client *source_p) sp->is_cbr += target_p->localClient->receiveB; sp->is_cks += target_p->localClient->sendK; sp->is_ckr += target_p->localClient->receiveK; - sp->is_cti += CurrentTime - target_p->localClient->firsttime; + sp->is_cti += rb_current_time() - target_p->localClient->firsttime; sp->is_cl++; if(sp->is_cbs > 1023) { diff --git a/src/s_user.c b/src/s_user.c index 9ff1e405..a9537d05 100644 --- a/src/s_user.c +++ b/src/s_user.c @@ -261,7 +261,7 @@ register_local_user(struct Client *client_p, struct Client *source_p, const char if(rb_dlink_list_length(&source_p->preClient->dnsbl_queries) > 0) return -1; - client_p->localClient->last = CurrentTime; + client_p->localClient->last = rb_current_time(); /* Straight up the maximum rate of flooding... */ source_p->localClient->allow_read = MAX_FLOOD_BURST; diff --git a/src/scache.c b/src/scache.c index 49c9f3b3..920ebad9 100644 --- a/src/scache.c +++ b/src/scache.c @@ -105,7 +105,7 @@ find_or_add(const char *name) strlcpy(ptr->name, name, sizeof(ptr->name)); ptr->info[0] = '\0'; ptr->flags = 0; - ptr->known_since = CurrentTime; + ptr->known_since = rb_current_time(); ptr->last_connect = 0; ptr->last_split = 0; @@ -126,7 +126,7 @@ scache_connect(const char *name, const char *info, int hidden) ptr->flags |= SC_HIDDEN; else ptr->flags &= ~SC_HIDDEN; - ptr->last_connect = CurrentTime; + ptr->last_connect = rb_current_time(); return ptr; } @@ -136,7 +136,7 @@ scache_split(struct scache_entry *ptr) if (ptr == NULL) return; ptr->flags &= ~SC_ONLINE; - ptr->last_split = CurrentTime; + ptr->last_split = rb_current_time(); } const char *scache_get_name(struct scache_entry *ptr) @@ -168,9 +168,9 @@ scache_send_flattened_links(struct Client *source_p) !ConfigServerHide.disable_hidden) show = FALSE; else if (scache_ptr->flags & SC_ONLINE) - show = scache_ptr->known_since < CurrentTime - ConfigServerHide.links_delay; + show = scache_ptr->known_since < rb_current_time() - ConfigServerHide.links_delay; else - show = scache_ptr->last_split > CurrentTime - ConfigServerHide.links_delay && scache_ptr->last_split - scache_ptr->known_since > ConfigServerHide.links_delay; + show = scache_ptr->last_split > rb_current_time() - ConfigServerHide.links_delay && scache_ptr->last_split - scache_ptr->known_since > ConfigServerHide.links_delay; if (show) sendto_one_numeric(source_p, RPL_LINKS, form_str(RPL_LINKS), scache_ptr->name, me.name, 1, scache_ptr->info); @@ -203,7 +203,7 @@ scache_send_missing(struct Client *source_p) scache_ptr = scache_hash[i]; while (scache_ptr) { - if (!(scache_ptr->flags & SC_ONLINE) && scache_ptr->last_split > CurrentTime - MISSING_TIMEOUT) + if (!(scache_ptr->flags & SC_ONLINE) && scache_ptr->last_split > rb_current_time() - MISSING_TIMEOUT) sendto_one_numeric(source_p, RPL_MAP, "** %s (recently split)", scache_ptr->name); diff --git a/src/whowas.c b/src/whowas.c index 1f7cd75a..4e31df7b 100644 --- a/src/whowas.c +++ b/src/whowas.c @@ -72,7 +72,7 @@ void add_history(struct Client *client_p, int online) del_whowas_from_list(&WHOWASHASH[who->hashv], who); } who->hashv = hash_whowas_name(client_p->name); - who->logoff = CurrentTime; + who->logoff = rb_current_time(); /* * NOTE: strcpy ok here, the sizes in the client struct MUST * match the sizes in the whowas struct @@ -118,7 +118,7 @@ struct Client *get_history(const char *nick, time_t timelimit) struct Whowas *temp; int blah; - timelimit = CurrentTime - timelimit; + timelimit = rb_current_time() - timelimit; blah = hash_whowas_name(nick); temp = WHOWASHASH[blah]; for (; temp; temp = temp->next)