on ^hook "update %" switch ($tolower($1)) {
    (dcc_log) {
	if (dcc_log) {
	    @ :open_dcc_logfile = open($dcc_logfile W T)
	    @ write($open_dcc_logfile DCC Log started [$stime($time())])
	    @ close($open_dcc_logfile)
	}{
	    @ :open_dcc_logfile = open($dcc_logfile W T)
	    @ write($open_dcc_logfile DCC Log ended [$stime($time())])
	    @ close($open_dcc_logfile)
	}
    }
    (nick_comp) {
	if (nick_comp) {
	    ^stack push set nick_completion
	    ^set nick_completion off
	}{
	    ^stack pop set nick_completion
	}
    }
    (whois_convert_host) {
	if (whois_convert_host) {
	    ^assign FORMAT_WHOIS_NICK %c[**] %n\$1 %c\\(%n$2@$3%c)%n %c[%n\$convert($3)%c]%n
	    ^assign FORMAT_WHOWAS_NICK %c[**] %n\$1 was %c\\(%n$2@$3%c)%n %c[%n\$convert($3)%c]%n
	}{
	    ^assign FORMAT_WHOIS_NICK %c[**] %n\$1 %c\\(%n$2@$3%c)%n
	    ^assign FORMAT_WHOWAS_NICK %c[**] %n\$1 was %c\\(%n$2@$3%c)%n
	}
    }
}

