You are right that the if statement is not needed, but you are wrong that messages not containing a o will not be sent - the /halt is done only is there is a o in the text, and it is to stop 2 messages being sent (1 message with the replaced text, 1 without) - the /halt will not be done for messages without a so those messages will be sent as normal.
In your script there are 2 problems:
1. All of your messages will be sent twice - once with the "o"s replaced, once without.
2. This code:
on *:input:
*:{ msg
$chanWill not work in a query, because $chan will be $null - that is why I used $active.
Both of our scripts have 1 flaw though - /commands are filtered too - they shouldn't be.
on *:input:*:{
if ( $left($1,1) != / ) {
msg $active $replace($1-,o,0)
halt
}
}