###
##	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.
###
# 
# --------------------------------------------------------------------------
# REGISTER - take ownership of a nickname
# --------------------------------------------------------------------------
#
# No parms cos NONE = OFF
#(@parms) = split(/ /, $parms);
#if(($#parms+1) >= 2)

{
my($keynick);

$keynick = &dcase($nick); # lowercase key

if(!$nicks{$keynick}{ident}{nicks}{$keynick})
	{
	&send(":$servnick NOTICE $nick :You must identify to $nicknick\n");
	&send(":$servnick NOTICE $nick :before using this command.\n");
	return;
	}
if(!$opers{$keynick})
	{
	$text = qq~
	This option is for IRC Operators only.
	Hopefully, this will serve you better
	in the future. You can use this command:
	/msg $nicknick INFO <nick>
	and the IRC Operator NOTE should tell you what
	that particular IRCops function is.~;
	&sendtext($text, "\t"); # send with no tabs
	return;
	}
# if we got this far the check went ok, let's set the note
$rnicks{$keynick}{opnote}{item} = $parms;

# did they type nothing or just spaces? then it's OFF
if(($parms eq "") && (!$parms))
	{
	&send(":$servnick NOTICE $nick :Done! You're opnote is now OFF\n");
	return;
	}
# on fall through they typed something
&send(":$servnick NOTICE $nick :Done! You're opnote has been set to:\n");
&send(":$servnick NOTICE $nick :$parms\n");

}



