Poodletooth-iLand/otp/chat/ChatUtil.py

15 lines
346 B
Python
Raw Normal View History

2015-05-30 14:47:29 -05: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)
return info.getName() if info else ''