diff options
Diffstat (limited to 'app.js')
-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>) |