mIRC Home    About    Download    Register    News    Help

Print Thread
#144737 14/03/06 01:53 AM
Joined: Feb 2006
Posts: 307
N
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Feb 2006
Posts: 307
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!

Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
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.

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
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.

Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
I read it as two events, but maybe both in the same event is what they wanted.

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
If you're right, then they have yours to work with, if not then they have mine.

Joined: Feb 2006
Posts: 307
N
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Feb 2006
Posts: 307
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)

Joined: Mar 2005
Posts: 420
X
Fjord artisan
Offline
Fjord artisan
X
Joined: Mar 2005
Posts: 420
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.

If you have a plastic floor runner over your tiles, then you're one Hella Pinoy!
Joined: Feb 2006
Posts: 307
N
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Feb 2006
Posts: 307
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?

Joined: Mar 2005
Posts: 420
X
Fjord artisan
Offline
Fjord artisan
X
Joined: Mar 2005
Posts: 420
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


If you have a plastic floor runner over your tiles, then you're one Hella Pinoy!

Link Copied to Clipboard