For a while i was looking for a slap-type plugin to annoy people from time to time, I spend reading HexChat api and how to develop plugins, the result was this plugin that ultimately fulfilled with my expectations 🙂 –
here is the code:
__module_name__ = "Hexchat Slap Plugin"
__module_version__ = "0.1"
__module_description__ = "Slap command"
__author__ = "Douglas Brunal (AKA) Frankity"
import xchat as XC
def slaps(word, word_eol, userdata):
XC.command('me ' + 'Slap ' + '\002'+word+'\002' +
' in da face with a large trout')
print 'error '
XC.prnt(__module_name__ + ' version ' + __module_version__ + ' loaded.')
You must have installed python and install the python interface feature in the HexChat installation.
for use, create a .py file and save it in %appdata%\Roaming\HexChat\addons if you are using Windows, for Linux the path is /.config/hexchat/addons.