Speed/script questions. - 06/12/07 10:33 AM
Is it always faster to call an alias in a remote?
Example.
Where.
2.And then, would you rather call in an alias, or use signals?
I read a tutorial on on signals and I don't see how that or calling in aliases are faster, as mIRC will have to perform them all anyways.
3.Also, for a flood script, which is faster.
On text or on ^:Text?
I noticed when there's flooding, my mIRC temporarily freezes and the Ctrl Breaks return my 2 major text events, 1's on text and the other is on ^ text.
My current flood-kicking script is on text, but I read a flood script which uses ^. It basically increases a variable for $nick.$chan.etc and ban kicks if the variable researches a number.
And then there really isn't much of a way to combine the 2, right?
4.Which is faster.
if (a) && (b) {
do this
}
if (c) && (d) {
do that
}
Basically for any event all if statements have to be called.
The above should be faster than..
if (a) && (b) && (!c) && (!d) {
I'm guessing there's a cutoff point, because you could go all the way to... if (y) && (z), right?
5.I was trying to help someone, but couldn't find the most efficient way.
An on mode event that reverses everything someone does.
Example: someone sets mode: +a-b
You set mode: -a+b
I have.
That just means +o-o becomes -o-o.
And using $replace($1-,-,+,+,-) just makes +o-o +o+o, etc.
So I used something like:
if (+ isin $1-) { /mode $chan $replace($1-,+,-) }
if (- isin $1-) { /mode $chan $replace($1-,-,+) }
Therefore.
Someone sets mode +abc-def
You sets mode -abc
You sets mode +def
Of course, this takes double lines, double flood. Anyone know a way to make it work in 1 line?
Thanks.
-Neal.
Example.
Code:
if (this) { /dothisalias } if (that) { /dothatalias }
Where.
Code:
alias dothisalias { is a bunch of if-elseif-else statements }
2.And then, would you rather call in an alias, or use signals?
I read a tutorial on on signals and I don't see how that or calling in aliases are faster, as mIRC will have to perform them all anyways.
3.Also, for a flood script, which is faster.
On text or on ^:Text?
I noticed when there's flooding, my mIRC temporarily freezes and the Ctrl Breaks return my 2 major text events, 1's on text and the other is on ^ text.
My current flood-kicking script is on text, but I read a flood script which uses ^. It basically increases a variable for $nick.$chan.etc and ban kicks if the variable researches a number.
And then there really isn't much of a way to combine the 2, right?
4.Which is faster.
if (a) && (b) {
do this
}
if (c) && (d) {
do that
}
Basically for any event all if statements have to be called.
The above should be faster than..
if (a) && (b) && (!c) && (!d) {
I'm guessing there's a cutoff point, because you could go all the way to... if (y) && (z), right?
5.I was trying to help someone, but couldn't find the most efficient way.
An on mode event that reverses everything someone does.
Example: someone sets mode: +a-b
You set mode: -a+b
I have.
Code:
on *:mode:#: { if ($nick == ) { /mode $chan $replace($1-,+,-,-,+) } }
That just means +o-o becomes -o-o.
And using $replace($1-,-,+,+,-) just makes +o-o +o+o, etc.
So I used something like:
if (+ isin $1-) { /mode $chan $replace($1-,+,-) }
if (- isin $1-) { /mode $chan $replace($1-,-,+) }
Therefore.
Someone sets mode +abc-def
You sets mode -abc
You sets mode +def
Of course, this takes double lines, double flood. Anyone know a way to make it work in 1 line?
Thanks.
-Neal.