###
##	Original package IRCCS version 1, Copyright (c) 1995
##	Daniel J. Wightman.  Rewritten from Nov to Dec 2000.
##	Packaged Dec 19 and published as IRCCS (fruitbrick) version 2.
##
##	FruitBrick (IRCCS) - Internet Relay Chat Control System version 2
##	Copyright (C) 1995, 2000  Daniel J. Wightman <dent@abonica.net>
##
##	See the copyright or COPYRIGHT in the main program directory for
##	details.  See the LICENSE in the main program directory as well.
###
# 
# --------------------------------------------------------------------------
# REHASH - destroy and reload the commands structure - installs new commands
# --------------------------------------------------------------------------
{
# do they have auth?
if(!&isauthoper($opcoms{rehash}{rank}, $keynick))
	{
	$text = qq~
	You don't appear to have access to this setting. 
	You can gain access by authenticating as the admin
	or, if your registered nick has access, identify 
	yourself as the owner of that nick.~;
	&sendtext($text, "\n", "\t");
	return;
	}

undef %commands;
undef %ctcp;
&send(":$servnick NOTICE $nick :Reloading commands...\n");
&runcom("admin", "COMLIST");
&send(":$servnick NOTICE $nick :Done!\n");
}





