toontown-just-works/otp/chat/ChatUtil.py

16 lines
347 B
Python
Raw Normal View History

2024-07-07 18:08:39 -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 ''