Go Back   RunUO - Ultima Online Emulation > RunUO > Utility Support > Third Party Program Support

Third Party Program Support Misc support forum and advertisment forum for all RunUO related third party Utilities.

Reply
 
Thread Tools Display Modes
Old 08-08-2005, 01:54 AM   #1 (permalink)
Forum Newbie
 
Join Date: Aug 2003
Posts: 67
Send a message via ICQ to Calbracht Send a message via AIM to Calbracht Send a message via Yahoo to Calbracht
Default pandora's Box Server (Script Explorer)

When i tryed to Set up Script Explorer and configured the Config file for it and Complied i got a Runtime Error Everytime but when i reinstalled and didnt config it worked Fine. does anyone else have this problem?

heres my Config File

Code:
/*///////////////////////////////////////////////////////////////////////////////////////////////////////////
 * 
 * Remote Explorer is a component that allows a remote user to access a folder within
 * the server's Scripts folder. The remote user can download, upload, delete and rename
 * scripts files (*.cs), and create/delete folders.
 * 
 * Each account that is allowed to use the remote explorer must be explicitly specified in
 * this file, and assigned the parent folder for its operation. Registering an account is very
 * easy:
 * 
 * RegisterAccount( string AccountName, params string[] folders );
 * 
 * the AccountName is the user's account name. The folders parameters is a list of folders the user
 * is allowed to access on the server. Folders are specified relatively to the RunUO folder:
 * 
 * "Scripts" - will allows access to ALL the scripts.
 * "Scripts\Custom\Arya" - will allow access only to a subfolder.
 * 
 * Please take most care when assigning folders, I suggest you don't assign the whole Scripts
 * folder to anyone else than yourself, and that you assign your staff custom folders as in the
 * example. This is a powerful but potentially dangerous feature, please be careful who you give
 * access to your scripts. 
 * 
 *///////////////////////////////////////////////////////////////////////////////////////////////////////////////
using System;
using System.Collections;

namespace TheBox.BoxServer
{
	/// <summary>
	/// Provides configuration for the Remote Explorer
	/// </summary>
	public class RemoteExplorerConfig
	{
		/// <summary>
		/// This is the maximum size in bytes for a file that will be downloaded from the server
		/// </summary>
		public static readonly int MaxFileSize = 100000;

		public static void Initialize()
		{

			RegisterAccount( "FTP", "Scripts" );


			/*////////////////////////////////////////////////////////////
			 * 
			 * Register accounts and access folders here.
			 * Example:
			 * 
			 * RegisterAccount( "FTP", "Scripts\\Items", "Scripts\\Mobiles" );
			 *////////////////////////////////////////////////////////////
		}

		#region Implementation

		/// <summary>
		/// Registers an account for access to the remote explorer in Pandora's Box
		/// </summary>
		/// <param name="username">The username that should receive access</param>
		/// <param name="folders">A list of folder, specified relative to the RunUO folder (must start with "Scripts\\"</param>
		private static void RegisterAccount( string username, params string[] folders )
		{
			RegisterAccount( "FTP", "Scripts\\Items", "Scripts\\Mobiles" );
			m_Table[ username.ToLower() ] = folders;
 			RegisterAccount( "FTP", "Scripts\\Items", "Scripts\\Mobiles" );
		}

		/// <summary>
		/// Contains all the allowed user accounts
		/// </summary>
		private static Hashtable m_Table;

		/// <summary>
		/// Static init
		/// </summary>
		static RemoteExplorerConfig()
		{
			m_Table = new Hashtable();
		}

		/// <summary>
		/// Gets the base folder for the remote explorer for a given username
		/// </summary>
		/// <param name="username">The user's account name</param>
		/// <returns>The full path to the user's allowed folder</returns>
		public static string[] GetExplorerFolder( string username )
		{
			return (string[]) m_Table[ username.ToLower() ];
		}

		/// <summary>
		/// Verifies if a user can access a given folder
		/// </summary>
		/// <param name="username">The user requesting to access the folder</param>
		/// <param name="folder">The path to the requested folder, relative to the RunUO folder</param>
		/// <returns>True if allowed</returns>
		public static bool AllowAccess( string username, string folder )
		{
			string[] allowedfolders = (string[]) m_Table[ username.ToLower() ];

			if ( allowedfolders == null )
				return false;

			string requested = System.IO.Path.Combine( BoxUtil.RunUOFolder, folder );
			requested = System.IO.Path.GetDirectoryName( requested );

			foreach( string allowed in allowedfolders )
			{
				string a = System.IO.Path.Combine( BoxUtil.RunUOFolder, allowed );

				if ( requested.IndexOf( a ) > -1 )
				{
					return true;
				}
			}

			return false;
		}

		/// <summary>
		/// Verifies if a file can be processed through the remote explorer
		/// </summary>
		/// <param name="file">The filename to evaluate</param>
		/// <returns>True if the extension is supported</returns>
		public static bool VeirfyExtension( string file )
		{
			string ext = System.IO.Path.GetExtension( file );

			return ( 
				ext == ".txt" ||
				ext == ".xml" ||
				ext == ".cs" ||
				ext == ".vb" );
		}

		#endregion
	}
}
Maybe its Something I did in the code.
Calbracht is offline   Reply With Quote
Old 08-08-2005, 03:27 AM   #2 (permalink)
Account Terminated
 
Join Date: Sep 2002
Age: 26
Posts: 3,846
Send a message via ICQ to Phantom Send a message via AIM to Phantom Send a message via MSN to Phantom
Default

You really shouldn't use that feature.

I will be honest its not very good and it has issues. Just offer an ftp to your shard, and it does the samething.
Phantom is offline   Reply With Quote
Old 08-08-2005, 12:41 PM   #3 (permalink)
Forum Newbie
 
Join Date: Aug 2003
Posts: 67
Send a message via ICQ to Calbracht Send a message via AIM to Calbracht Send a message via Yahoo to Calbracht
Default

Alright Thanks Phantom
Calbracht is offline   Reply With Quote
Old 08-08-2005, 12:49 PM   #4 (permalink)
Account Terminated
 
Join Date: Sep 2002
Age: 26
Posts: 3,846
Send a message via ICQ to Phantom Send a message via AIM to Phantom Send a message via MSN to Phantom
Default

Quote:
Originally Posted by Calbracht
Alright Thanks Phantom
What I will do is look at trying to update the system.

It is sort of handy, but use an ftp server till then, its alot of trouble to use the editor :-)
Phantom is offline   Reply With Quote
Old 08-08-2005, 10:35 PM   #5 (permalink)
Forum Newbie
 
Join Date: Aug 2003
Posts: 67
Send a message via ICQ to Calbracht Send a message via AIM to Calbracht Send a message via Yahoo to Calbracht
Default

Quote:
Originally Posted by Phantom
What I will do is look at trying to update the system.

It is sort of handy, but use an ftp server till then, its alot of trouble to use the editor :-)

Can you recommend any good ftp servers?
Calbracht is offline   Reply With Quote
Old 08-08-2005, 10:50 PM   #6 (permalink)
Account Terminated
 
Join Date: Sep 2002
Age: 26
Posts: 3,846
Send a message via ICQ to Phantom Send a message via AIM to Phantom Send a message via MSN to Phantom
Default

Quote:
Originally Posted by Calbracht
Can you recommend any good ftp servers?
No
Phantom is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5