diff options
author | Adam Frisby | 2009-05-11 19:23:51 +0000 |
---|---|---|
committer | Adam Frisby | 2009-05-11 19:23:51 +0000 |
commit | 6dcafec22d560c50625c8a391701606a1a0bb363 (patch) | |
tree | 6e0199901946f9a0b7a9797bbc85a30c2b094288 /OpenSim/Region/ClientStack/LindenUDP | |
parent | Add selling for $0 back to the sample economy module. This is disabled by (diff) | |
download | opensim-SC_OLD-6dcafec22d560c50625c8a391701606a1a0bb363.zip opensim-SC_OLD-6dcafec22d560c50625c8a391701606a1a0bb363.tar.gz opensim-SC_OLD-6dcafec22d560c50625c8a391701606a1a0bb363.tar.bz2 opensim-SC_OLD-6dcafec22d560c50625c8a391701606a1a0bb363.tar.xz |
* Implements IP and DNS based ban facilities to OpenSim.
* User interface is ... primitive at best right now.
* Loads bans from bans.txt and region ban DB on startup, bans.txt is in the format of one per line. The following explains how they are read;
DNS bans are in the form "somewhere.com" will block ANY matching domain (including "betasomewhere.com", "beta.somewhere.com", "somewhere.com.beta") - make sure to be reasonably specific in DNS bans.
IP address bans match on first characters, so, "127.0.0.1" will ban only that address, "127.0.1" will ban "127.0.10.0" but "127.0.1." will ban only the "127.0.1.*" network
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index f9db91c..a157df5 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -54,7 +54,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
54 | /// Handles new client connections | 54 | /// Handles new client connections |
55 | /// Constructor takes a single Packet and authenticates everything | 55 | /// Constructor takes a single Packet and authenticates everything |
56 | /// </summary> | 56 | /// </summary> |
57 | public class LLClientView : IClientAPI, IClientCore, IClientIM, IClientChat, IStatsCollector | 57 | public class LLClientView : IClientAPI, IClientCore, IClientIM, IClientChat, IClientIPEndpoint, IStatsCollector |
58 | { | 58 | { |
59 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 59 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
60 | 60 | ||
@@ -10478,6 +10478,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
10478 | { | 10478 | { |
10479 | RegisterInterface<IClientIM>(this); | 10479 | RegisterInterface<IClientIM>(this); |
10480 | RegisterInterface<IClientChat>(this); | 10480 | RegisterInterface<IClientChat>(this); |
10481 | RegisterInterface<IClientIPEndpoint>(this); | ||
10481 | } | 10482 | } |
10482 | 10483 | ||
10483 | public bool TryGet<T>(out T iface) | 10484 | public bool TryGet<T>(out T iface) |
@@ -10496,6 +10497,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
10496 | return (T)m_clientInterfaces[typeof(T)]; | 10497 | return (T)m_clientInterfaces[typeof(T)]; |
10497 | } | 10498 | } |
10498 | 10499 | ||
10500 | public void Disconnect(string reason) | ||
10501 | { | ||
10502 | Kick(reason); | ||
10503 | Thread.Sleep(1000); | ||
10504 | Close(true); | ||
10505 | } | ||
10506 | |||
10507 | public void Disconnect() | ||
10508 | { | ||
10509 | Close(true); | ||
10510 | } | ||
10511 | |||
10512 | |||
10499 | #endregion | 10513 | #endregion |
10500 | 10514 | ||
10501 | private void RefreshGroupMembership() | 10515 | private void RefreshGroupMembership() |
@@ -10587,5 +10601,23 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
10587 | { | 10601 | { |
10588 | return ""; | 10602 | return ""; |
10589 | } | 10603 | } |
10604 | |||
10605 | #region IClientIPEndpoint Members | ||
10606 | |||
10607 | public IPAddress EndPoint | ||
10608 | { | ||
10609 | get | ||
10610 | { | ||
10611 | if(m_userEndPoint is IPEndPoint) | ||
10612 | { | ||
10613 | IPEndPoint ep = (IPEndPoint)m_userEndPoint; | ||
10614 | |||
10615 | return ep.Address; | ||
10616 | } | ||
10617 | return null; | ||
10618 | } | ||
10619 | } | ||
10620 | |||
10621 | #endregion | ||
10590 | } | 10622 | } |
10591 | } | 10623 | } |