diff options
author | Teravus Ovares | 2007-11-24 03:28:42 +0000 |
---|---|---|
committer | Teravus Ovares | 2007-11-24 03:28:42 +0000 |
commit | 944b118c622159c87e7f89c05892458d88797d58 (patch) | |
tree | 576fff3c7791e3df87425d5da862f5c70ec5c0f6 /OpenSim/Region/ClientStack | |
parent | Make remoting errors because of missing adjacent regions a little more user a... (diff) | |
download | opensim-SC-944b118c622159c87e7f89c05892458d88797d58.zip opensim-SC-944b118c622159c87e7f89c05892458d88797d58.tar.gz opensim-SC-944b118c622159c87e7f89c05892458d88797d58.tar.bz2 opensim-SC-944b118c622159c87e7f89c05892458d88797d58.tar.xz |
* Added a way for the Region master user to kick individual users from their sim with a custom message. Their client says, "You've been logged off of secondlife, <Your custom message here> and logs them off.
* Added a way for the Region master user to kick *ALL* users from *ALL* their regions in the estate with a custom message.
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r-- | OpenSim/Region/ClientStack/ClientView.API.cs | 1 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs | 17 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/ClientView.cs | 13 |
3 files changed, 26 insertions, 5 deletions
diff --git a/OpenSim/Region/ClientStack/ClientView.API.cs b/OpenSim/Region/ClientStack/ClientView.API.cs index b046f0a..80111d9 100644 --- a/OpenSim/Region/ClientStack/ClientView.API.cs +++ b/OpenSim/Region/ClientStack/ClientView.API.cs | |||
@@ -66,6 +66,7 @@ namespace OpenSim.Region.ClientStack | |||
66 | public event MoveObject OnGrabUpdate; | 66 | public event MoveObject OnGrabUpdate; |
67 | public event AddNewPrim OnAddPrim; | 67 | public event AddNewPrim OnAddPrim; |
68 | public event RequestGodlikePowers OnRequestGodlikePowers; | 68 | public event RequestGodlikePowers OnRequestGodlikePowers; |
69 | public event GodKickUser OnGodKickUser; | ||
69 | public event ObjectExtraParams OnUpdateExtraParams; | 70 | public event ObjectExtraParams OnUpdateExtraParams; |
70 | public event UpdateShape OnUpdatePrimShape; | 71 | public event UpdateShape OnUpdatePrimShape; |
71 | public event ObjectSelect OnObjectSelect; | 72 | public event ObjectSelect OnObjectSelect; |
diff --git a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs index ca7ba7f..f46c199 100644 --- a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs +++ b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs | |||
@@ -1075,11 +1075,18 @@ namespace OpenSim.Region.ClientStack | |||
1075 | 1075 | ||
1076 | break; | 1076 | break; |
1077 | case PacketType.GodKickUser: | 1077 | case PacketType.GodKickUser: |
1078 | //GodKickUserPacket gkupack = (GodKickUserPacket) Pack; | 1078 | OpenSim.Framework.Console.MainLog.Instance.Verbose("CLIENT", "unhandled packet " + Pack.ToString()); |
1079 | //gkupack.UserInfo.GodID; | 1079 | |
1080 | //gkupack.UserInfo.AgentID; | 1080 | GodKickUserPacket gkupack = (GodKickUserPacket) Pack; |
1081 | //gkupack.UserInfo.KickFlags; | 1081 | |
1082 | //gkupack.UserInfo.Reason; | 1082 | if (gkupack.UserInfo.GodSessionID == SessionId && this.AgentId == gkupack.UserInfo.GodID) |
1083 | { | ||
1084 | OnGodKickUser(gkupack.UserInfo.GodID, gkupack.UserInfo.GodSessionID, gkupack.UserInfo.AgentID, (uint) 0, gkupack.UserInfo.Reason); | ||
1085 | } | ||
1086 | else | ||
1087 | { | ||
1088 | SendAgentAlertMessage("Kick request denied", false); | ||
1089 | } | ||
1083 | //KickUserPacket kupack = new KickUserPacket(); | 1090 | //KickUserPacket kupack = new KickUserPacket(); |
1084 | //KickUserPacket.UserInfoBlock kupackib = kupack.UserInfo; | 1091 | //KickUserPacket.UserInfoBlock kupackib = kupack.UserInfo; |
1085 | 1092 | ||
diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs index e6712fe..fbe66db 100644 --- a/OpenSim/Region/ClientStack/ClientView.cs +++ b/OpenSim/Region/ClientStack/ClientView.cs | |||
@@ -308,7 +308,20 @@ namespace OpenSim.Region.ClientStack | |||
308 | 308 | ||
309 | ClientThread.Abort(); | 309 | ClientThread.Abort(); |
310 | } | 310 | } |
311 | public void Kick(string message) | ||
312 | { | ||
313 | KickUserPacket kupack = new KickUserPacket(); | ||
314 | |||
315 | kupack.UserInfo.AgentID = AgentId; | ||
316 | kupack.UserInfo.SessionID = SessionId; | ||
317 | |||
318 | kupack.TargetBlock.TargetIP = (uint)0; | ||
319 | kupack.TargetBlock.TargetPort = (ushort)0; | ||
320 | kupack.UserInfo.Reason = Helpers.StringToField(message); | ||
321 | OutPacket(kupack, ThrottleOutPacketType.Task); | ||
311 | 322 | ||
323 | |||
324 | } | ||
312 | public void Stop() | 325 | public void Stop() |
313 | { | 326 | { |
314 | clientPingTimer.Stop(); | 327 | clientPingTimer.Stop(); |