Create new top-level chat folder.

This commit is contained in:
Major-
2014-08-08 03:53:15 +01:00
parent 32aadfeaa4
commit 9469ebe297
6 changed files with 0 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
<?xml version="1.0"?>
<plugin>
<id>chat-privacy</id>
<version>1</version>
<name>Chat privacy</name>
<description>Adds chat privacy support.</description>
<authors>
<author>Major</author>
</authors>
<scripts>
<script>privacy.rb</script>
</scripts>
<dependencies>
<dependency>private-messaging</dependency>
</dependencies>
</plugin>
+12
View File
@@ -0,0 +1,12 @@
require 'java'
java_import 'org.apollo.game.model.setting.PrivacyState'
java_import 'org.apollo.game.event.impl.SendFriendEvent'
on :event, :privacy_option do |ctx, player, event|
player.chat_privacy = event.chat_privacy
player.friend_privacy = event.friend_privacy
player.trade_privacy = event.trade_privacy
update_friends(player, event.friend_privacy == PrivacyState::OFF ? 0 : player.world_id)
end