mIRC Home    About    Download    Register    News    Help

Print Thread
#144737 14/03/06 01:53 AM
N
nataliad
nataliad
N
hello!

I have an idea, can anyone help me implement it

I wont to block any query that a person msgs me and contains the word *http://* and *sex*

the person will be msged with 'you have been blocked, if you want to speak to me try not to paste me urls'

thanks!

M
MikeChat
MikeChat
M
Don't know if it will block a virus, but should stop you from seeing as many spam messages:
Code:
on *:text:*:?:{
  if (http isin $1-) { close -cfims $nick | msg $nick your msgs are blocked due to your posting a URL to me }
  if (sex isin $1-) { close -cfims $nick | msg $nick your msgs are blocked due to your posting a URL to me }
  .ignore -u15pntid $nick 
}


Note: I didn't have a chance to test this.

R
RusselB
RusselB
R
Since you want to check for both http & sex (per the original request)
Code:
on *:text:*:?:{
  if (http isin $1-) && (sex isin $1-) { close -cfims $nick | msg $nick your msgs are blocked due to your posting a URL to me
 .ignore -u15pntid $nick
 }
  

that way if someone pm's you with Hi sexy, they won't get the response or be ignored.

M
MikeChat
MikeChat
M
I read it as two events, but maybe both in the same event is what they wanted.

R
RusselB
RusselB
R
If you're right, then they have yours to work with, if not then they have mine.

N
nataliad
nataliad
N
thank you for your replies

although I didnt realised whats the difference between those 2 scripts, I would like to ask

this will work ONLY for those who private msg me for first time? I dont want it to work for already opened queries
It should be ok if a person with which I chat in private pastes me an url (in an already opened query)

X
xDaeMoN
xDaeMoN
X
To have it work only for first time queries, an On OPen event should be used. Here's a modification of Russelb's code:

Code:
 on ^*:OPEN:?:*: {
  tokenize 32 $strip($$1-)
  if (http isin $1-) || (sex isin $1-) || (word isin $1-) { 
    .msg $nick your msgs are blocked due to your posting a URL to me
    .ignore -u15pntid $nick
    halt
  }
}  

Last edited by xDaeMoN; 15/03/06 09:48 PM.
N
nataliad
nataliad
N
thanks!

1.
can I block (besides msgs with http) msgs that contain clolours as well? (since many spammers use colours)?

2.
also I guess I can add other words to determine unwanted pop ups, by adding

Code:
 && (word isin $1-) 


right?

but what if I want to block *word, *word* or word* ?

or a phrase containing word1 AND word2?

X
xDaeMoN
xDaeMoN
X
See the above updated code. It would strip now the colors from the incomming query so it could check the words. Also I changed '&&' to '||' which means 'or'.

You could also add a phrase using a wildcard & iswm like '( *word*next*word* iswm $1- )'

The script would catch the line "that word in the line is next to that word..."

For more info, see
/help isin
/help iswm


Link Copied to Clipboard