mIRC Home    About    Download    Register    News    Help

Print Thread
#216203 01/11/09 03:55 PM
Joined: Nov 2009
Posts: 1
P
Mostly harmless
OP Offline
Mostly harmless
P
Joined: Nov 2009
Posts: 1
Hi,

I would like to know how can I do a mIRC script who do than at the third message, you're automatically devoiced (everybody is voice at start)

Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
I don't understand what you mean by
Quote:
how can I do a mIRC script who do than at the third message, you're automatically devoiced (everybody is voice at start)

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Do you mean that you want a person to be de-voiced after they have made three messages?
If so try
Code:
on @*:text:*:#:{
  inc $+(%,$nick)
  if $($+(%,$nick),2) == 3 {
    .mode $chan -v $nick
  }
}


If not, please clarify what you mean, as your English is difficult to understand.

Joined: Feb 2009
Posts: 133
C
Vogon poet
Offline
Vogon poet
C
Joined: Feb 2009
Posts: 133
have to unset the %var when he devoice the user so

Code:
on @*:text:*:#:{
  if $(,$+(%,$nick)) >= 2 {
    unset % $+ $nick
    mode # -v $nick
  }
  else inc % $+ $nick
}


WorldDMT
Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
Not necessarily have to unset it. You can use
Code:
inc -e $+(%,$nick)
To have it unset when mirc exists. Not unless, of course, the op hardly ever closes his or her mirc...the variables will eat up the space...

Joined: Jan 2007
Posts: 1,156
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
-e is nice for constantly used variables that may not get unset. I think it's a good rule to remove any data you created that you do not need.

With this script I would want to unset the variable. I don't see any reason to have the variable there unless you wanted to give them a voice automatically later on.

Also, I think it is a good idea to name your variables. At the very least, it makes it easy to find them with a script.

Joined: Jun 2007
Posts: 933
5
Hoopy frood
Offline
Hoopy frood
5
Joined: Jun 2007
Posts: 933
Originally Posted By: DJ_Sol
Also, I think it is a good idea to name your variables. At the very least, it makes it easy to find them with a script.

That is always wise, especially in this case. If you use an add-on script (or even just your own scripts) of which people know variable names then they can mess with them with the above-mentioned script by changing their nick to said variable name.

Joined: Nov 2009
Posts: 117
Vogon poet
Offline
Vogon poet
Joined: Nov 2009
Posts: 117
Code:
on @*:text:*:#:var %h $cid $+ # | hinc -m %h $nick | if $hget(%h,$nick) = 3 { hdel %h $nick | mode # -v $nick }


Link Copied to Clipboard