• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Fix/Patch Fix house command in TFS 0.3.6pl1

Joined
Apr 17, 2008
Messages
1,922
Solutions
1
Reaction score
188
Location
Venezuela
Well, i've tested this and is working very good, it isn't crashing the server.

house.cpp, in function:
Lua:
bool AccessList::addExpression(const std::string& expression)

Replace:
Lua:
std::string metachars = ".[{}()\\+|^$"

With:
Lua:
std::string metachars = ".[{}()\\+|^$*?"

Replace:
Lua:
if(metachars.find(*it) != std::string::npos)
			outExp += "\\";

With:
Lua:
if(metachars.find(*it) != std::string::npos)
			outExp += "";

And replace:
Lua:
	replaceString(outExp, "*", ".*");
	replaceString(outExp, "?", ".?");

With:
Lua:
	replaceString(outExp, "*", "");
	replaceString(outExp, "?", "");

It's working good for me, it isn't crashing the server.

I've tested with text like:
Code:
*Darkhaos
******
Darkhaos*
Dark*Haos

And isn't crashing the server :)


Rep++ if this helped you :D
 
I had done this but it still not working.
Some people still are crashing my server (they are using this bug)
 
Last edited:
Isnt this already fixed in 0.4? :S I mean... putting * to let everyone inside the house etc: p
 
I have one error.

for(std::string::const_iterator it = expression.begin(); it != expression.end(); ++it)
 
I have one error.

for(std::string::const_iterator it = expression.begin(); it != expression.end(); ++it)

fix: add the symbol ;
at the end of this line:
std::string metachars = ".[{}()\\+|^$*?"

So results are:
std::string metachars = ".[{}()\\+|^$*?";
 
I fixed it and it look fine but my server is going down 3 minutes after start without errors :/ Can someone help me?
 
Last edited:
Back
Top