# loader:pf version:0.2.2 # # autojoin.dsm - Auto-join module for DarkStar/EPIC4 # Copyright (c) 2005 Brian Weiss # See the 'COPYRIGHT' file for more information. # # This script uses serial number 704 for all /ON hooks. # queue cleanup.autojoin { ^alias -jchans; ^alias -joinchans; ^on #connect 704 -"*"; }; addconfig AUTO_JOIN_CHANNELS; addconfig -b AUTO_JOIN_NEW_WINDOW 0; addconfig -b AUTO_JOIN_ON_CONNECT 0; alias jchans (...) { joinchans $*; }; alias joinchans (void) { xecho -b Joining all your channels...; if (CONFIG.AUTO_JOIN_NEW_WINDOW) { @ :chanlist = CONFIG.AUTO_JOIN_CHANNELS; join $shift(chanlist); for chan in ($chanlist) { window new channel "$chan" hide; }; }{ for chan in ($CONFIG.AUTO_JOIN_CHANNELS) { join $chan; }; }; }; on #-connect 704 "*" { if (CONFIG.AUTO_JOIN_ON_CONNECT && @CONFIG.AUTO_JOIN_CHANNELS) { joinchans; }; };