Skip to content
Snippets Groups Projects
Commit 45818ca6 authored by Alexis Durgnat's avatar Alexis Durgnat :milky_way:
Browse files

Split only first space of chat command

parent 05bf70f3
Branches master
No related tags found
1 merge request!21*poof* final version
...@@ -226,7 +226,7 @@ public class MainWindowController implements Initializable { ...@@ -226,7 +226,7 @@ public class MainWindowController implements Initializable {
* @param cmd The line to parse. * @param cmd The line to parse.
*/ */
private void parseChatCommand(String cmd){ private void parseChatCommand(String cmd){
String[] command = cmd.split(" "); String[] command = cmd.split(" ", 2);
if (AppConfig.CHAT_COMMANDS.contains(command[0])){ if (AppConfig.CHAT_COMMANDS.contains(command[0])){
if (command[0].equals("help")) { if (command[0].equals("help")) {
drawCommands(); drawCommands();
...@@ -290,7 +290,6 @@ public class MainWindowController implements Initializable { ...@@ -290,7 +290,6 @@ public class MainWindowController implements Initializable {
// Now iterating over connections // Now iterating over connections
Connection c = new Connection.ConnectionBuilder(connections.getJSONObject(i)).build(); Connection c = new Connection.ConnectionBuilder(connections.getJSONObject(i)).build();
drawConnection(c, 30, 100 + 100 * i); drawConnection(c, 30, 100 + 100 * i);
} }
} catch (IOException | ParseException e) { } catch (IOException | ParseException e) {
showSadMessage(AppConfig.ERROR_API_UNREACHABLE); showSadMessage(AppConfig.ERROR_API_UNREACHABLE);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment