/* -------------------------------------------------------------------- */
/*	SCRFGRP.CPP 					Citadel 							*/
/* -------------------------------------------------------------------- */
/*	This file contains all the internal functions for user scripts		*/
/* -------------------------------------------------------------------- */
#include "ctdl.h"
#pragma hdrstop

#include "scrfunc.h"

#include "group.h"

/* -------------------------------------------------------------------- */
/*							GROUP FILE STUFF							*/
/* -------------------------------------------------------------------- */

void sfIsgrpinuse(strList *params)
	{
	SETBOOL(GroupData->GetEntry(evaluateInt(params->string))->IsInuse());
	}

void sfIsgrplocked(strList *params)
	{
	SETBOOL(GroupData->GetEntry(evaluateInt(params->string))->IsLocked());
	}

void sfIsgrphidden(strList *params)
	{
	SETBOOL(GroupData->GetEntry(evaluateInt(params->string))->IsHidden());
	}

void sfIsgrpautoadd(strList *params)
	{
	SETBOOL(GroupData->GetEntry(evaluateInt(params->string))->IsAutoAdd());
	}

void sfGetgrpname(strList *params)
	{
	SETSTR(GroupData->GetEntry(evaluateInt(params->string))->GetName());
	}

void sfGetgrpdesc(strList *params)
	{
	SETSTR(GroupData->GetEntry(evaluateInt(params->string))->GetDescription());
	}


void sfGetgroupslot(strList *params)
	{
	SETINT(FindGroupByName(evaluateString(params->string)));
	}
