X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/blobdiff_plain/de0572442e82828190206eb22bdf2f7da04d6df7..de2fb6e2ae29f5ea67290e9f7f05732ba474bfc2:/modules/m_services.c diff --git a/modules/m_services.c b/modules/m_services.c index dbfd064..af0e9c3 100644 --- a/modules/m_services.c +++ b/modules/m_services.c @@ -31,7 +31,6 @@ #include "stdinc.h" -#include "tools.h" #include "send.h" #include "channel.h" #include "client.h" @@ -39,7 +38,6 @@ #include "config.h" #include "ircd.h" #include "numeric.h" -#include "memory.h" #include "s_conf.h" #include "s_newconf.h" #include "s_serv.h" @@ -154,6 +152,7 @@ me_rsfnc(struct Client *client_p, struct Client *source_p, struct Client *target_p; struct Client *exist_p; time_t newts, curts; + char note[NICKLEN + 10]; if(!(source_p->flags & FLAGS_SERVICE)) return 0; @@ -205,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; @@ -237,7 +236,8 @@ me_rsfnc(struct Client *client_p, struct Client *source_p, del_all_accepts(target_p); - comm_note(target_p->localClient->F->fd, "Nick: %s", target_p->name); + rb_snprintf(note, NICKLEN + 10, "Nick: %s", target_p->name); + rb_note(target_p->localClient->F, note); return 0; } @@ -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; @@ -279,9 +279,9 @@ me_nickdelay(struct Client *client_p, struct Client *source_p, int parc, const c static void h_svc_server_introduced(hook_data_client *hdata) { - dlink_node *ptr; + rb_dlink_node *ptr; - DLINK_FOREACH(ptr, service_list.head) + RB_DLINK_FOREACH(ptr, service_list.head) { if(!irccmp((const char *) ptr->data, hdata->target->name)) { @@ -317,11 +317,11 @@ static void h_svc_stats(hook_data_int *data) { char statchar = (char) data->arg2; - dlink_node *ptr; + rb_dlink_node *ptr; if (statchar == 'U' && IsOper(data->client)) { - DLINK_FOREACH(ptr, service_list.head) + RB_DLINK_FOREACH(ptr, service_list.head) { sendto_one_numeric(data->client, RPL_STATSULINE, form_str(RPL_STATSULINE),