Help with link/caps spam!

Hi, im new to the forums so i dont really know where this is supposed to go so can soemone please move it if im wrong :slight_smile:
Im developing a bot and theres 1 part of it i cannot work out how to do in Mirc and that is the link/caps spam. if anyone could send me the code on how to do this then that would be amazing.


TutorGuy (TutorCast)
TutorBot Creator

What do you mean by link/caps spam?

so that people cant post links in my chat but mods and me can do !permit so that they wont get timed out!

If you want to do something like this in mIRC then you should learn to use regular expressions. A good resource for starting on that is

1 Like

moocat can you show me how you would do it? because im really confused on how to:/

Alright, for example to detect caps you would count the uppercase letters. To do that with a regular expression in mIRC:

var %uppercase = $regex($1-, /[A-Z]/g)

This would return the number of occurrences of A to Z in the message $1-.
Then you’d determine if it should be classified as caps by comparing it to the length of the whole message (percentage.)

Detecting links is a different beast, and you’ll have to learn the basics of regular expressions to understand that.