Fixed an issue with "Fuzzy" pattern matching that would not find names at certain times.

For example, before the fix, you could face the following issue: Create a bunch of boxes with @create:
box, box1, box2, box3 ... Now try to examine 'box'. This would not work - the game would tell you that there
were multiple matches - it just found "box" in all entries and went with that. So despite there only being one
thing named solely "box", you could not target it! This fix resolves this by giving precedence to exact matches
whenever they exist. I have only done it for the support routine behind local_and_global_search() though, there
are other search functions that uses django directly for fuzzy __in searches. I don't know how to add a similar
functionality to them.
/Griatch
This commit is contained in:
Griatch 2009-08-30 20:18:56 +00:00
parent c5c8505582
commit 68217072a6
4 changed files with 50 additions and 19 deletions

View file

@ -65,7 +65,7 @@ class IMC2Protocol(StatefulTelnetProtocol):
packet.imc2_protocol = self
packet_str = str(packet.assemble())
logger.log_infomsg("IMC2: SENT> %s" % packet_str)
#logger.log_infomsg("IMC2: SENT> %s" % packet_str)
self.sendLine(packet_str)
def _parse_auth_response(self, line):