Skip to content

Commit 066df4f

Browse files
committed
Added console note
Signed-off-by: Rafael Ibasco <[email protected]>
1 parent e206016 commit 066df4f

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

examples/src/main/java/com/ibasco/agql/examples/SourceRconExample.java

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -86,22 +86,20 @@ public class SourceRconExample extends BaseExample {
8686

8787
private InetSocketAddress serverAddress;
8888

89-
private SourceRconOptions options;
90-
9189
/** {@inheritDoc} */
9290
@Override
9391
public void run(String[] args) throws Exception {
9492
Boolean userTerminatorPackets = promptInputBool("Enable terminator packets? (Y for 'source based servers', N for non-source based servers)", true, "true", "sourceUseTerminatorPackets");
9593
Console.colorize(true).purple("[config] ").green("Terminator packets enabled: ").cyan("%s", userTerminatorPackets).println();
96-
options = SourceRconOptions.builder()
97-
.option(ConnectOptions.FAILSAFE_ENABLED, true)
98-
.option(ConnectOptions.FAILSAFE_RETRY_DELAY, 3000L)
99-
.option(ConnectOptions.FAILSAFE_RETRY_BACKOFF_ENABLED, false)
100-
.option(FailsafeOptions.FAILSAFE_RETRY_ENABLED, true)
101-
.option(FailsafeOptions.FAILSAFE_RETRY_BACKOFF_ENABLED, false)
102-
.option(FailsafeOptions.FAILSAFE_RETRY_DELAY, 3000L)
103-
.option(GeneralOptions.POOL_MAX_CONNECTIONS, 8)
104-
.build();
94+
SourceRconOptions options = SourceRconOptions.builder()
95+
.option(ConnectOptions.FAILSAFE_ENABLED, true)
96+
.option(ConnectOptions.FAILSAFE_RETRY_DELAY, 3000L)
97+
.option(ConnectOptions.FAILSAFE_RETRY_BACKOFF_ENABLED, false)
98+
.option(FailsafeOptions.FAILSAFE_RETRY_ENABLED, true)
99+
.option(FailsafeOptions.FAILSAFE_RETRY_BACKOFF_ENABLED, false)
100+
.option(FailsafeOptions.FAILSAFE_RETRY_DELAY, 3000L)
101+
.option(GeneralOptions.POOL_MAX_CONNECTIONS, 8)
102+
.build();
105103
initializeProcessors();
106104
rconClient = new SourceRconClient(options);
107105
sourceModParser = new SMParser(rconClient);
@@ -141,6 +139,12 @@ public void runTerminal() {
141139
String address = promptInput("Enter server address", true, "", "sourceRconIp");
142140
int port = Integer.parseInt(promptInput("Enter server port", false, "27015", "sourceRconPort"));
143141

142+
Console.colorize(true)
143+
.cyan("[NOTE]: ")
144+
.white("Type !h or !help for the available console commands")
145+
.reset()
146+
.println();
147+
144148
serverAddress = new InetSocketAddress(address, port);
145149
boolean stop = false;
146150

0 commit comments

Comments
 (0)