mIRC Home    About    Download    Register    News    Help

Print Thread
#43826 24/08/03 02:19 AM
Joined: Mar 2003
Posts: 8
T
Techwid Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
T
Joined: Mar 2003
Posts: 8
I'm making a highlighter script that echo's to my status window when a certain word was said, what channel, by who, and the text it was said in. I'm doing this so that I can see if people are talking about/to me in certain channels. I have it set up fine, the only problem is if i wanted it to match my name 'Ben' but someone says 'beneath' it still matches it. I searched the forums on whole word matching and came up with some word boundary commands (\b) but I didn't do them in the right context or just don't get them. Anyways here is the script:

Code:
on *:text:*ben*:*: {
  echo -st 4,1Ben 15was said in4 $chan $+ 15, by4 $nick $+ 15, the text was:4 $$1-
}


Also is it possible to flash and change the colors of these words like the highlight feature does? (only reason I don't use the highlight feature is it doesn't let me choose specific channels)

Thanks

#43827 24/08/03 03:15 AM
Joined: Aug 2003
Posts: 136
Vogon poet
Offline
Vogon poet
Joined: Aug 2003
Posts: 136
Quote:
$$1-

Im not sure about the rest but that command is used for popups youd want $1-

Last edited by MrPeepers; 24/08/03 03:16 AM.

In Virginia, chickens cannot lay eggs before 8:00 a.m., and must be done before 4:00 p.m.
#43828 24/08/03 03:17 AM
Joined: Mar 2003
Posts: 8
T
Techwid Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
T
Joined: Mar 2003
Posts: 8
Well the $$1- just checks to make sure the text is there before executing the line instead of just outputting null. Thanks though

#43829 24/08/03 03:32 AM
Joined: Aug 2003
Posts: 136
Vogon poet
Offline
Vogon poet
Joined: Aug 2003
Posts: 136
take a look at /help $ifmatch


In Virginia, chickens cannot lay eggs before 8:00 a.m., and must be done before 4:00 p.m.
#43830 24/08/03 06:18 AM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
There is nothing wrong with his use of $$1-, apart from the fact that when on TEXT is triggered $1 is never empty.

Techwid:
This script should do when you want.
Code:
on ^*:TEXT:*:#:{
  if ( $istok($1-,ben,32) ) {
    echo -st 4,1Ben 15was said in4 $chan $+ 15, by4 $nick $+ 15, the text was:4 $1-
    echo 4 -mbflirt # < $+ $nick $+ > $1-
    flash
    haltdef
  }
}


Link Copied to Clipboard