Last active
June 9, 2016 22:49
-
-
Save GEOFBOT/988f8cf8cc4c0be73df3d78c92a8aee6 to your computer and use it in GitHub Desktop.
HexChat script for ¯\_(ツ)_/¯
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
# portions based on slap.py https://github.com/hexchat/hexchat-addons/blob/master/python/slap/slap.py | |
from __future__ import print_function | |
import hexchat | |
__module_name__ = "Shrug" | |
__module_version__ = "1.1" | |
__module_description__ = "Shrugs with /SHRUG [target]" | |
__author__ = 'Geoffrey Mon @GEOFBOT' | |
shrug = '¯\_(ツ)_/¯' | |
def shrugger(word, word_eol, userdata): | |
if len(word) > 1: | |
hexchat.command('say ' + word[1] + ': ' + shrug) | |
else: | |
hexchat.command('say ' + shrug) | |
return hexchat.EAT_ALL | |
def unload_cb(userdata): | |
print(__module_name__, 'version', __module_version__, 'unloaded.') | |
hexchat.hook_command('shrug', shrugger, help='/SHRUG [target]') | |
hexchat.hook_unload(unload_cb) | |
print(__module_name__, 'version', __module_version__, 'loaded.') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment