Skip to content

Commit

Permalink
Added console note
Browse files Browse the repository at this point in the history
Signed-off-by: Rafael Ibasco <[email protected]>
  • Loading branch information
ribasco committed Jun 22, 2022
1 parent e206016 commit 066df4f
Showing 1 changed file with 15 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,22 +86,20 @@ public class SourceRconExample extends BaseExample {

private InetSocketAddress serverAddress;

private SourceRconOptions options;

/** {@inheritDoc} */
@Override
public void run(String[] args) throws Exception {
Boolean userTerminatorPackets = promptInputBool("Enable terminator packets? (Y for 'source based servers', N for non-source based servers)", true, "true", "sourceUseTerminatorPackets");
Console.colorize(true).purple("[config] ").green("Terminator packets enabled: ").cyan("%s", userTerminatorPackets).println();
options = SourceRconOptions.builder()
.option(ConnectOptions.FAILSAFE_ENABLED, true)
.option(ConnectOptions.FAILSAFE_RETRY_DELAY, 3000L)
.option(ConnectOptions.FAILSAFE_RETRY_BACKOFF_ENABLED, false)
.option(FailsafeOptions.FAILSAFE_RETRY_ENABLED, true)
.option(FailsafeOptions.FAILSAFE_RETRY_BACKOFF_ENABLED, false)
.option(FailsafeOptions.FAILSAFE_RETRY_DELAY, 3000L)
.option(GeneralOptions.POOL_MAX_CONNECTIONS, 8)
.build();
SourceRconOptions options = SourceRconOptions.builder()
.option(ConnectOptions.FAILSAFE_ENABLED, true)
.option(ConnectOptions.FAILSAFE_RETRY_DELAY, 3000L)
.option(ConnectOptions.FAILSAFE_RETRY_BACKOFF_ENABLED, false)
.option(FailsafeOptions.FAILSAFE_RETRY_ENABLED, true)
.option(FailsafeOptions.FAILSAFE_RETRY_BACKOFF_ENABLED, false)
.option(FailsafeOptions.FAILSAFE_RETRY_DELAY, 3000L)
.option(GeneralOptions.POOL_MAX_CONNECTIONS, 8)
.build();
initializeProcessors();
rconClient = new SourceRconClient(options);
sourceModParser = new SMParser(rconClient);
Expand Down Expand Up @@ -141,6 +139,12 @@ public void runTerminal() {
String address = promptInput("Enter server address", true, "", "sourceRconIp");
int port = Integer.parseInt(promptInput("Enter server port", false, "27015", "sourceRconPort"));

Console.colorize(true)
.cyan("[NOTE]: ")
.white("Type !h or !help for the available console commands")
.reset()
.println();

serverAddress = new InetSocketAddress(address, port);
boolean stop = false;

Expand Down

0 comments on commit 066df4f

Please sign in to comment.