def bot():
return chan().bot
+def chanmsg(message):
+ return chan().msg(message, truncate=True, msgtype="NOTICE")
+
def debug(message, send_to_owner=True):
if lib.parent is None:
print(message)
if message['state'] == 'private':
message['text'] = getText(message['name'])
print(repr(message))
- chan().msg('[%(section)s] %(name)s went %(state)s (was: %(previous_state)s) (https://old.reddit.com/%(name)s)%(text)s' % message, truncate=True)
+ chanmsg('[%(section)s] %(name)s went %(state)s (was: %(previous_state)s) (https://old.reddit.com/%(name)s)%(text)s' % message)
elif message['state'] == 'restricted':
- chan().msg('[%(section)s] %(name)s went %(state)s (was: %(previous_state)s) (https://old.reddit.com/%(name)s)' % message, truncate=True)
+ chanmsg('[%(section)s] %(name)s went %(state)s (was: %(previous_state)s) (https://old.reddit.com/%(name)s)' % message)
else:
- chan().msg('[%(section)s] %(name)s went \x02%(state)s\x02 (was: %(previous_state)s) (https://old.reddit.com/%(name)s)' % message, truncate=True)
+ chanmsg('[%(section)s] %(name)s went \x02%(state)s\x02 (was: %(previous_state)s) (https://old.reddit.com/%(name)s)' % message)
def handleState(message):
global last_update, last_topic