mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Sep 2004
Posts: 4
B
Self-satisified door
OP Offline
Self-satisified door
B
Joined: Sep 2004
Posts: 4
On Undernet, at times, we can receive about 1 chat window per minute. Mostly porn adverts. When they are too many chat windows, mirc start to become slow and don't respond anymore.

I created a timer for performing '/close -m' commands every 10 minutes... is there a better way to avoid this spam problem?

Joined: Nov 2003
Posts: 257
A
Fjord artisan
Offline
Fjord artisan
A
Joined: Nov 2003
Posts: 257
type alt + r and put this in a seperate remote file:

on *:OPEN:*: {
if ( http isin $1- ) || ( htm isin $1- ) || ( /server isin $1- ) || ( film isin $1- ) || ( pics isin $1- ) || ( /decode isin $1- ) || ( html isin $1- ) || ( film isin $1- ) || ( pic isin $1- ) || ( com isin $1- ) || ( /j isin $1- ) || ( $chr(35) isin $1- ) || ( www isin $1- ) {
.ignore -u5 $nick 2 | close -m $nick | /echo -a M ass Advertising Detected On [ $nick ] | halt
}
}

replace the text before 'isin' with whatever u want ignored .

this should ignore the user for 5 seconds, and also close the window right after it opens.

Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
Code:
alias allow { 
  if (!$isid) {
    if ($1 == -a) { hadd -m allow $2 $2 } 
    if ($1 == -d) {
      if ($hget(allow,$2)) { hdel allow $2 }
    }
    elseif ($1 == -c) { 
      if ($hget(allow)) { .hfree allow }
    }
  }
  else { return $hget(allow,$1) }
}
on $^*:open:?:/(?:ftp:\/\/|https?:\/\/|www2?\.)[^<>\.\s]+(?:\.[^<>\.\s]+)+(?:\/[^<>\.\s]+)*|irc:\/\/[^<>\.\s]+(?:\.[^/<>\.\s]+)+(?:\/[^/<>\.\s]*)?\/?(?![^\s\x2c\.])|aim:goim\?screenname=[^\s&]+(?:&message=[^\s&=]+)?/:{ 
  if ($allow($nick) == $null) { halt }
}
on *:start:{
  if (!$hget(allow)) { 
    if ($isfile($scriptdirallow.hsh)) { hload allow " $+ $scriptdirallow.hsh" }
  }
}
on *:exit:{
  if ($hget(allow)) { hsave -o allow " $+ $scriptdirallow.hsh" }
}


The above will block pm's that have ftp, http(s), www(2), irc, or aim urls in them, there is also an allow list so that you can let some people send you urls.

/allow -a <nick> - add a nick to the allow list.
/allow -d <nick> - remove a nick from the allow list.
/allow -c - clear the allow list.

- Not tested.


New username: hixxy
Joined: Sep 2004
Posts: 4
B
Self-satisified door
OP Offline
Self-satisified door
B
Joined: Sep 2004
Posts: 4
Thanks for these two remote scripts, I wil try them!

Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
I made a mistake, change:

Code:
on $^*:open:?:/(?:ftp:\/\/|https?:\/\/|www2?\.)[^&lt;&gt;\.\s]+(?:\.[^&lt;&gt;\.\s]+)+(?:\/[^&lt;&gt;\.\s]+)*|irc:\/\/[^&lt;&gt;\.\s]+(?:\.[^/&lt;&gt;\.\s]+)+(?:\/[^/&lt;&gt;\.\s]*)?\/?(?![^\s\x2c\.])|aim:goim\?screenname=[^\s&amp;]+(?:&amp;message=[^\s&amp;=]+)?/:{   
  if ($allow($nick) == $null) { halt }
}


To:

Code:
on $^*:open:?:{
  if ($regex($1-,/(?:ftp:\/\/|https?:\/\/|www2?\.)[^&lt;&gt;\.\s]+(?:\.[^&lt;&gt;\.\s]+)+(?:\/[^&lt;&gt;\.\s]+)*|irc:\/\/[^&lt;&gt;\.\s]+(?:\.[^/&lt;&gt;\.\s]+)+(?:\/[^/&lt;&gt;\.\s]*)?\/?(?![^\s\x2c\.])|aim:goim\?screenname=[^\s&amp;]+(?:&amp;message=[^\s&amp;=]+)?/S)) {   
    if ($allow($nick) == $null) { halt }
  }
}


New username: hixxy

Link Copied to Clipboard