Last active
August 10, 2017 05:54
-
-
Save ksqsf/da57606c43f42a6a04c079e7871529c4 to your computer and use it in GitHub Desktop.
An addon for hexchat to remove the names of forwarding bots
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
# | |
# 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