
# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA

__author__ = "Guru_Meditation <guru\at\alterinet.org>"
__date__ = "22 January 2007"
__version__ = "1.0"

__module_name__ = "tabsno" 
__module_version__ = "1.0" 
__module_description__ = "more tabs for snotices" 

import xchat

def notice_cb(word, word_eol, userdata): 
    
    if 'has changed his/her nickname to' in word_eol[3] or \
       word_eol[3].startswith(':*** Notice -- Client'):
        ctx = xchat.find_context(channel='(join\part\quit\chgnick)')
        ctx.prnt(word_eol[3])
        return xchat.EAT_ALL

    # Functions return None by default and xchat.EAT_NONE is None.
    #return xchat.EAT_NONE

xchat.command("query -nofocus (join\part\quit\chgnick)")
xchat.hook_server("NOTICE", notice_cb)


