* 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 3406 2007-04-13 19:06:53Z jilles $
*/
/* 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: 3406 $");
/* 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 > 0)
{
- if(newval > MASTER_MAX)
+ if(newval > ServerInfo.max_clients)
{
- 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 > max_clients (%d)",
+ ServerInfo.max_clients);
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;
}