Not sure what your terminology means. Is 'stream' the same thing as 'chats'? And they both mean what real IRC calls "channels"? Or does one of them refer to having multiple mirc connections, and you're trying to get a script to respond to things typed from that same mirc?

And by 'doesnt work', does that mean it acts like it doesn't see the command, or it tries to do the command but fails?

So by 'stream' i mean a twitch channel. But anyways whenever i add a new filter to my bot for 1 channel it doesn't work but when i use it in another channel it works. It's like i have too much code for that one specific channel.

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

put a debugging echo at the top of your handler, to see whether it really "isn't working", or whether it's just not matching your if() statement.

Your timer is unsetting the variable you so carefully created. If you want to delete the token you just addtok'ened, you should use $!deltok in the timer to keep it from being evaluated at launch time. What you're actually doing is making %fd.warned go away completely after 120 seconds.

Ok everything works now for some reason. But i need help with something else, someone in a channel on Twitch the other night tried to spell the n word so how would i make it time out the user when they only put "N" in chat?

Welcome to the wonderful world of whack-a-mole. Where people get more creative in avoiding badword filters, and you end up banning someone who uses the word 'class' because it contains a bad word. And then your list of bad words grows and grows.

so this is to stop self promotion in my stream but when a moderator says "follow me" the automated message pops up and i dont want that happening. So how do I make this where when a moderator says it it doesnt have the message pop up?

If moderator means 'Op' then this should not be causing your problem, because the 1st command is checking if the $nick is an Op in $chan and exiting the event handler if they are an Op. Perhaps you have another :TEXT: event in another script doing stuff too?