Created
October 22, 2017 12:36
-
-
Save Fulgen301/7d1e527f7639221bd53c4d99ba651c7c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def _redispatch_message_common(message, type): | |
target, text = get_target(message.params[0]), message.params[1] | |
user = get_user(message.source) if message.source else None | |
signal(type).send(message, user=user, target=target, text=text) | |
if target == message.client.nickname: | |
signal("private-{}".format(type)).send(message, user=user, target=target, text=text) | |
else: | |
signal("public-{}".format(type)).send(message, user=user, target=target, text=text) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment