Skip to content

Instantly share code, notes, and snippets.

@Fulgen301
Created October 22, 2017 12:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Fulgen301/7d1e527f7639221bd53c4d99ba651c7c to your computer and use it in GitHub Desktop.
Save Fulgen301/7d1e527f7639221bd53c4d99ba651c7c to your computer and use it in GitHub Desktop.
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