Poodletooth-iLand/otp/chat/ChatUtil.py

16 lines
347 B
Python
Raw Normal View History

2015-05-30 19:47:29 +00:00
ThoughtPrefix = '.'
def isThought(message):
return message and message.startswith(ThoughtPrefix)
def removeThoughtPrefix(message):
if isThought(message):
return message[len(ThoughtPrefix):]
else:
return message
def findAvatarName(id):
info = base.cr.identifyAvatar(id)
2015-07-05 23:59:25 +00:00
return info.getName() if info else ''