+nenolod 2007/01/25 07:08:21 UTC (20070125-3159)
+ Log:
+ - keyword-subst from charybdis 2.2.
+
+
+ Changes: Modified:
+ +12 -3 trunk/doc/example.conf (File Modified)
+ +58 -3 trunk/doc/reference.conf (File Modified)
+ + - trunk/include/substitution.h (File Added)
+ +1 -0 trunk/src/Makefile.in (File Modified)
+ +2 -2 trunk/src/s_conf.c (File Modified)
+ +164 -1 trunk/src/s_user.c (File Modified)
+ + - trunk/src/substitution.c (File Added)
+
+
nenolod 2007/01/25 07:00:49 UTC (20070125-3157)
Log:
Removed merge tracking for "svnmerge" for
<para>
Adds a D:line to <filename>dline.conf</filename>, which will deny any connections
from the given IP address.
+ The IP address can be given as a full address (192.168.0.1) or
+ as a CIDR mask (192.168.0.0/24).
</para>
<para>
If the optional parameter <replaceable>length</replaceable> is given, the D:line will
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: example_module.c 494 2006-01-15 16:08:28Z jilles $
+ * $Id: example_module.c 3161 2007-01-25 07:23:01Z nenolod $
*/
/* List of ircd includes from ../include/ */
/* Then the hook function list, if we have one */
test_hfnlist,
/* And finally the version number of this module. */
- "$Revision: 494 $");
+ "$Revision: 3161 $");
/* Any of the above arguments can be NULL to indicate they aren't used. */
{
if(parc < 2)
{
- sendto_one(source_p, ":%s NOTICE %s :You are unregistered and sent no parameters",
- me.name, source_p->name);
+ sendto_one_notice(source_p, ":You are unregistered and sent no parameters");
}
else
{
- sendto_one(source_p, ":%s NOTICE %s :You are unregistered and sent parameter: %s",
- me.name, source_p->name, parv[1]);
+ sendto_one_notice(source_p, ":You are unregistered and sent parameter: %s", parv[1]);
}
/* illustration of how to call a hook function */
{
if(parc < 2)
{
- sendto_one(source_p, ":%s NOTICE %s :You are a normal user, and sent no parameters",
- me.name, source_p->name);
+ sendto_one_notice(source_p, ":You are a normal user, and sent no parameters");
}
else
{
- sendto_one(source_p,
- ":%s NOTICE %s :You are a normal user, and send parameters: %s", me.name,
- source_p->name, parv[1]);
+ sendto_one_notice(source_p, ":You are a normal user, and send parameters: %s", parv[1]);
}
/* illustration of how to call a hook function */
{
if(parc < 2)
{
- sendto_one(source_p,
- ":%s NOTICE %s :You are a remote client, and sent no parameters",
- me.name, source_p->name);
+ sendto_one_notice(source_p, ":You are a remote client, and sent no parameters");
}
else
{
- sendto_one(source_p,
- ":%s NOTICE %s :You are a remote client, and sent parameters: %s",
- me.name, source_p->name, parv[1]);
+ sendto_one_notice(source_p, ":You are a remote client, and sent parameters: %s", parv[1]);
}
return 0;
}
{
if(parc < 2)
{
- sendto_one(source_p,
- ":%s NOTICE %s :You are a server, and sent no parameters",
- me.name, source_p->name);
+ sendto_one_notice(source_p, ":You are a server, and sent no parameters");
}
else
{
- sendto_one(source_p,
- ":%s NOTICE %s :You are a server, and sent parameters: %s",
- me.name, source_p->name, parv[1]);
+ sendto_one_notice(source_p, ":You are a server, and sent parameters: %s", parv[1]);
}
return 0;
}
{
if(parc < 2)
{
- sendto_one(source_p, ":%s NOTICE %s :You are an operator, and sent no parameters",
- me.name, source_p->name);
+ sendto_one_notice(source_p, ":You are an operator, and sent no parameters");
}
else
{
- sendto_one(source_p, ":%s NOTICE %s :You are an operator, and sent parameters: %s",
- me.name, source_p->name, parv[1]);
+ sendto_one_notice(source_p, ":You are an operator, and sent parameters: %s", parv[1]);
}
return 0;
}
* Copyright (C) 2006 charybdis development team
* All rights reserved
*
- * $Id: hurt.c 1905 2006-08-29 14:51:31Z jilles $
+ * $Id: hurt.c 3161 2007-01-25 07:23:01Z nenolod $
*/
#include "stdinc.h"
#include "modules.h"
hurt_clist,
NULL,
hurt_hfnlist,
- "$Revision: 1905 $"
+ "$Revision: 3161 $"
);
/* }}} */
if (!expire)
expire_time = HURT_DEFAULT_EXPIRE;
if (expire && (expire_time = valid_temp_time(expire)) < 1) {
- sendto_one(source_p,
- ":%s NOTICE %s :Permanent HURTs are not supported",
- me.name, source_p->name);
+ sendto_one_notice(source_p, ":Permanent HURTs are not supported");
return 0;
}
if (EmptyString(reason)) {
- sendto_one(source_p,
- ":%s NOTICE %s :Empty HURT reasons are bad for business",
- me.name, source_p->name);
+ sendto_one_notice(source_p, ":Empty HURT reasons are bad for business");
return 0;
}
}
if (hurt_find(ip) != NULL) {
- sendto_one(source_p,
- ":%s NOTICE %s :[%s] already HURT",
- me.name, source_p->name, ip);
+ sendto_one(source_p, ":[%s] already HURT", ip);
return 0;
}
{
if (hurt_find_exact(parv[1]) == NULL)
{
- sendto_one(source_p, ":%s NOTICE %s :Mask [%s] is not HURT",
- me.name, source_p->name, parv[1]);
+ sendto_one_notice(source_p, ":Mask [%s] is not HURT", parv[1]);
return 0;
}
hurt_remove(parv[1]);
}
else
{
- sendto_one(source_p,
- ":%s NOTICE %s :[%s] is not a valid IP address/nick",
- me.name, source_p->name, parv[1]);
+ sendto_one(source_p, ":[%s] is not a valid IP address/nick", parv[1]);
return 0;
}
* Copyright (C) infinity-infinity God <God@Heaven>
*
* Bob was here
- * $Id: m_42.c 6 2005-09-10 01:02:21Z nenolod $
+ * $Id: m_42.c 3161 2007-01-25 07:23:01Z nenolod $
*/
#include "stdinc.h"
static int
mclient_42(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
- sendto_one(source_p, ":%s NOTICE %s :The Answer to Life, the Universe, and Everything.",
- me.name, source_p->name);
+ sendto_one_notice(source_p, ":The Answer to Life, the Universe, and Everything.");
return 0;
}
*
* You can use this code in any way as long as these names remain.
*
- * $Id: m_mkpasswd.c 6 2005-09-10 01:02:21Z nenolod $
+ * $Id: m_mkpasswd.c 3161 2007-01-25 07:23:01Z nenolod $
*/
/* List of ircd includes from ../include/ */
mapi_clist_av1 mkpasswd_clist[] = { &mkpasswd_msgtab, NULL };
-DECLARE_MODULE_AV1(mkpasswd, NULL, NULL, mkpasswd_clist, NULL, NULL, "$Revision: 6 $");
+DECLARE_MODULE_AV1(mkpasswd, NULL, NULL, mkpasswd_clist, NULL, NULL, "$Revision: 3161 $");
static int
}
else
{
- sendto_one(source_p,
- ":%s NOTICE %s :MKPASSWD syntax error: MKPASSWD pass [DES|MD5]",
- me.name, parv[0]);
+ sendto_one_notice(source_p, ":MKPASSWD syntax error: MKPASSWD pass [DES|MD5]");
return 0;
}
}
if(parc == 1)
sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS), me.name, parv[0], "MKPASSWD");
else
- sendto_one(source_p, ":%s NOTICE %s :Encryption for [%s]: %s",
- me.name, parv[0], parv[1], crypt(parv[1],
+ sendto_one_notice(source_p, ":Encryption for [%s]: %s",
+ parv[1], crypt(parv[1],
is_md5 ? make_md5_salt() :
make_salt()));
}
else
{
- sendto_one(source_p,
- ":%s NOTICE %s :MKPASSWD syntax error: MKPASSWD pass [DES|MD5]",
- me.name, parv[0]);
+ sendto_one_notice(source_p,
+ ":MKPASSWD syntax error: MKPASSWD pass [DES|MD5]");
return 0;
}
}
if(parc == 1)
sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS), me.name, parv[0], "MKPASSWD");
else
- sendto_one(source_p, ":%s NOTICE %s :Encryption for [%s]: %s",
- me.name, parv[0], parv[1], crypt(parv[1],
- is_md5 ? make_md5_salt() :
- make_salt()));
+ sendto_one_notice(source_p, ":Encryption for [%s]: %s",
+ parv[1], crypt(parv[1], is_md5 ? make_md5_salt() : make_salt()));
return 0;
}
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: m_ojoin.c 3121 2007-01-02 13:23:04Z jilles $
+ * $Id: m_ojoin.c 3161 2007-01-25 07:23:01Z nenolod $
*/
#include "stdinc.h"
mapi_clist_av1 ojoin_clist[] = { &ojoin_msgtab, NULL };
-DECLARE_MODULE_AV1(ojoin, NULL, NULL, ojoin_clist, NULL, NULL, "$Revision: 3121 $");
+DECLARE_MODULE_AV1(ojoin, NULL, NULL, ojoin_clist, NULL, NULL, "$Revision: 3161 $");
/*
** mo_ojoin
if(IsMember(source_p, chptr))
{
- sendto_one(source_p, ":%s NOTICE %s :Please part %s before using OJOIN",
- me.name, source_p->name, parv[1]);
+ sendto_one_notice(source_p, ":Please part %s before using OJOIN", parv[1]);
return 0;
}
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: m_opme.c 3121 2007-01-02 13:23:04Z jilles $
+ * $Id: m_opme.c 3161 2007-01-25 07:23:01Z nenolod $
*/
#include "stdinc.h"
#include "tools.h"
mapi_clist_av1 opme_clist[] = { &opme_msgtab, NULL };
-DECLARE_MODULE_AV1(opme, NULL, NULL, opme_clist, NULL, NULL, "$Revision: 3121 $");
+DECLARE_MODULE_AV1(opme, NULL, NULL, opme_clist, NULL, NULL, "$Revision: 3161 $");
/*
if(is_chanop(msptr))
{
- sendto_one(source_p, ":%s NOTICE %s :%s Channel is not opless",
- me.name, parv[0], parv[1]);
+ sendto_one_notice(source_p, ":%s Channel is not opless", parv[1]);
return 0;
}
}
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
- * $Id: spy_whois_notice.c 498 2006-01-15 16:40:33Z jilles $
+ * $Id: spy_whois_notice.c 3161 2007-01-25 07:23:01Z nenolod $
*/
#include "stdinc.h"
#include "modules.h"
{NULL, NULL}
};
-DECLARE_MODULE_AV1(whois_spy, NULL, NULL, NULL, NULL, whois_hfnlist, "$Revision: 498 $");
+DECLARE_MODULE_AV1(whois_spy, NULL, NULL, NULL, NULL, whois_hfnlist, "$Revision: 3161 $");
void
show_whois(hook_data_client *data)
if(MyClient(target_p) && IsOper(target_p) && (source_p != target_p) &&
(target_p->snomask & SNO_SPY))
{
- sendto_one(target_p,
- ":%s NOTICE %s :*** Notice -- %s (%s@%s) is doing a whois on you [%s]",
- me.name, target_p->name, source_p->name,
+ sendto_one_notice(target_p,
+ ":*** Notice -- %s (%s@%s) is doing a whois on you [%s]",
+ source_p->name,
source_p->username, source_p->host,
source_p->user->server);
}
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
- * $Id: spy_whois_notice_global.c 498 2006-01-15 16:40:33Z jilles $
+ * $Id: spy_whois_notice_global.c 3161 2007-01-25 07:23:01Z nenolod $
*/
#include "stdinc.h"
#include "modules.h"
};
DECLARE_MODULE_AV1(whois_global_spy, NULL, NULL, NULL, NULL, whois_global_hfnlist,
- "$Revision: 498 $");
+ "$Revision: 3161 $");
void
show_whois_global(hook_data_client *data)
if(MyClient(target_p) && IsOper(target_p) && (source_p != target_p) &&
(target_p->snomask & SNO_SPY))
{
- sendto_one(target_p,
- ":%s NOTICE %s :*** Notice -- %s (%s@%s) is doing a whois on you [%s]",
- me.name, target_p->name, source_p->name,
+ sendto_one_notice(target_p,
+ ":*** Notice -- %s (%s@%s) is doing a whois on you [%s]",
+ source_p->name,
source_p->username, source_p->host,
source_p->user->server);
}
-#define SERNO "20070125-3157"
+#define SERNO "20070125-3159"
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
- * $Id: m_die.c 98 2005-09-11 03:37:47Z nenolod $
+ * $Id: m_die.c 3161 2007-01-25 07:23:01Z nenolod $
*/
#include "stdinc.h"
mapi_clist_av1 die_clist[] = { &die_msgtab, NULL };
-DECLARE_MODULE_AV1(die, NULL, NULL, die_clist, NULL, NULL, "$Revision: 98 $");
+DECLARE_MODULE_AV1(die, NULL, NULL, die_clist, NULL, NULL, "$Revision: 3161 $");
/*
* mo_die - DIE command handler
if(parc < 2 || EmptyString(parv[1]))
{
- sendto_one(source_p, ":%s NOTICE %s :Need server name /die %s",
- me.name, source_p->name, me.name);
+ sendto_one_notice(source_p, ":Need server name /die %s", me.name);
return 0;
}
else if(irccmp(parv[1], me.name))
{
- sendto_one(source_p, ":%s NOTICE %s :Mismatch on /die %s",
- me.name, source_p->name, me.name);
+ sendto_one_notice(source_p, ":Mismatch on /die %s", me.name);
return 0;
}
{
target_p = ptr->data;
- sendto_one(target_p,
- ":%s NOTICE %s :Server Terminating. %s",
- me.name, target_p->name, get_client_name(source_p, HIDE_IP));
+ sendto_one_notice(target_p, ":Server Terminating. %s", get_client_name(source_p, HIDE_IP));
}
DLINK_FOREACH(ptr, serv_list.head)
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
- * $Id: m_kill.c 2755 2006-11-10 19:08:03Z jilles $
+ * $Id: m_kill.c 3161 2007-01-25 07:23:01Z nenolod $
*/
#include "stdinc.h"
mapi_clist_av1 kill_clist[] = { &kill_msgtab, NULL };
-DECLARE_MODULE_AV1(kill, NULL, NULL, kill_clist, NULL, NULL, "$Revision: 2755 $");
+DECLARE_MODULE_AV1(kill, NULL, NULL, kill_clist, NULL, NULL, "$Revision: 3161 $");
/*
** mo_kill
form_str(ERR_NOSUCHNICK), user);
return 0;
}
- sendto_one(source_p, ":%s NOTICE %s :KILL changed from %s to %s",
- me.name, parv[0], user, target_p->name);
+ sendto_one_notice(source_p, ":KILL changed from %s to %s", user, target_p->name);
}
if(!MyConnect(target_p) && (!IsOperGlobalKill(source_p)))
{
- sendto_one(source_p, ":%s NOTICE %s :Nick %s isnt on your server",
- me.name, parv[0], target_p->name);
+ sendto_one_notice(source_p, ":Nick %s is not on your server "
+ "and you do not have the global_kill flag",
+ target_p->name);
return 0;
}
/* Do not change the format of this message. There's no point in changing messages
* that have been around for ever, for no reason.. */
sendto_realops_snomask(SNO_GENERAL, L_ALL,
- "Received KILL message for %s. From %s Path: %s (%s)",
- target_p->name, parv[0], me.name, reason);
+ "Received KILL message for %s[%s@%s]. From %s Path: %s (%s)",
+ target_p->name, target_p->username, target_p->host,
+ parv[0], me.name, reason);
ilog(L_KILL, "%c %s %s!%s@%s %s %s",
MyConnect(target_p) ? 'L' : 'G', get_oper_name(source_p),
if(IsOper(source_p)) /* send it normally */
{
sendto_realops_snomask(IsService(source_p) ? SNO_SKILL : SNO_GENERAL, L_ALL,
- "Received KILL message for %s. From %s Path: %s!%s!%s!%s %s",
- target_p->name, parv[0], source_p->user->server,
- source_p->host, source_p->username, source_p->name, reason);
+ "Received KILL message for %s[%s@%s]. From %s Path: %s!%s!%s!%s %s",
+ target_p->name, target_p->username, target_p->host, parv[0],
+ source_p->user->server, source_p->host, source_p->username,
+ source_p->name, reason);
ilog(L_KILL, "%c %s %s!%s@%s %s %s",
MyConnect(target_p) ? 'O' : 'R', get_oper_name(source_p),
else
{
sendto_realops_snomask(SNO_SKILL, L_ALL,
- "Received KILL message for %s. From %s %s",
- target_p->name, parv[0], reason);
+ "Received KILL message for %s[%s@%s]. From %s %s",
+ target_p->name, target_p->username, target_p->host,
+ parv[0], reason);
ilog(L_KILL, "S %s %s!%s@%s %s %s",
source_p->name, target_p->name, target_p->username,
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
- * $Id: m_squit.c 698 2006-02-04 18:26:55Z jilles $
+ * $Id: m_squit.c 3161 2007-01-25 07:23:01Z nenolod $
*/
#include "stdinc.h"
mapi_clist_av1 squit_clist[] = { &squit_msgtab, NULL };
-DECLARE_MODULE_AV1(squit, NULL, NULL, squit_clist, NULL, NULL, "$Revision: 698 $");
+DECLARE_MODULE_AV1(squit, NULL, NULL, squit_clist, NULL, NULL, "$Revision: 3161 $");
struct squit_parms
{
if(IsClient(client_p))
{
if(MyClient(client_p))
- sendto_one(source_p, ":%s NOTICE %s :You are trying to squit me.",
- me.name, client_p->name);
+ sendto_one_notice(source_p, ":You are trying to squit me.");
+
return NULL;
}
else
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
- * $Id: m_challenge.c 1483 2006-05-27 18:58:12Z jilles $
+ * $Id: m_challenge.c 3161 2007-01-25 07:23:01Z nenolod $
*/
#include "stdinc.h"
#endif
}
-DECLARE_MODULE_AV1(challenge, challenge_load, NULL, NULL, NULL, NULL, "$Revision: 1483 $");
+DECLARE_MODULE_AV1(challenge, challenge_load, NULL, NULL, NULL, NULL, "$Revision: 3161 $");
#else
static int m_challenge(struct Client *, struct Client *, int, const char **);
};
mapi_clist_av1 challenge_clist[] = { &challenge_msgtab, NULL };
-DECLARE_MODULE_AV1(challenge, NULL, NULL, challenge_clist, NULL, NULL, "$Revision: 1483 $");
+DECLARE_MODULE_AV1(challenge, NULL, NULL, challenge_clist, NULL, NULL, "$Revision: 3161 $");
static int generate_challenge(char **r_challenge, char **r_response, RSA * key);
if(!oper_p->rsa_pubkey)
{
- sendto_one(source_p, ":%s NOTICE %s :I'm sorry, PK authentication "
- "is not enabled for your oper{} block.", me.name, parv[0]);
+ sendto_one_notice(source_p, ":I'm sorry, PK authentication is not enabled for your oper{} block.");
return 0;
}
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
- * $Id: m_connect.c 254 2005-09-21 23:35:12Z nenolod $
+ * $Id: m_connect.c 3161 2007-01-25 07:23:01Z nenolod $
*/
#include "stdinc.h"
};
mapi_clist_av1 connect_clist[] = { &connect_msgtab, NULL };
-DECLARE_MODULE_AV1(connect, NULL, NULL, connect_clist, NULL, NULL, "$Revision: 254 $");
+DECLARE_MODULE_AV1(connect, NULL, NULL, connect_clist, NULL, NULL, "$Revision: 3161 $");
/*
* mo_connect - CONNECT command handler
if((target_p = find_server(source_p, parv[1])))
{
- sendto_one(source_p, ":%s NOTICE %s :Connect: Server %s already exists from %s.",
- me.name, parv[0], parv[1], target_p->from->name);
+ sendto_one_notice(source_p, ":Connect: Server %s already exists from %s.", parv[1],
+ target_p->from->name);
return 0;
}
*/
if((server_p = find_server_conf(parv[1])) == NULL)
{
- sendto_one(source_p,
- "NOTICE %s :Connect: Host %s not listed in ircd.conf",
- parv[0], parv[1]);
+ sendto_one_notice(source_p, ":Connect: Host %s not listed in ircd.conf", parv[1]);
return 0;
}
{
if((port = atoi(parv[2])) <= 0)
{
- sendto_one(source_p, "NOTICE %s :Connect: Illegal port number", parv[0]);
+ sendto_one_notice(source_p, ":Connect: Illegal port number");
return 0;
}
}
else if(port <= 0 && (port = PORTNUM) <= 0)
{
- sendto_one(source_p, ":%s NOTICE %s :Connect: missing port number",
- me.name, parv[0]);
+ sendto_one_notice(source_p, ":Connect: missing port number");
return 0;
}
/*
if(serv_connect(server_p, source_p))
{
#ifndef HIDE_SERVERS_IPS
- sendto_one(source_p, ":%s NOTICE %s :*** Connecting to %s[%s].%d",
- me.name, parv[0], server_p->host, server_p->name, server_p->port);
+ sendto_one_notice(source_p, ":*** Connecting to %s[%s].%d",
+ server_p->host, server_p->name, server_p->port);
#else
- sendto_one(source_p, ":%s NOTICE %s :*** Connecting to %s.%d",
- me.name, parv[0], server_p->name, server_p->port);
+ sendto_one_notice(source_p, ":*** Connecting to %s.%d",
+ server_p->name, server_p->port);
#endif
}
else
{
- sendto_one(source_p, ":%s NOTICE %s :*** Couldn't connect to %s.%d",
- me.name, parv[0], server_p->name, server_p->port);
-
+ sendto_one_notice(source_p, ":*** Couldn't connect to %s.%d",
+ server_p->name, server_p->port);
}
/*
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
- * $Id: m_dline.c 3051 2006-12-27 00:02:32Z jilles $
+ * $Id: m_dline.c 3161 2007-01-25 07:23:01Z nenolod $
*/
#include "stdinc.h"
};
mapi_clist_av1 dline_clist[] = { &dline_msgtab, &undline_msgtab, NULL };
-DECLARE_MODULE_AV1(dline, NULL, NULL, dline_clist, NULL, NULL, "$Revision: 3051 $");
+DECLARE_MODULE_AV1(dline, NULL, NULL, dline_clist, NULL, NULL, "$Revision: 3161 $");
static int valid_comment(char *comment);
static int flush_write(struct Client *, FILE *, char *, char *);
if(parse_netmask(cidr, NULL, NULL) == HM_HOST)
{
- sendto_one(source_p, ":%s NOTICE %s :Invalid D-Line",
- me.name, source_p->name);
+ sendto_one_notice(source_p, ":Invalid D-Line");
return 0;
}
if(error_on_write)
{
- sendto_one(source_p, ":%s NOTICE %s :Unable to write to %s",
- me.name, source_p->name, temppath);
+ sendto_one_notice(source_p, ":Unable to write to %s", temppath);
fclose(out);
if(temppath != NULL)
(void) unlink(temppath);
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: m_etrace.c 2775 2006-11-27 11:45:31Z jilles $
+ * $Id: m_etrace.c 3161 2007-01-25 07:23:01Z nenolod $
*/
#include "stdinc.h"
};
mapi_clist_av1 etrace_clist[] = { &etrace_msgtab, &chantrace_msgtab, &masktrace_msgtab, NULL };
-DECLARE_MODULE_AV1(etrace, NULL, NULL, etrace_clist, NULL, NULL, "$Revision: 2775 $");
+DECLARE_MODULE_AV1(etrace, NULL, NULL, etrace_clist, NULL, NULL, "$Revision: 3161 $");
static void do_etrace(struct Client *source_p, int ipv4, int ipv6);
static void do_etrace_full(struct Client *source_p);
if((hostname = strchr(name, '@')) == NULL)
{
- sendto_one(source_p, ":%s NOTICE %s :Invalid parameters", me.name, source_p->name);
+ sendto_one_notice(source_p, ":Invalid parameters");
return 0;
}
if(EmptyString(username) || EmptyString(hostname))
{
- sendto_one(source_p, ":%s NOTICE %s :Invalid parameters", me.name, source_p->name);
+ sendto_one_notice(source_p, ":Invalid parameters");
return 0;
}
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
- * $Id: m_gline.c 1146 2006-04-07 22:52:35Z jilles $
+ * $Id: m_gline.c 3161 2007-01-25 07:23:01Z nenolod $
*/
#include "stdinc.h"
};
mapi_clist_av1 gline_clist[] = { &gline_msgtab, &ungline_msgtab, NULL };
-DECLARE_MODULE_AV1(gline, NULL, NULL, gline_clist, NULL, NULL, "$Revision: 1146 $");
+DECLARE_MODULE_AV1(gline, NULL, NULL, gline_clist, NULL, NULL, "$Revision: 3161 $");
static int majority_gline(struct Client *source_p, const char *user,
const char *host, const char *reason);
if(!ConfigFileEntry.glines)
{
- sendto_one(source_p, ":%s NOTICE %s :GLINE disabled, perhaps you want a clustered or remote KLINE?",
- me.name, source_p->name);
+ sendto_one_notice(source_p, ":GLINE disabled, perhaps you want a clustered or remote KLINE?");
return 0;
}
/* ok, its not a host.. abort */
if(strchr(parv[1], '.') == NULL)
{
- sendto_one(source_p,
- ":%s NOTICE %s :Invalid parameters",
- me.name, source_p->name);
+ sendto_one_notice(source_p, ":Invalid parameters");
return 0;
}
if(check_wild_gline(user, host))
{
if(MyClient(source_p))
- sendto_one(source_p,
- ":%s NOTICE %s :Please include at least %d non-wildcard "
- "characters with the user@host",
- me.name, source_p->name,
+ sendto_one_notice(source_p,
+ ":Please include at least %d non-wildcard characters with the user@host",
ConfigFileEntry.min_nonwildcard);
return 0;
}
{
if(bitlen < ConfigFileEntry.gline_min_cidr)
{
- sendto_one(source_p, ":%s NOTICE %s :Cannot set G-Lines with cidr length < %d",
- me.name, source_p->name,
+ sendto_one_notice(source_p, ":Cannot set G-Lines with cidr length < %d",
ConfigFileEntry.gline_min_cidr);
return 0;
}
/* ipv6 */
else if(bitlen < ConfigFileEntry.gline_min_cidr6)
{
- sendto_one(source_p, ":%s NOTICE %s :Cannot set G-Lines with cidr length < %d",
- me.name, source_p->name,
+ sendto_one_notice(source_p, ":Cannot set G-Lines with cidr length < %d",
ConfigFileEntry.gline_min_cidr6);
return 0;
}
if(!ConfigFileEntry.glines)
{
- sendto_one(source_p, ":%s NOTICE %s :UNGLINE disabled, perhaps you want UNKLINE?", me.name, parv[0]);
+ sendto_one_notice(source_p, ":UNGLINE disabled, perhaps you want UNKLINE?");
return 0;
}
}
else
{
- sendto_one(source_p, ":%s NOTICE %s :Invalid parameters", me.name, parv[0]);
+ sendto_one_notice(source_p, ":Invalid parameters");
return 0;
}
if(remove_temp_gline(user, host))
{
- sendto_one(source_p, ":%s NOTICE %s :Un-glined [%s@%s]",
- me.name, parv[0], user, host);
+ sendto_one_notice(source_p, ":Un-glined [%s@%s]", user, host);
sendto_realops_snomask(SNO_GENERAL, L_ALL,
"%s has removed the G-Line for: [%s@%s]",
get_oper_name(source_p), user, host);
}
else
{
- sendto_one(source_p, ":%s NOTICE %s :No G-Line for %s@%s",
- me.name, parv[0], user, host);
+ sendto_one_notice(source_p, ":No G-Line for %s@%s", user, host);
}
return 0;
{
if(strchr(luser, '!'))
{
- sendto_one(source_p, ":%s NOTICE %s :Invalid character '!' in gline",
- me.name, source_p->name);
+ sendto_one_notice(source_p, ":Invalid character '!' in gline");
return 1;
}
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
- * $Id: m_kline.c 3063 2006-12-27 00:47:45Z jilles $
+ * $Id: m_kline.c 3161 2007-01-25 07:23:01Z nenolod $
*/
#include "stdinc.h"
};
mapi_clist_av1 kline_clist[] = { &kline_msgtab, &unkline_msgtab, NULL };
-DECLARE_MODULE_AV1(kline, NULL, NULL, kline_clist, NULL, NULL, "$Revision: 3063 $");
+DECLARE_MODULE_AV1(kline, NULL, NULL, kline_clist, NULL, NULL, "$Revision: 3161 $");
/* Local function prototypes */
static int find_user_host(struct Client *source_p, const char *userhost, char *user, char *host);
}
else
{
- sendto_one(source_p, ":%s NOTICE %s :Invalid parameters", me.name, source_p->name);
+ sendto_one_notice(source_p, ":Invalid parameters");
return 0;
}
if(remove_temp_kline(user, host))
{
- sendto_one(source_p,
- ":%s NOTICE %s :Un-klined [%s@%s] from temporary k-lines",
- me.name, parv[0], user, host);
+ sendto_one_notice(source_p, ":Un-klined [%s@%s] from temporary k-lines", user, host);
sendto_realops_snomask(SNO_GENERAL, L_ALL,
"%s has removed the temporary K-Line for: [%s@%s]",
get_oper_name(source_p), user, host);
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
- * $Id: m_rehash.c 932 2006-03-05 03:39:14Z nenolod $
+ * $Id: m_rehash.c 3161 2007-01-25 07:23:01Z nenolod $
*/
#include "stdinc.h"
};
mapi_clist_av1 rehash_clist[] = { &rehash_msgtab, NULL };
-DECLARE_MODULE_AV1(rehash, NULL, NULL, rehash_clist, NULL, NULL, "$Revision: 932 $");
+DECLARE_MODULE_AV1(rehash, NULL, NULL, rehash_clist, NULL, NULL, "$Revision: 3161 $");
struct hash_commands
{
strlcat(cmdbuf, " ", sizeof(cmdbuf));
strlcat(cmdbuf, rehash_commands[x].cmd, sizeof(cmdbuf));
}
- sendto_one(source_p, ":%s NOTICE %s :rehash one of:%s", me.name, source_p->name,
- cmdbuf);
+ sendto_one_notice(source_p, ":rehash one of:%s", cmdbuf);
}
else
{
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
- * $Id: m_restart.c 254 2005-09-21 23:35:12Z nenolod $
+ * $Id: m_restart.c 3161 2007-01-25 07:23:01Z nenolod $
*/
#include "stdinc.h"
};
mapi_clist_av1 restart_clist[] = { &restart_msgtab, NULL };
-DECLARE_MODULE_AV1(restart, NULL, NULL, restart_clist, NULL, NULL, "$Revision: 254 $");
+DECLARE_MODULE_AV1(restart, NULL, NULL, restart_clist, NULL, NULL, "$Revision: 3161 $");
/*
* mo_restart
if(parc < 2 || EmptyString(parv[1]))
{
- sendto_one(source_p, ":%s NOTICE %s :Need server name /restart %s",
- me.name, source_p->name, me.name);
+ sendto_one_notice(source_p, ":Need server name /restart %s", me.name);
return 0;
}
else if(irccmp(parv[1], me.name))
{
- sendto_one(source_p, ":%s NOTICE %s :Mismatch on /restart %s",
- me.name, source_p->name, me.name);
+ sendto_one_notice(source_p, ":Mismatch on /restart %s", me.name);
return 0;
}
{
target_p = ptr->data;
- sendto_one(target_p,
- ":%s NOTICE %s :Server Restarting. %s",
- me.name, target_p->name, get_client_name(source_p, HIDE_IP));
+ sendto_one_notice(target_p, ":Server Restarting. %s", get_client_name(source_p, HIDE_IP));
}
DLINK_FOREACH(ptr, serv_list.head)
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
- * $Id: m_set.c 494 2006-01-15 16:08:28Z jilles $
+ * $Id: m_set.c 3161 2007-01-25 07:23:01Z nenolod $
*/
/* rewritten by jdc */
};
mapi_clist_av1 set_clist[] = { &set_msgtab, NULL };
-DECLARE_MODULE_AV1(set, NULL, NULL, set_clist, NULL, NULL, "$Revision: 494 $");
+DECLARE_MODULE_AV1(set, NULL, NULL, set_clist, NULL, NULL, "$Revision: 3161 $");
/* Structure used for the SET table itself */
struct SetStruct
int j = 0;
const char *names[4];
- sendto_one(source_p, ":%s NOTICE %s :Available QUOTE SET commands:",
- me.name, source_p->name);
+ sendto_one_notice(source_p, ":Available QUOTE SET commands:");
names[0] = names[1] = names[2] = names[3] = "";
if(j > 3)
{
- sendto_one(source_p, ":%s NOTICE %s :%s %s %s %s",
- me.name, source_p->name, names[0], names[1], names[2], names[3]);
+ sendto_one_notice(source_p, ":%s %s %s %s",
+ names[0], names[1], names[2], names[3]);
j = 0;
names[0] = names[1] = names[2] = names[3] = "";
}
}
if(j)
- sendto_one(source_p, ":%s NOTICE %s :%s %s %s %s",
- me.name, source_p->name, names[0], names[1], names[2], names[3]);
+ sendto_one_notice(source_p, ":%s %s %s %s",
+ names[0], names[1], names[2], names[3]);
}
/* SET AUTOCONN */
}
else
{
- sendto_one(source_p, ":%s NOTICE %s :AUTOCONNALL is currently %i",
- me.name, source_p->name, GlobalSetOptions.autoconn);
+ sendto_one_notice(source_p, ":AUTOCONNALL is currently %i",
+ GlobalSetOptions.autoconn);
}
}
}
else
{
- sendto_one(source_p, ":%s NOTICE %s :FLOODCOUNT is currently %i",
- me.name, source_p->name, GlobalSetOptions.floodcount);
+ sendto_one_notice(source_p, ":FLOODCOUNT is currently %i",
+ GlobalSetOptions.floodcount);
}
}
GlobalSetOptions.ident_timeout = newval;
}
else
- sendto_one(source_p, ":%s NOTICE %s :IDENTTIMEOUT is currently %d",
- me.name, source_p->name, GlobalSetOptions.ident_timeout);
+ sendto_one_notice(source_p, ":IDENTTIMEOUT is currently %d",
+ GlobalSetOptions.ident_timeout);
}
/* SET IDLETIME */
}
else
{
- sendto_one(source_p, ":%s NOTICE %s :IDLETIME is currently %i",
- me.name, source_p->name, GlobalSetOptions.idletime / 60);
+ sendto_one_notice(source_p, ":IDLETIME is currently %i",
+ GlobalSetOptions.idletime / 60);
}
}
{
if(newval > MASTER_MAX)
{
- sendto_one(source_p,
- ":%s NOTICE %s :You cannot set MAXCLIENTS to > MASTER_MAX (%d)",
- me.name, source_p->name, MASTER_MAX);
+ sendto_one_notice(source_p, ":You cannot set MAXCLIENTS to > MASTER_MAX (%d)",
+ MASTER_MAX);
return;
}
if(newval < 32)
{
- sendto_one(source_p,
- ":%s NOTICE %s :You cannot set MAXCLIENTS to < 32 (%d:%d)",
- me.name, source_p->name, GlobalSetOptions.maxclients,
- highest_fd);
+ sendto_one_notice(source_p, ":You cannot set MAXCLIENTS to < 32 (%d:%d)",
+ GlobalSetOptions.maxclients, highest_fd);
return;
}
}
else
{
- sendto_one(source_p, ":%s NOTICE %s :Current Maxclients = %d (%lu)",
- me.name, source_p->name, GlobalSetOptions.maxclients,
- dlink_list_length(&lclient_list));
+ sendto_one_notice(source_p, ":Current Maxclients = %d (%lu)",
+ GlobalSetOptions.maxclients, dlink_list_length(&lclient_list));
}
}
{
if(EmptyString(arg))
{
- sendto_one(source_p, ":%s NOTICE %s :OPERSTRING is currently '%s'",
- me.name, source_p->name, GlobalSetOptions.operstring);
+ sendto_one_notice(source_p, ":OPERSTRING is currently '%s'", GlobalSetOptions.operstring);
}
else
{
{
if(EmptyString(arg))
{
- sendto_one(source_p, ":%s NOTICE %s :ADMINSTRING is currently '%s'",
- me.name, source_p->name, GlobalSetOptions.adminstring);
+ sendto_one_notice(source_p, ":ADMINSTRING is currently '%s'", GlobalSetOptions.adminstring);
}
else
{
}
else
{
- sendto_one(source_p, ":%s NOTICE %s :SPAMNUM is currently %i",
- me.name, source_p->name, GlobalSetOptions.spam_num);
+ sendto_one_notice(source_p, ":SPAMNUM is currently %i", GlobalSetOptions.spam_num);
}
}
}
else
{
- sendto_one(source_p, ":%s NOTICE %s :SPAMTIME is currently %i",
- me.name, source_p->name, GlobalSetOptions.spam_time);
+ sendto_one_notice(source_p, ":SPAMTIME is currently %i", GlobalSetOptions.spam_time);
}
}
* pull values back out of, splitmode can be four states - but you can
* only set to three, which means we cant use the same table --fl_
*/
- sendto_one(source_p, ":%s NOTICE %s :SPLITMODE is currently %s",
- me.name, source_p->name,
+ sendto_one_notice(source_p, ":SPLITMODE is currently %s",
splitmode_status[(splitchecking + (splitmode * 2))]);
}
check_splitmode(NULL);
}
else
- sendto_one(source_p, ":%s NOTICE %s :SPLITNUM is currently %i",
- me.name, source_p->name, split_servers);
+ sendto_one_notice(source_p, ":SPLITNUM is currently %i", split_servers);
}
/* SET SPLITUSERS */
check_splitmode(NULL);
}
else
- sendto_one(source_p, ":%s NOTICE %s :SPLITUSERS is currently %i",
- me.name, source_p->name, split_users);
+ sendto_one_notice(source_p, ":SPLITUSERS is currently %i", split_users);
}
/*
if((n - 1) > parc)
{
- sendto_one(source_p,
- ":%s NOTICE %s :SET %s expects (\"%s%s\") args",
- me.name, source_p->name,
+ sendto_one_notice(source_p,
+ ":SET %s expects (\"%s%s\") args",
set_cmd_table[i].name,
(set_cmd_table[i].
wants_char ? "string, " : ""),
if(newval < 0)
{
- sendto_one(source_p,
- ":%s NOTICE %s :Value less than 0 illegal for %s",
- me.name, source_p->name,
+ sendto_one_notice(source_p,
+ ":Value less than 0 illegal for %s",
set_cmd_table[i].name);
return 0;
* Code here will be executed when a /QUOTE SET command is not
* found within set_cmd_table.
*/
- sendto_one(source_p, ":%s NOTICE %s :Variable not found.", me.name, parv[0]);
+ sendto_one_notice(source_p, ":Variable not found.");
return 0;
}
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: m_testmask.c 2775 2006-11-27 11:45:31Z jilles $
+ * $Id: m_testmask.c 3161 2007-01-25 07:23:01Z nenolod $
*
*/
};
mapi_clist_av1 testmask_clist[] = { &testmask_msgtab, NULL };
-DECLARE_MODULE_AV1(testmask, NULL, NULL, testmask_clist, NULL, NULL, "$Revision: 2775 $");
+DECLARE_MODULE_AV1(testmask, NULL, NULL, testmask_clist, NULL, NULL, "$Revision: 3161 $");
static const char *empty_sockhost = "255.255.255.255";
static const char *spoofed_sockhost = "0";
/* username is required */
if((hostname = strchr(name, '@')) == NULL)
{
- sendto_one(source_p, ":%s NOTICE %s :Invalid parameters",
- me.name, source_p->name);
+ sendto_one_notice(source_p, ":Invalid parameters");
return 0;
}
if(EmptyString(username) || EmptyString(hostname))
{
- sendto_one(source_p, ":%s NOTICE %s :Invalid parameters",
- me.name, source_p->name);
+ sendto_one_notice(source_p, ":Invalid parameters");
return 0;
}
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
- * $Id: m_unreject.c 254 2005-09-21 23:35:12Z nenolod $
+ * $Id: m_unreject.c 3161 2007-01-25 07:23:01Z nenolod $
*/
#include "stdinc.h"
};
mapi_clist_av1 unreject_clist[] = { &unreject_msgtab, NULL };
-DECLARE_MODULE_AV1(unreject, NULL, NULL, unreject_clist, NULL, NULL, "$Revision: 254 $");
+DECLARE_MODULE_AV1(unreject, NULL, NULL, unreject_clist, NULL, NULL, "$Revision: 3161 $");
/*
* mo_unreject
if(ConfigFileEntry.reject_after_count == 0 || ConfigFileEntry.reject_ban_time == 0 ||
ConfigFileEntry.reject_duration == 0)
{
- sendto_one(source_p, ":%s NOTICE %s :Reject cache is disabled",
- me.name, source_p->name);
+ sendto_one_notice(source_p, ":Reject cache is disabled");
return 0;
}
if(!parse_netmask(parv[1], NULL, NULL))
{
- sendto_one(source_p, ":%s NOTICE %s :Unable to parse netmask %s",
- me.name, source_p->name, parv[1]);
+ sendto_one_notice(source_p, ":Unable to parse netmask %s", parv[1]);
return 0;
}
if(remove_reject(parv[1]))
- sendto_one(source_p, ":%s NOTICE %s :Removed reject for %s",
- me.name, source_p->name, parv[1]);
+ sendto_one_notice(source_p, ":Removed reject for %s", parv[1]);
else
- sendto_one(source_p, ":%s NOTICE %s :Unable to remove reject for %s",
- me.name, source_p->name, parv[1]);
+ sendto_one_notice(source_p, ":Unable to remove reject for %s", parv[1]);
+
return 0;
}
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: m_xline.c 3059 2006-12-27 00:36:54Z jilles $
+ * $Id: m_xline.c 3161 2007-01-25 07:23:01Z nenolod $
*/
#include "stdinc.h"
};
mapi_clist_av1 xline_clist[] = { &xline_msgtab, &unxline_msgtab, NULL };
-DECLARE_MODULE_AV1(xline, NULL, NULL, xline_clist, NULL, NULL, "$Revision: 3059 $");
+DECLARE_MODULE_AV1(xline, NULL, NULL, xline_clist, NULL, NULL, "$Revision: 3161 $");
static int valid_xline(struct Client *, const char *, const char *);
static void apply_xline(struct Client *client_p, const char *name,
/* already xlined */
if((aconf = find_xline(name, 0)) != NULL)
{
- sendto_one(source_p, ":%s NOTICE %s :[%s] already X-Lined by [%s] - %s",
- me.name, source_p->name, name,
- aconf->name, aconf->passwd);
+ sendto_one_notice(source_p, ":[%s] already X-Lined by [%s] - %s", name, aconf->name, aconf->passwd);
return;
}
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
- * $Id: chmode.c 3131 2007-01-21 15:36:31Z jilles $
+ * $Id: chmode.c 3161 2007-01-25 07:23:01Z nenolod $
*/
#include "stdinc.h"
if (!(*errors & SM_ERR_RPL_F))
{
if (*chptr->mode.forward == '\0')
- sendto_one(source_p, ":%s NOTICE %s :%s has no forward channel", me.name, source_p->name, chptr->chname);
+ sendto_one_notice(source_p, ":%s has no forward channel", chptr->chname);
else
- sendto_one(source_p, ":%s NOTICE %s :%s forward channel is %s", me.name, source_p->name, chptr->chname, chptr->mode.forward);
+ sendto_one_notice(source_p, ":%s forward channel is %s", chptr->chname, chptr->mode.forward);
*errors |= SM_ERR_RPL_F;
}
return;
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
- * $Id: modules.c 1509 2006-05-28 02:35:58Z nenolod $
+ * $Id: modules.c 3161 2007-01-25 07:23:01Z nenolod $
*/
#include "stdinc.h"
if(findmodule_byname(m_bn) != -1)
{
- sendto_one(source_p,
- ":%s NOTICE %s :Module %s is already loaded",
- me.name, source_p->name, m_bn);
+ sendto_one_notice(source_p, ":Module %s is already loaded", m_bn);
MyFree(m_bn);
return 0;
}
if((modindex = findmodule_byname(m_bn)) == -1)
{
- sendto_one(source_p,
- ":%s NOTICE %s :Module %s is not loaded", me.name, source_p->name, m_bn);
+ sendto_one_notice(source_p, ":Module %s is not loaded", m_bn);
MyFree(m_bn);
return 0;
}
if(modlist[modindex]->core == 1)
{
- sendto_one(source_p,
- ":%s NOTICE %s :Module %s is a core module and may not be unloaded",
- me.name, source_p->name, m_bn);
+ sendto_one_notice(source_p, ":Module %s is a core module and may not be unloaded", m_bn);
MyFree(m_bn);
return 0;
}
if(unload_one_module(m_bn, 1) == -1)
{
- sendto_one(source_p,
- ":%s NOTICE %s :Module %s is not loaded", me.name, source_p->name, m_bn);
+ sendto_one_notice(source_p, ":Module %s is not loaded", m_bn);
}
+
MyFree(m_bn);
return 0;
}
if((modindex = findmodule_byname(m_bn)) == -1)
{
- sendto_one(source_p,
- ":%s NOTICE %s :Module %s is not loaded", me.name, source_p->name, m_bn);
+ sendto_one_notice(source_p, ":Module %s is not loaded", m_bn);
MyFree(m_bn);
return 0;
}
if(unload_one_module(m_bn, 1) == -1)
{
- sendto_one(source_p,
- ":%s NOTICE %s :Module %s is not loaded", me.name, source_p->name, m_bn);
+ sendto_one_notice(source_p, ":Module %s is not loaded", m_bn);
MyFree(m_bn);
return 0;
}
return 0;
}
- sendto_one(source_p, ":%s NOTICE %s :Reloading all modules", me.name, parv[0]);
+ sendto_one_notice(source_p, ":Reloading all modules");
modnum = num_mods;
while (num_mods)
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
- * $Id: s_auth.c 1683 2006-06-20 14:26:16Z jilles $ */
+ * $Id: s_auth.c 3161 2007-01-25 07:23:01Z nenolod $ */
/*
* Changes:
static const char *HeaderMessages[] =
{
- "NOTICE AUTH :*** Looking up your hostname...",
- "NOTICE AUTH :*** Found your hostname",
- "NOTICE AUTH :*** Couldn't look up your hostname",
- "NOTICE AUTH :*** Checking Ident",
- "NOTICE AUTH :*** Got Ident response",
- "NOTICE AUTH :*** No Ident response",
- "NOTICE AUTH :*** Your hostname is too long, ignoring hostname",
- "NOTICE AUTH :*** Your forward and reverse DNS do not match, ignoring hostname",
- "NOTICE AUTH :*** Cannot verify hostname validity, ignoring hostname",
+ ":*** Looking up your hostname...",
+ ":*** Found your hostname",
+ ":*** Couldn't look up your hostname",
+ ":*** Checking Ident",
+ ":*** Got Ident response",
+ ":*** No Ident response",
+ ":*** Your hostname is too long, ignoring hostname",
+ ":*** Your forward and reverse DNS do not match, ignoring hostname",
+ ":*** Cannot verify hostname validity, ignoring hostname",
};
typedef enum
}
ReportType;
-#define sendheader(c, r) sendto_one(c, HeaderMessages[(r)])
+#define sendheader(c, r) sendto_one_notice(c, HeaderMessages[(r)])
static dlink_list auth_poll_list;
static BlockHeap *auth_heap;
if(client == NULL)
return;
- /* to aid bopm which needs something unique to match against */
- sendto_one(client, "NOTICE AUTH :*** Processing connection to %s",
- me.name);
-
auth = make_auth_request(client);
auth->dns_query.ptr = auth;
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
- * $Id: s_conf.c 3159 2007-01-25 07:08:21Z nenolod $
+ * $Id: s_conf.c 3161 2007-01-25 07:23:01Z nenolod $
*/
#include "stdinc.h"
}
else if(aconf->status & CONF_GLINE)
{
- sendto_one(client_p, ":%s NOTICE %s :*** G-lined", me.name, client_p->name);
+ sendto_one_notice(client_p, ":*** G-lined");
if(ConfigFileEntry.kline_with_reason)
sendto_one(client_p,
}
else
{
- sendto_one(client_p, ":%s NOTICE %s :*** I: line is full, but you have an >I: line!",
- me.name, client_p->name);
+ sendto_one_notice(client_p, ":*** I: line is full, but you have an >I: line!");
SetExemptLimits(client_p);
}
reason, oper_reason);
}
- sendto_one(source_p,
- ":%s NOTICE %s :Added D-Line [%s] to %s", me.name,
- source_p->name, host, filename);
+ sendto_one_notice(source_p, ":Added D-Line [%s] to %s", host, filename);
}
else if(type == RESV_TYPE)
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: s_newconf.c 1747 2006-07-25 21:22:45Z jilles $
+ * $Id: s_newconf.c 3161 2007-01-25 07:23:01Z nenolod $
*/
#include "stdinc.h"
get_oper_name(source_p), name, newval);
}
else
- sendto_one(source_p, ":%s NOTICE %s :Can't find %s",
- me.name, source_p->name, name);
+ sendto_one_notice(source_p, ":Can't find %s", name);
}
struct ConfItem *
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
- * $Id: s_user.c 3159 2007-01-25 07:08:21Z nenolod $
+ * $Id: s_user.c 3161 2007-01-25 07:23:01Z nenolod $
*/
#include "stdinc.h"
if(!valid_hostname(source_p->host))
{
- sendto_one(source_p,
- ":%s NOTICE %s :*** Notice -- You have an illegal character in your hostname",
- me.name, source_p->name);
+ sendto_one_notice(source_p, ":*** Notice -- You have an illegal character in your hostname");
strlcpy(source_p->host, source_p->sockhost, sizeof(source_p->host));
if(IsNeedIdentd(aconf))
{
ServerStats->is_ref++;
- sendto_one(source_p,
- ":%s NOTICE %s :*** Notice -- You need to install identd to use this server",
- me.name, client_p->name);
+ sendto_one_notice(source_p, ":*** Notice -- You need to install identd to use this server");
exit_client(client_p, source_p, &me, "Install identd");
return (CLIENT_EXITED);
}
if(IsNeedSasl(aconf) && !*user->suser)
{
ServerStats->is_ref++;
- sendto_one(source_p,
- ":%s NOTICE %s :*** Notice -- You need to identify via SASL to use this server",
- me.name, client_p->name);
+ sendto_one_notice(source_p, ":*** Notice -- You need to identify via SASL to use this server");
exit_client(client_p, source_p, &me, "SASL access only");
return (CLIENT_EXITED);
}
/* If this user is being spoofed, tell them so */
if(IsConfDoSpoofIp(aconf))
{
- sendto_one(source_p,
- ":%s NOTICE %s :*** Spoofing your IP. congrats.",
- me.name, source_p->name);
+ sendto_one_notice(source_p, ":*** Spoofing your IP. congrats.");
}
/* If this user is in the exception class, Set it "E lined" */
if(IsConfExemptKline(aconf))
{
SetExemptKline(source_p);
- sendto_one(source_p,
- ":%s NOTICE %s :*** You are exempt from K/D/G/X lines. congrats.",
- me.name, source_p->name);
+ sendto_one_notice(source_p, ":*** You are exempt from K/D/G/X lines. congrats.");
}
if(IsConfExemptGline(aconf))
/* dont send both a kline and gline exempt notice */
if(!IsConfExemptKline(aconf))
- sendto_one(source_p,
- ":%s NOTICE %s :*** You are exempt from G lines.",
- me.name, source_p->name);
+ sendto_one_notice(source_p, ":*** You are exempt from G lines.");
}
if(IsConfExemptDNSBL(aconf))
/* kline exempt implies this, don't send both */
if(!IsConfExemptKline(aconf))
- sendto_one(source_p,
- ":%s NOTICE %s :*** You are exempt from DNS blacklists.",
- me.name, source_p->name);
+ sendto_one_notice(source_p, ":*** You are exempt from DNS blacklists.");
/* If this user is exempt from user limits set it F lined" */
if(IsConfExemptLimits(aconf))
{
SetExemptLimits(source_p);
- sendto_one(source_p,
- ":%s NOTICE %s :*** You are exempt from user limits. congrats.",
- me.name, source_p->name);
+ sendto_one_notice(source_p, "*** You are exempt from user limits. congrats.");
}
/* If this user is exempt from idle time outs */
if(IsConfIdlelined(aconf))
{
SetIdlelined(source_p);
- sendto_one(source_p,
- ":%s NOTICE %s :*** You are exempt from idle limits. congrats.",
- me.name, source_p->name);
+ sendto_one_notice(source_p, ":*** You are exempt from idle limits. congrats.");
}
if(IsConfExemptFlood(aconf))
{
SetExemptFlood(source_p);
- sendto_one(source_p,
- ":%s NOTICE %s :*** You are exempt from flood limits.",
- me.name, source_p->name);
+ sendto_one_notice(source_p, ":*** You are exempt from flood limits.");
}
if(IsConfExemptSpambot(aconf))
{
SetExemptSpambot(source_p);
- sendto_one(source_p,
- ":%s NOTICE %s :*** You are exempt from spambot checks.",
- me.name, source_p->name);
+ sendto_one_notice(source_p, ":*** You are exempt from spambot checks.");
}
if(IsConfExemptJupe(aconf))
{
SetExemptJupe(source_p);
- sendto_one(source_p,
- ":%s NOTICE %s :*** You are exempt from juped channel warnings.",
- me.name, source_p->name);
+ sendto_one_notice(source_p, ":*** You are exempt from juped channel warnings.");
}
if(IsConfExemptResv(aconf))
{
SetExemptResv(source_p);
- sendto_one(source_p,
- ":%s NOTICE %s :*** You are exempt from resvs.",
- me.name, source_p->name);
+ sendto_one_notice(source_p, ":*** You are exempt from resvs.");
}
if(IsConfExemptShide(aconf))
{
SetExemptShide(source_p);
- sendto_one(source_p,
- ":%s NOTICE %s :*** You are exempt from serverhiding.",
- me.name, source_p->name);
+ sendto_one_notice(source_p, ":*** You are exempt from serverhiding.");
}
}
if(MyClient(source_p) && (source_p->snomask & SNO_NCHANGE) && !IsOperN(source_p))
{
- sendto_one(source_p,
- ":%s NOTICE %s :*** You need oper and N flag for +s +n", me.name, parv[0]);
+ sendto_one_notice(source_p, ":*** You need oper and N flag for +s +n");
source_p->snomask &= ~SNO_NCHANGE; /* only tcm's really need this */
}
if(MyClient(source_p) && (source_p->umodes & UMODE_OPERWALL) && !IsOperOperwall(source_p))
{
- sendto_one(source_p,
- ":%s NOTICE %s :*** You need oper and operwall flag for +z", me.name, parv[0]);
+ sendto_one_notice(source_p, ":*** You need oper and operwall flag for +z");
source_p->umodes &= ~UMODE_OPERWALL;
}
if(MyConnect(source_p) && (source_p->umodes & UMODE_ADMIN) &&
(!IsOperAdmin(source_p) || IsOperHiddenAdmin(source_p)))
{
- sendto_one(source_p,
- ":%s NOTICE %s :*** You need oper and A flag for +a", me.name, parv[0]);
+ sendto_one_notice(source_p, ":*** You need oper and A flag for +a");
source_p->umodes &= ~UMODE_ADMIN;
}
if(ConfigFileEntry.short_motd)
{
- sendto_one(source_p,
- "NOTICE %s :*** Notice -- motd was last changed at %s",
- source_p->name, user_motd_changed);
-
- sendto_one(source_p,
- "NOTICE %s :*** Notice -- Please read the motd if you haven't read it",
- source_p->name);
+ sendto_one_notice(source_p, ":*** Notice -- motd was last changed at %s", user_motd_changed);
+ sendto_one_notice(source_p, ":*** Notice -- Please read the motd if you haven't read it");
sendto_one(source_p, form_str(RPL_MOTDSTART),
me.name, source_p->name, me.name);
sendto_one(source_p, form_str(RPL_SNOMASK), me.name, source_p->name,
construct_snobuf(source_p->snomask));
sendto_one(source_p, form_str(RPL_YOUREOPER), me.name, source_p->name);
- sendto_one(source_p, ":%s NOTICE %s :*** Oper privs are %s", me.name,
- source_p->name, get_oper_privs(oper_p->flags));
+ sendto_one_notice(source_p, ":*** Oper privs are %s", get_oper_privs(oper_p->flags));
send_oper_motd(source_p);
return (1);
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
- * $Id: send.c 1379 2006-05-20 14:11:07Z jilles $
+ * $Id: send.c 3161 2007-01-25 07:23:01Z nenolod $
*/
#include "stdinc.h"
struct Client *dest_p;
va_list args;
buf_head_t linebuf;
+ char *to;
/* send remote if to->from non NULL */
if(target_p->from != NULL)
va_start(args, pattern);
linebuf_putmsg(&linebuf, pattern, &args,
":%s NOTICE %s ",
- get_id(&me, target_p), get_id(target_p, target_p));
+ get_id(&me, target_p), *(to = get_id(target_p, target_p)) != '\0' ? to : "*");
va_end(args);
_send_linebuf(dest_p, &linebuf);
struct Client *dest_p;
va_list args;
buf_head_t linebuf;
+ char *to;
/* send remote if to->from non NULL */
if(target_p->from != NULL)
linebuf_putmsg(&linebuf, pattern, &args,
":%s %03d %s ",
get_id(&me, target_p),
- numeric, get_id(target_p, target_p));
+ numeric, *(to = get_id(target_p, target_p)) != '\0' ? to : "*");
va_end(args);
_send_linebuf(dest_p, &linebuf);
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: m_clearchan.c 1425 2006-05-23 16:41:33Z jilles $
+ * $Id: m_clearchan.c 3161 2007-01-25 07:23:01Z nenolod $
*/
#include "stdinc.h"
#include "tools.h"
mapi_clist_av1 clearchan_clist[] = { &clearchan_msgtab, NULL };
-DECLARE_MODULE_AV1(clearchan, NULL, NULL, clearchan_clist, NULL, NULL, "$Revision: 1425 $");
+DECLARE_MODULE_AV1(clearchan, NULL, NULL, clearchan_clist, NULL, NULL, "$Revision: 3161 $");
/*
** mo_clearchan
/* admins only */
if(!IsOperAdmin(source_p))
{
- sendto_one(source_p, ":%s NOTICE %s :You have no A flag", me.name, parv[0]);
+ sendto_one_notice(source_p, ":You have no A flag");
return 0;
}
if(IsMember(source_p, chptr))
{
- sendto_one(source_p, ":%s NOTICE %s :*** Please part %s before using CLEARCHAN",
- me.name, source_p->name, parv[1]);
+ sendto_one_notice(source_p, ":*** Please part %s before using CLEARCHAN", parv[1]);
return 0;
}
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: m_force.c 1425 2006-05-23 16:41:33Z jilles $
+ * $Id: m_force.c 3161 2007-01-25 07:23:01Z nenolod $
*/
#include "stdinc.h"
mapi_clist_av1 force_clist[] = { &forcejoin_msgtab, &forcepart_msgtab, NULL };
-DECLARE_MODULE_AV1(force, NULL, NULL, force_clist, NULL, NULL, "$Revision: 1425 $");
+DECLARE_MODULE_AV1(force, NULL, NULL, force_clist, NULL, NULL, "$Revision: 3161 $");
/*
* m_forcejoin
if(IsMember(target_p, chptr))
{
/* debugging is fun... */
- sendto_one(source_p, ":%s NOTICE %s :*** Notice -- %s is already in %s",
- me.name, source_p->name, target_p->name, chptr->chname);
+ sendto_one_notice(source_p, ":*** Notice -- %s is already in %s",
+ target_p->name, chptr->chname);
return 0;
}
/* newch can't be longer than CHANNELLEN */
if(strlen(newch) > CHANNELLEN)
{
- sendto_one(source_p, ":%s NOTICE %s :Channel name is too long", me.name,
- source_p->name);
+ sendto_one_notice(source_p, ":Channel name is too long");
return 0;
}
* seen from the server handling the command instead of the server that
* the oper is on.
*/
- sendto_one(source_p, ":%s NOTICE %s :*** Notice -- Creating channel %s", me.name,
- source_p->name, chptr->chname);
+ sendto_one_notice(source_p, ":*** Notice -- Creating channel %s", chptr->chname);
}
return 0;
}