# --------------------------------------------------------------- # # ctcp.py -- An XChat plugin to send custom CTCP replies # # Copyright (C) 2005, Baishampayan Ghose # # # # This program is free software; you can redistribute it and/or # # modify it under the terms of the GNU General Public License as # # published by the Free Software Foundation; either version 2 of # # the License, or (at your option) any later version. # # # # This program is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # # GNU General Public License for more details. # # # # You should have received a copy of the GNU General Public # # License along with this program; if not, write to the Free # # Software Foundation, Inc., 51 Franklin Street - Fifth Floor, # # Boston, MA 02110-1301, USA. # # --------------------------------------------------------------- # __module_name__ = "ctcp" __module_version__ = "0.01" __module_description__ = "XChat module to send custom CTCP replies" VERSION = "mIRC 3.0 Windows XP Professional Service Pack 2" CLIENTINFO = "mIRC 3.0" import xchat def ctcp_cb(word, word_eol, userdata): msg = word[0] if (msg == "VERSION"): xchat.command("NOTICE %s %s %s" % (word[1], msg, VERSION)) elif (msg == "CLIENTINFO"): xchat.command("NOTICE %s %s %s" % (word[1], msg, CLIENTINFO)) else: pass return xchat.EAT_ALL xchat.hook_print("CTCP Generic", ctcp_cb) print "CTCP plugin loaded!"