Ah, now you're describing your problem differently. Though I've never tested it, the limit for script size is 1 meg. Before it sounded like a :TEXT: handler that worked in some situations but not others. Now it sounds like you're trying to put 2 :TEXT: handlers in the same script where both are matching the same text but in different channels.
When not using the ^ prefix, which you don't want to do here, you can have multiple :TEXT: handlers, but anything that matches the matchtext:location of a handler won't get handled by :SAMEEVENT: below it. You can have a matchtext for !command1 in one handler and for !command2 in a different handler, because they don't compete with each other.
You need to either place the handlers in separate scriptfiles per channel, or change
on *:TEXT:matchwildtext:#channel1:{ code }
into
on *:TEXT:matchwildtext:#channel1,#channel2:{ code for both }
or
on *:TEXT:matchwildtext:#channel1,#channel2:{
code shared by both channels
if ($chan == #channel1) {
code for #channel1
}
if ($chan == #channel2) {
code for #channel2
return
}
:end
code shared by both channels
}
You could also do the same kind of thing to have several !commands share the same event handler.
if ($1 == !command1) { code }
if ($1 == !command2) { code }
If you have matchtext :*: below :!command1: then the below handles everything that didn't get intercepted by one of the earlier handlers.