Reimplement some functions

This commit is contained in:
KimLS
2017-12-24 23:21:17 -08:00
parent 7a778c549f
commit 0ec53eff52
11 changed files with 195 additions and 146 deletions
+13
View File
@@ -196,6 +196,19 @@ void find_replace(std::string& string_subject, const std::string& search_string,
}
}
void ParseAccountString(const std::string &s, std::string &account, std::string &loginserver)
{
auto split = SplitString(s, '.');
if (split.size() == 2) {
loginserver = split[0];
account = split[1];
}
else if(split.size() == 1) {
loginserver = "eqemu";
account = split[0];
}
}
//Const char based
// normal strncpy doesnt put a null term on copied strings, this one does