@ _sets = [auto_cycle auto_join_on_invite autoop_operators auto_response_beep away_usermodes back_usermodes dcc_log dcc_logfile default_away_reason default_back_reason default_channel_modes default_encode_pass email encode_passwords encryption extra_away_logging keepnick keepnick_nick mirc_color_kick nick_comp nick_comp_character pager startup_ansi topicbar topicbar_type user_chans]

@ lit_sets = [auto_join_on_invite away_usermodes back_usermodes dcc_logfile default_away_reason default_back_reason default_channel_modes default_encode_pass email encode_passwords keepnick_nick nick_comp_character topicbar_type user_chans]

^set CDCC_PROMPT %K[%bcdcc%K]%n
^wset * STATUS_FORMAT3 %| %> %&
^bind ^O SELF_INSERT
_ncomp
_topicbar

# to get uptime ---> $tdiff2(${time() - F})

alias cdccstats {
    eval echo $statsparse(%&)
    eval echo $statsparse(%|)
}
alias reload {unload;^load .bitchxrc}
alias cs cdccstats
alias ut untopic
alias topicbar tbar
alias tbar if ([$0]) {
    switch ($0) {
	(1) {
	    @ topicbar_type = [$0]
	    ^wset * STATUS_FORMAT3 %-
	}
	(2) {
	    @ topicbar_type = [$0]
	    ^wset * STATUS_FORMAT3 %| %> %&
	}
	(*) {pecho Invalid selection;pecho Usage: /topicbar <1-2>}
    }
    pecho Now using topic bar $fix.c1($topicbar_type)
}{pecho Currently using topic bar $fix.c1($topicbar_type);pecho Usage: /topicbar <1-2>}

alias country if ([$0]) {
    pecho Domain $(hblk)[$(hwht)$0$(hblk)]$(cl) is $(hblk)[$(hwht)$country($0)$(hblk)]$(cl)
}

on -public_ar * {_ar_beep}
on -public_other_ar * {_ar_beep}
on ^ctcp "% % page *" {
    echo $fparse(format_ctcp $Z $0 $userhost() $1-)
    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 #-channel_sync 981 * {
    if (default_channel_modes && !M && ischanop($N $0)) {
	mode $0 $default_channel_modes
    }
    @ p.channel_sync = []
}
on -window_create * if (topicbar) {
    ^wset * STATUS_FORMAT3 $STATUS_FORMAT3
    ^window split on
}

alias _ar_beep {
    if (auto_response_beep) {
	^stack push set BEEP
	^set BEEP ON
	beep
	^stack pop set BEEP
    }
}
alias _topicbar if (topicbar) {
    switch ($topicbar_type) {
	(1) {
	    ^wset * STATUS_FORMAT3 %-
	}
	(2) {
	    ^wset * STATUS_FORMAT3 %| %> %&
	}
    }
    ^window split on
}{^window split off}

