]> jfr.im git - irc/rqf/shadowircd.git/commitdiff
CurrentTime -> rb_currenttime();
authorValery Yatsko <redacted>
Tue, 1 Apr 2008 23:53:20 +0000 (03:53 +0400)
committerValery Yatsko <redacted>
Tue, 1 Apr 2008 23:53:20 +0000 (03:53 +0400)
53 files changed:
include/ircd.h
modules/core/m_join.c
modules/core/m_message.c
modules/core/m_nick.c
modules/core/m_part.c
modules/core/m_quit.c
modules/m_admin.c
modules/m_challenge.c
modules/m_cmessage.c
modules/m_dline.c
modules/m_gline.c
modules/m_info.c
modules/m_kline.c
modules/m_knock.c
modules/m_list.c
modules/m_lusers.c
modules/m_motd.c
modules/m_names.c
modules/m_pong.c
modules/m_resv.c
modules/m_services.c
modules/m_signon.c
modules/m_stats.c
modules/m_svinfo.c
modules/m_testline.c
modules/m_time.c
modules/m_topic.c
modules/m_trace.c
modules/m_version.c
modules/m_who.c
modules/m_whois.c
modules/m_whowas.c
modules/m_xline.c
src/blacklist.c
src/channel.c
src/chmode.c
src/client.c
src/hash.c
src/ircd.c
src/listener.c
src/packet.c
src/reject.c
src/res.c
src/s_auth.c
src/s_conf.c
src/s_gline.c
src/s_log.c
src/s_newconf.c
src/s_serv.c
src/s_stats.c
src/s_user.c
src/scache.c
src/whowas.c

index d3d0e0f130871da4633b987187fed9adeb4946a9..f026f3d0dc735962b00aa3787eafbc25e9b62fd7 100644 (file)
@@ -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;
index fbb2e4adfecbb149b02f88fb34fcb8af9570512a..7c5d38464092633379147caa1614bc7e26141abb 100644 (file)
@@ -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",
index 651f395c1cb5d1bf10838094e5d1034aee07b88e..95a68fc76b5eded57416cf2c18ca6a18f0af232d 100644 (file)
@@ -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;
index b8b6771e524be8e03b09ea6f3630c9054cf9345e..02c278789804957aea38e2e8eaf598b677f18394 100644 (file)
@@ -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);
        }
 
index 0557002dd8a5ef68a8f79efe75824a46aa76382c..d7536d767bcf5f6b9391582c8c8ba49b01ac1825 100644 (file)
@@ -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);
index 2f1afb67469e5a8e4fe6e28a041b2d8a23d9b206..c60214d4efa60ca30df346461d60c2c0ea1e35f2 100644 (file)
@@ -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;
index 49d60f84134727c5b09b16c6141ad76c1a1adc4a..5e051a4da81f6ef03af6ce19a0f522b489358c54 100644 (file)
@@ -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;
index bb4ff39abf06d25fc62a63db5e545efcf3782159..9c2701153322d873c7e0cf466ab92cba4826531d 100644 (file)
@@ -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);
index d1a069e22f7c66dc9eace72d0a25cc9921bd126d..10fb40ebc42a21244938a1143651a9a8d2f9b6bc 100644 (file)
@@ -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;
index c7ede5322c13cda37edd690f34dd7b30189a4bb8..1cf22a0794bacfb3e5520436a0c3944d521514dc 100644 (file)
@@ -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))
index 9e8148ea0aa9b910e6d86253a1933621cbe80e40..5e8db9d5d8d51052bf5e0173b568c1af3925c722 100644 (file)
@@ -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);
 
index 08d43957a3a344790090a9434deae42c78052289..5bbad557cc685e480ae38e608c030ff58c16aadd 100644 (file)
@@ -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;
index 1fdac5b8abfb57555335e3dfcdfb67d999027124..faa6ad795f0f3e47e65c3206edd4a9cc60e1e5bf 100644 (file)
@@ -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.. */
index fce94690336eda3476322847d2ff2bc5f0c9b061..55a688d6bb3ef6412e622edb6f4cbdced8f48116 100644 (file)
@@ -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,
index 9b15f8114f077e17ecaff7a6735a59e4f9eb4ebb..e6aaff4ebbd31c167206cfaf153eaf076e45df38 100644 (file)
@@ -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);
index f819dbecc8cd87781b920f5acd8b4c88067c32c2..58dfdeedd61f9c0b93614b09cf562b279f5b9113 100644 (file)
@@ -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)
index 6b17c31c99b2e5095dfa6474b52afcf79b11bfb7..15742ff3f5117eadd77b3665ae08e142d30cdbc8 100644 (file)
@@ -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;
index bb4b238bcefd6a297b92832fb324066c353dcae2..59c670a144cd9fee8bce465c871f0594d501146d 100644 (file)
@@ -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);
index 73220b1efaada7c91d452157febc54c169ec1333..82ce37c4d81a13dcd6fcfd4aa4cff7980a327361 100644 (file)
@@ -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);
index d492c985f18ae56246487e268f63261b109d4bf1..084f3f8ef0d6225132346ebebb11550b47acf0c8 100644 (file)
@@ -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]",
index 899c1a3616186579293cef7ddb2f0ae266972235..af0e9c30d93790a4c228fdef0f40a3f1adbac287 100644 (file)
@@ -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;
index 16b13ccf5b9cbaf78e228e71d155ae4806904136..5e56f240a1194f3efd6da66a3b1214b989bbee9d 100644 (file)
@@ -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);
index af32d13d7bcd385cc9538175f632fdcbe1188945..f264e35fdd1f47f10290651252f1001127c8f1e1 100644 (file)
@@ -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,
                                    "-");
        }
 }
index 10f06eb0826373d875209f621ee3607af187e49a..0d8d90ce6377b40342c4dc1251d261be62cd05c8 100644 (file)
@@ -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;
index fbecbe8d1fffeccac344e8f6c711e40a3ea9d4ce..53e698b347b7005e52f3f6af35e94664fe663d19 100644 (file)
@@ -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;
 }
index 69403699d83f8ff77435fa28d00098a3eae6d35f..19a83225dc5a030f0e2513e0e05533b452429916 100644 (file)
@@ -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;
index 1aabf4bb1bee10aaeae89cbb5ae116a09905ddac..fb558fb12d59c908b4c3fabe7f230a811e990735 100644 (file)
@@ -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",
index 2f95f5d69c07d14b260c12690efe4d6aa10c6101..d04efd19be741c0f8495e130b2d3a721f59494b3 100644 (file)
@@ -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++;
 
                }
index 08b918aa849bcdae1be8364485bdeb18c8d1777a..e94460760df3b33b9d635133a65ca9ac1db14542 100644 (file)
@@ -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;
index bb8825989b0e4392bfac6d822160cb9590f72c2c..882a11a59701d477e9a8336c3e248f1e64881f97 100644 (file)
@@ -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
index 331630c7b3093ccec6eaa4892e97c7c73dc3a115..044493b537a8617b2405cbbd96edee7265dc125f 100644 (file)
@@ -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
index ecb477086710e8b61c2dfb10fb57b0066d11bf7b..807f84a5d511f44364bd076a247b8a99d355f51e 100644 (file)
@@ -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();
        }
 
 
index 4656ea378a6e21ce8834e2e0c6e57762b80b4354..98b46da6548c82be1eb7f502d53fd8c41b81e96e 100644 (file)
@@ -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)
        {
index c4dfe31f9f021518a2b0621041875017b998a6ef..50de9ade364d86ccbca7b04d1bdd4d2088cd1501 100644 (file)
@@ -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();
                }
        }
 
index b1b347bb2a6f0e8730d91608dd1a1ecf073a2b6c..183a4e34fba42a724fb6da2cddd862dfadafb758 100644 (file)
@@ -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();
        }
 }
 
index d252f6f9b0e75226bc6726d8c9ac2a6efd2d6208..2e73cb95de593d37eee1cec6b882abbb03cf2d21 100644 (file)
@@ -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);
 
index c2ae48219e579120b1c505cb0ee2d8c4862ccdf7..eee6db190a689f482b1638f6f1d2f32222a5bb23 100644 (file)
@@ -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);
index 48ed950a30c6ac4ffb9c01b7e6fb36c21e70b5e9..41829bbe6c0f55aa62bae9f51575a0b28a2adb93 100644 (file)
@@ -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]);
 
index c3bffde0467cd9000b087d996203321c12dbcd18..5550df971cde9409e8a214c528b260eb9b2af89f 100644 (file)
@@ -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);
index 304b51cf6705dee437aed274bee2ae1e809a910c..e8647cfd7f73a147b17e31dc49ec7a466890d74e 100644 (file)
@@ -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);
index 038ddca3cc653c63b2d10d7a5d0fc7f256d1fb65..d8afef07ad204611889fe29a41b9de5dfdfad2f9 100644 (file)
@@ -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;
 
        /*
index 86897b4dc9dab30f2967b9ca80605232e2da1866..a4374490f6bbdfac2cd256a0d7ff5d5fd1acaa3f 100644 (file)
@@ -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++;
index 356e838e504777fe70ee2ed82dd1edb882b03e13..fff5abc69e4174280f1e2cfc80d41efc72f16a36 100644 (file)
--- 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. */
index af4ab14bfa893763cd56d620c6ebd701353f11ce..ebb8765f14cd061b109a9126ce91a12e25a7c20c 100644 (file)
@@ -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);
                }
        }
index 83f0c58775b4ef574a311d3063cd7ce22a000ffe..3951baf909f9925e721a170b4a241574029174cb 100644 (file)
@@ -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)
index 8d7027b09e84aa513f7bd0e371e8eeecdbaebd9a..326c6da23fd4ef9555eef2da012451ff6b1181af 100644 (file)
@@ -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);
index 680b8b9267c11a2e6647f33bf333d920bcfe4715..de696d3e03fecb7f73eefda2df7202ca843b98c7 100644 (file)
@@ -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(&ltime);
 
index c4ba39d6adbd6f9d77539da728a25dca4bbf3ee0..061a9f65f9e53de4acff15b6ca54bd23cd58e2be 100644 (file)
@@ -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);
 }
index 361d546bb632ebb03b7f2674732fbed7654fa90e..cd3a90f17a2571a57e9fa65876c9ef6f2619099b 100644 (file)
@@ -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)) >
index 4d0fc16b8b09c14af15ce6bc8b513398659cdd7f..0dd277ea614f7f62658847f89ca7e2b6ed505132 100644 (file)
@@ -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)
                {
index 9ff1e4053c6f6dc0fe7feace9dc3a74315b56561..a9537d0554fc6df97582931b89b8a6fc765f3f2c 100644 (file)
@@ -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;
 
index 49c9f3b38b1746c34e7347f266e058b4ea42cd8e..920ebad93d0395d73817a9edcc811356dd14fd5d 100644 (file)
@@ -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);
 
index 1f7cd75a22e10f961a745dce3842f34a3748501d..4e31df7b51d3fbe252b467c07e3ec9a06ee188a8 100644 (file)
@@ -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)