Skip to content

Instantly share code, notes, and snippets.

@stil stil/masslap.py
Last active Jan 3, 2016

Embed
What would you like to do?
__module_name__ = "Mass Highlight"
__module_version__ = "1.666"
__module_description__ = "Script annoying everyone on the channel."
import hexchat
def masshl(word, word_eol, userdata):
notice = " ".join(word[1:])
users = hexchat.get_list('users')
prefix = '\0030,0'
line = []
separator = " "
def flush_buffer(line):
if len(line) > 0:
hexchat.command("msg {} {}".format(hexchat.get_info("channel"), prefix + separator.join(line)))
for user in users:
will_fit = len(prefix + separator.join(line) + separator + user.nick) < 350
if not will_fit:
flush_buffer(line)
line = []
line.append(user.nick)
flush_buffer(line)
if len(notice) > 0:
hexchat.command('msg {} \00300,05\002{}'.format(hexchat.get_info("channel"), notice))
hexchat.hook_command("hl", masshl, help="/ms Mass highlights all users on channel")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.