make all extensions libratbox-clean.
This commit is contained in:
parent
8325ed70b7
commit
71f6ebfa1f
|
@ -42,14 +42,14 @@ static int eb_extended(const char *data, struct Client *client_p,
|
||||||
if (data == NULL)
|
if (data == NULL)
|
||||||
return EXTBAN_INVALID;
|
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);
|
client_p->name, client_p->username, client_p->host, client_p->info);
|
||||||
|
|
||||||
ret = match(data, buf) ? EXTBAN_MATCH : EXTBAN_NOMATCH;
|
ret = match(data, buf) ? EXTBAN_MATCH : EXTBAN_NOMATCH;
|
||||||
|
|
||||||
if (ret == EXTBAN_NOMATCH && IsDynSpoof(client_p))
|
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);
|
client_p->name, client_p->username, client_p->orighost, client_p->info);
|
||||||
|
|
||||||
ret = match(data, buf) ? EXTBAN_MATCH : EXTBAN_NOMATCH;
|
ret = match(data, buf) ? EXTBAN_MATCH : EXTBAN_NOMATCH;
|
||||||
|
|
|
@ -130,6 +130,10 @@ hurt_state_t hurt_state = {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* {{{ static int modinit() */
|
/* {{{ static int modinit() */
|
||||||
|
|
||||||
|
struct ev_entry *hurt_expire_ev = NULL;
|
||||||
|
struct ev_entry *hurt_check_ev = NULL;
|
||||||
|
|
||||||
static int
|
static int
|
||||||
modinit(void)
|
modinit(void)
|
||||||
{
|
{
|
||||||
|
@ -137,8 +141,8 @@ modinit(void)
|
||||||
hurt_state.start_time = CurrentTime;
|
hurt_state.start_time = CurrentTime;
|
||||||
|
|
||||||
/* add our event handlers. */
|
/* add our event handlers. */
|
||||||
eventAdd("hurt_expire", hurt_expire_event, NULL, 60);
|
hurt_expire_ev = rb_event_add("hurt_expire", hurt_expire_event, NULL, 60);
|
||||||
eventAdd("hurt_check", hurt_check_event, NULL, 5);
|
hurt_check_ev = rb_event_add("hurt_check", hurt_check_event, NULL, 5);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -151,8 +155,8 @@ modfini(void)
|
||||||
dlink_node *ptr, *next_ptr;
|
dlink_node *ptr, *next_ptr;
|
||||||
|
|
||||||
/* and delete our events. */
|
/* and delete our events. */
|
||||||
eventDelete(hurt_expire_event, NULL);
|
rb_event_delete(hurt_expire_ev);
|
||||||
eventDelete(hurt_check_event, NULL);
|
rb_event_delete(hurt_check_ev);
|
||||||
|
|
||||||
DLINK_FOREACH_SAFE (ptr, next_ptr, hurt_state.hurt_clients.head)
|
DLINK_FOREACH_SAFE (ptr, next_ptr, hurt_state.hurt_clients.head)
|
||||||
{
|
{
|
||||||
|
|
|
@ -94,7 +94,7 @@ do_host_cloak(const char *inbuf, char *outbuf, int ipmask)
|
||||||
|
|
||||||
if (ipmask == 0)
|
if (ipmask == 0)
|
||||||
{
|
{
|
||||||
ircsnprintf(outbuf, HOSTLEN, "%s-%X%X",
|
rb_snprintf(outbuf, HOSTLEN, "%s-%X%X",
|
||||||
ServerInfo.network_name, hosthash2, hosthash);
|
ServerInfo.network_name, hosthash2, hosthash);
|
||||||
len1 = strlen(outbuf);
|
len1 = strlen(outbuf);
|
||||||
rest = strchr(inbuf, '.');
|
rest = strchr(inbuf, '.');
|
||||||
|
@ -106,7 +106,7 @@ do_host_cloak(const char *inbuf, char *outbuf, int ipmask)
|
||||||
strlcat(outbuf, rest, HOSTLEN);
|
strlcat(outbuf, rest, HOSTLEN);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
ircsnprintf(outbuf, HOSTLEN, "%X%X.%s",
|
rb_snprintf(outbuf, HOSTLEN, "%X%X.%s",
|
||||||
hosthash2, hosthash, ServerInfo.network_name);
|
hosthash2, hosthash, ServerInfo.network_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,7 @@ m_findforwards(struct Client *client_p, struct Client *source_p, int parc, const
|
||||||
static time_t last_used = 0;
|
static time_t last_used = 0;
|
||||||
struct Channel *chptr;
|
struct Channel *chptr;
|
||||||
struct membership *msptr;
|
struct membership *msptr;
|
||||||
dlink_node *ptr;
|
rb_dlink_node *ptr;
|
||||||
char buf[414];
|
char buf[414];
|
||||||
char *p = buf, *end = buf + sizeof buf - 1;
|
char *p = buf, *end = buf + sizeof buf - 1;
|
||||||
*p = '\0';
|
*p = '\0';
|
||||||
|
@ -91,7 +91,7 @@ m_findforwards(struct Client *client_p, struct Client *source_p, int parc, const
|
||||||
last_used = CurrentTime;
|
last_used = CurrentTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
DLINK_FOREACH(ptr, global_channel_list.head)
|
RB_DLINK_FOREACH(ptr, global_channel_list.head)
|
||||||
{
|
{
|
||||||
chptr = ptr->data;
|
chptr = ptr->data;
|
||||||
if(chptr->mode.forward && !irccmp(chptr->mode.forward, parv[1]))
|
if(chptr->mode.forward && !irccmp(chptr->mode.forward, parv[1]))
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
#include "ircd.h"
|
#include "ircd.h"
|
||||||
#include "irc_string.h"
|
#include "irc_string.h"
|
||||||
#include "numeric.h"
|
#include "numeric.h"
|
||||||
#include "patricia.h"
|
|
||||||
#include "s_newconf.h"
|
#include "s_newconf.h"
|
||||||
#include "s_conf.h"
|
#include "s_conf.h"
|
||||||
#include "s_log.h"
|
#include "s_log.h"
|
||||||
|
|
|
@ -21,24 +21,22 @@
|
||||||
|
|
||||||
#include "stdinc.h"
|
#include "stdinc.h"
|
||||||
#include "tools.h"
|
#include "tools.h"
|
||||||
#include "patricia.h"
|
|
||||||
#include "channel.h"
|
#include "channel.h"
|
||||||
#include "client.h"
|
#include "client.h"
|
||||||
#include "ircd.h"
|
#include "ircd.h"
|
||||||
#include "numeric.h"
|
#include "numeric.h"
|
||||||
#include "s_log.h"
|
#include "s_log.h"
|
||||||
#include "s_serv.h"
|
#include "s_serv.h"
|
||||||
#include "s_conf.h"
|
#include "s_conf.h"
|
||||||
#include "s_newconf.h"
|
#include "s_newconf.h"
|
||||||
#include "send.h"
|
#include "send.h"
|
||||||
#include "whowas.h"
|
#include "whowas.h"
|
||||||
#include "irc_string.h"
|
#include "irc_string.h"
|
||||||
#include "hash.h"
|
#include "hash.h"
|
||||||
#include "msg.h"
|
#include "msg.h"
|
||||||
#include "parse.h"
|
#include "parse.h"
|
||||||
#include "modules.h"
|
#include "modules.h"
|
||||||
|
|
||||||
|
|
||||||
static int mo_ojoin(struct Client *client_p, struct Client *source_p, int parc, const char *parv[]);
|
static int mo_ojoin(struct Client *client_p, struct Client *source_p, int parc, const char *parv[]);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,6 @@
|
||||||
|
|
||||||
#include "stdinc.h"
|
#include "stdinc.h"
|
||||||
#include "tools.h"
|
#include "tools.h"
|
||||||
#include "patricia.h"
|
|
||||||
#include "channel.h"
|
#include "channel.h"
|
||||||
#include "client.h"
|
#include "client.h"
|
||||||
#include "ircd.h"
|
#include "ircd.h"
|
||||||
|
@ -101,10 +100,10 @@ static void
|
||||||
list_all_channels(struct Client *source_p)
|
list_all_channels(struct Client *source_p)
|
||||||
{
|
{
|
||||||
struct Channel *chptr;
|
struct Channel *chptr;
|
||||||
dlink_node *ptr;
|
rb_dlink_node *ptr;
|
||||||
sendto_one(source_p, form_str(RPL_LISTSTART), me.name, source_p->name);
|
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;
|
chptr = ptr->data;
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,6 @@
|
||||||
*/
|
*/
|
||||||
#include "stdinc.h"
|
#include "stdinc.h"
|
||||||
#include "tools.h"
|
#include "tools.h"
|
||||||
#include "patricia.h"
|
|
||||||
#include "channel.h"
|
#include "channel.h"
|
||||||
#include "client.h"
|
#include "client.h"
|
||||||
#include "ircd.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 Channel *chptr;
|
||||||
struct membership *msptr;
|
struct membership *msptr;
|
||||||
dlink_node *ptr;
|
rb_dlink_node *ptr;
|
||||||
|
|
||||||
/* admins only */
|
/* admins only */
|
||||||
if(!IsOperAdmin(source_p))
|
if(!IsOperAdmin(source_p))
|
||||||
|
@ -75,7 +74,7 @@ mo_opme(struct Client *client_p, struct Client *source_p, int parc, const char *
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
DLINK_FOREACH(ptr, chptr->members.head)
|
RB_DLINK_FOREACH(ptr, chptr->members.head)
|
||||||
{
|
{
|
||||||
msptr = ptr->data;
|
msptr = ptr->data;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue