<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://opensimulator.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://opensimulator.org/index.php?action=history&amp;feed=atom&amp;title=RemoteAdmin%3ARemoteAdmin_Implement_new_command</id>
		<title>RemoteAdmin:RemoteAdmin Implement new command - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://opensimulator.org/index.php?action=history&amp;feed=atom&amp;title=RemoteAdmin%3ARemoteAdmin_Implement_new_command"/>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/index.php?title=RemoteAdmin:RemoteAdmin_Implement_new_command&amp;action=history"/>
		<updated>2026-05-11T08:20:55Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.19.9</generator>

	<entry>
		<id>http://opensimulator.org/index.php?title=RemoteAdmin:RemoteAdmin_Implement_new_command&amp;diff=39376&amp;oldid=prev</id>
		<title>Petewall: /* How to implement new commands to Remote Admin */ Fixing a typo</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/index.php?title=RemoteAdmin:RemoteAdmin_Implement_new_command&amp;diff=39376&amp;oldid=prev"/>
				<updated>2014-07-28T02:32:39Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;How to implement new commands to Remote Admin: &lt;/span&gt; Fixing a typo&lt;/span&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr valign='top'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 02:32, 28 July 2014&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 71:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 71:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* If we have parameters that are needed and may not be empty, then one check these parameters using ''CheckStringParameters'' and ''CheckIntegerParams''. If any of the specified paramaters, in our case the string &amp;quot;message&amp;quot; is not given, then a error with exeption will be given and the rest of our code will not be executed.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* If we have parameters that are needed and may not be empty, then one check these parameters using ''CheckStringParameters'' and ''CheckIntegerParams''. If any of the specified paramaters, in our case the string &amp;quot;message&amp;quot; is not given, then a error with exeption will be given and the rest of our code will not be executed.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* As we want to send region data of a given region_id or region_name we use ''CheckRegionParamsInScene''. This will output us the ''scene'' of the region if it exists. Both region_id and region_name are checked. If no region is found then scene = null and a ''error_mesage'' is returned. The error message can be used to send back as ''responseData[&amp;quot;error&amp;quot;]''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* As we want to send region data of a given region_id or region_name we use ''CheckRegionParamsInScene''. This will output us the ''scene'' of the region if it exists. Both region_id and region_name are checked. If no region is found then scene = null and a ''error_mesage'' is returned. The error message can be used to send back as ''responseData[&amp;quot;error&amp;quot;]''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* As a &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;responce &lt;/del&gt;we always send ''responseData[&amp;quot;success&amp;quot;]'' as true or false were true only is returned if no errors occured.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* As a &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;response &lt;/ins&gt;we always send ''responseData[&amp;quot;success&amp;quot;]'' as true or false were true only is returned if no errors occured.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* If errors occure, we send the error message to our application as ''responseData[&amp;quot;error&amp;quot;]''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* If errors occure, we send the error message to our application as ''responseData[&amp;quot;error&amp;quot;]''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[RemoteAdmin]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[RemoteAdmin]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Petewall</name></author>	</entry>

	<entry>
		<id>http://opensimulator.org/index.php?title=RemoteAdmin:RemoteAdmin_Implement_new_command&amp;diff=28449&amp;oldid=prev</id>
		<title>MakoBot: Robot: Cosmetic changes</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/index.php?title=RemoteAdmin:RemoteAdmin_Implement_new_command&amp;diff=28449&amp;oldid=prev"/>
				<updated>2012-03-04T04:04:41Z</updated>
		
		<summary type="html">&lt;p&gt;Robot: Cosmetic changes&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr valign='top'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 04:04, 4 March 2012&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 7:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 7:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;When implementing a new RemoteAdmin command you need to edit /OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;When implementing a new RemoteAdmin command you need to edit /OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;big&amp;gt;'''Please see [[RemoteAdmin:&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;RemoteAdmin_Standards&lt;/del&gt;|RemoteAdmin Standards]] for proposed naming schema'''&amp;lt;/big&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;big&amp;gt;'''Please see [[RemoteAdmin:&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;RemoteAdmin Standards&lt;/ins&gt;|RemoteAdmin Standards]] for proposed naming schema'''&amp;lt;/big&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>MakoBot</name></author>	</entry>

	<entry>
		<id>http://opensimulator.org/index.php?title=RemoteAdmin:RemoteAdmin_Implement_new_command&amp;diff=26842&amp;oldid=prev</id>
		<title>Michelle Argus: /* Step 2 - Coding our new command */</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/index.php?title=RemoteAdmin:RemoteAdmin_Implement_new_command&amp;diff=26842&amp;oldid=prev"/>
				<updated>2011-12-14T01:19:36Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Step 2 - Coding our new command&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr valign='top'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 01:19, 14 December 2011&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 48:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 48:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; //Check if a region with parameter region_id or region_name exist&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; //Check if a region with parameter region_id or region_name exist&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;SceneContainsRegion&lt;/del&gt;(requestData, out scene, out error_message);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;CheckRegionParamsInScene&lt;/ins&gt;(requestData, out scene, out error_message);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; if (scene == null)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; if (scene == null)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 69:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 69:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* Our new function always starts of with creating the Hashtable ''responseData'' and ''requestData''. In the ''requestData'' list we have all parameters we are recieving from our external application while ''responseData'' is the list of data we are sending back...&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* Our new function always starts of with creating the Hashtable ''responseData'' and ''requestData''. In the ''requestData'' list we have all parameters we are recieving from our external application while ''responseData'' is the list of data we are sending back...&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* If we have parameters that are needed and may not be empty, then one check these parameters using ''CheckStringParameters'' and ''&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;CheckIntegerParameters&lt;/del&gt;''. If any of the specified paramaters, in our case the string &amp;quot;message&amp;quot; is not given, then a error with exeption will be given and the rest of our code will not be executed.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* If we have parameters that are needed and may not be empty, then one check these parameters using ''CheckStringParameters'' and ''&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;CheckIntegerParams&lt;/ins&gt;''. If any of the specified paramaters, in our case the string &amp;quot;message&amp;quot; is not given, then a error with exeption will be given and the rest of our code will not be executed.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* As we want to send region data of a given region_id or region_name we use ''&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;SceneContainsRegion&lt;/del&gt;''. This will output us the ''scene'' of the region if it exists. Both region_id and region_name are checked. If no region is found then scene = null and a ''error_mesage'' is returned. The error message can be used to send back as ''responseData[&amp;quot;error&amp;quot;]''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* As we want to send region data of a given region_id or region_name we use ''&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;CheckRegionParamsInScene&lt;/ins&gt;''. This will output us the ''scene'' of the region if it exists. Both region_id and region_name are checked. If no region is found then scene = null and a ''error_mesage'' is returned. The error message can be used to send back as ''responseData[&amp;quot;error&amp;quot;]''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* As a responce we always send ''responseData[&amp;quot;success&amp;quot;]'' as true or false were true only is returned if no errors occured.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* As a responce we always send ''responseData[&amp;quot;success&amp;quot;]'' as true or false were true only is returned if no errors occured.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* If errors occure, we send the error message to our application as ''responseData[&amp;quot;error&amp;quot;]''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* If errors occure, we send the error message to our application as ''responseData[&amp;quot;error&amp;quot;]''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[RemoteAdmin]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[RemoteAdmin]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Michelle Argus</name></author>	</entry>

	<entry>
		<id>http://opensimulator.org/index.php?title=RemoteAdmin:RemoteAdmin_Implement_new_command&amp;diff=26823&amp;oldid=prev</id>
		<title>Michelle Argus at 17:37, 11 December 2011</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/index.php?title=RemoteAdmin:RemoteAdmin_Implement_new_command&amp;diff=26823&amp;oldid=prev"/>
				<updated>2011-12-11T17:37:16Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr valign='top'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 17:37, 11 December 2011&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 73:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 73:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* As a responce we always send ''responseData[&amp;quot;success&amp;quot;]'' as true or false were true only is returned if no errors occured.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* As a responce we always send ''responseData[&amp;quot;success&amp;quot;]'' as true or false were true only is returned if no errors occured.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* If errors occure, we send the error message to our application as ''responseData[&amp;quot;error&amp;quot;]''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* If errors occure, we send the error message to our application as ''responseData[&amp;quot;error&amp;quot;]''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;[[RemoteAdmin]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Michelle Argus</name></author>	</entry>

	<entry>
		<id>http://opensimulator.org/index.php?title=RemoteAdmin:RemoteAdmin_Implement_new_command&amp;diff=26822&amp;oldid=prev</id>
		<title>Michelle Argus: Created page with &quot;{{Quicklinks}} {{proposal}} {{content}}  == How to implement new commands to Remote Admin ==  When implementing a new RemoteAdmin command you need to edit /OpenSim/ApplicationPlu...&quot;</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/index.php?title=RemoteAdmin:RemoteAdmin_Implement_new_command&amp;diff=26822&amp;oldid=prev"/>
				<updated>2011-12-11T17:36:14Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Quicklinks}} {{proposal}} {{content}}  == How to implement new commands to Remote Admin ==  When implementing a new RemoteAdmin command you need to edit /OpenSim/ApplicationPlu...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Quicklinks}}&lt;br /&gt;
{{proposal}}&lt;br /&gt;
{{content}}&lt;br /&gt;
&lt;br /&gt;
== How to implement new commands to Remote Admin ==&lt;br /&gt;
&lt;br /&gt;
When implementing a new RemoteAdmin command you need to edit /OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs &lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;'''Please see [[RemoteAdmin:RemoteAdmin_Standards|RemoteAdmin Standards]] for proposed naming schema'''&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Lets assume we want to create a command that outputs a line in the console containing a message and the region uuid of a region we choose.&lt;br /&gt;
&lt;br /&gt;
=== Step 1 - Adding a new Command ===&lt;br /&gt;
First we need to define our new command and make it available. In the function ''public void Initialise(OpenSimBase openSim)'' you will find a list of all implemented commands. The available commands start with ''availableMethods...''. There we add our new command, lets call it admin_output_message.&lt;br /&gt;
&lt;br /&gt;
We will now add a new availableMethods to those already listed, were admin_output_message is our command and XmlRpcOutputMessage will be the function in which our command does the work wehn called (step 2).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        public void Initialise(OpenSimBase openSim)&lt;br /&gt;
        {&lt;br /&gt;
        ...&lt;br /&gt;
                    //Our new command&lt;br /&gt;
                    availableMethods[&amp;quot;admin_output_message&amp;quot;] = (req, ep) =&amp;gt; InvokeXmlRpcMethod(req, ep, XmlRpcOutputMessage);&lt;br /&gt;
        ...&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Step 2 - Coding our new command ===&lt;br /&gt;
In Step 1 we added a new command which calls the function ''XmlRpcOutputMessage''. So our next step is to create our new function and include all the goddies our command will execute.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        private void XmlRpcOutputMessage(XmlRpcRequest request, XmlRpcResponse response, IPEndPoint remoteClient)&lt;br /&gt;
        {&lt;br /&gt;
            //List with all parameters that will be returned&lt;br /&gt;
            Hashtable responseData = (Hashtable)response.Value;&lt;br /&gt;
            //List with all parameters received&lt;br /&gt;
            Hashtable requestData = (Hashtable)request.Params[0];&lt;br /&gt;
&lt;br /&gt;
            //Check if the parameter message was received&lt;br /&gt;
            CheckStringParameters(requestData, responseData, new string[] { &amp;quot;message&amp;quot; });&lt;br /&gt;
&lt;br /&gt;
            Scene scene = null;&lt;br /&gt;
            string error_message = String.Empty;&lt;br /&gt;
            responseData[&amp;quot;success&amp;quot;] = false;&lt;br /&gt;
&lt;br /&gt;
            //Check if a region with parameter region_id or region_name exist&lt;br /&gt;
            SceneContainsRegion(requestData, out scene, out error_message);&lt;br /&gt;
&lt;br /&gt;
            if (scene == null)&lt;br /&gt;
            {&lt;br /&gt;
                //The region is not known, so we send a error message&lt;br /&gt;
                responseData[&amp;quot;error&amp;quot;] = error_message;&lt;br /&gt;
                throw new Exception(error_message);&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
            // here we do all work when a region is found&lt;br /&gt;
            string message = (string) requestData[&amp;quot;message&amp;quot;];&lt;br /&gt;
&lt;br /&gt;
            m_log.InfoFormat(&amp;quot;[RADMIN]: {0}: {1} {2}&amp;quot;, message, scene.RegionInfo.RegionName, scene.RegionInfo.RegionID);&lt;br /&gt;
&lt;br /&gt;
            // We have finished our work, lets send back some information&lt;br /&gt;
            responseData[&amp;quot;success&amp;quot;] = true;&lt;br /&gt;
            responseData[&amp;quot;region_name&amp;quot;] = scene.RegionInfo.RegionName;&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Our new function always starts of with creating the Hashtable ''responseData'' and ''requestData''. In the ''requestData'' list we have all parameters we are recieving from our external application while ''responseData'' is the list of data we are sending back...&lt;br /&gt;
* If we have parameters that are needed and may not be empty, then one check these parameters using ''CheckStringParameters'' and ''CheckIntegerParameters''. If any of the specified paramaters, in our case the string &amp;quot;message&amp;quot; is not given, then a error with exeption will be given and the rest of our code will not be executed.&lt;br /&gt;
* As we want to send region data of a given region_id or region_name we use ''SceneContainsRegion''. This will output us the ''scene'' of the region if it exists. Both region_id and region_name are checked. If no region is found then scene = null and a ''error_mesage'' is returned. The error message can be used to send back as ''responseData[&amp;quot;error&amp;quot;]''&lt;br /&gt;
* As a responce we always send ''responseData[&amp;quot;success&amp;quot;]'' as true or false were true only is returned if no errors occured.&lt;br /&gt;
* If errors occure, we send the error message to our application as ''responseData[&amp;quot;error&amp;quot;]''&lt;/div&gt;</summary>
		<author><name>Michelle Argus</name></author>	</entry>

	</feed>