From 6aa5d3904d71c4be21e5991d9ba82dff3c1cf51f Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Wed, 22 Apr 2009 00:48:56 +0000 Subject: Add copyright headers. Formatting cleanup. --- .../OptionalModules/Avatar/Chat/IRCConnector.cs | 3 +- .../Voice/FreeSwitchVoice/FreeSwitchDialplan.cs | 60 ++++++++-------- .../Voice/FreeSwitchVoice/FreeSwitchDirectory.cs | 84 +++++++++++----------- .../Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs | 2 +- .../Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs | 10 +-- 5 files changed, 79 insertions(+), 80 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Avatar') diff --git a/OpenSim/Region/OptionalModules/Avatar/Chat/IRCConnector.cs b/OpenSim/Region/OptionalModules/Avatar/Chat/IRCConnector.cs index ca85817..c621fd3 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Chat/IRCConnector.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Chat/IRCConnector.cs @@ -546,8 +546,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat // through reconnect. if (m_enabled && (m_resetk == resetk)) - Reconnect(); - + Reconnect(); } private Regex RE = new Regex(@":(?[\w-]*)!(?\S*) PRIVMSG (?\S+) :(?.*)", diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchDialplan.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchDialplan.cs index 2a2b4a3..d8fce67 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchDialplan.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchDialplan.cs @@ -43,7 +43,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice Hashtable response = new Hashtable(); - foreach(DictionaryEntry item in request) + foreach (DictionaryEntry item in request) { m_log.InfoFormat("[FreeSwitchDirectory] requestBody item {0} {1}",item.Key, item.Value); } @@ -52,37 +52,37 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice response["keepalive"] = false; response["int_response_code"]=200; response["str_response_string"] = @" - -
- - - - - - - - - - - - - - - - - - - - - - - - -
-
"; + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+
"; return response; } } -} \ No newline at end of file +} diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchDirectory.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchDirectory.cs index 9959d11..4113976 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchDirectory.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchDirectory.cs @@ -63,7 +63,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice //domain=9.20.151.43 //ip=9.167.220.137 // this is the correct IP rather than sip_contact_host above when through a vpn or NAT setup - foreach(DictionaryEntry item in request) + foreach (DictionaryEntry item in request) { m_log.InfoFormat("[FreeSwitchDirectory] requestBody item {0} {1}",item.Key, item.Value); } @@ -71,41 +71,41 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice string eventCallingFunction = (string) request["Event-Calling-Function"]; - if(eventCallingFunction=="sofia_reg_parse_auth") + if (eventCallingFunction=="sofia_reg_parse_auth") { string sipAuthMethod = (string)request["sip_auth_method"]; - - if(sipAuthMethod=="REGISTER") - { - response = HandleRegister(request); - } - else if(sipAuthMethod=="INVITE") - { - response = HandleInvite(request); - } - else - { - m_log.ErrorFormat("[FreeSwitchVoice] HandleDirectoryRequest unknown sip_auth_method {0}",sipAuthMethod); - response["int_response_code"]=404; - } + + if (sipAuthMethod=="REGISTER") + { + response = HandleRegister(request); + } + else if (sipAuthMethod=="INVITE") + { + response = HandleInvite(request); + } + else + { + m_log.ErrorFormat("[FreeSwitchVoice] HandleDirectoryRequest unknown sip_auth_method {0}",sipAuthMethod); + response["int_response_code"]=404; + } } - else if(eventCallingFunction=="switch_xml_locate_user") - { - response = HandleLocateUser(request); + else if (eventCallingFunction=="switch_xml_locate_user") + { + response = HandleLocateUser(request); } - else if(eventCallingFunction=="user_data_function") // gets called when an avatar to avatar call is made + else if (eventCallingFunction=="user_data_function") // gets called when an avatar to avatar call is made { response = HandleLocateUser(request); } - else if(eventCallingFunction=="user_outgoing_channel") + else if (eventCallingFunction=="user_outgoing_channel") { response = HandleRegister(request); } - else if(eventCallingFunction=="config_sofia") // happens once on freeswitch startup + else if (eventCallingFunction=="config_sofia") // happens once on freeswitch startup { response = HandleConfigSofia(request); } - else if(eventCallingFunction=="switch_load_network_lists") + else if (eventCallingFunction=="switch_load_network_lists") { //response = HandleLoadNetworkLists(request); response["int_response_code"]=404; @@ -266,24 +266,24 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice "\r\n"+ "\r\n"+ "\r\n"+ - "\r\n"+ - "\r\n"+ - "\r\n"+ - "\r\n"+ - "\r\n"+ - "\r\n"+ - "\r\n"+ - "\r\n"+ - "\r\n"+ - "\r\n"+ - "\r\n"+ - "\r\n"+ - "\r\n"+ - "\r\n"+ - "\r\n"+ - "\r\n"+ - "\r\n"+ - "\r\n"+ + "\r\n"+ + "\r\n"+ + "\r\n"+ + "\r\n"+ + "\r\n"+ + "\r\n"+ + "\r\n"+ + "\r\n"+ + "\r\n"+ + "\r\n"+ + "\r\n"+ + "\r\n"+ + "\r\n"+ + "\r\n"+ + "\r\n"+ + "\r\n"+ + "\r\n"+ + "
\r\n"+ ""+ "\r\n" + "\r\n"+ @@ -332,4 +332,4 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice } -} \ No newline at end of file +} diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs index a8f9de6..fcb1c97 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs @@ -500,7 +500,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice // is this a dialplan or directory request string section = (string) requestBody["section"]; - if(section=="directory") + if (section=="directory") response = m_FreeSwitchDirectory.HandleDirectoryRequest(requestBody); else if (section=="dialplan") response = m_FreeSwitchDialplan.HandleDialplanRequest(requestBody); diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs index ec26dff..9f45fd0 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs @@ -294,7 +294,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups string firstname, lastname; IClientAPI agent; - if( m_ActiveClients.TryGetValue(AgentID, out agent) ) + if (m_ActiveClients.TryGetValue(AgentID, out agent)) { firstname = agent.FirstName; lastname = agent.LastName; @@ -405,7 +405,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups } UUID GroupID = new UUID(im.toAgentID); - if( m_groupData.GetGroupRecord(GroupID, null) != null) + if (m_groupData.GetGroupRecord(GroupID, null) != null) { UUID NoticeID = UUID.Random(); string Subject = im.message.Substring(0, im.message.IndexOf('|')); @@ -453,9 +453,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups GridInstantMessage msg = CreateGroupNoticeIM(UUID.Zero, NoticeID, (byte)OpenMetaverse.InstantMessageDialog.GroupNotice); // Send notice out to everyone that wants notices - foreach( GroupMembersData member in m_groupData.GetGroupMembers(GroupID) ) + foreach (GroupMembersData member in m_groupData.GetGroupMembers(GroupID)) { - if( member.AcceptNotices ) + if (member.AcceptNotices) { msg.toAgentID = member.AgentID.Guid; m_MsgTransferModule.SendInstantMessage(msg, delegate(bool success) { }); @@ -712,7 +712,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups { if (m_debugEnabled) m_log.InfoFormat("[GROUPS] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); - if( m_groupData.GetGroupRecord(UUID.Zero, name) != null ) + if (m_groupData.GetGroupRecord(UUID.Zero, name) != null) { remoteClient.SendCreateGroupReply(UUID.Zero, false, "A group with the same name already exists."); return UUID.Zero; -- cgit v1.1