This question should actually be posted in the scripting section, but here is a code that might work you:
on *:TEXT:!tbs*:#:{
if ($nick !isop $chan) { notice $nick This command is only available for channel operators. | halt }
else {
if (!$2) { notice $nick Invalid syntax, usage: !Tbs nick seconds reason | halt }
elseif (!$3) { notice $nick Invalid syntax, usage: !Tbs nick seconds reason | halt }
elseif (!$4) { notice $nick Invalid syntax, usage: !Tbs nick seconds reason | halt }
else { ban -ku $+ $3 $chan $2 $4- }
}
}
Just put that in the bots remote file (ALT + R).
It will only do the ban when someone is OPPED. I couldnt get the half-op thing to work since my network doesn't support that, but it should be easy to fix I reckon.
Try /help if-then-else