mIRC Home    About    Download    Register    News    Help

Print Thread
B
Bespin74
Bespin74
B
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?

A
alkahol1k
alkahol1k
A
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,321
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,321
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.

B
Bespin74
Bespin74
B
Thanks for these two remote scripts, I wil try them!

Joined: Nov 2003
Posts: 2,321
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,321
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 }
  }
}


Link Copied to Clipboard