From 954012d39be2c96c55f6939e69edd8aa90495820 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Tue, 1 Apr 2008 19:35:13 -0500 Subject: [PATCH] extensions compile without libcharybdis now. --- configure | 3 +-- extensions/hurt.c | 16 ++++++++-------- extensions/ip_cloaking.c | 3 +-- extensions/ip_cloaking_old.c | 3 +-- extensions/m_findforwards.c | 5 ++--- extensions/m_mkpasswd.c | 4 ++-- extensions/m_ojoin.c | 3 +-- extensions/m_okick.c | 1 - extensions/m_olist.c | 5 ++--- extensions/m_omode.c | 1 - extensions/m_opme.c | 1 - 11 files changed, 18 insertions(+), 27 deletions(-) diff --git a/configure b/configure index 9b48b08f..edcf3637 100755 --- a/configure +++ b/configure @@ -14170,7 +14170,7 @@ _ACEOF fi -ac_config_files="$ac_config_files Makefile libcharybdis/Makefile servlink/Makefile extensions/Makefile unsupported/Makefile src/Makefile modules/Makefile tools/Makefile doc/Makefile help/Makefile" +ac_config_files="$ac_config_files Makefile servlink/Makefile extensions/Makefile unsupported/Makefile src/Makefile modules/Makefile tools/Makefile doc/Makefile help/Makefile" cat >confcache <<\_ACEOF @@ -14728,7 +14728,6 @@ do case $ac_config_target in "include/setup.h") CONFIG_HEADERS="$CONFIG_HEADERS include/setup.h" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "libcharybdis/Makefile") CONFIG_FILES="$CONFIG_FILES libcharybdis/Makefile" ;; "servlink/Makefile") CONFIG_FILES="$CONFIG_FILES servlink/Makefile" ;; "extensions/Makefile") CONFIG_FILES="$CONFIG_FILES extensions/Makefile" ;; "unsupported/Makefile") CONFIG_FILES="$CONFIG_FILES unsupported/Makefile" ;; diff --git a/extensions/hurt.c b/extensions/hurt.c index e6ec64fa..047eff2d 100644 --- a/extensions/hurt.c +++ b/extensions/hurt.c @@ -137,7 +137,7 @@ static int modinit(void) { /* set-up hurt_state. */ - hurt_state.start_time = CurrentTime; + hurt_state.start_time = rb_current_time(); /* add our event handlers. */ hurt_expire_ev = rb_event_add("hurt_expire", hurt_expire_event, NULL, 60); @@ -401,7 +401,7 @@ hurt_check_event(void *arg) rb_dlinkDestroy(ptr, &hurt_state.hurt_clients); sendto_one_notice(client_p, ":HURT restriction removed for this session"); USED_TARGETS(client_p) = 0; - client_p->localClient->target_last = CurrentTime; /* don't ask --nenolod */ + client_p->localClient->target_last = rb_current_time(); /* don't ask --nenolod */ } else if (client_p->localClient->receiveM > hurt_state.cutoff) exit_client(NULL, client_p, &me, hurt_state.exit_reason); @@ -420,7 +420,7 @@ hurt_expire_event(void *unused) { hurt = (hurt_t *) ptr->data; - if (hurt->expire <= CurrentTime) + if (hurt->expire <= rb_current_time()) { rb_dlinkFindDestroy(hurt, &hurt_confs); hurt_destroy(hurt); @@ -455,7 +455,7 @@ new_local_user_hook(struct Client *source_p) if (hurt_find(source_p->sockhost) || hurt_find(source_p->orighost)) { USED_TARGETS(source_p) = 10; - source_p->localClient->target_last = CurrentTime + 600; /* don't ask --nenolod */ + source_p->localClient->target_last = rb_current_time() + 600; /* don't ask --nenolod */ SetTGChange(source_p); rb_dlinkAddAlloc(source_p, &hurt_state.hurt_clients); sendto_one_notice(source_p, ":You are hurt. Please identify to services immediately, or use /stats p for assistance."); @@ -525,13 +525,13 @@ hurt_propagate(struct Client *client_p, struct Client *source_p, hurt_t *hurt) sendto_one(client_p, ":%s ENCAP %s HURT %ld %s :%s", source_p->name, client_p->name, - (long)(hurt->expire - CurrentTime), + (long)(hurt->expire - rb_current_time()), hurt->ip, hurt->reason); else sendto_server(&me, NULL, NOCAPS, NOCAPS, ":%s ENCAP * HURT %ld %s :%s", source_p->name, - (long)(hurt->expire - CurrentTime), + (long)(hurt->expire - rb_current_time()), hurt->ip, hurt->reason); } /* }}} */ @@ -546,7 +546,7 @@ hurt_new(time_t expire, const char *ip, const char *reason) hurt->ip = rb_strdup(ip); hurt->reason = rb_strdup(reason); - hurt->expire = CurrentTime + expire; + hurt->expire = rb_current_time() + expire; return hurt; } @@ -628,7 +628,7 @@ heal_nick(struct Client *source_p, struct Client *target_p) sendto_one_notice(target_p, ":HURT restriction temporarily removed by operator"); sendto_one_notice(source_p, ":HURT restriction on %s temporarily removed", target_p->name); USED_TARGETS(target_p) = 0; - target_p->localClient->target_last = CurrentTime; /* don't ask --nenolod */ + target_p->localClient->target_last = rb_current_time(); /* don't ask --nenolod */ return 1; } else diff --git a/extensions/ip_cloaking.c b/extensions/ip_cloaking.c index 5b9c5f42..1b5af63c 100644 --- a/extensions/ip_cloaking.c +++ b/extensions/ip_cloaking.c @@ -9,7 +9,6 @@ #include "s_conf.h" #include "s_user.h" #include "s_serv.h" -#include "tools.h" #include "numeric.h" /* if you're modifying this module, you'll probably to change this */ @@ -204,7 +203,7 @@ check_new_user(void *vdata) source_p->umodes &= ~user_modes['h']; return; } - source_p->localClient->mangledhost = MyMalloc(HOSTLEN); + source_p->localClient->mangledhost = rb_malloc(HOSTLEN); if (!irccmp(source_p->orighost, source_p->sockhost)) do_host_cloak_ip(source_p->orighost, source_p->localClient->mangledhost); else diff --git a/extensions/ip_cloaking_old.c b/extensions/ip_cloaking_old.c index bcc900ed..c87d7a20 100644 --- a/extensions/ip_cloaking_old.c +++ b/extensions/ip_cloaking_old.c @@ -9,7 +9,6 @@ #include "s_conf.h" #include "s_user.h" #include "s_serv.h" -#include "tools.h" #include "numeric.h" /* if you're modifying this module, you'll probably to change this */ @@ -160,7 +159,7 @@ check_new_user(void *vdata) source_p->umodes &= ~user_modes['h']; return; } - source_p->localClient->mangledhost = MyMalloc(HOSTLEN); + source_p->localClient->mangledhost = rb_malloc(HOSTLEN); if (!irccmp(source_p->orighost, source_p->sockhost)) do_host_cloak(source_p->orighost, source_p->localClient->mangledhost, 1); else diff --git a/extensions/m_findforwards.c b/extensions/m_findforwards.c index 746b5904..79bdeea6 100644 --- a/extensions/m_findforwards.c +++ b/extensions/m_findforwards.c @@ -20,7 +20,6 @@ * $Id: m_findforwards.c 986 2006-03-08 00:10:46Z jilles $ */ #include "stdinc.h" -#include "tools.h" #include "channel.h" #include "client.h" #include "hash.h" @@ -81,14 +80,14 @@ m_findforwards(struct Client *client_p, struct Client *source_p, int parc, const return 0; } - 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, "FINDFORWARDS"); return 0; } else - last_used = CurrentTime; + last_used = rb_current_time(); } RB_DLINK_FOREACH(ptr, global_channel_list.head) diff --git a/extensions/m_mkpasswd.c b/extensions/m_mkpasswd.c index dd84b8f3..35a9c0ce 100644 --- a/extensions/m_mkpasswd.c +++ b/extensions/m_mkpasswd.c @@ -55,7 +55,7 @@ m_mkpasswd(struct Client *client_p, struct Client *source_p, int parc, const cha static time_t last_used = 0; int is_md5 = 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), me.name, parv[0]); @@ -63,7 +63,7 @@ m_mkpasswd(struct Client *client_p, struct Client *source_p, int parc, const cha } else { - last_used = CurrentTime; + last_used = rb_current_time(); } if(parc == 3) diff --git a/extensions/m_ojoin.c b/extensions/m_ojoin.c index 96a1775b..10967532 100644 --- a/extensions/m_ojoin.c +++ b/extensions/m_ojoin.c @@ -20,7 +20,6 @@ */ #include "stdinc.h" -#include "tools.h" #include "channel.h" #include "client.h" #include "ircd.h" @@ -154,7 +153,7 @@ mo_ojoin(struct Client *client_p, struct Client *source_p, int parc, const char source_p->name, chptr->chname, chptr->topic_info, chptr->topic_time); } - source_p->localClient->last_join_time = CurrentTime; + source_p->localClient->last_join_time = rb_current_time(); channel_member_names(chptr, source_p, 1); return 0; diff --git a/extensions/m_okick.c b/extensions/m_okick.c index 07c5800d..156a046e 100644 --- a/extensions/m_okick.c +++ b/extensions/m_okick.c @@ -24,7 +24,6 @@ */ #include "stdinc.h" -#include "tools.h" #include "channel.h" #include "client.h" #include "irc_string.h" diff --git a/extensions/m_olist.c b/extensions/m_olist.c index 8d295c10..a402f8b8 100644 --- a/extensions/m_olist.c +++ b/extensions/m_olist.c @@ -27,7 +27,6 @@ */ #include "stdinc.h" -#include "tools.h" #include "channel.h" #include "client.h" #include "ircd.h" @@ -109,7 +108,7 @@ list_all_channels(struct Client *source_p) sendto_one(source_p, form_str(RPL_LIST), me.name, source_p->name, chptr->chname, - dlink_list_length(&chptr->members), + rb_dlink_list_length(&chptr->members), chptr->topic == NULL ? "" : chptr->topic); } @@ -146,6 +145,6 @@ list_named_channel(struct Client *source_p, const char *name) form_str(ERR_NOSUCHCHANNEL), n); else sendto_one(source_p, form_str(RPL_LIST), me.name, source_p->name, - chptr->chname, dlink_list_length(&chptr->members), + chptr->chname, rb_dlink_list_length(&chptr->members), chptr->topic ? chptr->topic : ""); } diff --git a/extensions/m_omode.c b/extensions/m_omode.c index 47a91148..3c33f167 100644 --- a/extensions/m_omode.c +++ b/extensions/m_omode.c @@ -26,7 +26,6 @@ */ #include "stdinc.h" -#include "tools.h" #include "channel.h" #include "client.h" #include "hash.h" diff --git a/extensions/m_opme.c b/extensions/m_opme.c index 78a7706f..5139373b 100644 --- a/extensions/m_opme.c +++ b/extensions/m_opme.c @@ -19,7 +19,6 @@ * $Id: m_opme.c 3554 2007-08-10 22:31:14Z jilles $ */ #include "stdinc.h" -#include "tools.h" #include "channel.h" #include "client.h" #include "ircd.h"