X-Git-Url: https://jfr.im/git/solanum.git/blobdiff_plain/f25be66429cb3175c192c92137f7c2af3b96fc46..269646ed4c8c74712e52d87027084009d37f5aa3:/modules/m_set.c diff --git a/modules/m_set.c b/modules/m_set.c index 88e079a1..2355ab10 100644 --- a/modules/m_set.c +++ b/modules/m_set.c @@ -20,8 +20,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA - * - * $Id: m_set.c 3406 2007-04-13 19:06:53Z jilles $ */ /* rewritten by jdc */ @@ -33,7 +31,6 @@ #include "numeric.h" #include "s_serv.h" #include "send.h" -#include "common.h" #include "channel.h" #include "s_conf.h" #include "s_newconf.h" @@ -41,15 +38,17 @@ #include "parse.h" #include "modules.h" -static int mo_set(struct Client *, struct Client *, int, const char **); +static const char set_desc[] = "Provides the SET command to change server parameters"; + +static void mo_set(struct MsgBuf *, struct Client *, struct Client *, int, const char **); struct Message set_msgtab = { - "SET", 0, 0, 0, MFLG_SLOW, + "SET", 0, 0, 0, 0, {mg_unreg, mg_not_oper, mg_ignore, mg_ignore, mg_ignore, {mo_set, 0}} }; mapi_clist_av1 set_clist[] = { &set_msgtab, NULL }; -DECLARE_MODULE_AV1(set, NULL, NULL, set_clist, NULL, NULL, "$Revision: 3406 $"); +DECLARE_MODULE_AV2(set, NULL, NULL, set_clist, NULL, NULL, NULL, NULL, set_desc); /* Structure used for the SET table itself */ struct SetStruct @@ -80,7 +79,7 @@ static void quote_splitusers(struct Client *, const char *, int); static void list_quote_commands(struct Client *); -/* +/* * If this ever needs to be expanded to more than one arg of each * type, want_char/want_int could be the count of the arguments, * instead of just a boolean flag... @@ -203,6 +202,7 @@ quote_identtimeout(struct Client *source_p, const char *arg, int newval) "%s has changed IDENTTIMEOUT to %d", get_oper_name(source_p), newval); GlobalSetOptions.ident_timeout = newval; + set_authd_timeout("ident_timeout", newval); } else sendto_one_notice(source_p, ":IDENTTIMEOUT is currently %d", @@ -235,7 +235,7 @@ quote_max(struct Client *source_p, const char *arg, int newval) sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s!%s@%s set new MAXCLIENTS to %d (%lu current)", source_p->name, source_p->username, source_p->host, - GlobalSetOptions.maxclients, + GlobalSetOptions.maxclients, rb_dlink_list_length(&lclient_list)); return; @@ -259,7 +259,7 @@ quote_operstring(struct Client *source_p, const char *arg, int newval) { rb_strlcpy(GlobalSetOptions.operstring, arg, sizeof(GlobalSetOptions.operstring)); - + sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s has changed OPERSTRING to '%s'", get_oper_name(source_p), arg); @@ -278,7 +278,7 @@ quote_adminstring(struct Client *source_p, const char *arg, int newval) { rb_strlcpy(GlobalSetOptions.adminstring, arg, sizeof(GlobalSetOptions.adminstring)); - + sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s has changed ADMINSTRING to '%s'", get_oper_name(source_p), arg); @@ -407,7 +407,7 @@ quote_splitmode(struct Client *source_p, const char *charval, int intval) } } else - /* if we add splitchecking to splitmode*2 we get a unique table to + /* if we add splitchecking to splitmode*2 we get a unique table to * 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_ */ @@ -453,8 +453,8 @@ quote_splitusers(struct Client *source_p, const char *arg, int newval) * mo_set - SET command handler * set options while running */ -static int -mo_set(struct Client *client_p, struct Client *source_p, int parc, const char *parv[]) +static void +mo_set(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[]) { int newval; int i, n; @@ -497,7 +497,7 @@ mo_set(struct Client *client_p, struct Client *source_p, int parc, const char *p wants_char ? "string, " : ""), (set_cmd_table[i]. wants_char ? "int" : "")); - return 0; + return; } if(parc <= 2) @@ -529,14 +529,14 @@ mo_set(struct Client *client_p, struct Client *source_p, int parc, const char *p ":Value less than 0 illegal for %s", set_cmd_table[i].name); - return 0; + return; } } else newval = -1; set_cmd_table[i].handler(source_p, arg, newval); - return 0; + return; } } @@ -545,10 +545,8 @@ mo_set(struct Client *client_p, struct Client *source_p, int parc, const char *p * found within set_cmd_table. */ sendto_one_notice(source_p, ":Variable not found."); - return 0; + return; } list_quote_commands(source_p); - - return 0; }