mIRC Home    About    Download    Register    News    Help

Print Thread
#151794 22/06/06 01:57 AM
Joined: Jun 2006
Posts: 79
B
Babel fish
OP Offline
Babel fish
B
Joined: Jun 2006
Posts: 79
Code:
 
    if ($regex($3-,/[www.|#]/gS)) { .signal -n d $1 $2 advertise } 
 


Why when I type 'w' , 'ww' and 'www' it will kick.
$regex(string,[abc]) means a, b, c, and abc rite ? Anybody knows how to fix this codes like its suppose to be. One more ..

Code:
 
   if ($istok($strip($3-),[[censored]|suck],32)) { .signal -n d $1 $2 swear } 
 


Its doesnt detect anything. Thats all. Thanks

#151795 22/06/06 08:57 AM
Joined: Nov 2005
Posts: 24
K
Ameglian cow
Offline
Ameglian cow
K
Joined: Nov 2005
Posts: 24
1. if ($regex($3-,/(www)|#/S)) { .signal -n d $1 $2 advertise }
[abc] means a or b or c (abc) means abc

2. $istok($strip($3-),[[censored]|suck],32)) - you are searching for a space delimited token "[[censored]|suck]", if you want to search for "suck", for example - $istok($strip($3-),suck,32). And even more better - use regex here, too: $regex($strip($3-),/\b(censored)|(suck)\b/)

Good luck while scripting wink

#151796 22/06/06 11:28 PM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
i could be wrong but im pretty sure the forum censored that text

[censored]

^ test above

[i]yeah see i didnt say that i said some word thats sounds like luck

Last edited by DaveC; 22/06/06 11:29 PM.
#151797 23/06/06 09:52 AM
Joined: Jun 2006
Posts: 79
B
Babel fish
OP Offline
Babel fish
B
Joined: Jun 2006
Posts: 79
Thanks both of you.

#151798 26/06/06 09:40 AM
Joined: Jun 2006
Posts: 79
B
Babel fish
OP Offline
Babel fish
B
Joined: Jun 2006
Posts: 79
Code:
 
$regex($strip($3-),/\b(cute)|(suck)\b/)
 


It will detect
nick:cutexxx
nick:abc cutexxx abc
nick:abcsuck abc
nick:abcsuck

But what i need is it detect exactly "cute" , "suck" not abccuteabc or abcsuckabc. confused

nick:abc suck abc
nick:cute

Last edited by BanJirian; 26/06/06 09:41 AM.

Link Copied to Clipboard