Skip to content

Instantly share code, notes, and snippets.

@ksqsf
Last active August 10, 2017 05:54
Show Gist options
  • Save ksqsf/da57606c43f42a6a04c079e7871529c4 to your computer and use it in GitHub Desktop.
Save ksqsf/da57606c43f42a6a04c079e7871529c4 to your computer and use it in GitHub Desktop.
An addon for hexchat to remove the names of forwarding bots
#
# an addon for hexchat to remove the names of forwarding bots.
#
import hexchat
__module_name__ = 'bot-killer'
__module_version__ = '0.1.0'
__module_description__ = 'Eliminate the names of forwarding bots'
bot_list = ['teleboto', 'zhmrtbot', 'xmppbot', 'OrzGTalk', 'Orizon', 'OrzIrc2p']
def filter_botnames(word, word_eol, userdata, attrs):
sender = word[0][1:word[0].find('!')]
if sender in bot_list:
user = word[3][word[3].find('[')+1 : -1]
hexchat.emit_print('Channel Message', user, word_eol[4])
return hexchat.EAT_HEXCHAT
hexchat.hook_server_attrs('PRIVMSG', filter_botnames)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment