mIRC Home    About    Download    Register    News    Help

Print Thread
Need help for a script #216203 01/11/09 03:55 PM
Joined: Nov 2009
Posts: 1
P
Professeur Offline OP
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)

Re: Need help for a script [Re: Professeur] #216204 01/11/09 04:50 PM
Joined: Jul 2007
Posts: 1,129
T
Tomao Offline
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)

Re: Need help for a script [Re: Professeur] #216205 01/11/09 04:52 PM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
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.

Re: Need help for a script [Re: RusselB] #216225 03/11/09 02:11 PM
Joined: Feb 2009
Posts: 133
C
chacha Offline
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
Re: Need help for a script [Re: chacha] #216229 03/11/09 05:00 PM
Joined: Jul 2007
Posts: 1,129
T
Tomao Offline
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...

Re: Need help for a script [Re: Tomao] #216230 03/11/09 05:14 PM
Joined: Jan 2007
Posts: 1,156
D
DJ_Sol Offline
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.

Re: Need help for a script [Re: DJ_Sol] #216231 03/11/09 05:23 PM
Joined: Jun 2007
Posts: 933
5
5618 Offline
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.

Re: Need help for a script [Re: Professeur] #216554 19/11/09 02:23 AM
Joined: Nov 2009
Posts: 117
gooshie Offline
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 }