Skip to content

Instantly share code, notes, and snippets.

@aikar
Last active September 5, 2017 20:17
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 aikar/96754416f6c9db18fd2e to your computer and use it in GitHub Desktop.
Save aikar/96754416f6c9db18fd2e to your computer and use it in GitHub Desktop.
import hexchat
__module_name__ = "AikarStream"
__module_version__ = "1.3"
__module_description__ = "Improves chat view for AikarStream in #aikar on Spigot"
def chanmessage(word, word_eol, userdata, attr):
message = word_eol[3][1:]
target = "Channel Message"
nick = word[0][1:].split("!", 2)[0]
if nick == "Aikar|stream":
temp = message.split(" ", 1)
nick = temp[0].replace("<", "").replace(">", "")
message = temp[1]
if hexchat.get_info("nick") in message:
target = "Channel Msg Hilight"
# END if
hexchat.emit_print(target, nick, message, "")
return hexchat.EAT_ALL
# END if
return hexchat.EAT_NONE
# END chanmessage
hexchat.hook_server_attrs("PRIVMSG", chanmessage),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment