mIRC Home    About    Download    Register    News    Help

Print Thread
If $nick Script don't work #260795 18/06/17 03:18 PM
Joined: Jun 2017
Posts: 9
M
Mike2Mike Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
M
Joined: Jun 2017
Posts: 9
Hi guys, i have a simple script, but this don't work. And i can't find the error. The script should timeout users from which the name begins with Mark (like Mark12345 or Mark15)

Code:
on *:TEXT:*sex*:#*: {
  if ($nick >= mark*) {
    msg $chan /timeout $nick 600
  }
}


The Script works but everyone who write sex will be timed out not just the Mark's

Any Idea?

Thanks

Mike

Re: If $nick Script don't work [Re: Mike2Mike] #260797 18/06/17 06:42 PM
Joined: Jan 2004
Posts: 1,281
maroon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,281
from the fact you're doing the timeout by doing a /msg $chan, I'm guessing this is a twitch server, which I'm not familiar with.

However your issue doesn't seem to be twitch related.

1. For the ON TEXT line, :#: is sufficient to enable this event for all channels.
2. Are you sure it does timeout for *ALL* users? Or just the ones whose nick begins with a letter from M-Z? If you really want to do this just for nicks beginning with 'mark', you should instead use:

if (mark* iswm $nick) {
stuff goes here
}

ISWM has it match the wildcard, while ">=" is checking to see if their nick would follow 'mark' in the dictionary.

Re: If $nick Script don't work [Re: maroon] #260799 18/06/17 07:55 PM
Joined: Jun 2017
Posts: 9
M
Mike2Mike Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
M
Joined: Jun 2017
Posts: 9
Thanks that works smile The old script deleted all names with M