*/
#include "stdinc.h"
-#include "tools.h"
#include "channel.h"
#include "client.h"
#include "common.h"
#include "whowas.h"
#include "s_conf.h" /* ConfigFileEntry, ConfigChannel */
#include "s_newconf.h"
-#include "event.h"
-#include "memory.h"
-#include "balloc.h"
#include "s_log.h"
extern rb_dlink_list global_channel_list;
{
struct Channel *chptr;
chptr = BlockHeapAlloc(channel_heap);
- DupString(chptr->chname, chname);
+ chptr->chname = rb_strdup(chname);
return (chptr);
}
void
free_channel(struct Channel *chptr)
{
- MyFree(chptr->chname);
+ rb_free(chptr->chname);
BlockHeapFree(channel_heap, chptr);
}
{
struct Ban *bptr;
bptr = BlockHeapAlloc(ban_heap);
- DupString(bptr->banstr, banstr);
- DupString(bptr->who, who);
+ bptr->banstr = rb_strdup(banstr);
+ bptr->who = rb_strdup(who);
return (bptr);
}
void
free_ban(struct Ban *bptr)
{
- MyFree(bptr->banstr);
- MyFree(bptr->who);
+ rb_free(bptr->banstr);
+ rb_free(bptr->who);
BlockHeapFree(ban_heap, bptr);
}
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);
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);
/* 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;
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);
}
else
{
- if((CurrentTime -
+ if((rb_current_time() -
(source_p->localClient->last_join_time)) < GlobalSetOptions.spam_time)
{
/* oh, its a possible spambot */
}
}
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();
}
}