diff --git a/python/CFDialog.py b/python/CFDialog.py index fd5afc37f..94d4f666c 100644 --- a/python/CFDialog.py +++ b/python/CFDialog.py @@ -275,7 +275,7 @@ class Dialog: # only need to be a substring of the message in order to trigger a reply. def isAnswer(self, msg, keywords): for ckey in keywords: - if ckey == "*" or string.find(msg.lower(), ckey.lower()) != -1: + if ckey == "*" or msg.lower().find(ckey.lower()) != -1: return 1 return 0 diff --git a/python/CFWorld.py b/python/CFWorld.py index 8a8344331..b42fb0e23 100644 --- a/python/CFWorld.py +++ b/python/CFWorld.py @@ -13,7 +13,7 @@ bigmapysize = 50 #Return an x,y tuple of where in bigworld an object is. Return false if not in bigworld. In current bigworld, values range from 5000 to 6499. def loc_from_ob(ob): cfmap = ob.Map - if ((string.find(cfmap.Path,world_prefix) != 0) or (len(cfmap.Path) != world_len)): + if ((cfmap.Path.find(world_prefix) != 0) or (len(cfmap.Path) != world_len)): return False strloc = cfmap.Path[world_prefix_len:].split(world_sep) x = (int(strloc[0]) * bigmapxsize) + ob.X