Created
October 15, 2014 01:59
-
-
Save dotStart/42388fa597866e535f0c to your computer and use it in GitHub Desktop.
A simple hexchat script which makes ZNCs stickychan module slightly less annoying.
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
import hexchat; | |
# Module Metadata | |
__module_name__ = 'ZNC Stickychan' | |
__module_author__ = 'Akkarin' | |
__module_version__ = '1.0.0' | |
__module_description__ = 'Makes stickychan less annoying.' | |
# Handles messages. | |
def privmsg_cb (word, word_eol, userdata): | |
if word[0][1:].split('!')[0] == '*stickychan': | |
for chan in hexchat.get_list('channels'): | |
if chan.type == 1 and chan.id == hexchat.get_prefs('id'): | |
chan.context.emit_print('Server Text', '[\00312stickychan\017] \0033' + word_eol[3][1:]) | |
return hexchat.EAT_ALL | |
# Hook events | |
hexchat.hook_server('PRIVMSG', privmsg_cb) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment