mIRC Home    About    Download    Register    News    Help

Print Thread
#259467 02/12/16 06:45 PM
Joined: Nov 2013
Posts: 49
L
Ameglian cow
OP Offline
Ameglian cow
L
Joined: Nov 2013
Posts: 49
How do you allow for:
!youtube - to trigger alone
!youtubelolol - not to trigger, but still let
!youtube This is my youtube! - trigger?

on *:TEXT:!youtube*:#: {
on *:TEXT:!youtube *:#: {

----

And how do I define the difference between
!announce1
!announce2
!announce3
without being able to do $2 (not separate word) and having
on *:TEXT:!announce*:#: { triggering on everything that starts with announce.

Cheers!
Cheers!

Last edited by lindenkron; 02/12/16 06:49 PM.
Joined: Jul 2006
Posts: 4,149
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,149
You can't do it with just wildcard, you either can use regex, or you have to use an if statement with either using * to match anything or you can start with !youtube* and then check that $1 is youtube, and if $2 is non $null etc


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Nov 2013
Posts: 49
L
Ameglian cow
OP Offline
Ameglian cow
L
Joined: Nov 2013
Posts: 49
Originally Posted By: Wims
You can't do it with just wildcard, you either can use regex, or you have to use an if statement with either using * to match anything or you can start with !youtube* and then check that $1 is youtube, and if $2 is non $null etc


Yeah regex really complicated though. Figured that was probably where it was headed. Feels like a whole language in itself frown

Last edited by lindenkron; 02/12/16 07:03 PM.
Joined: Jul 2006
Posts: 4,149
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,149
It really is a whole new language, and it is not so easy. But once you know it pretty well, it's time saving.
If you want to play around with them, I recommend www.regex101.com, the best website out there.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel

Link Copied to Clipboard