on ^join * xecho -b $fparse(format_join $0 $2 $1)
on ^leave * xecho -b $fparse(format_leave $0 $2 $1 $3-)

on ^public * echo $fparse(format_public $Z $0 $1 $2-)
on ^public_other * echo $fparse(format_public_other $Z $0 $1 $2-)

on ^send_public * if ([$0] == C) {
    echo $fparse(format_send_public $Z $0 $N $1-)
}{
    echo $fparse(format_send_public_other $Z $N $0 $1-)
}

on ^msg * echo $fparse(format_msg $Z $0 $userhost() $1-)
on ^send_msg * echo $fparse(format_send_msg $Z $0 $userhost($0) $1-)
on ^notice * echo $fparse(format_notice $0 $userhost() $1-)
on ^send_notice * echo $fparse(format_send_notice $0 $1-)

on ^dcc_chat * echo $fparse(format_dcc_chat $Z $*)
on ^send_dcc_chat * echo $fparse(format_send_dcc_chat $Z $*)

on ^311 * {
    echo $fparse(format_whois_nick $1 $2 $3)
    echo $fparse(format_whois_name $5-)
}
on ^319 * echo $fparse(format_whois_channels $2-)
on ^312 * echo $fparse(format_whois_server $2 $3-)
on ^301 * echo $fparse(format_whois_away $0 $1-)
on ^313 * echo $fparse(format_whois_oper $1)
on ^317 * echo $fparse(format_whois_idle $2)
on ^318 * #

on ^314 * {
    echo $fparse(format_whowas_nick $1 $2 $3)
    echo $fparse(format_whowas_name $5-)
}
on ^369 * #
on ^310 * #

on ^channel_signoff * xecho -b $fparse(format_channel_signoff $1 $0 $2-)

/* Who written by Da5id (thanks) */
on ^who "* % % % % *" {
    echo $cparse(%c$[10]0%n $[9]1 $[3]2 %W$6%n${([$5]=~[*$after(. $S)*]) ? [%R$[14]after(1 . $5)%n] : [%c$[14]after(1 . $5)%n]} $[-10]3%W@%n$4)
}

