Do not log /login and /user
This commit is contained in:
parent
9a3cf85cf2
commit
65a7998b16
1 changed files with 5 additions and 5 deletions
|
|
@ -56,6 +56,7 @@ namespace TShockAPI
|
||||||
{
|
{
|
||||||
public string Name { get { return Names[0]; } }
|
public string Name { get { return Names[0]; } }
|
||||||
public List<string> Names { get; protected set; }
|
public List<string> Names { get; protected set; }
|
||||||
|
public bool DoLog { get; set; }
|
||||||
private string permission;
|
private string permission;
|
||||||
private CommandDelegate command;
|
private CommandDelegate command;
|
||||||
|
|
||||||
|
|
@ -71,6 +72,7 @@ namespace TShockAPI
|
||||||
permission = null;
|
permission = null;
|
||||||
Names = new List<string>(names);
|
Names = new List<string>(names);
|
||||||
command = cmd;
|
command = cmd;
|
||||||
|
DoLog = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool Run(string msg, TSPlayer ply, List<string> parms)
|
public bool Run(string msg, TSPlayer ply, List<string> parms)
|
||||||
|
|
@ -151,8 +153,8 @@ namespace TShockAPI
|
||||||
ChatCommands.Add(new Command(PartyChat, "p"));
|
ChatCommands.Add(new Command(PartyChat, "p"));
|
||||||
ChatCommands.Add(new Command(Rules, "rules"));
|
ChatCommands.Add(new Command(Rules, "rules"));
|
||||||
ChatCommands.Add(new Command("logs", Rules, "displaylogs"));
|
ChatCommands.Add(new Command("logs", Rules, "displaylogs"));
|
||||||
ChatCommands.Add(new Command("manageusers", ManageUsers, "user"));
|
ChatCommands.Add(new Command("manageusers", ManageUsers, "user") { DoLog = false });
|
||||||
ChatCommands.Add(new Command(AttemptLogin, "login"));
|
ChatCommands.Add(new Command(AttemptLogin, "login") { DoLog = false });
|
||||||
ChatCommands.Add(new Command("cfg", Broadcast, "broadcast", "bc"));
|
ChatCommands.Add(new Command("cfg", Broadcast, "broadcast", "bc"));
|
||||||
ChatCommands.Add(new Command("whisper", Whisper, "whisper", "w", "tell"));
|
ChatCommands.Add(new Command("whisper", Whisper, "whisper", "w", "tell"));
|
||||||
ChatCommands.Add(new Command("whisper", Reply, "reply", "r"));
|
ChatCommands.Add(new Command("whisper", Reply, "reply", "r"));
|
||||||
|
|
@ -189,10 +191,8 @@ namespace TShockAPI
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!cmdText.Contains("login") || !cmdText.Contains("user"))
|
if (cmd.DoLog)
|
||||||
{
|
|
||||||
Tools.SendLogs(string.Format("{0} executed: /{1}", player.Name, cmdText), Color.Red);
|
Tools.SendLogs(string.Format("{0} executed: /{1}", player.Name, cmdText), Color.Red);
|
||||||
}
|
|
||||||
cmd.Run(cmdText, player, args);
|
cmd.Run(cmdText, player, args);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue