Poodletooth-iLand/otp/chat/ChatUtil.py
2015-06-17 09:06:48 -04:00

15 lines
No EOL
346 B
Python

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 ''