Skip to content
This repository has been archived by the owner on Apr 16, 2023. It is now read-only.

Commit

Permalink
Update CHANGELOG & fix Address formatting in sysInfo command
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkL4YG committed Feb 6, 2020
1 parent 083ef8b commit 225ef47
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
## 1.1.0 (Typed commands, Language selection)
+ Added a new command service that allows for declarative commands and typed parameters
+ Added the ability to create custom matchers for plugin specific types in command parameters
+ Added a ``!help`` command that lists commands registered to the new implementation
+ Added a ``!help <command>`` command that shows another commands signature
+ Added a ``!locale`` command that shows the current custom locale
+ Added a ``!locale <short-ident>`` command that allows users to select another locale as their default
+ Added a new ``CLIService`` available to framework components to register cli-commands to
+ Added a ``sysInfo`` cli-command that prints system information
~ Changed: Sanctions on plugin IDs are less strict now. (Regex: ``"^[a-zA-Z.][a-zA-Z0-9.&+#]+$"``)
~ Downgraded dependencies:
* antlr 4.8-1 -> 4.7.1: Antlr gradle plugin is not updated yet and produces incompatible parsers.
~ Changed: REST-service now deals correctly with ``OPTIONS`` requests
~ Changed: REST-service now supports ``CORS``
~ Changed: REST-service now supports custom headers
~ Changed: TS3PermProvider now holds internal cache of all permission IDs (when retrievable)
~ Changed: Properly set log levels in the default Log4J2 configuration

## 1.0.4
~ Changed: user-service performance improved by caching results for 30 seconds
~ Changed: Non-string dataSourceOptions now cause an exception
Expand Down
8 changes: 5 additions & 3 deletions src/main/java/de/fearnixx/jeak/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

import java.io.File;
import java.lang.management.ManagementFactory;
import java.net.InetAddress;
import java.net.InterfaceAddress;
import java.net.NetworkInterface;
import java.util.*;
Expand Down Expand Up @@ -112,7 +113,6 @@ public void run() {
ExecutorService execSvc = Executors.newSingleThreadExecutor();



try (Scanner sysInScanner = new Scanner(System.in)) {
Supplier<Future<String>> next = () -> execSvc.submit(sysInScanner::nextLine);
Future<String> futConsoleLine = next.get();
Expand Down Expand Up @@ -225,10 +225,12 @@ public void dumpSysInfo(Consumer<String> acceptor) {
NetworkInterface netIf = netIfIterator.next();
dump.accept(String.format("[IF] Name=%s MAC=%s", netIf.getDisplayName(), Arrays.toString(netIf.getHardwareAddress())));
for (InterfaceAddress ifAddr : netIf.getInterfaceAddresses()) {
String addrStr = Arrays.toString(ifAddr.getAddress().getAddress());
String addrStr = ifAddr.getAddress().getHostAddress();
String prefix = Integer.toString(ifAddr.getNetworkPrefixLength());
String hostname = ifAddr.getAddress().getHostName();
String broadcast = Arrays.toString(ifAddr.getBroadcast().getAddress());
String broadcast = Optional.ofNullable(ifAddr.getBroadcast())
.map(InetAddress::getHostAddress)
.orElse("-");
dump.accept(String.format("IP: %s/%s [%s] BR: %s", addrStr, prefix, hostname, broadcast));
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/de/fearnixx/jeak/commandline/CLIService.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public void receiveLine(String input) {

Consumer<CLICommandContext> cliConsumer = cliCommands.getOrDefault(command, null);
if (cliConsumer != null) {
CommandInfo commandInfo = parseCommandLine(contextPart, logger);
CommandInfo commandInfo = parseCommandLine(contextPart != null ? contextPart : "", logger);
CLICommandContext cliContext = new CLICommandContext(commandInfo, getMessageConsumer());
cliConsumer.accept(cliContext);

Expand Down

0 comments on commit 225ef47

Please sign in to comment.