make all extensions libratbox-clean.

This commit is contained in:
William Pitcock 2008-04-01 16:20:40 -05:00
parent 03dba44854
commit 036a10a995
8 changed files with 21 additions and 22 deletions

View file

@ -42,14 +42,14 @@ static int eb_extended(const char *data, struct Client *client_p,
if (data == NULL)
return EXTBAN_INVALID;
ircsnprintf(buf, BUFSIZE, "%s!%s@%s#%s",
rb_snprintf(buf, BUFSIZE, "%s!%s@%s#%s",
client_p->name, client_p->username, client_p->host, client_p->info);
ret = match(data, buf) ? EXTBAN_MATCH : EXTBAN_NOMATCH;
if (ret == EXTBAN_NOMATCH && IsDynSpoof(client_p))
{
ircsnprintf(buf, BUFSIZE, "%s!%s@%s#%s",
rb_snprintf(buf, BUFSIZE, "%s!%s@%s#%s",
client_p->name, client_p->username, client_p->orighost, client_p->info);
ret = match(data, buf) ? EXTBAN_MATCH : EXTBAN_NOMATCH;

View file

@ -130,6 +130,10 @@ hurt_state_t hurt_state = {
*/
/* {{{ static int modinit() */
struct ev_entry *hurt_expire_ev = NULL;
struct ev_entry *hurt_check_ev = NULL;
static int
modinit(void)
{
@ -137,8 +141,8 @@ modinit(void)
hurt_state.start_time = CurrentTime;
/* add our event handlers. */
eventAdd("hurt_expire", hurt_expire_event, NULL, 60);
eventAdd("hurt_check", hurt_check_event, NULL, 5);
hurt_expire_ev = rb_event_add("hurt_expire", hurt_expire_event, NULL, 60);
hurt_check_ev = rb_event_add("hurt_check", hurt_check_event, NULL, 5);
return 0;
}
@ -151,8 +155,8 @@ modfini(void)
dlink_node *ptr, *next_ptr;
/* and delete our events. */
eventDelete(hurt_expire_event, NULL);
eventDelete(hurt_check_event, NULL);
rb_event_delete(hurt_expire_ev);
rb_event_delete(hurt_check_ev);
DLINK_FOREACH_SAFE (ptr, next_ptr, hurt_state.hurt_clients.head)
{

View file

@ -94,7 +94,7 @@ do_host_cloak(const char *inbuf, char *outbuf, int ipmask)
if (ipmask == 0)
{
ircsnprintf(outbuf, HOSTLEN, "%s-%X%X",
rb_snprintf(outbuf, HOSTLEN, "%s-%X%X",
ServerInfo.network_name, hosthash2, hosthash);
len1 = strlen(outbuf);
rest = strchr(inbuf, '.');
@ -106,7 +106,7 @@ do_host_cloak(const char *inbuf, char *outbuf, int ipmask)
strlcat(outbuf, rest, HOSTLEN);
}
else
ircsnprintf(outbuf, HOSTLEN, "%X%X.%s",
rb_snprintf(outbuf, HOSTLEN, "%X%X.%s",
hosthash2, hosthash, ServerInfo.network_name);
}

View file

@ -59,7 +59,7 @@ m_findforwards(struct Client *client_p, struct Client *source_p, int parc, const
static time_t last_used = 0;
struct Channel *chptr;
struct membership *msptr;
dlink_node *ptr;
rb_dlink_node *ptr;
char buf[414];
char *p = buf, *end = buf + sizeof buf - 1;
*p = '\0';
@ -91,7 +91,7 @@ m_findforwards(struct Client *client_p, struct Client *source_p, int parc, const
last_used = CurrentTime;
}
DLINK_FOREACH(ptr, global_channel_list.head)
RB_DLINK_FOREACH(ptr, global_channel_list.head)
{
chptr = ptr->data;
if(chptr->mode.forward && !irccmp(chptr->mode.forward, parv[1]))

View file

@ -16,7 +16,6 @@
#include "ircd.h"
#include "irc_string.h"
#include "numeric.h"
#include "patricia.h"
#include "s_newconf.h"
#include "s_conf.h"
#include "s_log.h"

View file

@ -21,24 +21,22 @@
#include "stdinc.h"
#include "tools.h"
#include "patricia.h"
#include "channel.h"
#include "client.h"
#include "client.h"
#include "ircd.h"
#include "numeric.h"
#include "s_log.h"
#include "s_serv.h"
#include "s_conf.h"
#include "s_newconf.h"
#include "s_newconf.h"
#include "send.h"
#include "whowas.h"
#include "irc_string.h"
#include "hash.h"
#include "hash.h"
#include "msg.h"
#include "parse.h"
#include "modules.h"
static int mo_ojoin(struct Client *client_p, struct Client *source_p, int parc, const char *parv[]);

View file

@ -28,7 +28,6 @@
#include "stdinc.h"
#include "tools.h"
#include "patricia.h"
#include "channel.h"
#include "client.h"
#include "ircd.h"
@ -101,10 +100,10 @@ static void
list_all_channels(struct Client *source_p)
{
struct Channel *chptr;
dlink_node *ptr;
rb_dlink_node *ptr;
sendto_one(source_p, form_str(RPL_LISTSTART), me.name, source_p->name);
DLINK_FOREACH(ptr, global_channel_list.head)
RB_DLINK_FOREACH(ptr, global_channel_list.head)
{
chptr = ptr->data;

View file

@ -20,7 +20,6 @@
*/
#include "stdinc.h"
#include "tools.h"
#include "patricia.h"
#include "channel.h"
#include "client.h"
#include "ircd.h"
@ -59,7 +58,7 @@ mo_opme(struct Client *client_p, struct Client *source_p, int parc, const char *
{
struct Channel *chptr;
struct membership *msptr;
dlink_node *ptr;
rb_dlink_node *ptr;
/* admins only */
if(!IsOperAdmin(source_p))
@ -75,7 +74,7 @@ mo_opme(struct Client *client_p, struct Client *source_p, int parc, const char *
return 0;
}
DLINK_FOREACH(ptr, chptr->members.head)
RB_DLINK_FOREACH(ptr, chptr->members.head)
{
msptr = ptr->data;