| 111 | File = java.io.File; |
| 112 | |
| 113 | function revokeScripting(player) { |
| 114 | if (__plugin.bukkit) { |
| 115 | foreach(player.getEffectivePermissions(), function(perm) { |
| 116 | if (('' + perm.permission).indexOf('scriptcraft.') == 0) { |
| 117 | if (perm.attachment) { |
| 118 | perm.attachment.remove(); |
| 119 | } |
| 120 | } |
| 121 | }); |
| 122 | } |
| 123 | if (__plugin.canary) { |
| 124 | // |
| 125 | var Canary = Packages.net.canarymod.Canary; |
| 126 | Canary.permissionManager().removePlayerPermission( |
| 127 | 'scriptcraft.evaluate', |
| 128 | player |
| 129 | ); |
| 130 | } |
| 131 | var playerName = '' + player.name; |
| 132 | playerName = playerName.replace(/[^a-zA-Z0-9_\-]/g, ''); |
| 133 | var playerDir = new File(playersDir + playerName); |
| 134 | unwatchDir(playerDir); |
| 135 | } |
| 136 | var autoloadTime = {}; |
| 137 | |
| 138 | var playerEventHandlers = {}; |