/********************************************************************************
 * Wiznet All copyright 2002                                                    *
 * Ankerous : mrjessetblackmore@softhome.net                                    *
 *                                                                              *
 * I got tired of manually turning on all wiznet commands on muds so I made     *
 * this.  It works perfectly and is pretty much self explanitory.  One note     *
 * however.  The wiznet bits, such as prefix, secure, and others, might not     *
 * be the ones on your mud, so be sure to check in the do_wiznet section in     *
 * act_wiz.c or wherever it is located.  Thanks.
 *                                                                              *
 * All I ask in return is that you give me credit on your mud somewhere         *
 * or email me if you use it.                                                   *
 ********************************************************************************/
 
/*Add this somewhere in interp.c*/
{ "wiznetall",      do_wiznetall,           POS_DEAD,	 IM, LOG_NORMAL, 1 },

/*Add these to interp.h */
DECLARE_DO_FUN( do_wiznetall    );
DECLARE_DO_FUN( do_wiznetallon  );
DECLARE_DO_FUN( do_wiznetalloff );

/*Add this in act_info.c or act_wiz.c, your choice*/

void do_wiznetall (CHAR_DATA * ch, char *argument)
{
    char arg[MAX_INPUT_LENGTH];

    argument = one_argument (argument, arg);

    if (arg[0] == '\0')
    {
        send_to_char ("Syntax:\n\r", ch);
        send_to_char ("  Wiznetall <on/off>\n\r", ch);
        send_to_char ("  On turns all Wiznet Options on\n\r", ch);
        send_to_char ("  Off turns all Wiznet Options off\n\r", ch);
        return;
    }

    if (!str_cmp (arg, "on") || !str_cmp (arg, "char"))
    {
        do_function (ch, &do_wiznetallon, argument);
        return;
    }

    if (!str_cmp (arg, "off"))
    {
        do_function (ch, &do_wiznetalloff, argument);
        return;
    }
    /* echo syntax */
    do_function (ch, &do_wiznetall, "");
}

void do_wiznetallon(CHAR_DATA *ch, char *argument)
{
	if (IS_NPC(ch))
		return;

	SET_BIT(ch->wiznet,WIZ_ON);
	SET_BIT(ch->wiznet,WIZ_PREFIX);
	SET_BIT(ch->wiznet,WIZ_TICKS);
	SET_BIT(ch->wiznet,WIZ_LOGINS);
	SET_BIT(ch->wiznet,WIZ_SITES);
	SET_BIT(ch->wiznet,WIZ_LINKS);
	SET_BIT(ch->wiznet,WIZ_NEWBIES);
	SET_BIT(ch->wiznet,WIZ_SPAM);
	SET_BIT(ch->wiznet,WIZ_DEATHS);
	SET_BIT(ch->wiznet,WIZ_RESETS);
	SET_BIT(ch->wiznet,WIZ_MOBDEATHS);
	SET_BIT(ch->wiznet,WIZ_FLAGS);
	SET_BIT(ch->wiznet,WIZ_PENALTIES);
	SET_BIT(ch->wiznet,WIZ_SACCING);
	SET_BIT(ch->wiznet,WIZ_LEVELS);
	SET_BIT(ch->wiznet,WIZ_LOAD);
	SET_BIT(ch->wiznet,WIZ_RESTORE);
	SET_BIT(ch->wiznet,WIZ_SNOOPS);
	SET_BIT(ch->wiznet,WIZ_SWITCHES);
	SET_BIT(ch->wiznet,WIZ_SECURE);

	send_to_char("{YAll Wiznet Options turned {Gon{x.{x\n\r",ch);
}

void do_wiznetalloff(CHAR_DATA *ch, char *argument)
{
	if (IS_NPC(ch))
		return;

	REMOVE_BIT(ch->wiznet,WIZ_ON);
	REMOVE_BIT(ch->wiznet,WIZ_PREFIX);
	REMOVE_BIT(ch->wiznet,WIZ_TICKS);
	REMOVE_BIT(ch->wiznet,WIZ_LOGINS);
	REMOVE_BIT(ch->wiznet,WIZ_SITES);
	REMOVE_BIT(ch->wiznet,WIZ_LINKS);
	REMOVE_BIT(ch->wiznet,WIZ_NEWBIES);
	REMOVE_BIT(ch->wiznet,WIZ_SPAM);
	REMOVE_BIT(ch->wiznet,WIZ_DEATHS);
	REMOVE_BIT(ch->wiznet,WIZ_RESETS);
	REMOVE_BIT(ch->wiznet,WIZ_MOBDEATHS);
	REMOVE_BIT(ch->wiznet,WIZ_FLAGS);
	REMOVE_BIT(ch->wiznet,WIZ_PENALTIES);
	REMOVE_BIT(ch->wiznet,WIZ_SACCING);
	REMOVE_BIT(ch->wiznet,WIZ_LEVELS);
	REMOVE_BIT(ch->wiznet,WIZ_LOAD);
	REMOVE_BIT(ch->wiznet,WIZ_RESTORE);
	REMOVE_BIT(ch->wiznet,WIZ_SNOOPS);
	REMOVE_BIT(ch->wiznet,WIZ_SWITCHES);
	REMOVE_BIT(ch->wiznet,WIZ_SECURE);

	send_to_char("{YAll Wiznet Options turned {Roff{x.{x\n\r",ch);
}