Skip to content

Instantly share code, notes, and snippets.

@GEOFBOT
Last active June 9, 2016 22:49
Show Gist options
  • Save GEOFBOT/988f8cf8cc4c0be73df3d78c92a8aee6 to your computer and use it in GitHub Desktop.
Save GEOFBOT/988f8cf8cc4c0be73df3d78c92a8aee6 to your computer and use it in GitHub Desktop.
HexChat script for ¯\_(ツ)_/¯
# 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