mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 11:28:25 +00:00
Reimplement some functions
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user