I believe you only need one command for !ident:
on *:input:#:{ if ($1 == !ident) { if ($me isop #) { mode # -o $me return } services identify # PASSWORD } }
No need to supply the cmd char.