public void tellItemSlot(int x, int y, int id, int amount, string state, NetworkMessageInfo info) { if (info.sender != Network.player) { NetworkUser user = NetworkUserList.getUserFromPlayer(info.sender); Logger.LogSecurity(user.id, user.name, "Added an item to self! ID: " + id + " Amount: " + amount + " name: " + ItemName.getName(id)); if (info.sender != null) { NetworkBans.ban(user.name, user.id, "Item add hack (Auto banned)", "SERVER"); return; } } if (info.sender.ToString() == "0" || info.sender.ToString() == "-1") { this.tellItemSlot_Pizza(x, y, id, amount, state); } }
public static void ban(NetworkPlayer player, string name, string id, string reason, string bannedBy) { NetworkBans.ban(name, id, reason, bannedBy); NetworkTools.kick(player, "You have been banned. Reason: " + reason); }