ntargets = 0;
- for(nick = strtoken(&p, target_list, ","); nick; nick = strtoken(&p, NULL, ","))
+ for(nick = rb_strtok_r(target_list, ",", &p); nick; nick = rb_strtok_r(NULL, ",", &p))
{
char *with_prefix;
/*
{
/* 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)
{
- strlcpy(text2, text, BUFSIZE);
+ rb_strlcpy(text2, text, BUFSIZE);
strip_colour(text2);
text = text2;
if (EmptyString(text))
{
/* 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",
expire_tgchange(void *unused)
{
tgchange *target;
- rb_dlink_node *ptr, *rb_free(;
+ rb_dlink_node *ptr, *next_ptr;
- RB_DLINK_FOREACH_SAFE(ptr, rb_free(, tgchange_list.head)
+ RB_DLINK_FOREACH_SAFE(ptr, next_ptr, tgchange_list.head)
{
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);
*
* 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);
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)
{
- ServerStats->is_tgch++;
+ ServerStats.is_tgch++;
add_tgchange(source_p->sockhost);
return 0;
}
*/
else
{
- source_p->localClient->target_last = CurrentTime;
+ source_p->localClient->target_last = rb_current_time();
SetTGChange(source_p);
}
/* 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
}
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,
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);
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;
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;