diff options
author | UbitUmarov | 2015-10-26 18:00:01 +0000 |
---|---|---|
committer | UbitUmarov | 2015-10-26 18:00:01 +0000 |
commit | 8922d58f055287f46fcd2f08307ac10fb145f4d4 (patch) | |
tree | 625fe22575bff91dd7ea07f8161eb04d4baf99cf /OpenSim/Region/OptionalModules | |
parent | merge issue: fix missing '/' (diff) | |
download | opensim-SC-8922d58f055287f46fcd2f08307ac10fb145f4d4.zip opensim-SC-8922d58f055287f46fcd2f08307ac10fb145f4d4.tar.gz opensim-SC-8922d58f055287f46fcd2f08307ac10fb145f4d4.tar.bz2 opensim-SC-8922d58f055287f46fcd2f08307ac10fb145f4d4.tar.xz |
try fix IRC connector issue on mantis 7731 but with code a bit diferent from proposed patch. Also append '@irc' to nick on region messages, so message origin is clear
Diffstat (limited to 'OpenSim/Region/OptionalModules')
-rw-r--r-- | OpenSim/Region/OptionalModules/Avatar/Chat/IRCConnector.cs | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/Chat/IRCConnector.cs b/OpenSim/Region/OptionalModules/Avatar/Chat/IRCConnector.cs index 6985371..5b9a5b5 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Chat/IRCConnector.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Chat/IRCConnector.cs | |||
@@ -368,11 +368,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat | |||
368 | m_writer.Flush(); | 368 | m_writer.Flush(); |
369 | m_writer.WriteLine(m_user); | 369 | m_writer.WriteLine(m_user); |
370 | m_writer.Flush(); | 370 | m_writer.Flush(); |
371 | m_writer.WriteLine(String.Format("JOIN {0}", m_ircChannel)); | ||
372 | m_writer.Flush(); | ||
373 | |||
374 | m_log.InfoFormat("[IRC-Connector-{0}]: {1} has asked to join {2}", idn, m_nick, m_ircChannel); | ||
375 | |||
376 | } | 371 | } |
377 | catch (Exception e) | 372 | catch (Exception e) |
378 | { | 373 | { |
@@ -521,7 +516,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat | |||
521 | c.Message = data["msg"]; | 516 | c.Message = data["msg"]; |
522 | c.Type = ChatTypeEnum.Region; | 517 | c.Type = ChatTypeEnum.Region; |
523 | c.Position = CenterOfRegion; | 518 | c.Position = CenterOfRegion; |
524 | c.From = data["nick"]; | 519 | c.From = data["nick"] + "@IRC"; |
525 | c.Sender = null; | 520 | c.Sender = null; |
526 | c.SenderUUID = UUID.Zero; | 521 | c.SenderUUID = UUID.Zero; |
527 | 522 | ||
@@ -659,6 +654,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat | |||
659 | version = commArgs[2]; | 654 | version = commArgs[2]; |
660 | usermod = commArgs[3]; | 655 | usermod = commArgs[3]; |
661 | chanmod = commArgs[4]; | 656 | chanmod = commArgs[4]; |
657 | |||
658 | m_writer.WriteLine(String.Format("JOIN {0}", m_ircChannel)); | ||
659 | m_writer.Flush(); | ||
660 | m_log.InfoFormat("[IRC-Connector-{0}]: sent request to join {1} ", idn, m_ircChannel); | ||
661 | |||
662 | break; | 662 | break; |
663 | case "005": // Server information | 663 | case "005": // Server information |
664 | break; | 664 | break; |
@@ -721,11 +721,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat | |||
721 | case "PONG": | 721 | case "PONG": |
722 | break; | 722 | break; |
723 | case "JOIN": | 723 | case "JOIN": |
724 | if (m_pending) | 724 | |
725 | { | ||
726 | m_log.InfoFormat("[IRC-Connector-{0}] [{1}] Connected", idn, cmd); | ||
727 | m_pending = false; | ||
728 | } | ||
729 | m_log.DebugFormat("[IRC-Connector-{0}] [{1}] parms = <{2}>", idn, cmd, parms); | 725 | m_log.DebugFormat("[IRC-Connector-{0}] [{1}] parms = <{2}>", idn, cmd, parms); |
730 | eventIrcJoin(pfx, cmd, parms); | 726 | eventIrcJoin(pfx, cmd, parms); |
731 | break; | 727 | break; |
@@ -767,7 +763,13 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat | |||
767 | if (IrcChannel.StartsWith(":")) | 763 | if (IrcChannel.StartsWith(":")) |
768 | IrcChannel = IrcChannel.Substring(1); | 764 | IrcChannel = IrcChannel.Substring(1); |
769 | 765 | ||
770 | m_log.DebugFormat("[IRC-Connector-{0}] Event: IRCJoin {1}:{2}", idn, m_server, m_ircChannel); | 766 | if(IrcChannel == m_ircChannel) |
767 | { | ||
768 | m_log.InfoFormat("[IRC-Connector-{0}] Joined requested channel {1} at {2}", idn, IrcChannel,m_server); | ||
769 | m_pending = false; | ||
770 | } | ||
771 | else | ||
772 | m_log.InfoFormat("[IRC-Connector-{0}] Joined unknown channel {1} at {2}", idn, IrcChannel,m_server); | ||
771 | BroadcastSim(IrcUser, "/me joins {0}", IrcChannel); | 773 | BroadcastSim(IrcUser, "/me joins {0}", IrcChannel); |
772 | } | 774 | } |
773 | 775 | ||