Added OpenHatch_???? exception to clean_nick

This commit is contained in:
Shauna 2014-12-07 10:28:56 -05:00
parent 988c93c9af
commit 1edf73593f

2
bot.py
View File

@ -125,6 +125,8 @@ def parse_messages(ircmsg):
# Cleans a nickname of decorators/identifiers # Cleans a nickname of decorators/identifiers
def clean_nick(actor): def clean_nick(actor):
if actor: # In case an empty string gets passed if actor: # In case an empty string gets passed
if actor.find("openhatch") != -1: # If nick is like "openhatch_1234" don't clean.
return actor
actor = actor.replace("_", "") # Strip out trailing _ characters actor = actor.replace("_", "") # Strip out trailing _ characters
while(actor[-1]) in "1234567890": # Remove trailing numbers while(actor[-1]) in "1234567890": # Remove trailing numbers
actor = actor[:-1] actor = actor[:-1]