# HG changeset patch # User Charly COSTE # Date 1267961856 -3600 # Node ID 5726a0833537f2bedba79f79ecfa3d69ca83ea5b # Parent 63289aa1dea7238e041bc26df07b69ecc52d4e51 minor syntax change in bot.py Signed-off-by: Charly COSTE diff --git a/bot.py b/bot.py --- a/bot.py +++ b/bot.py @@ -465,9 +465,8 @@ class Bot(threading.Thread): nickname = None - if event.source() != None: - if '!' in event.source(): - nickname = event.source().split('!')[0] + if event.source() and '!' in event.source(): + nickname = event.source().split('!')[0] # A string representation of the event