# OpenVerse Technical Documentation
# 
# Tech docs for OpenVerse.
#
#
# Module Name		- Technical Help
# Current Maintainter 	- vile <documentation@openverse.com>
# Sourced By		- OpenHelp
#
# Portions Copyright (C) 1999 Bruce Gingery <bgingery@gtcs.com>
# OpenHelp Conversion Copyright (C) 1999-2001 David Gale <cruise@openverse.org>
# For more information visit http://OpenVerse.org/
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
# USA.

# OpenVerse Technical Help
# Converted from documentation written by Bruce Gingery
# <bgingery@gtcs.com>
#
# Currently mainted by David Gale <cruise@openverse.org>
#
proc mtindex {} {
	global MV
	set MV(url.-2.1.what) "mailto:sketch@openverse.com"
	set MV(url.-2.2.what) "http://www.openverse.com/"
	set MV(url.-2.3.what) "http://www.openverse.com/plugins"
	set MV(url.-2.4.what) "mailto:bgingery@gtcs.com"
	set MV(url.-2.5.what) "http://export-ventures.com/tcltk.htm"
	
openHelp "OpenVerse Technical Help" {

	<h1><fgr>OpenVerse Technical Help</fgr></h1>

  This section is the nitty-gritty of OpenVerse. It describes all
  of the functions, variables, protocols, file formats, and the 
  like in the tcl client and in the tcl server. Much of the
  information here was originally written by <URL_OpenWeb -2 4>Bruce Gingery</URL_OpenWeb -2 4>

   1.	<THLP_Overview><b>OverView</b></THLP_Overview>
   2.	<THLP_Functions>Client Functions Described</THLP_Functions>
   3.	Client Variables Described
   4.	<THLP_Server_Functions>Server Functions Described</THLP_Server_Functions>
   5.	<THLP_Server_Variables>Server Variables Described</THLP_Server_Variables>

		<h2><fgb>Platform Specific Information</fgb></h2>

	1.	<THLP_OS_AS_400>AS-400</THLP_OS_AS_400>
	2.	<THLP_OS_BLEND>Java and Tcl-Blend</THLP_OS_BLEND>
	3.	MacIntosh
	4.	UNIX® and Unix-like
	5.	VMS
	6.	Windows

	Visit the <URL_OpenWeb -2 2>Web Site!</URL_OpenWeb -2 2>
  	Originally written by <URL_OpenWeb -2 4>Bruce Gingery</URL_OpenWeb -2 4>
	Current Maintainer is <URL_OpenWeb -2 1>sketch@openverse.com</URL_OpenWeb -2 1>

}}

proc THLP_Overview {} {
openHelp "OpenVerse Technical Help Overview" {

		<fgb><h1>Overview</h1></fgb>

  The technical documentation for a multi-platform capable functional
  system becomes necessarily just a bit more complex than that
  designed, for example, for a single version of a single platform.
  While Tcl/Tk makes implementation across all supported Tcl/Tk
  platforms much faster, it doesn't necessarily make the
  documentation that much easier. On each platform, the porter may
  add a tweak here, or there, to iron out what to the original design
  is a nuance, but to the user on that machine, especially one with
  proper concerns for security, functionality, and possible
  interaction with other programs, there seems to always be
  something. 

  Yet, this is essentially a single-source client/server suite.
  Although packaged in a .zip file for Windows, .bin.hqx for
  MacIntosh and .tar.gz for various UNIX® and Unix-like platforms,
  the contents are nearly identical, and the operation is as much the
  same as they can be. For that reason, don't be surprised if
  documentation across various platforms, referenced on the main
  index, look very much the same. They should.

		<fgb><h2>The OpenVerse System</h2></fgb>

  The OpenVerse system is a many-client to many-server setup.
  Both the server and client applications are written in Tcl/Tk
  initially. For heavy use servers, some hardcoded optimizations
  may become desirable, possibly in the integration with a
  dynamically loadable database. As distributed, the server is a
  non-graphical single script (except on platforms where ALL
  networking is forced into the  GUI), while the client is a
  graphically more intensive (Tk Canvas based) item, except when
  tossed into text mode. 

  Server and Client run as separate processes, and not necessarily
  on the same machine.

<mtindex>[Main Index]</mtindex>

}}

proc THLP_OS_AS_400 {} {
openHelp "OpenVerse Technical OS AS-400" {

		<fgb><h1>AS-400 Information.</h1></fgb>

 Please see the <URL_OpenWeb -2 5>Export Ventures page</URL_OpenWeb -2 5> for information on Tcl/Tk
 on the AS-400. There has been no specific testing on this platform.
 Please report success or failure to <URL_OpenWeb -2 1>sketch@openverse.com</URL_OpenWeb -2 1>

<mtindex>[Main Index]</mtindex>
}}

proc THLP_OS_BLEND {} {
openHelp "OpenVerse Technical Java Blend" {

		<fgb><h1>Java Blend Information.</h1></fgb>

 Please see the <URL_OpenWeb -2 5>eXport Ventures page</URL_OpenWeb -2 5> for information on Tcl/Tk
 on the AS-400. There has been no specific testing on this platform.
 Please report success or failure to <URL_OpenWeb -2 1>sketch@openverse.com</URL_OpenWeb -2 1>

}}

proc THLP_Functions {} {
openHelp "OpenVerse Technical - Functions" {

		<fgb><h1>Functions Explained</h1></fgb>

    1.	<THLP_AvEd>AvEd.tcl</THLP_AvEd> Avatar Editor Functions
    2.	Avatars.tcl
    3.	BaseFunc.tcl
    4.	Bubble.tcl
    5.	BugRpt.tcl
    6.	ChtFuncs.tcl
    7.	GifHeader.tcl
    8.	Globals.tcl
    9.	IOFuncs.tcl
   10.	InitMain.tcl
   11.	Objects.tcl
   12.	Passage.tcl
   13.	Plugin.tcl
   14.	SetFuncs.tcl
   15.	URL.tcl
   16.	tkohlp.tcl

<mtindex>[Main Index]</mtindex>
}}

proc THLP_Server_Functions {} {
openHelp "OpenVerse Technical - Server Functions" {

	<fgb><h1>Server Functions Explained</h1></fgb>

    <fgr><b>*</b></fgr>	<THLP_SFUNC_LogIt>LogIt</THLP_SFUNC_LogIt> Central Logging Facility
    <fgr><b>*</b></fgr>	<THLP_SFUNC_SendToAllUsers>SendToAllUsers</THLP_SFUNC_SendToAllUsers> Sends text to all logged in users.
    <fgr><b>*</b></fgr>	<THLP_SFUNC_SendToUser>SendToUser</THLP_SFUNC_SendToUser> Sends text to one user.
    <fgr><b>*</b></fgr>	<THLP_SFUNC_SanityCheck>SanityCheck</THLP_SFUNC_SanityCheck> Check to see if a path passed sanity rules.
    <fgr><b>*</b></fgr>	<THLP_SFUNC_TestNum>TestNum</THLP_SFUNC_TestNum> Test a value to be sure it is a number.
    <fgr><b>*</b></fgr>	<THLP_SFUNC_ReloadConfig>ReloadConfig</THLP_SFUNC_ReloadConfig> Reload the Config File.
    <fgr><b>*</b></fgr>	<THLP_SFUNC_NewConnect>NewConnect</THLP_SFUNC_NewConnect> Accept incoming connections.
    <fgr><b>*</b></fgr>	<THLP_SFUNC_CheckName>CheckName</THLP_SFUNC_CheckName> Check a nickname for validity.
    <fgr><b>*</b></fgr>	<THLP_SFUNC_Serv_ReadFrom>Serv_ReadFrom</THLP_SFUNC_Serv_ReadFrom> Read incoming Text
    <fgr><b>*</b></fgr>	<THLP_SFUNC_DisconnectUser>Disconnect User</THLP_SFUNC_DisconnectUser> Disconnect users from the system.
    <fgr><b>*</b></fgr>	<THLP_SFUNC_Serv_ProcessInput>Serv_ProcessInput</THLP_SFUNC_Serv_ProcessInput> Process input from users.
    <fgr><b>*</b></fgr>	<THLP_SFUNC_Serv_ChangeAvatar>Serv_ChangeAvatar</THLP_SFUNC_Serv_ChangeAvatar> Change a user's avatar.
    <fgr><b>*</b></fgr>	<THLP_SFUNC_Serv_CheckTimeouts>Serv_CheckTimeouts</THLP_SFUNC_Serv_CheckTimeouts> Check various timeouts and events.
    <fgr><b>*</b></fgr>	<THLP_SFUNC_TransAuth>TransAuth</THLP_SFUNC_TransAuth> Authenticate ORT Transports.
    <fgr><b>*</b></fgr>	<THLP_SFUNC_DisplayORT>DisplayORT</THLP_SFUNC_DisplayORT> Display transport systems.
    <fgr><b>*</b></fgr>	<THLP_SFUNC_WarnOrt>WarnOrt</THLP_SFUNC_WarnOrt> Announce transport departure.
    <fgr><b>*</b></fgr>	<THLP_SFUNC_KillOrt>KillOrt</THLP_SFUNC_KillOrt> Remove transport.
    <fgr><b>*</b></fgr>	<THLP_SFUNC_MVSerifyAvailable>MVSerifyAvailable</THLP_SFUNC_MVSerifyAvailable> Verify download Available.
    <fgr><b>*</b></fgr>	<THLP_SFUNC_RegisterHook>RegisterHook</THLP_SFUNC_RegisterHook> Register server Hook.
    <fgr><b>*</b></fgr>	<THLP_SFUNC_FloodCheck>FloodCheck</THLP_SFUNC_FloodCheck> Ceck for user flood.
    <fgr><b>*</b></fgr>	<THLP_SFUNC_SendAvatarToAll>SendAvatarToAll</THLP_SFUNC_SendAvatarToAll> Send out the AVATAR command.
    <fgr><b>*</b></fgr>	<THLP_SFUNC_SchedServ_DCCSend>SchedServ_DCCSend</THLP_SFUNC_SchedServ_DCCSend> Scheduler for resending files.
    <fgr><b>*</b></fgr>	<THLP_SFUNC_Serv_DCCSend>Serv_DCCSend</THLP_SFUNC_Serv_DCCSend> Send files to user (passive).
    <fgr><b>*</b></fgr>	<THLP_SFUNC_Serv_acceptSend>Serv_acceptSend</THLP_SFUNC_Serv_acceptSend> Accept connections for downloads.
    <fgr><b>*</b></fgr>	<THLP_SFUNC_Serv_dccSendEvent>Serv_dccSendEvent</THLP_SFUNC_Serv_dccSendEvent> DCC Send event handler.
    <fgr><b>*</b></fgr>	<THLP_SFUNC_Serv_endDCC>Serv_endDCC</THLP_SFUNC_Serv_endDCC> End DCC transfers.
    <fgr><b>*</b></fgr>	<THLP_SFUNC_CheckGif>CheckGif</THLP_SFUNC_CheckGif> Check the validity of a GIF.

<mtindex>[Main Index]</mtindex>
}}


# CRUISE - 11/08/2001 - Added a bunch of new server variables.
# CRUISE - 11/09/2001 - Added a bunch of new server variables.
#
proc THLP_Server_Variables {} {
openHelp "OpenVerse Technical - Server Variables" {

	<fgb><h1>Server Variables Explained</h1></fgb>

---------------------------------------------
The variables in this first list <b>CAN</b> be used in your config files. Not
all variables may be supported within the personal server (yet).
Users may submit requests for more to be added but in general we're
terribly lazy and believe the ones not in the personal server are for
advanced users who should probaly be running a dedicated server.
---------------------------------------------
		<h2>Basic Settings</h2>

MVS(log) 1		Is logging turned on or off? This
			applies to both command line and GUI
			incarnations

MVS(log_scroll) 1	When in GUI mode, do we scroll the
			log window (when on)?

MVS(port)		What port the server is runing on.

MVS(timeout)		Seconds to wait before calling a
			transfer failed.

MVS(roomname)		The name of this room.

MVS(maxheight)		Maximum allowed image height.

MVS(maxwidth)		Maximum Allowed Image Width.

MVS(push)		Does the server support pushing?

MVS(sendbuffer)		The size of the send buffer when
			transfering files.

MVS(maxmsglen)		Maximum lengs of messages which
			the server accepts.

MVS(flood_threshold)	Maximum things a user can send
			before they are flooded offline.

MVS(exits)		{} This is a list of the exits which are
			invisible to the user.

MVS(locations)		{} This is a list which directly
			corresponds to the list of invisible
			exits; it lists the server and port for
			where the user will be going.

MVS(maxpushdistance)	The maximum distance a user will be
			pushed when the /push command is
			issued.

MVS(maxpushvelocity)	The speed at which users are pushed. 

MVS(max_same_users)	Maximum users from the same host.

MVS(maxusers)		Maximum number of users allowed to
			log in. 

MVS(max_ignores)	Maximum users you may ignore (per type)

MVS(max_socket_retries)	Maximum times we will try to open
			a socket on a busy day.

MVS(retry_wait_time)	Time to wait between retries to 
			open a new socket (milliseconds).

		<h2>Directories and Files</h2>

MVS(avatars)		The directory where avatars are
			stored.

MVS(sobjects)		Directory where server objects are
			stored.

MVS(images)		Directory Where our images are stored.

MVS(icons)		Where our icons are stored

MVS(tickler)		Config file tickler; reload config
			when it exists.

MVS(mem_tickler)	Memory tickler - Dump mem when it exists.

MVS(roomdir)		The directory where room images are
			stored.

MVS(roomfile)		The name (not the full path) of the
			room image.

		<h2>ORT Settings</h2>

MVS(register_ort)	Should we register with the ort?

MVS(ORT_Admin)		The admin's name.

MVS(ORT_AdminEmail)	The admin's email address.

MVS(ORT_Country)	The country this server is in.

MVS(ORT_Description)	A brief description of this server.

MVS(ORT_Image)		Our banner image for the ORT.

MVS(ORT_Rating)		Our content Rating.

MVS(ORT_WebSite)	This server's website address.

MVS(ORT_Server)		{} A list of ORT server:port values.

MVS(ORT_Username)	{} A list of ORT username values for
			each server.

MVS(ORT_Password)	{} A list of ORT passwords for each
			server.

MVS(ORT_Location)	{} A list of ORT screen locations for
			each server.

MVS(ORT.force)		Force the ORT image?

MVS(ORT.force.image)	Name of the image if we are forcing it.

MVS(ORT.msg)		What does the ORT say?

	<h2>Server Maintainted Variables</h2>

---------------------------------------------
The following are all variables used by the server. These are in
the global scope of things. This list is server maintained variables
and should generally <b>NOT BE USED</b> within your server.cfg file.
---------------------------------------------

MVS(server_socket)	Our socket which is accepting
			connections.

MVS(socks)		{} List of connected users 
			sockets.

MVS(waiter)		Dummy variable for tclsh looping.

MVS(serving)		Is server running? (Used mostly
			by the GUI mode).

MVS(users)		Number of connected users.

MVS(standalone)		Is server sourced by the client or is it
			a standalone daemon-type server?

MVS(homedir)		The working directory for the
			OpenVerse Server.

MVS(configfile)		Configuration file to be used for
			the server.

MVS(ORT_info.$idx.image)	Image for the connected ORT.

MVS(ORT_info.$idx.name)	Name of the connected ORT.

MVS(ORT_info.$idx.host)	Hostname of the connected ORT.

MVS(ORT_info.$idx.port)	Port of the connected ORT.

MVS(ORT_info.$idx.time)	Time the ORT connected.

MVS(ORT_info.$idx.x)	X Location on the screen for this ORT.

MVS(ORT_info.$idx.y)	Y Location on the screen for this ORT.

MVS(ORT_current_ort)	Is the ORT stopped at our server?

MVS(registry.servers)	{} List of objects in the
			SERVERS registry (used with ORT
			registrations).

MVS(registry.$sck.username)	ORT registration username.

MVS(registry.$sck.password)	ORT registration password.

MVS(registry.$sck.stage)	ORT registration stage.

MVS(registry.$sck.timeout)	ORT registration timeout.

		<h2>User Variables</h2>

---------------------------------------------
Note! Wherever you see "socket" in the array, this is the streamID
for this user. The server identifies users by streamID not by name.
---------------------------------------------

MVS(socket.name)		User's nickname.

MVS(socket.flood)		Amount of data sent by
				user within one second.

MVS(socket.time)		Time setting (for flood checking).

MVS(socket.address)		User's IP address.

MVS(socket.port)		User's remote port.

MVS(socket.ping)		Time since last ping was sent.

MVS(socket.ping_response)	Time since last pong was received.

MVS(socket.x)			User's X position on the screen.

MVS(socket.y)			User's Y position on the screen.

MVS(socket.avatar)		The name of the user's avatar image.

MVS(socket.av_head_x)		X offset for the user's nametag.

MVS(socket.av_head_y)		Y offset for the user's nametag.

MVS(socket.av_baloon_x)		X offset for the user's chat balloon.

MVS(socket.av_baloon_y)		Y offset for the user's chat balloon.

MVS(socket.downloads)		{} List of user's downloads in progress.

MVS(socket.ig.av)		{} List of ignores for AVATAR protocol.

MVS(socket.ig.effect)		{} List of ignores for EFFECT protocol.

MVS(socket.ig.move)		{} List of ignores for MOVE protocol.

MVS(socket.ig.chat)		{} List of ignores for CHAT and PRIVMSG
				protocols.

MVS(socket.ig.sub)		{} List of ignores for SUB protocol.

MVS(socket.ig.url)		{} List of ignores for URL protocol.

MVS(socket.ig.all)		{} List of ignores for ALL protocols.

	<h2>Registry Vars (plugins, objects)</h2>

MVS(tell_registry)		{} List of objects in the TELL registry

MVS(entry_registry)		{} List of objects in the ENTRY registry.

MVS(submit_registry)		{} List of objects in the SUBMIT registry

	<h2>Server Hooks (plugins, objects)</h2>

MVS(hooks.Connect)	{} hooks into the new connection
			routineCalls user defined function with
			the following args...
			<b>Function who</b>

MVS(hooks.DisconnectUser)	{} Hooks into the DiconnectUser
			function. Calls the user defined
			function with the following args...
			<b>Function who notify</b>

MVS(hooks.Move)		{} Hooks into the MOVE command.
			Calls the user defined fuunction with
			the following args...
			<b>Function who is_exiting</b>

MVS(hooks.Input)	{} Hooks into ALL Input, Calls the user
			defined function with the following args...
			<b>Functions who what</b>

MVS(hooks.Chat)		{} Hooks into the CHAT commands.
			Calls the user defined function with
			the following args....
			<b>Fuunction who what</b>

		<h2>DCC Variables</h2>

MVS(dcc_num)		This transfer's number.

MVS(dcc_list)		A list of all active transfers.

MVS(DCC.idx.sender)	The socket for the sender.

MVS(DCC.idx.file)	The file name for transfer idx.

MVS(DCC.idx.fd)		The file descriptor for the open file.

MVS(DCC.idx.size)	The size of this file.

MVS(DCC.idx.posn)	For future use when I enable resuming of files.

MVS(DCC.idx.type)	Type of file transfer.

MVS(DCC.idx.time)	Last time data was received for transfer idx.

MVS(DCC.idx.server)	The server socket for this (outgoing) connection.

MVS(DCC.idx.sock)	The socket for the data stream.

MVS(DCC.idx.port)	The port for this connection.

MVS(DCC.idx.remote)	The remote user's address.

MVS(DCC.idx.av_head_x)	User's nametag X offset.

MVS(DCC.idx.av_head_y)	user's nametag Y offset.

MVS(DCC.idx.av_baloon_x)	User's balloon X offset.

MVS(DCC.idx.av_baloon_y)	User's Balloon Y offset.

tl(MVS(DCC.idx.sock))	The amount of data transfered so far.

MVS($who.SDCCS.$idx.who)	Who setting for send retry.

MVS($who.SDCCS.$idx.what)	What setting for send retry.

MVS($who.SDCCS.$idx.type)	Type setting for send retry.

MVS($who.SDCCS.$idx.tries)	Tries setting for send retry.

MVS($who.GBF.$idx.who)	Who setting for send retry.

MVS($who.GBF.$idx.what)	What Setting for send retry.

MVS($who.GBF.$idx.type)	Type Setting for send retry.

MVS($who.GBF.$idx.tries)	Tries setting for send retry.

MVS($who.GBF.$idx.size)	Size setting for send retry.

<mtindex>[Main Index]</mtindex>
}}

# -------------------------------------------------------------------
# Server Functions - LogIt
# -------------------------------------------------------------------
proc THLP_SFUNC_LogIt {} {
openHelp "OpenVerse Technical - Server Functions - LogIt" {

		<fgb><h1>Server Functions
		LogIt</h1></fgb>

  <fgb>Usage:</fgb> <b>LogIt</b> "Text To Log"

  This function is the central logging facility for the OpenVerse
  server code. If the server is running "standalone" then the 
  text which is sent to this function is output to stdout. If the
  server is running from the GUI, then the text is output to the
  server's GUI log window (if turned on)

<THLP_Server_Functions>[server functions]</THLP_Server_Functions> <mtindex>[Main Index]</mtindex>
}}

# -------------------------------------------------------------------
# Server Functions - Serv_CheckTimeouts
# -------------------------------------------------------------------
proc THLP_SFUNC_Serv_CheckTimeouts {} {
openHelp "OpenVerse Technical - Server Functions - Serv_CheckTimeouts" {

		<fgb><h1>Server Functions
		Serv_CheckTimeouts</h1></fgb>

  <fgb>Usage:</fgb> <b>Serv_CheckTimeouts</b>

  This function should be run only ONCE when the server is started.
  It should never be run multiple times within a given instance. Once
  it is run, it will re-spawn iteself later and check again, add
  infinitium. What it does is check timeouts. Download Timeouts, Ping
  Timeouts and it also checks for the existance of a tickler file which,
  when it exists, will cause the server to reload it's config file.

<THLP_Server_Functions>[server functions]</THLP_Server_Functions> <mtindex>[Main Index]</mtindex>
}}

# -------------------------------------------------------------------
# Server Functions - TransAuth
# -------------------------------------------------------------------
proc THLP_SFUNC_TransAuth {} {
openHelp "OpenVerse Technical - Server Functions - TransAuth" {

		<fgb><h1>Server Functions
		TransAuth</h1></fgb>

  <fgb>Usage:</fgb> <b>TransAuth</b> user_socket parms_list

  This function will authenticate transport systems (the ORT).

  It is passed a space seperated list of paramteters which 
  it uses to get information about this ORT. If the transport 
  is allowed to connect, an EXIT_OBJ object will be sent to
  all connected users and a fake user will be created with
  an avatar image offered by this transport.
 
  Transport systems are assigned a username and password by
  each server which registers with a transport system. Your
  transport registration information should be in your
  server.cfg file. If you run your server from the client,
  your info is within the setup tool.

<THLP_Server_Functions>[server functions]</THLP_Server_Functions> <mtindex>[Main Index]</mtindex>
}}

# -------------------------------------------------------------------
# Server Functions - DisplayORT
# -------------------------------------------------------------------
proc THLP_SFUNC_DisplayORT {} {
openHelp "OpenVerse Technical - Server Functions - DisplayORT" {

		<fgb><h1>Server Functions
		DisplayORT</h1></fgb>

  <fgb>Usage:</fgb> <b>DisplayORT</b> idx image name time port

  This function will display transport systems (the ORT)

  It is passed a list of parameters to complete this task.

	idx	The index in the MVS(ORT_Servers) array.
	image	The image name for this ORT.
	name	The name of this ORT.
	time	The number of seconds the ORT will stay for.
	port	The user port for this ORT (we already know
		the IP).

  It will use this information to format the EXIT_OBJ and NEW
  protocol commands which it will then sent to all connected
  and new users while it's time has not run out.

<THLP_Server_Functions>[server functions]</THLP_Server_Functions> <mtindex>[Main Index]</mtindex>
}}

# -------------------------------------------------------------------
# Server Functions - KillOrt
# -------------------------------------------------------------------
proc THLP_SFUNC_KillOrt {} {
openHelp "OpenVerse Technical - Server Functions - KillOrt" {

		<fgb><h1>Server Functions
		KillOrt</h1></fgb>

  <fgb>Usage:</fgb> <b>KillOrt</b> idx

  This function will remove an ORT from the screen erasing
  it's associated objects. Once it's gone it'll free up the
  memory this ORT was using.

<THLP_Server_Functions>[server functions]</THLP_Server_Functions> <mtindex>[Main Index]</mtindex>
}}

# -------------------------------------------------------------------
# Server Functions - MVSerifyAvailable
# -------------------------------------------------------------------
proc THLP_SFUNC_MVSerifyAvailable {} {
openHelp "OpenVerse Technical - Server Functions - MVSerifyAvailable" {

		<fgb><h1>Server Functions
		MVSerifyAvailable</h1></fgb>

  <fgb>Usage:</fgb> <b>MVSerifyAvailable</b> user_socket filename

  This function will check to see if the user is already
  getting a file or not. If they are, the server will not
  offer it to them again until the existing one finishes.

  returns 1 if available, 0 if not.

<THLP_Server_Functions>[server functions]</THLP_Server_Functions> <mtindex>[Main Index]</mtindex>
}}

# -------------------------------------------------------------------
# Server Functions - RegisterHook
# -------------------------------------------------------------------
proc THLP_SFUNC_RegisterHook {} {
openHelp "OpenVerse Technical - Server Functions - RegisterHook" {

		<fgb><h1>Server Functions
		RegisterHook</h1></fgb>

  <fgb>Usage:</fgb> <b>RegisterHook</b> ModuleName HookName YourFunction

  This function will register your hook with ther server's
  hook registry. It is used by plugins and objects to
  hook into the server's existing functions to either
  stop operation or trigger operations in their plugin
  code. 

  <b>ModuleName</b> is the name of your module and should
  be unique
  <b>HookName</b> is the name of the hook registry you
  want to use.
  <b>YourFunction</b> is the name of your function which
  will be called when the hook is activated.

<THLP_Server_Functions>[server functions]</THLP_Server_Functions> <mtindex>[Main Index]</mtindex>
}}

# -------------------------------------------------------------------
# Server Functions - FloodCheck
# -------------------------------------------------------------------
proc THLP_SFUNC_FloodCheck {} {
openHelp "OpenVerse Technical - Server Functions - FloodCheck" {

		<fgb><h1>Server Functions
		FloodCheck</h1></fgb>

  <fgb>Usage:</fgb> <b>FloodCheck</b> who

  This process keeps track of how much information the user has
  Sent to the server in how much time. It's used to disconnect
  malicious users. See the MVS(flood_threshold) variable to
  Change the ammount of flood a user is allowed.

  Returns 1 if the user is flooding, 0 otherwise.

<THLP_Server_Functions>[server functions]</THLP_Server_Functions> <mtindex>[Main Index]</mtindex>
}}

# -------------------------------------------------------------------
# Server Functions - WarnOrt
# -------------------------------------------------------------------
proc THLP_SFUNC_WarnOrt {} {
openHelp "OpenVerse Technical - Server Functions - WarnOrt" {

		<fgb><h1>Server Functions
		WarnOrt</h1></fgb>

  <fgb>Usage:</fgb> <b>WarnOrt</b> idx

  This function will announce the eminant departure of
  an ORT. (All Aboard!!!)

<THLP_Server_Functions>[server functions]</THLP_Server_Functions> <mtindex>[Main Index]</mtindex>
}}

# -------------------------------------------------------------------
# Server Functions - Serv_ChangeAvatar
# -------------------------------------------------------------------
proc THLP_SFUNC_Serv_ChangeAvatar {} {
openHelp "OpenVerse Technical - Server Functions - Serv_ChangeAvatar" {

		<fgb><h1>Server Functions
		Serv_ChangeAvatar</h1></fgb>

  <fgb>Usage:</fgb> <b>Serv_ChangeAvatar</b> who avatar_name nametag_x
		nametag_y size balloon_x balloon_y

  This function is used to change a user's avatar. It will announce
  the change to all connected users.

<THLP_Server_Functions>[server functions]</THLP_Server_Functions> <mtindex>[Main Index]</mtindex>
}}

# -------------------------------------------------------------------
# Server Functions - Serv_ProcessInput
# -------------------------------------------------------------------
proc THLP_SFUNC_Serv_ProcessInput {} {
openHelp "OpenVerse Technical - Server Functions - Serv_ProcessInput" {

		<fgb><h1>Server Functions
		Serv_ProcessInput</h1></fgb>

  <fgb>Usage:</fgb> <b>Serv_ProcessInput</b> socket "text to process"

  This function is the root of the protocol. It processes all of the
  things which a client can send to the server. If the client sends
  something it does not understand, it will ignore it. Please see the   
  Protocol Documentation (NOTE - documentation does not exist)
  within the technical documentation for a complete descritption of the 
  logic within this function.  

<THLP_Server_Functions>[server functions]</THLP_Server_Functions> <mtindex>[Main Index]</mtindex>
}}

# -------------------------------------------------------------------
# Server Functions - SendToUser
# -------------------------------------------------------------------
proc THLP_SFUNC_SendToUser {} {
openHelp "OpenVerse Technical - Server Functions - SendToUser" {

		<fgb><h1>Server Functions
		SendToUser</h1></fgb>

  <fgb>Usage:</fgb> <b>SendToUser</b> socket "Text To Send"

  This function will send the provided text to the user specified
  It should be preformatted and ready to go.

<THLP_Server_Functions>[server functions]</THLP_Server_Functions> <mtindex>[Main Index]</mtindex>
}}

# -------------------------------------------------------------------
# Server Functions - SendAvatarToAll
# -------------------------------------------------------------------
proc THLP_SFUNC_SendAvatarToAll {} {
openHelp "OpenVerse Technical - Server Functions - SendAvatarToAll" {

		<fgb><h1>Server Functions
		SendAvatarToAll</h1></fgb>

  <fgb>Usage:</fgb> <b>SendAvatarToAll</b> who filename nametag_x nametag_y size balloon_x balloon_y

  This is centralized here so that ignoring it is easier.
  All it does is send the AVATAR command out. You should be using
  <THLP_SFUNC_Serv_ChangeAvatar>Serv_ChangeAvatar</THLP_SFUNC_Serv_ChangeAvatar> to do this.

<THLP_Server_Functions>[server functions]</THLP_Server_Functions> <mtindex>[Main Index]</mtindex>
}}

# -------------------------------------------------------------------
# Server Functions - SendAvatarToAll
# -------------------------------------------------------------------
proc THLP_SFUNC_SchedServ_DCCSend {} {
openHelp "OpenVerse Technical - Server Functions - SchedServ_DCCSend" {

		<fgb><h1>Server Functions
		SchedServ_DCCSend</h1></fgb>

  <fgb>Usage:</fgb> <b>SchedServ_DCCSend</b> index who

  Schedules downloads to be sent again if there was not
  enough resources to send it the first time. It is done
  though this routine to prevent hack with filenames
  interrupting the code.

<THLP_Server_Functions>[server functions]</THLP_Server_Functions> <mtindex>[Main Index]</mtindex>
}}

# -------------------------------------------------------------------
# Server Functions - Serv_DCCSend
# -------------------------------------------------------------------
proc THLP_SFUNC_Serv_DCCSend {} {
openHelp "OpenVerse Technical - Server Functions - Serv_DCCSend" {

		<fgb><h1>Server Functions
		Serv_DCCSend</h1></fgb>

  <fgb>Usage:</fgb> <b>Serv_DCCSend</b> socket filename transfer_type retry_flag

  This function will initiate a file transfer. It is used for rooms and
  avatars and object images. This is a passive DCC transfer so things
  work better through modern firewalls.

<THLP_Server_Functions>[server functions]</THLP_Server_Functions> <mtindex>[Main Index]</mtindex>
}}

# -------------------------------------------------------------------
# Server Functions - Serv_acceptSend
# -------------------------------------------------------------------
proc THLP_SFUNC_Serv_acceptSend {} {
openHelp "OpenVerse Technical - Server Functions - Serv_acceptSend" {

		<fgb><h1>Server Functions
		Serv_acceptSend</h1></fgb>

  <fgb>Usage:</fgb> <b>Serv_acceptSend</b> index socket host port

  This function is not called directly, it is instead called by the
  opening of the server socket. It accepts the connection, closes the
  server socket and starts the sending of the file to the user.

<THLP_Server_Functions>[server functions]</THLP_Server_Functions> <mtindex>[Main Index]</mtindex>
}}

# -------------------------------------------------------------------
# Server Functions - Serv_dccSendEvent
# -------------------------------------------------------------------
proc THLP_SFUNC_Serv_dccSendEvent {} {
openHelp "OpenVerse Technical - Server Functions - Serv_dccSendEvent" {

		<fgb><h1>Server Functions
		Serv_dccSendEvent</h1></fgb>

  <fgb>Usage:</fgb> <b>Serv_dccSendEvent</b> index start_time file_stream_descriptor

  This function is triggered each time the remote client sends a
  response announcing the number of bytes the server has sent to it.
  It will send some more bytes if the client has received all of what
  we've sent so far. It will end the transfer when the client informs
  us that it has all of the data we've sent.

<THLP_Server_Functions>[server functions]</THLP_Server_Functions> <mtindex>[Main Index]</mtindex>
}}

# -------------------------------------------------------------------
# Server Functions - Serv_endDCC
# -------------------------------------------------------------------
proc THLP_SFUNC_Serv_endDCC {} {
openHelp "OpenVerse Technical - Server Functions - Serv_endDCC" {

		<fgb><h1>Server Functions
		Serv_endDCC</h1></fgb>

  <fgb>Usage:</fgb> <b>Serv_endDCC</b> transfer_type index fail_type debug_info

  This function will end a user's DCC transfer. If it is a failure, it
  will print information about the transfer out to the log, if it is
  successful and the transfer is an incoming avatar, it will announce
  the avatar to all connected users. Once it's done ending the
  transfer it will clean up the mess made (closing any sockets or
  files).

<THLP_Server_Functions>[server functions]</THLP_Server_Functions> <mtindex>[Main Index]</mtindex>
}}

# -------------------------------------------------------------------
# Server Functions - CheckGif
# -------------------------------------------------------------------
proc THLP_SFUNC_CheckGif {} {
openHelp "OpenVerse Technical - Server Functions - CheckGif" {

		<fgb><h1>Server Functions
		CheckGif</h1></fgb>

  <fgb>Usage:</fgb> <b>CheckGif</b> file_name

  This will read in the GIF file header and determine its size. It will
  compare the size against the server limits and report back if the file
  is good or bad.

<THLP_Server_Functions>[server functions]</THLP_Server_Functions> <mtindex>[Main Index]</mtindex>
}}

# -------------------------------------------------------------------
# Server Functions - DisconnectUser
# -------------------------------------------------------------------
proc THLP_SFUNC_DisconnectUser {} {
openHelp "OpenVerse Technical - Server Functions - DisconnectUser" {

		<fgb><h1>Server Functions
		DisconnectUser</h1></fgb>

  <fgb>Usage:</fgb> <b>DisconnectUser</b> socket announce_flag

  This function is used to disconnect a user from the system. A
  general cleanup will be done with the variables the user was
  consuming and an annoucement will be made to all connected
  users if it is requested with the announce_flag parameter set.

<THLP_Server_Functions>[server functions]</THLP_Server_Functions> <mtindex>[Main Index]</mtindex>
}}

# -------------------------------------------------------------------
# Server Functions - Serv_ReadFrom
# -------------------------------------------------------------------
proc THLP_SFUNC_Serv_ReadFrom {} {
openHelp "OpenVerse Technical - Server Functions - Serv_ReadFrom" {

		<fgb><h1>Server Functions
		Serv_ReadFrom</h1></fgb>

  <fgb>Usage:</fgb> <b>Serv_ReadFrom</b> socket

  This function will read text from a socket and process it. If the user
  is not authenticated, it will authenticate him. If the user is just
  requesting a number of connected users, this function will process
  the request. If it has nothing to do other than to read the text, it
  will pass this text off to the Serv_ProcessInput function for
  processing.

<THLP_Server_Functions>[server functions]</THLP_Server_Functions> <mtindex>[Main Index]</mtindex>
}}

# -------------------------------------------------------------------
# Server Functions - CheckName
# -------------------------------------------------------------------
proc THLP_SFUNC_CheckName {} {
openHelp "OpenVerse Technical - Server Functions - CheckName" {

		<fgb><h1>Server Functions
		CheckName</h1></fgb>

  <fgb>Usage:</fgb> <b>CheckName</b> "NickName"

 This function will check a given nickname to be sure it is allowed.
 Some nicknames are not allowed if they contain special characters.

<THLP_Server_Functions>[server functions]</THLP_Server_Functions> <mtindex>[Main Index]</mtindex>
}}

# -------------------------------------------------------------------
# Server Functions - NewConnect
# -------------------------------------------------------------------
proc THLP_SFUNC_NewConnect {} {
openHelp "OpenVerse Technical - Server Functions - NewConnect" {

		<fgb><h1>Server Functions
		NewConnect</h1></fgb>

  <fgb>Usage:</fgb> <b>NewConnect</b> socket IPAddress port

  This function will accept a new connection and setup some initial
  variables for the user. It will also set a trigger on the incoming
  socket which will read data on the socket. The arguments are
  generated by the server socket's accept trigger and passed to this
  function.

<THLP_Server_Functions>[server functions]</THLP_Server_Functions> <mtindex>[Main Index]</mtindex>
}}

# -------------------------------------------------------------------
# Server Functions - TestNum
# -------------------------------------------------------------------
proc THLP_SFUNC_TestNum {} {
openHelp "OpenVerse Technical - Server Functions - TestNum" {

		<fgb><h1>Server Functions
		TestNum</h1></fgb>

  <fgb>Usage:</fgb> <b>TestNum</b> "12345"

  This function will test a value to be sure it is a number. The function
  will return 0 if it is a number and 1 if it is not a number.

<THLP_Server_Functions>[server functions]</THLP_Server_Functions> <mtindex>[Main Index]</mtindex>
}}

# -------------------------------------------------------------------
# Server Functions - SanityCheck
# -------------------------------------------------------------------
proc THLP_SFUNC_SanityCheck {} {
openHelp "OpenVerse Technical - Server Functions - SanityCheck" {

		<fgb><h1>Server Functions
		SanityCheck</h1></fgb>

  <fgb>Usage:</fgb> <b>SanityCheck</b> "/path/to/file"

  This function will check a path to be sure it passes rules for sane
  processing. This function will return 1 if it passes or 0 if it fails.

<THLP_Server_Functions>[server functions]</THLP_Server_Functions> <mtindex>[Main Index]</mtindex>
}}

# -------------------------------------------------------------------
# Server Functions - SendToAllUsers
# -------------------------------------------------------------------
proc THLP_SFUNC_SendToAllUsers {} {
openHelp "OpenVerse Technical - Server Functions -SendToAllUsers" {

		<fgb><h1>Server Functions
		SendToAllUsers</h1></fgb>

  <fgb>Usage:</fgb> <b>SendToAllUsers</b> "Stuff To Send"

  This function will send the provided text to all logged in users. Text
  passed to this function should be preformatted protocol information
  and ready to go to the user. ALL information passed through this
  function will be logged if logging is enabled.

<THLP_Server_Functions>[server functions]</THLP_Server_Functions> <mtindex>[Main Index]</mtindex>
}}

# -------------------------------------------------------------------
# Server Functions - ReloadConfig
# -------------------------------------------------------------------
proc THLP_SFUNC_ReloadConfig {} {
openHelp "OpenVerse Technical - Server Functions - ReloadConfig" {

		<fgb><h1>Server Functions
		ReloadConfig</h1></fgb>

  <fgb>Usage:</fgb> <b>ReloadConfig</b>

  A very straight forward function for re-loading the server
  config file. You can do this at any time. It only takes an
  an instant.

<THLP_Server_Functions>[server functions]</THLP_Server_Functions> <mtindex>[Main Index]</mtindex>
}}

# -------------------------------------------------------------------
# AvEd.tcl
# -------------------------------------------------------------------
proc THLP_AvEd {} {
openHelp "OpenVerse Technical - Functions - AvEd" {

		<fgb><h1>AvEd - Avatar Editor</h1></fgb>

<mtindex>[Main Index]</mtindex><THLP_Functions>[Functions]</THLP_Functions>
}}


mtindex
