Remove ChanServ 'voice' messages in XChat
Posted: Mon Jun 21, 2010 3:16 am
Those of you have have been using the XChat support system will notice that we have implemented a "voicing" feature where everybody is automatically "voiced" on entry to #linuxmint-chat, #linuxmint-help and #pimpmymint. This is a system that allows the channel operators greater freedom to block unruly elements from spamming / trolling etc our great network.
However, as everybody is voiced on entry, the continual barrage of messages from ChanServ (the user or rather bot that performs the voicing for us), I wrote a little script to ignore those messages. A number of the channel ops use it already as do quite a few of our regulars, and with it's simplicity, you should be to!
Without further ado, I present novoice.py :
Installation
You should save the code (copy and paste into and editor) above as the file " novoice.py " in your " .xchat2 " folder. Notice that's a hidden folder, so you should be very careful when typing the filename in.
Once it's saved, you should simply restart (or start if not already running) your XChat and the script will automatically be loaded for you.
EDIT
Since I initially posted this, it appears the forums mechanism for copying text is not ideal, some people have reported "indentation errors". To address this, I'm also hosting the file : novoice.py. Right click, save the file as ~/.xchat2/novoice.py Restart XChat and you will enjoy the silence!
However, as everybody is voiced on entry, the continual barrage of messages from ChanServ (the user or rather bot that performs the voicing for us), I wrote a little script to ignore those messages. A number of the channel ops use it already as do quite a few of our regulars, and with it's simplicity, you should be to!
Without further ado, I present novoice.py :
Code: Select all
#
# Copyright (C) 2010, Suhana scripts@suhana.co.uk
# All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# * Neither the copyright holder nor the names of their contributors may be
# used to endorse or promote products derived from this software without
# specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import xchat
__module_name__ = "novoice"
__module_version__ = "1.0"
__module_description__ = "Ignores voice messages from ChanServ"
def ignore_callback(word, word_eol, userdata):
return xchat.EAT_XCHAT
xchat.hook_print("Channel Voice", ignore_callback)
You should save the code (copy and paste into and editor) above as the file " novoice.py " in your " .xchat2 " folder. Notice that's a hidden folder, so you should be very careful when typing the filename in.
Once it's saved, you should simply restart (or start if not already running) your XChat and the script will automatically be loaded for you.
EDIT
Since I initially posted this, it appears the forums mechanism for copying text is not ideal, some people have reported "indentation errors". To address this, I'm also hosting the file : novoice.py. Right click, save the file as ~/.xchat2/novoice.py Restart XChat and you will enjoy the silence!