aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/Chat/ChannelState.cs10
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/Chat/RegionState.cs12
2 files changed, 18 insertions, 4 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/Chat/ChannelState.cs b/OpenSim/Region/OptionalModules/Avatar/Chat/ChannelState.cs
index f03e5fc..b61959f 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Chat/ChannelState.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Chat/ChannelState.cs
@@ -83,6 +83,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat
83 83
84 internal string _accessPassword = String.Empty; 84 internal string _accessPassword = String.Empty;
85 internal Regex AccessPasswordRegex = null; 85 internal Regex AccessPasswordRegex = null;
86 internal List<string> ExcludeList = new List<string>();
86 internal string AccessPassword 87 internal string AccessPassword
87 { 88 {
88 get { return _accessPassword; } 89 get { return _accessPassword; }
@@ -210,8 +211,13 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat
210 m_log.DebugFormat("[IRC-Channel-{0}] PingDelay : <{1}>", cs.idn, cs.PingDelay); 211 m_log.DebugFormat("[IRC-Channel-{0}] PingDelay : <{1}>", cs.idn, cs.PingDelay);
211 cs.AccessPassword = Substitute(rs, config.GetString("access_password", cs.AccessPassword)); 212 cs.AccessPassword = Substitute(rs, config.GetString("access_password", cs.AccessPassword));
212 m_log.DebugFormat("[IRC-Channel-{0}] AccessPassword : <{1}>", cs.idn, cs.AccessPassword); 213 m_log.DebugFormat("[IRC-Channel-{0}] AccessPassword : <{1}>", cs.idn, cs.AccessPassword);
213 214 string[] excludes = config.GetString("exclude_list", "").Trim().Split(new Char[] { ',' });
214 215 cs.ExcludeList = new List<string>(excludes.Length);
216 foreach(string name in excludes)
217 {
218 cs.ExcludeList.Add(name.Trim().ToLower());
219 }
220
215 // Fail if fundamental information is still missing 221 // Fail if fundamental information is still missing
216 222
217 if (cs.Server == null || cs.IrcChannel == null || cs.BaseNickname == null || cs.User == null) 223 if (cs.Server == null || cs.IrcChannel == null || cs.BaseNickname == null || cs.User == null)
diff --git a/OpenSim/Region/OptionalModules/Avatar/Chat/RegionState.cs b/OpenSim/Region/OptionalModules/Avatar/Chat/RegionState.cs
index 203948e..c49d942 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Chat/RegionState.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Chat/RegionState.cs
@@ -145,7 +145,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat
145 if (enabled && (cs.irc.Enabled) && (cs.irc.Connected) && (cs.ClientReporting)) 145 if (enabled && (cs.irc.Enabled) && (cs.irc.Connected) && (cs.ClientReporting))
146 { 146 {
147 m_log.InfoFormat("[IRC-Region {0}]: {1} has left", Region, client.Name); 147 m_log.InfoFormat("[IRC-Region {0}]: {1} has left", Region, client.Name);
148 cs.irc.PrivMsg(cs.NoticeMessageFormat, cs.irc.Nick, Region, String.Format("{0} has left", client.Name)); 148 //Check if this person is excluded from IRC
149 if (!cs.ExcludeList.Contains(client.Name.ToLower()))
150 {
151 cs.irc.PrivMsg(cs.NoticeMessageFormat, cs.irc.Nick, Region, String.Format("{0} has left", client.Name));
152 }
149 } 153 }
150 client.OnLogout -= OnClientLoggedOut; 154 client.OnLogout -= OnClientLoggedOut;
151 client.OnConnectionClosed -= OnClientLoggedOut; 155 client.OnConnectionClosed -= OnClientLoggedOut;
@@ -209,7 +213,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat
209 { 213 {
210 string clientName = String.Format("{0} {1}", presence.Firstname, presence.Lastname); 214 string clientName = String.Format("{0} {1}", presence.Firstname, presence.Lastname);
211 m_log.DebugFormat("[IRC-Region {0}] {1} has arrived", Region, clientName); 215 m_log.DebugFormat("[IRC-Region {0}] {1} has arrived", Region, clientName);
212 cs.irc.PrivMsg(cs.NoticeMessageFormat, cs.irc.Nick, Region, String.Format("{0} has arrived", clientName)); 216 //Check if this person is excluded from IRC
217 if (!cs.ExcludeList.Contains(clientName.ToLower()))
218 {
219 cs.irc.PrivMsg(cs.NoticeMessageFormat, cs.irc.Nick, Region, String.Format("{0} has arrived", clientName));
220 }
213 } 221 }
214 } 222 }
215 } 223 }