mIRC Home    About    Download    Register    News    Help

Print Thread
#200970 15/06/08 09:39 PM
Joined: Aug 2007
Posts: 7
B
brent0n Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
B
Joined: Aug 2007
Posts: 7
i'm having a bit of trouble finding a script that will do what i need it to. i need to give a user +q status if they repeat the same line 2 times in one second, and then remove it after a minute. only in one specific channel, and it doesn't need to require that i'm opped, because i'm a server admin.

Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
Code:
on 1:OWNER:#<Channel name>: { 
  hadd -m Deop $opnick $chan
  $+(.timer,$opnick) 1 60 mode $chan -q $hget(Deop,$opnick).item
  .timerq 1 70 hfree Deop
}
on 1:TEXT:*:#<channel name>: {
  var %q = $+(Rep,$site,.,$chan,.,$cid)
  hinc -m Repeat %q
  if ($hget(Repeat,%q) >= 2) {
    mode $chan +q $nick
    hfree Repeat
  }
}

Joined: Aug 2006
Posts: 44
D
Ameglian cow
Offline
Ameglian cow
D
Joined: Aug 2006
Posts: 44
why in the world would you do such a thing?

Joined: Aug 2006
Posts: 183
T
Vogon poet
Offline
Vogon poet
T
Joined: Aug 2006
Posts: 183
I assume to stop bots from spamming channels.


Yar
Tomao #201030 17/06/08 10:03 AM
Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
Well, I didn't know what kind of network this admin is using, so I assume it was for the owner status...but I was apparently wrong about that. I think the second part should work somewhat... crazy And I also think the op can modify it to suit his needs.

Joined: Aug 2006
Posts: 44
D
Ameglian cow
Offline
Ameglian cow
D
Joined: Aug 2006
Posts: 44
see the thing is he wants to give owner status to spammers - which is kinda lame to give owner status to a spammer, would be better off +b and kick them out.

Joined: Aug 2007
Posts: 7
B
brent0n Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
B
Joined: Aug 2007
Posts: 7
ahh, i am on a chatspace server. +q is quiet status. that original script doesn't really work. it mutes anyone who speaks two times. doesn't matter how long they wait between lines, and it doesn't unmute them either. which is just -q. hmm, any other takers? haha.

Last edited by brent0n; 20/06/08 10:20 PM.
Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
This one below should work a lot better, but I can't think of any other way to -q someone after 1 minute. This may or may not work for you. Give it a try.

Code:
on *:TEXT:*:#: {
  if ($nick !isop #) {
    if ( [ %repeat.001. [ $+ [ $site ] ] ] ==  $strip($1-)) {
      inc %repeat.002. $+ $site 1
      .timer 1 10 dec -u15 %repeat.002. $+ $site 1
      if ( [ %repeat.002. [ $+ [ $site ] ] ] == 1) {
        mode $chan +q $nick | set -u65 %spam $nick
        timer 1 60 mode $chan -q %spam
      }
    }
    set -u20 %repeat.001. $+ $site $strip($1-)
  }
}


Link Copied to Clipboard