diff options
author | onefang | 2019-05-19 21:24:15 +1000 |
---|---|---|
committer | onefang | 2019-05-19 21:24:15 +1000 |
commit | 5e4d6cab00cb29cd088ab7b62ab13aff103b64cb (patch) | |
tree | a9fbc62df9eb2d1d9ba2698d8552eae71eca20d8 /OpenSim/Region/OptionalModules/Avatar/Chat/RegionState.cs | |
parent | Add a build script. (diff) | |
download | opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.zip opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.gz opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.bz2 opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.xz |
Dump OpenSim 0.9.0.1 into it's own branch.
Diffstat (limited to 'OpenSim/Region/OptionalModules/Avatar/Chat/RegionState.cs')
-rw-r--r-- | OpenSim/Region/OptionalModules/Avatar/Chat/RegionState.cs | 43 |
1 files changed, 18 insertions, 25 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/Chat/RegionState.cs b/OpenSim/Region/OptionalModules/Avatar/Chat/RegionState.cs index 6ea542c..a3ef83b 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Chat/RegionState.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Chat/RegionState.cs | |||
@@ -389,39 +389,32 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat | |||
389 | } | 389 | } |
390 | 390 | ||
391 | m_log.DebugFormat("[IRC-Region {0}] heard on channel {1} : {2}", Region, msg.Channel, msg.Message); | 391 | m_log.DebugFormat("[IRC-Region {0}] heard on channel {1} : {2}", Region, msg.Channel, msg.Message); |
392 | string txt = msg.Message; | ||
393 | 392 | ||
394 | if (null != avatar) | 393 | if (null != avatar && cs.RelayChat && (msg.Channel == 0 || msg.Channel == DEBUG_CHANNEL)) |
395 | { | 394 | { |
396 | if ((!cs.RelayChat) || (msg.Channel != 0 && msg.Channel != DEBUG_CHANNEL)) | 395 | string txt = msg.Message; |
397 | return; | 396 | if (txt.StartsWith("/me ")) |
397 | txt = String.Format("{0} {1}", fromName, msg.Message.Substring(4)); | ||
398 | |||
399 | cs.irc.PrivMsg(cs.PrivateMessageFormat, fromName, Region, txt); | ||
400 | return; | ||
398 | } | 401 | } |
399 | else | 402 | |
403 | if (null == avatar && cs.RelayPrivateChannels && null != cs.AccessPassword && | ||
404 | msg.Channel == cs.RelayChannelOut) | ||
400 | { | 405 | { |
401 | if (cs.RelayPrivateChannels && msg.Channel == cs.RelayChannelOut) | 406 | Match m = cs.AccessPasswordRegex.Match(msg.Message); |
407 | if (null != m) | ||
402 | { | 408 | { |
403 | if (null != cs.AccessPassword) | 409 | m_log.DebugFormat("[IRC] relaying message from {0}: {1}", m.Groups["avatar"].ToString(), |
404 | { | 410 | m.Groups["message"].ToString()); |
405 | Match m = cs.AccessPasswordRegex.Match(msg.Message); | 411 | cs.irc.PrivMsg(cs.PrivateMessageFormat, m.Groups["avatar"].ToString(), |
406 | if (null != m) | 412 | scene.RegionInfo.RegionName, m.Groups["message"].ToString()); |
407 | { | ||
408 | if (m.Groups["avatar"].ToString() != "") | ||
409 | fromName = m.Groups["avatar"].ToString(); | ||
410 | if (m.Groups["message"].ToString() != "") | ||
411 | txt = m.Groups["message"].ToString(); | ||
412 | } | ||
413 | } | ||
414 | } | 413 | } |
415 | fromName = "OBJECT: " + fromName; | ||
416 | } | 414 | } |
417 | |||
418 | if (txt.StartsWith("/me ")) | ||
419 | txt = String.Format("{0} {1}", fromName, msg.Message.Substring(4)); | ||
420 | m_log.DebugFormat("[IRC] relaying message from {0}: {1}", fromName, txt); | ||
421 | cs.irc.PrivMsg(cs.PrivateMessageFormat, fromName, Region, txt); | ||
422 | } | 415 | } |
423 | 416 | ||
424 | // This method gives the region an opportunity to interfere with | 417 | // This method gives the region an opportunity to interfere with |
425 | // message delivery. For now we just enforce the enable/disable | 418 | // message delivery. For now we just enforce the enable/disable |
426 | // flag. | 419 | // flag. |
427 | 420 | ||
@@ -435,7 +428,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat | |||
435 | } | 428 | } |
436 | } | 429 | } |
437 | 430 | ||
438 | // This supports any local message traffic that might be needed in | 431 | // This supports any local message traffic that might be needed in |
439 | // support of command processing. At present there is none. | 432 | // support of command processing. At present there is none. |
440 | 433 | ||
441 | internal void LocalChat(string msg) | 434 | internal void LocalChat(string msg) |