mIRC Home    About    Download    Register    News    Help

Print Thread
Need Some help with script #191008 30/11/07 03:11 PM
Joined: Nov 2007
Posts: 5
G
GimSheng Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
G
Joined: Nov 2007
Posts: 5
How do i write a script that auto ignore the person that /notice me for more than one time?

Re: Need Some help with script [Re: GimSheng] #191011 30/11/07 04:00 PM
Joined: Nov 2007
Posts: 5
A
antisback Offline
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
A
Joined: Nov 2007
Posts: 5
Several ways, you can either use user levels or ini files.

For simplicity i'll show you user levels, if it conflicts at all, just say and i'll write up ini files

something like
Code:
on 1:NOTICE:*:*:{ /auser 2 $address }
on 2:NOTICE:*:*:{ /auser 3 $address }
on 3:NOTICE:*:*:{ /timer 1 60 /ruser $address | /ignore -u60 $address }



thats from memory so it's probably a bit wrong

Last edited by antisback; 30/11/07 04:01 PM.
Re: Need Some help with script [Re: GimSheng] #191018 30/11/07 06:00 PM
Joined: Jan 2007
Posts: 1,156
D
DJ_Sol Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
Quote:
on *:notice:*:#:{
if (%notice [ $+ [ $nick ] ] > 1) { halt }
set -u5 %notice [ $+ [ $nick ] ] $true
}



I personally don't like this as it will block wanted notices but thats what you asked for. I made it so it will only last for 5 seconds. -u5

Re: Need Some help with script [Re: DJ_Sol] #191095 02/12/07 09:43 AM
Joined: May 2007
Posts: 89
T
TropNul Offline
Babel fish
Offline
Babel fish
T
Joined: May 2007
Posts: 89
Code:
on *:notice:*:#:{
if (%notice [ $+ [ $nick ] ] > 1) { halt }
set -u5 %notice [ $+ [ $nick ] ] $true
}


This won't work. You never increment the variable and then
verify if it's greater than 1.
Also, the '#' will make the event listen only to channel notices.

This would be better imo.

Code:
On *:Notice:*:*:{
  HInc -mu60 NotIgn $nick 1
  If ($hget(NotIgn,$nick) > 1) {
    HDel NotIgn $nick
    Ignore $nick
  }
}


Regards


tropnul
Re: Need Some help with script [Re: TropNul] #191097 02/12/07 11:07 AM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Originally Posted By: TropNul
Code:
on *:notice:*:#:{
if (%notice [ $+ [ $nick ] ] > 1) { halt }
set -u5 %notice [ $+ [ $nick ] ] $true
}


This won't work. You never increment the variable and then
verify if it's greater than 1.
Also, the '#' will make the event listen only to channel notices.


Other than the #, yes it will work. For that matter, with the #, it will still work if the notices are being sent to the channel instead of your nick. The IF only halts if the variable is set, though I'd drop the >1 check as it's not needed here. When it isn't set, it will set it for 5 seconds and NOT halt. That's what you want to have happen.

For a slightly modified version...

Code:
on *:notice:*:*:{
  if ($+(%,notice,$nick)) { halt }
  set -u5 %notice $+ $nick $true
}


Invision Support
#Invision on irc.irchighway.net