Mate, u need to Close ur brackets..
it'd be something like this
on *:input:*:{
If ($1 == +a) { cs protect $chan $2 }
If ($1 == -a) { cs deprotect $chan $2 }
If ($1 == -m) { mode $chan -m }
If ($1 == +q) { cs owner $chan }
If ($1 == -q) { cs deowner $chan }
}
If that dont work, then use the ELSE statement, but always use ur brackets and close them..
He doesn't need the brackets if it's only one line.
The closing bracket for the ON INPUT needs to be closed.