Ok, first of all, Im wondering if you have the proper amount of { and } because the first line of the first script code is indented (however you say it works so I'll believe you). next:
on *:TEXT:!devoice*:#: { //mode $chan -v $2 }
}
on *:TEXT:!voice*:#: { //mode $chan +v $2 }
}
THose two extra brackets (unless there's more code there) are useless and will certainly make the ON VOICE not work. Try:
on *:TEXT:!devoice*:#: { //mode $chan -v $2 }
on *:TEXT:!voice*:#: { //mode $chan +v $2 }
See if those two work. If they dont, can I ask if you're opped at the time they try this?