diff options
author | jak1 <jak1@themanaworld.org> | 2023-01-12 23:07:53 +0100 |
---|---|---|
committer | jak1 <jak1@themanaworld.org> | 2023-01-12 23:07:53 +0100 |
commit | 3a4d0c8b75d6296756fd53cd1d87bfd16cffad54 (patch) | |
tree | ac096aca4e7f0ca0ae9f7f8d62a40e060658356f | |
parent | 20548feae0ad2ace70e92243b1ce48fa1bf50d08 (diff) | |
download | thepixelworld-3a4d0c8b75d6296756fd53cd1d87bfd16cffad54.tar.gz thepixelworld-3a4d0c8b75d6296756fd53cd1d87bfd16cffad54.tar.bz2 thepixelworld-3a4d0c8b75d6296756fd53cd1d87bfd16cffad54.tar.xz thepixelworld-3a4d0c8b75d6296756fd53cd1d87bfd16cffad54.zip |
added feedback & permissions to @hide
-rw-r--r-- | app.js | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -234,7 +234,17 @@ io.sockets.on('connection', function(socket){ // @hide case "hide": - Player.Player.list[socket.id].ignorePlayerAttack = ! Player.Player.list[socket.id].ignorePlayerAttack; + hasPermission(socket.playerName, 60, function(res){ + if (res){ + Player.Player.list[socket.id].ignorePlayerAttack = ! Player.Player.list[socket.id].ignorePlayerAttack; + if (Player.Player.list[socket.id].ignorePlayerAttack) + socket.emit('addToChat', {ctimestamp: getTimeStamp(0), content: servermsg + "You are now immune to player and monster attacks", tab:"any"}); + else + socket.emit('addToChat', {ctimestamp: getTimeStamp(0), content: servermsg + "You are no longer immune to player and monster attacks", tab:"any"}); + } + else + socket.emit('addToChat', {ctimestamp: getTimeStamp(0), content: servermsg + "you dont have permission to use this command!", tab: "any"}); + }); break; // @setgm (args:<playername> <lvl>) |