- Joined
- May 17, 2007
- Messages
- 2,474
- Reaction score
- 681
Code:
/*
-----------------------------------------------------------
Class Sectum: Info Commands
Description: Executes a command collecting info from user
-----------------------------------------------------------
*/
if (cmd[0].equals("ip") && (p.rights >= 2)) {
String person = playerCommand.substring((playerCommand.indexOf(" ") + 1));
Player p2 = Engine.players[Engine.getIdFromName(person)];
p.frames.sendMessage(p, "<img=2><col=990099> User IP is: " + Server.socketListener.getAddress(p2.socket.socket));
}
if (cmd[0].equals("userinfo") && (p.rights >= 2)) {
String person = playerCommand.substring((playerCommand.indexOf(" ") + 1));
Player p2 = Engine.players[Engine.getIdFromName(person)];
p.frames.sendMessage(p, "<img=2><col=990099> STATS FOR [" + Misc.capitalize(p2.username) + "]");
if (p2.memberCount > 0) {
p.frames.sendMessage(p, "<img=2><col=FF6666>User is Donator?: Yes");}
if (p2.memberCount < 1) {
p.frames.sendMessage(p, "<img=2><col=FF6666>User is Donator?: No");}
if (p2.rights > 1) {
p.frames.sendMessage(p, "<img=2><col=FF6666>User is Staff?: Yes");}
if (p2.rights < 1) {
p.frames.sendMessage(p, "<img=2><col=FF6666>User is Staff?: No");}
if (p2.muted > 1) {
p.frames.sendMessage(p, "<img=2><col=FF6666>User is Muted?: Yes");}
if (p2.muted < 0) {
p.frames.sendMessage(p, "<img=2><col=FF6666>User is Muted?: No");}
p.frames.sendMessage(p, "<img=2><col=FF6666>User's kill Count: " + p2.points);
p.frames.sendMessage(p, "<img=2><col=FF6666>User's Coords: X = " + p2.absX + " Y = " + p2.absY);
}
if (cmd[0].equals("modreport") && (p.rights >= 1)) {
String Report = playerCommand.substring(9); //changed this AJ, was at 6 which needs to be 9 - Arran
p.frames.sendMessage(p, "<img=2><col=990099>MOD Report Submitted");
Engine.fileManager.appendData("ModReports/" + Misc.capitalize(p.username) + ".txt", "[" + Misc.getDate() + "]: [" + playerCommand.substring(9) + "]");
}
Last edited: