@ _sets = [auto_cycle auto_join_on_invite autoop_operators dcc_autoget dcc_log dcc_logfile default_channel_modes default_encode_pass email encode_passwords encryption keepnick keepnick_nick mirc_color_kick nick_comp nick_comp_character pager startup_ansi user_chans whois_convert_host]

@ lit_sets = [auto_join_on_invite dcc_logfile default_channel_modes default_encode_pass email encode_passwords keepnick_nick nick_comp_character user_chans]

@ _fsets = [format_channel_signoff format_dcc_chat format_join format_leave format_msg format_notice format_public format_public_other format_send_dcc_chat format_send_msg format_send_notice format_send_public format_send_public_other format_set format_set_novalue format_whois_away format_whois_channels format_whois_idle format_whois_name format_whois_nick format_whois_oper format_whois_server format_whowas_name format_whowas_nick]

^do set continued_line $repeat(6  )
alias reload {dump all;^load .ircrc}
alias ver if ([$0]) {ctcp $0 version}
alias partall fe ($mychannels()) ch1 {part $ch1}
alias l part ${[$0] ? [$0] : C}
alias cycle {^local p.x ${[$0] ? [$0] : C};part $p.x;wait;join $p.x}
alias op _mode + o $*
alias deop _mode - o $*
alias vox _mode + v $*
alias devox _mode - v $*
alias _mode {
    fe ($2-) i1 i2 i3 i4 {
	mode $C $0 $repeat(4 $1) $i1 $i2 $i3 $i4
    }
}
alias voice vox
alias dvoice devox
alias mop fe ($remw($N $nochops())) n1 n2 n3 n4 {mode $C +oooo $n1 $n2 $n3 $n4}
alias mdop fe ($remw($N $chops())) o1 o2 o3 o4 {mode $C -oooo $o1 $o2 $o3 $o4}
alias umode mode $N $0-
alias wi whois
alias ww whowas
alias q query
alias disco disconnect
alias sv msg ${[$0] ? [$0] : C} ircII $J $uname() - $client_information
alias c mode $C $0

alias chat dcc chat ${[$0] ? [$0] : p.dcc_nick}
alias nochat dcc close chat ${[$0] ? [$0] : p.dcc_nick}
alias dcx nochat

/* functions by nutbar */
alias fparse {
    do return $cparse($($0))
}
alias ischan {
    @ function_return = [$0] =~ [\\[# &\\]*] ? 1 : 0
}
alias isnum {
    ^local erp
    @ erp = strip(1234567890- $0)
    @ function_return = erp ? 0 : 1
}
/* end nutbar section */

on -329 * {
    if (default_channel_modes && ischanop($N $1)) {
	mode $1 $default_channel_modes
    }
    @ p.channel_sync = []
}
on -ctcp "% % page *" {
    if (pager) {
	^stack push set BEEP
	^set BEEP ON
	beep;^timer 1 beep;^timer 2 beep;^timer 3 ^stack pop set BEEP
	if ([$3]) {
	    pecho $0 $fix.c1($userhost()) paged you: $stripmirc($stripansicodes($3-))
	}{
	    pecho $0 $fix.c1($userhost()) paged you
	}
    }
}
on #-dcc_request 439 "% SEND *" if (dcc_autoget) {
    if (fexist($5) == 1) {
	xecho -b [$5] exists.. renaming to [_$5]
	dcc rename $0 $5 _$5
    }{
	dcc get $0
    }
}

on #-dcc_request 439 "% CHAT *" @ p.dcc_nick = [$0]

