diff options
Diffstat (limited to 'OpenSim/Region/Application')
-rw-r--r-- | OpenSim/Region/Application/HGOpenSimNode.cs | 36 |
1 files changed, 32 insertions, 4 deletions
diff --git a/OpenSim/Region/Application/HGOpenSimNode.cs b/OpenSim/Region/Application/HGOpenSimNode.cs index f46c9e3..6a525be 100644 --- a/OpenSim/Region/Application/HGOpenSimNode.cs +++ b/OpenSim/Region/Application/HGOpenSimNode.cs | |||
@@ -57,6 +57,10 @@ namespace OpenSim | |||
57 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 57 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
58 | private IHyperlink HGServices = null; | 58 | private IHyperlink HGServices = null; |
59 | 59 | ||
60 | private uint m_autoMappingX = 0; | ||
61 | private uint m_autoMappingY = 0; | ||
62 | private bool m_enableAutoMapping = false; | ||
63 | |||
60 | public HGOpenSimNode(IConfigSource configSource) : base(configSource) | 64 | public HGOpenSimNode(IConfigSource configSource) : base(configSource) |
61 | { | 65 | { |
62 | } | 66 | } |
@@ -140,7 +144,25 @@ namespace OpenSim | |||
140 | 144 | ||
141 | public override void RunCmd(string command, string[] cmdparams) | 145 | public override void RunCmd(string command, string[] cmdparams) |
142 | { | 146 | { |
143 | if (command.Equals("link-region")) | 147 | if (command.Equals("link-mapping")) |
148 | { | ||
149 | if (cmdparams.Length == 2) | ||
150 | { | ||
151 | try | ||
152 | { | ||
153 | m_autoMappingX = Convert.ToUInt32(cmdparams[0]); | ||
154 | m_autoMappingY = Convert.ToUInt32(cmdparams[1]); | ||
155 | m_enableAutoMapping = true; | ||
156 | } | ||
157 | catch (Exception) | ||
158 | { | ||
159 | m_autoMappingX = 0; | ||
160 | m_autoMappingY = 0; | ||
161 | m_enableAutoMapping = false; | ||
162 | } | ||
163 | } | ||
164 | } | ||
165 | else if (command.Equals("link-region")) | ||
144 | { | 166 | { |
145 | // link-region <Xloc> <Yloc> <HostName> <HttpPort> <LocalName> | 167 | // link-region <Xloc> <Yloc> <HostName> <HttpPort> <LocalName> |
146 | if (cmdparams.Length < 4) | 168 | if (cmdparams.Length < 4) |
@@ -203,9 +225,9 @@ namespace OpenSim | |||
203 | 225 | ||
204 | if (cmdparams.Length == 2) | 226 | if (cmdparams.Length == 2) |
205 | { | 227 | { |
206 | if (cmdparams[1].StartsWith("excludeList:")) | 228 | if (cmdparams[1].ToLower().StartsWith("excludelist:")) |
207 | { | 229 | { |
208 | string excludeString = cmdparams[1]; | 230 | string excludeString = cmdparams[1].ToLower(); |
209 | excludeString = excludeString.Remove(0, 12); | 231 | excludeString = excludeString.Remove(0, 12); |
210 | char[] splitter = { ';' }; | 232 | char[] splitter = { ';' }; |
211 | 233 | ||
@@ -220,7 +242,7 @@ namespace OpenSim | |||
220 | { | 242 | { |
221 | for (int n = 0; n < excludeSections.Length; n++) | 243 | for (int n = 0; n < excludeSections.Length; n++) |
222 | { | 244 | { |
223 | if (excludeSections[n] == cs.Configs[i].Name) | 245 | if (excludeSections[n] == cs.Configs[i].Name.ToLower()) |
224 | { | 246 | { |
225 | skip = true; | 247 | skip = true; |
226 | break; | 248 | break; |
@@ -251,6 +273,12 @@ namespace OpenSim | |||
251 | externalPort = Convert.ToUInt32(config.GetString("externalPort", "0")); | 273 | externalPort = Convert.ToUInt32(config.GetString("externalPort", "0")); |
252 | externalHostName = config.GetString("externalHostName", ""); | 274 | externalHostName = config.GetString("externalHostName", ""); |
253 | 275 | ||
276 | if (m_enableAutoMapping) | ||
277 | { | ||
278 | xloc = (uint)((xloc % 100) + m_autoMappingX); | ||
279 | yloc = (uint)((yloc % 100) + m_autoMappingY); | ||
280 | } | ||
281 | |||
254 | if (TryCreateLink(xloc, yloc, externalPort, externalHostName, out regInfo)) | 282 | if (TryCreateLink(xloc, yloc, externalPort, externalHostName, out regInfo)) |
255 | { | 283 | { |
256 | regInfo.RegionName = config.GetString("localName", ""); | 284 | regInfo.RegionName = config.GetString("localName", ""); |