Store server IP and server port in distinct vars

- Change "replaceVars" to "expandVars" (more explicit)
- Store server IP and server port in distinct vars in Settings class
- Add setServerIP setter in Settings which automatically split a
host:port string
- Add %serverip% variable which use the new ServerPort setting
- Fix "text%incompletevarnameatstringend" strings
This commit is contained in:
ORelio 2014-06-13 16:50:55 +02:00
parent 068b87a11a
commit 283074bb63
5 changed files with 74 additions and 60 deletions

View file

@ -37,7 +37,7 @@ namespace MinecraftClient.ChatBots
case "connect":
if (command.Length >= 9)
{
Settings.ServerIP = command.Substring(8);
Settings.setServerIP(command.Substring(8));
ReconnectToTheServer();
}
break;