about the mode commands use this:
if ($1 == !mode) /mode $chan $$2 $3-
than you can use !mode +t ore something. or !mode +k key better than use for al mode another Command.