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

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