__module_name__ = "freenode" __module_version__ = "0.1" __module_description__ = "Freenode ident + auto-join script" ###################################################################### # # # This script is intended to join your channels upon connect to # # freenode only after NickServ sets your cloak, to make your cloak # # visible in all channels. # # # # Usage: 1. set the JOIN_CHANNELS = to a comma separated list o # # channels, removing any channels set in your xchat config # # 2. set the PASSWORD = to your password. # # 3. Open the edit mode for the Freenode Server in your # # serverlist, and enter this as your connect command: # # py load /home/user/.xchat/freenode.py # ###################################################################### # # Set your nickserv password here # PASSWORD = 'yourpass' # # Set your join list here # JOIN_CHANNELS = '#freenode,#xchat,#python' ###################################################################### # # # YOU DO NOT HAVE TO EDIT BELOW THIS LINE # # # ###################################################################### import xchat def notice_check(word, word_eol, userdata): if word_eol[3].startswith(':NickServ set your hostname to'): joinchannels() return xchat.EAT_NONE def joinchannels(*args): global JOIN_CHANNELS for chan in JOIN_CHANNELS.split(','): chan = chan.strip() if not chan.startswith('#'): chan = '#' + chan xchat.command('join %s' % chan) xchat.hook_server('NOTICE', notice_check) xchat.command('msg nickserv identify %s' % PASSWORD)