mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Auto-Tpaccept from everyone
Disabled by default. Suggested by medxo
This commit is contained in:
parent
1499f8cbfc
commit
dd001e3519
3 changed files with 9 additions and 3 deletions
|
|
@ -24,7 +24,9 @@ namespace MinecraftClient.ChatBots
|
|||
SendPrivateMessage(sender, response);
|
||||
}
|
||||
}
|
||||
else if (Settings.RemoteCtrl_AutoTpaccept && isTeleportRequest(text, ref sender) && Settings.Bots_Owners.Contains(sender.ToLower()))
|
||||
else if (Settings.RemoteCtrl_AutoTpaccept
|
||||
&& isTeleportRequest(text, ref sender)
|
||||
&& (Settings.RemoteCtrl_AutoTpaccept_Everyone || Settings.Bots_Owners.Contains(sender.ToLower())))
|
||||
{
|
||||
SendText("/tpaccept");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -86,6 +86,7 @@ namespace MinecraftClient
|
|||
//Remote Control
|
||||
public static bool RemoteCtrl_Enabled = false;
|
||||
public static bool RemoteCtrl_AutoTpaccept = true;
|
||||
public static bool RemoteCtrl_AutoTpaccept_Everyone = false;
|
||||
|
||||
//Custom app variables and Minecraft accounts
|
||||
private static Dictionary<string, string> AppVars = new Dictionary<string, string>();
|
||||
|
|
@ -271,6 +272,7 @@ namespace MinecraftClient
|
|||
{
|
||||
case "enabled": RemoteCtrl_Enabled = str2bool(argValue); break;
|
||||
case "autotpaccept": RemoteCtrl_AutoTpaccept = str2bool(argValue); break;
|
||||
case "tpaccepteveryone": RemoteCtrl_AutoTpaccept_Everyone = str2bool(argValue); break;
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
@ -399,7 +401,8 @@ namespace MinecraftClient
|
|||
+ "\r\n"
|
||||
+ "[RemoteControl]\r\n"
|
||||
+ "enabled=false\r\n"
|
||||
+ "autotpaccept=true\r\n", Encoding.UTF8);
|
||||
+ "autotpaccept=true\r\n"
|
||||
+ "tpaccepteveryone=false\r\n", Encoding.UTF8);
|
||||
}
|
||||
|
||||
public static int str2int(string str) { try { return Convert.ToInt32(str); } catch { return 0; } }
|
||||
|
|
|
|||
|
|
@ -161,7 +161,8 @@ When the remote control bot is enabled, you can send commands to your bot using
|
|||
Don't forget to add your username in botowners INI setting if you want it to obey.
|
||||
To perform a command simply do the following: /tell <yourbot> <thecommand>
|
||||
Where <thecommand> is an internal command as described in "Internal commands" section.
|
||||
If enabled, remote control will auto-accept /tpa and /tpahere requests from the bot owners.
|
||||
Remote control system can auto-accept /tpa and /tpahere requests from the bot owners.
|
||||
Auto-accept can be disabled or extended to requests from anyone in remote control configuration.
|
||||
|
||||
=========================
|
||||
Disclaimer & Last words
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue