Remove all trailing whitespace
This commit is contained in:
parent
e044e2827d
commit
f9999a12bd
|
@ -274,7 +274,7 @@ static void cs_cmd_badwords(sourceinfo_t *si, int parc, char *parv[])
|
||||||
bw = n->data;
|
bw = n->data;
|
||||||
|
|
||||||
if (!irccasecmp(bw->badword, word))
|
if (!irccasecmp(bw->badword, word))
|
||||||
{
|
{
|
||||||
command_success_nodata(si, _("\2%s\2 has already been entered into the bad word list."), word);
|
command_success_nodata(si, _("\2%s\2 has already been entered into the bad word list."), word);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -319,7 +319,7 @@ static void cs_cmd_badwords(sourceinfo_t *si, int parc, char *parv[])
|
||||||
command_fail(si, fault_nosuch_target, _("There are no badwords set in this channel."));
|
command_fail(si, fault_nosuch_target, _("There are no badwords set in this channel."));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
MOWGLI_ITER_FOREACH_SAFE(n, tn, l->head)
|
MOWGLI_ITER_FOREACH_SAFE(n, tn, l->head)
|
||||||
{
|
{
|
||||||
bw = n->data;
|
bw = n->data;
|
||||||
|
@ -346,13 +346,13 @@ static void cs_cmd_badwords(sourceinfo_t *si, int parc, char *parv[])
|
||||||
{
|
{
|
||||||
char buf[BUFSIZE];
|
char buf[BUFSIZE];
|
||||||
struct tm tm;
|
struct tm tm;
|
||||||
|
|
||||||
if (!chanacs_source_has_flag(mc, si, CA_ACLVIEW))
|
if (!chanacs_source_has_flag(mc, si, CA_ACLVIEW))
|
||||||
{
|
{
|
||||||
command_fail(si, fault_noprivs, _("You are not authorized to perform this command."));
|
command_fail(si, fault_noprivs, _("You are not authorized to perform this command."));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (l == NULL)
|
if (l == NULL)
|
||||||
{
|
{
|
||||||
command_fail(si, fault_nosuch_target, _("There are no badwords set in this channel."));
|
command_fail(si, fault_nosuch_target, _("There are no badwords set in this channel."));
|
||||||
|
|
|
@ -75,7 +75,7 @@ static void cs_cmd_fregister(sourceinfo_t *si, int parc, char *parv[])
|
||||||
command_fail(si, fault_notverified, _("You need to verify your email address before you may register channels."));
|
command_fail(si, fault_notverified, _("You need to verify your email address before you may register channels."));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* make sure it isn't already registered */
|
/* make sure it isn't already registered */
|
||||||
if ((mc = mychan_find(name)))
|
if ((mc = mychan_find(name)))
|
||||||
{
|
{
|
||||||
|
@ -85,7 +85,7 @@ static void cs_cmd_fregister(sourceinfo_t *si, int parc, char *parv[])
|
||||||
command_fail(si, fault_alreadyexists, _("\2%s\2 is already registered."), mc->name);
|
command_fail(si, fault_alreadyexists, _("\2%s\2 is already registered."), mc->name);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* make sure the channel exists */
|
/* make sure the channel exists */
|
||||||
if (!(c = channel_find(name)))
|
if (!(c = channel_find(name)))
|
||||||
{
|
{
|
||||||
|
|
6
dnsbl.c
6
dnsbl.c
|
@ -173,7 +173,7 @@ static void os_cmd_dnsblexempt(sourceinfo_t *si, int parc, char *parv[])
|
||||||
de = n->data;
|
de = n->data;
|
||||||
|
|
||||||
if (!irccasecmp(de->ip, ip))
|
if (!irccasecmp(de->ip, ip))
|
||||||
{
|
{
|
||||||
command_success_nodata(si, _("\2%s\2 has already been entered into the DNSBL exempts list."), ip);
|
command_success_nodata(si, _("\2%s\2 has already been entered into the DNSBL exempts list."), ip);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -345,7 +345,7 @@ static void initiate_blacklist_dnsquery(struct Blacklist *blptr, user_t *u)
|
||||||
blcptr->dns_query.callback = blacklist_dns_callback;
|
blcptr->dns_query.callback = blacklist_dns_callback;
|
||||||
|
|
||||||
/* A sscanf worked fine for chary for many years, it'll be fine here */
|
/* A sscanf worked fine for chary for many years, it'll be fine here */
|
||||||
sscanf(u->ip, "%d.%d.%d.%d", &ip[3], &ip[2], &ip[1], &ip[0]);
|
sscanf(u->ip, "%d.%d.%d.%d", &ip[3], &ip[2], &ip[1], &ip[0]);
|
||||||
|
|
||||||
/* becomes 2.0.0.127.torbl.ahbl.org or whatever */
|
/* becomes 2.0.0.127.torbl.ahbl.org or whatever */
|
||||||
snprintf(buf, sizeof buf, "%d.%d.%d.%d.%s", ip[0], ip[1], ip[2], ip[3], blptr->host);
|
snprintf(buf, sizeof buf, "%d.%d.%d.%d.%s", ip[0], ip[1], ip[2], ip[3], blptr->host);
|
||||||
|
@ -514,7 +514,7 @@ static void osinfo_hook(sourceinfo_t *si)
|
||||||
|
|
||||||
if (action)
|
if (action)
|
||||||
command_success_nodata(si, "Action taken when a user is an a DNSBL: %s", action);
|
command_success_nodata(si, "Action taken when a user is an a DNSBL: %s", action);
|
||||||
else
|
else
|
||||||
command_success_nodata(si, "Action taken when a user is an a DNSBL: %s", "None");
|
command_success_nodata(si, "Action taken when a user is an a DNSBL: %s", "None");
|
||||||
|
|
||||||
MOWGLI_ITER_FOREACH(n, blacklist_list.head)
|
MOWGLI_ITER_FOREACH(n, blacklist_list.head)
|
||||||
|
|
|
@ -66,7 +66,7 @@ static void my_rhandler(connection_t * cptr)
|
||||||
|
|
||||||
static void do_listen(connection_t *cptr)
|
static void do_listen(connection_t *cptr)
|
||||||
{
|
{
|
||||||
connection_t *newptr;
|
connection_t *newptr;
|
||||||
newptr = connection_accept_tcp(cptr, my_rhandler, NULL);
|
newptr = connection_accept_tcp(cptr, my_rhandler, NULL);
|
||||||
slog(LG_DEBUG, "do_listen(): accepted %d", cptr->fd);
|
slog(LG_DEBUG, "do_listen(): accepted %d", cptr->fd);
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,7 +70,7 @@ static void my_rhandler(connection_t * cptr)
|
||||||
|
|
||||||
static void do_listen(connection_t *cptr)
|
static void do_listen(connection_t *cptr)
|
||||||
{
|
{
|
||||||
connection_t *newptr;
|
connection_t *newptr;
|
||||||
newptr = connection_accept_tcp(cptr, my_rhandler, NULL);
|
newptr = connection_accept_tcp(cptr, my_rhandler, NULL);
|
||||||
slog(LG_DEBUG, "do_listen(): accepted %d", cptr->fd);
|
slog(LG_DEBUG, "do_listen(): accepted %d", cptr->fd);
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,7 +106,7 @@ static void hook_user_identify(user_t *u)
|
||||||
{
|
{
|
||||||
/* if they have an existing cloak, don't do anything */
|
/* if they have an existing cloak, don't do anything */
|
||||||
if ((metadata_find(u->myuser, "private:usercloak")) || (me.hidehostsuffix == NULL))
|
if ((metadata_find(u->myuser, "private:usercloak")) || (me.hidehostsuffix == NULL))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* they do not, add one. */
|
/* they do not, add one. */
|
||||||
user_add_host(u->myuser);
|
user_add_host(u->myuser);
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
DECLARE_MODULE_V1
|
DECLARE_MODULE_V1
|
||||||
(
|
(
|
||||||
"contrib/ircd_announceserv", false, _modinit, _moddeinit,
|
"contrib/ircd_announceserv", false, _modinit, _moddeinit,
|
||||||
PACKAGE_STRING,
|
PACKAGE_STRING,
|
||||||
"JD and Taros"
|
"JD and Taros"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2006 William Pitcock, et al.
|
* Copyright (c) 2006 William Pitcock, et al.
|
||||||
* Rights to this code are as documented in doc/LICENSE.
|
* Rights to this code are as documented in doc/LICENSE.
|
||||||
*
|
*
|
||||||
* LoveServ implementation.
|
* LoveServ implementation.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -8,9 +8,9 @@
|
||||||
|
|
||||||
#include "atheme-compat.h"
|
#include "atheme-compat.h"
|
||||||
|
|
||||||
/* Changed to allow for dynamic configuration, to configure this, set
|
/* Changed to allow for dynamic configuration, to configure this, set
|
||||||
* chanserv::mlocktweak to the mode string you want set on channels as
|
* chanserv::mlocktweak to the mode string you want set on channels as
|
||||||
* they are registered. Keep in mind that +nt will be applied as well,
|
* they are registered. Keep in mind that +nt will be applied as well,
|
||||||
* so if you do not want +n or +t, negate them in the configuration.
|
* so if you do not want +n or +t, negate them in the configuration.
|
||||||
* - Quora
|
* - Quora
|
||||||
*/
|
*/
|
||||||
|
|
32
ms_fsend.c
32
ms_fsend.c
|
@ -44,20 +44,20 @@ static void ms_cmd_fsend(sourceinfo_t *si, int parc, char *parv[])
|
||||||
mowgli_node_t *n;
|
mowgli_node_t *n;
|
||||||
mymemo_t *memo;
|
mymemo_t *memo;
|
||||||
service_t *memoserv;
|
service_t *memoserv;
|
||||||
|
|
||||||
/* Grab args */
|
/* Grab args */
|
||||||
char *target = parv[0];
|
char *target = parv[0];
|
||||||
char *m = parv[1];
|
char *m = parv[1];
|
||||||
|
|
||||||
/* Arg validation */
|
/* Arg validation */
|
||||||
if (!target || !m)
|
if (!target || !m)
|
||||||
{
|
{
|
||||||
command_fail(si, fault_needmoreparams,
|
command_fail(si, fault_needmoreparams,
|
||||||
STR_INSUFFICIENT_PARAMS, "FSEND");
|
STR_INSUFFICIENT_PARAMS, "FSEND");
|
||||||
|
|
||||||
command_fail(si, fault_needmoreparams,
|
command_fail(si, fault_needmoreparams,
|
||||||
"Syntax: FSEND <user> <memo>");
|
"Syntax: FSEND <user> <memo>");
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,9 +79,9 @@ static void ms_cmd_fsend(sourceinfo_t *si, int parc, char *parv[])
|
||||||
/* Check for memo text length -- includes/common.h */
|
/* Check for memo text length -- includes/common.h */
|
||||||
if (strlen(m) >= MEMOLEN)
|
if (strlen(m) >= MEMOLEN)
|
||||||
{
|
{
|
||||||
command_fail(si, fault_badparams,
|
command_fail(si, fault_badparams,
|
||||||
"Please make sure your memo is less than %d characters", MEMOLEN);
|
"Please make sure your memo is less than %d characters", MEMOLEN);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ static void ms_cmd_fsend(sourceinfo_t *si, int parc, char *parv[])
|
||||||
command_fail(si, fault_badparams, _("Your memo contains invalid characters."));
|
command_fail(si, fault_badparams, _("Your memo contains invalid characters."));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
memoserv = service_find("memoserv");
|
memoserv = service_find("memoserv");
|
||||||
if (memoserv == NULL)
|
if (memoserv == NULL)
|
||||||
memoserv = si->service;
|
memoserv = si->service;
|
||||||
|
@ -101,17 +101,17 @@ static void ms_cmd_fsend(sourceinfo_t *si, int parc, char *parv[])
|
||||||
if (*target != '#' && *target != '!')
|
if (*target != '#' && *target != '!')
|
||||||
{
|
{
|
||||||
/* See if target is valid */
|
/* See if target is valid */
|
||||||
if (!(tmu = myuser_find_ext(target)))
|
if (!(tmu = myuser_find_ext(target)))
|
||||||
{
|
{
|
||||||
command_fail(si, fault_nosuch_target,
|
command_fail(si, fault_nosuch_target,
|
||||||
"\2%s\2 is not registered.", target);
|
"\2%s\2 is not registered.", target);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
si->smu->memo_ratelimit_num++;
|
si->smu->memo_ratelimit_num++;
|
||||||
si->smu->memo_ratelimit_time = CURRTIME;
|
si->smu->memo_ratelimit_time = CURRTIME;
|
||||||
|
|
||||||
/* Check to make sure target inbox not full */
|
/* Check to make sure target inbox not full */
|
||||||
if (tmu->memos.count >= me.mdlimit)
|
if (tmu->memos.count >= me.mdlimit)
|
||||||
{
|
{
|
||||||
|
@ -121,7 +121,7 @@ static void ms_cmd_fsend(sourceinfo_t *si, int parc, char *parv[])
|
||||||
}
|
}
|
||||||
|
|
||||||
logcommand(si, CMDLOG_ADMIN, "FSEND: to \2%s\2", entity(tmu)->name);
|
logcommand(si, CMDLOG_ADMIN, "FSEND: to \2%s\2", entity(tmu)->name);
|
||||||
|
|
||||||
/* Malloc and populate struct */
|
/* Malloc and populate struct */
|
||||||
memo = smalloc(sizeof(mymemo_t));
|
memo = smalloc(sizeof(mymemo_t));
|
||||||
memo->sent = CURRTIME;
|
memo->sent = CURRTIME;
|
||||||
|
@ -129,7 +129,7 @@ static void ms_cmd_fsend(sourceinfo_t *si, int parc, char *parv[])
|
||||||
mowgli_strlcpy(memo->sender,entity(si->smu)->name,NICKLEN);
|
mowgli_strlcpy(memo->sender,entity(si->smu)->name,NICKLEN);
|
||||||
mowgli_strlcpy(memo->text, "[FORCE] ", FMEMOLEN);
|
mowgli_strlcpy(memo->text, "[FORCE] ", FMEMOLEN);
|
||||||
mowgli_strlcat(memo->text, m, FMEMOLEN);
|
mowgli_strlcat(memo->text, m, FMEMOLEN);
|
||||||
|
|
||||||
/* Create a linked list node and add to memos */
|
/* Create a linked list node and add to memos */
|
||||||
n = mowgli_node_create();
|
n = mowgli_node_create();
|
||||||
mowgli_node_add(memo, n, &tmu->memos);
|
mowgli_node_add(memo, n, &tmu->memos);
|
||||||
|
@ -140,7 +140,7 @@ static void ms_cmd_fsend(sourceinfo_t *si, int parc, char *parv[])
|
||||||
{
|
{
|
||||||
compat_sendemail(si->su, tmu, EMAIL_MEMO, tmu->email, memo->text);
|
compat_sendemail(si->su, tmu, EMAIL_MEMO, tmu->email, memo->text);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Note: do not disclose other nicks they're logged in with
|
/* Note: do not disclose other nicks they're logged in with
|
||||||
* -- jilles
|
* -- jilles
|
||||||
*
|
*
|
||||||
|
|
|
@ -126,7 +126,7 @@ static void ns_cmd_ajoin(sourceinfo_t *si, int parc, char *parv[])
|
||||||
// First character of a potential match; remember it's location
|
// First character of a potential match; remember it's location
|
||||||
itempos = i;
|
itempos = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
j++;
|
j++;
|
||||||
if (!remove1[j])
|
if (!remove1[j])
|
||||||
{
|
{
|
||||||
|
@ -138,15 +138,15 @@ static void ns_cmd_ajoin(sourceinfo_t *si, int parc, char *parv[])
|
||||||
j = 0;
|
j = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (remove1[j])
|
if (remove1[j])
|
||||||
{
|
{
|
||||||
command_fail(si, fault_badparams, "%s is not on your AJOIN list.", parv[1]);
|
command_fail(si, fault_badparams, "%s is not on your AJOIN list.", parv[1]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
listlen = i;
|
listlen = i;
|
||||||
|
|
||||||
// listlen is the length of the list, rmlen is the length of the item to remove, itempos is the beginning of that item.
|
// listlen is the length of the list, rmlen is the length of the item to remove, itempos is the beginning of that item.
|
||||||
if (!list[itempos + rmlen])
|
if (!list[itempos + rmlen])
|
||||||
{
|
{
|
||||||
|
|
|
@ -65,7 +65,7 @@ static void clean_nickname(user_t *u)
|
||||||
while (*p++)
|
while (*p++)
|
||||||
{
|
{
|
||||||
if (IsUpper(*p))
|
if (IsUpper(*p))
|
||||||
*p = ToLower(*p);
|
*p = ToLower(*p);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_nickname_lame(nickbuf))
|
if (is_nickname_lame(nickbuf))
|
||||||
|
|
|
@ -19,7 +19,7 @@ static void ns_cmd_generatehash(sourceinfo_t *si, int parc, char *parv[]);
|
||||||
|
|
||||||
command_t ns_generatehash = { "GENERATEHASH", "Generates a hash for SOPER.",
|
command_t ns_generatehash = { "GENERATEHASH", "Generates a hash for SOPER.",
|
||||||
AC_NONE, 1, ns_cmd_generatehash, { .path = "contrib/generatehash" } };
|
AC_NONE, 1, ns_cmd_generatehash, { .path = "contrib/generatehash" } };
|
||||||
|
|
||||||
void _modinit(module_t *m)
|
void _modinit(module_t *m)
|
||||||
{
|
{
|
||||||
service_named_bind_command("nickserv", &ns_generatehash);
|
service_named_bind_command("nickserv", &ns_generatehash);
|
||||||
|
@ -38,7 +38,7 @@ static void ns_cmd_generatehash(sourceinfo_t *si, int parc, char *parv[])
|
||||||
if (parc < 1)
|
if (parc < 1)
|
||||||
{
|
{
|
||||||
command_fail(si, fault_needmoreparams, STR_INSUFFICIENT_PARAMS, "GENERATEHASH");
|
command_fail(si, fault_needmoreparams, STR_INSUFFICIENT_PARAMS, "GENERATEHASH");
|
||||||
command_fail(si, fault_needmoreparams, _("Syntax: GENERATEHASH <password>"));
|
command_fail(si, fault_needmoreparams, _("Syntax: GENERATEHASH <password>"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ static void ns_cmd_generatepass(sourceinfo_t *si, int parc, char *parv[]);
|
||||||
|
|
||||||
command_t ns_generatepass = { "GENERATEPASS", "Generates a random password.",
|
command_t ns_generatepass = { "GENERATEPASS", "Generates a random password.",
|
||||||
AC_NONE, 1, ns_cmd_generatepass, { .path = "contrib/generatepass" } };
|
AC_NONE, 1, ns_cmd_generatepass, { .path = "contrib/generatepass" } };
|
||||||
|
|
||||||
void _modinit(module_t *m)
|
void _modinit(module_t *m)
|
||||||
{
|
{
|
||||||
service_named_bind_command("nickserv", &ns_generatepass);
|
service_named_bind_command("nickserv", &ns_generatepass);
|
||||||
|
@ -34,7 +34,7 @@ static void ns_cmd_generatepass(sourceinfo_t *si, int parc, char *parv[])
|
||||||
{
|
{
|
||||||
int n = 0;
|
int n = 0;
|
||||||
char *newpass;
|
char *newpass;
|
||||||
|
|
||||||
if (parc >= 1)
|
if (parc >= 1)
|
||||||
n = atoi(parv[0]);
|
n = atoi(parv[0]);
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
* This file contains code for blocking registrations of guest nicks.
|
* This file contains code for blocking registrations of guest nicks.
|
||||||
* Particularly for use with webchat clients.
|
* Particularly for use with webchat clients.
|
||||||
*
|
*
|
||||||
* To actually use this, add a something like the following to
|
* To actually use this, add a something like the following to
|
||||||
* the nickserv {} block of your atheme.conf:
|
* the nickserv {} block of your atheme.conf:
|
||||||
* guestnicks {
|
* guestnicks {
|
||||||
* "mib_";
|
* "mib_";
|
||||||
|
|
10
ns_mxcheck.c
10
ns_mxcheck.c
|
@ -56,7 +56,7 @@ static void check_registration(hook_user_register_check_t *hdata)
|
||||||
/* attempt to resolve host (fallback to A) */
|
/* attempt to resolve host (fallback to A) */
|
||||||
if((host = gethostbyname(domain)) == NULL)
|
if((host = gethostbyname(domain)) == NULL)
|
||||||
{
|
{
|
||||||
slog(LG_INFO, "REGISTER: mxcheck: no A/MX records for %s - "
|
slog(LG_INFO, "REGISTER: mxcheck: no A/MX records for %s - "
|
||||||
"REGISTER failed", domain);
|
"REGISTER failed", domain);
|
||||||
command_fail(hdata->si, fault_noprivs, "Sorry, \2%s\2 does not exist, "
|
command_fail(hdata->si, fault_noprivs, "Sorry, \2%s\2 does not exist, "
|
||||||
"I can't send mail there. Please check and try again.", domain);
|
"I can't send mail there. Please check and try again.", domain);
|
||||||
|
@ -73,16 +73,16 @@ int count_mx (const char *host)
|
||||||
int l;
|
int l;
|
||||||
|
|
||||||
l = res_query (host, ns_c_any, ns_t_mx, nsbuf, sizeof (nsbuf));
|
l = res_query (host, ns_c_any, ns_t_mx, nsbuf, sizeof (nsbuf));
|
||||||
if (l < 0)
|
if (l < 0)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ns_initparse (nsbuf, l, &amsg);
|
ns_initparse (nsbuf, l, &amsg);
|
||||||
l = ns_msg_count (amsg, ns_s_an);
|
l = ns_msg_count (amsg, ns_s_an);
|
||||||
}
|
}
|
||||||
|
|
||||||
return l;
|
return l;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@ static void childproc_cb(pid_t pid, int status, void *data)
|
||||||
|
|
||||||
if (WEXITSTATUS(status) == 1)
|
if (WEXITSTATUS(status) == 1)
|
||||||
{
|
{
|
||||||
slog(LG_INFO, "REGISTER: mxcheck: no A/MX records for %s - "
|
slog(LG_INFO, "REGISTER: mxcheck: no A/MX records for %s - "
|
||||||
"REGISTER failed", domain);
|
"REGISTER failed", domain);
|
||||||
myuser_notice(nicksvs.nick, mu, "Sorry, \2%s\2 does not exist, "
|
myuser_notice(nicksvs.nick, mu, "Sorry, \2%s\2 does not exist, "
|
||||||
"I can't send mail there. Please check and try again.", domain);
|
"I can't send mail there. Please check and try again.", domain);
|
||||||
|
@ -136,16 +136,16 @@ int count_mx (const char *host)
|
||||||
int l;
|
int l;
|
||||||
|
|
||||||
l = res_query (host, ns_c_any, ns_t_mx, nsbuf, sizeof (nsbuf));
|
l = res_query (host, ns_c_any, ns_t_mx, nsbuf, sizeof (nsbuf));
|
||||||
if (l < 0)
|
if (l < 0)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ns_initparse (nsbuf, l, &amsg);
|
ns_initparse (nsbuf, l, &amsg);
|
||||||
l = ns_msg_count (amsg, ns_s_an);
|
l = ns_msg_count (amsg, ns_s_an);
|
||||||
}
|
}
|
||||||
|
|
||||||
return l;
|
return l;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -119,7 +119,7 @@ aknl_nickhook(hook_user_nick_t *data)
|
||||||
if (*username == '~')
|
if (*username == '~')
|
||||||
username++;
|
username++;
|
||||||
|
|
||||||
if (mowgli_patricia_retrieve(akillalllist, u->nick) != NULL &&
|
if (mowgli_patricia_retrieve(akillalllist, u->nick) != NULL &&
|
||||||
mowgli_patricia_retrieve(akillalllist, username) != NULL &&
|
mowgli_patricia_retrieve(akillalllist, username) != NULL &&
|
||||||
mowgli_patricia_retrieve(akillalllist, u->gecos) != NULL)
|
mowgli_patricia_retrieve(akillalllist, u->gecos) != NULL)
|
||||||
doit = true;
|
doit = true;
|
||||||
|
|
10
os_testcmd.c
10
os_testcmd.c
|
@ -30,11 +30,11 @@ static void testcmd_command_success_string(sourceinfo_t *si, const char *result,
|
||||||
command_t os_testcmd = { "TESTCMD", "Executes a command without a user_t.",
|
command_t os_testcmd = { "TESTCMD", "Executes a command without a user_t.",
|
||||||
AC_NONE, 3, os_cmd_testcmd, { .path = "contrib/testcmd" } };
|
AC_NONE, 3, os_cmd_testcmd, { .path = "contrib/testcmd" } };
|
||||||
|
|
||||||
struct sourceinfo_vtable testcmd_vtable = {
|
struct sourceinfo_vtable testcmd_vtable = {
|
||||||
.description = "testcmd",
|
.description = "testcmd",
|
||||||
.cmd_fail = testcmd_command_fail,
|
.cmd_fail = testcmd_command_fail,
|
||||||
.cmd_success_nodata = testcmd_command_success_nodata,
|
.cmd_success_nodata = testcmd_command_success_nodata,
|
||||||
.cmd_success_string = testcmd_command_success_string
|
.cmd_success_string = testcmd_command_success_string
|
||||||
};
|
};
|
||||||
|
|
||||||
void _modinit(module_t *m)
|
void _modinit(module_t *m)
|
||||||
|
|
18
os_trace.c
18
os_trace.c
|
@ -100,7 +100,7 @@ char *reason_extract(char **args)
|
||||||
(*args)++;
|
(*args)++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
(*args)++;
|
(*args)++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -132,7 +132,7 @@ static void *trace_regexp_prepare(char **args)
|
||||||
domain = scalloc(sizeof(trace_query_regexp_domain_t), 1);
|
domain = scalloc(sizeof(trace_query_regexp_domain_t), 1);
|
||||||
domain->pattern = regex_extract(*args, &(*args), &domain->flags);
|
domain->pattern = regex_extract(*args, &(*args), &domain->flags);
|
||||||
domain->regex = regex_create(domain->pattern, domain->flags);
|
domain->regex = regex_create(domain->pattern, domain->flags);
|
||||||
|
|
||||||
return domain;
|
return domain;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -221,7 +221,7 @@ static void *trace_glob_prepare(char **args)
|
||||||
{
|
{
|
||||||
char *pattern;
|
char *pattern;
|
||||||
trace_query_glob_domain_t *domain;
|
trace_query_glob_domain_t *domain;
|
||||||
|
|
||||||
return_val_if_fail(args != NULL, NULL);
|
return_val_if_fail(args != NULL, NULL);
|
||||||
return_val_if_fail(*args != NULL, NULL);
|
return_val_if_fail(*args != NULL, NULL);
|
||||||
|
|
||||||
|
@ -232,7 +232,7 @@ static void *trace_glob_prepare(char **args)
|
||||||
domain->pattern = sstrdup(pattern);
|
domain->pattern = sstrdup(pattern);
|
||||||
|
|
||||||
*args = strtok(NULL, "");
|
*args = strtok(NULL, "");
|
||||||
|
|
||||||
return domain;
|
return domain;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -622,7 +622,7 @@ static trace_action_t *trace_akill_prepare(sourceinfo_t *si, char **args)
|
||||||
/* Extract a token, but only if there's one to remove.
|
/* Extract a token, but only if there's one to remove.
|
||||||
* Otherwise, this would clip a word off the reason. */
|
* Otherwise, this would clip a word off the reason. */
|
||||||
token = 0;
|
token = 0;
|
||||||
s = *args;
|
s = *args;
|
||||||
if (!strncasecmp(s, "!T", 2) || !strncasecmp(s, "!P", 2))
|
if (!strncasecmp(s, "!T", 2) || !strncasecmp(s, "!P", 2))
|
||||||
{
|
{
|
||||||
if (s[2] == ' ')
|
if (s[2] == ' ')
|
||||||
|
@ -658,17 +658,17 @@ static trace_action_t *trace_akill_prepare(sourceinfo_t *si, char **args)
|
||||||
;
|
;
|
||||||
else
|
else
|
||||||
duration = 0;
|
duration = 0;
|
||||||
|
|
||||||
if (duration == 0)
|
if (duration == 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
else if (token == 'p')
|
else if (token == 'p')
|
||||||
duration = 0;
|
duration = 0;
|
||||||
|
|
||||||
reason = reason_extract(args);
|
reason = reason_extract(args);
|
||||||
if (reason == NULL)
|
if (reason == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
a = scalloc(sizeof(trace_action_akill_t), 1);
|
a = scalloc(sizeof(trace_action_akill_t), 1);
|
||||||
trace_action_init(&a->base, si);
|
trace_action_init(&a->base, si);
|
||||||
a->duration = duration;
|
a->duration = duration;
|
||||||
|
@ -843,7 +843,7 @@ static void os_cmd_trace(sourceinfo_t *si, int parc, char *parv[])
|
||||||
MOWGLI_ITER_FOREACH_SAFE(n, tn, crit.head)
|
MOWGLI_ITER_FOREACH_SAFE(n, tn, crit.head)
|
||||||
{
|
{
|
||||||
trace_query_domain_t *q = (trace_query_domain_t *) n->data;
|
trace_query_domain_t *q = (trace_query_domain_t *) n->data;
|
||||||
q->cons->cleanup(q);
|
q->cons->cleanup(q);
|
||||||
}
|
}
|
||||||
actcons->cleanup(act, succeeded);
|
actcons->cleanup(act, succeeded);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue