|
Joined: Jan 2004
Posts: 509
Fjord artisan
|
OP
Fjord artisan
Joined: Jan 2004
Posts: 509 |
on *:op:#: {
if ((($opnick == $me) && ($nick != $me) && ($nick != ChanServ))) {
/echo -s You have been 12opped by $nick in $chan at $asctime(h:nn:ss) $+ .
}
}
Works just fine, but when I have..
on *:op:#: {
if ($opnick == me) {
/echo $chan hi
}
} (Used ChanServ to op me). That doesn't trigger, not even the echo.. The 2nd code, I added before the 1st code (if statement only in the same on op event). But the echo won't trigger even though it is first.
|
|
|
|
Joined: Dec 2002
Posts: 2,962
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,962 |
on *:op:#: { if ($opnick == $me) { /echo $chan hi } }
Spelling mistakes, grammatical errors, and stupid comments are intentional.
|
|
|
|
Joined: Jun 2007
Posts: 15
Pikka bird
|
Pikka bird
Joined: Jun 2007
Posts: 15 |
|
|
|
|
Joined: Jan 2004
Posts: 509
Fjord artisan
|
OP
Fjord artisan
Joined: Jan 2004
Posts: 509 |
Okay thank you!
on *:op:#: {
if (($opnick == $me) && ($nick != $me)) {
/echo $chan hi
var %i = 1
while (%i < 20) {
So when ChanServ ops me, my mIRC freezes. I Ctrl Break, and the line halted was the while line... Did it several times. I don't know why mIRC freezes.
|
|
|
|
Joined: Dec 2002
Posts: 2,033
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,033 |
What is the loop for and did you inc %i inside the loop?
|
|
|
|
Joined: Jan 2004
Posts: 509
Fjord artisan
|
OP
Fjord artisan
Joined: Jan 2004
Posts: 509 |
Okay.. I debugged.
I added an echo $chan %i after the var %i = 1 and the while.
1 1 1 1 1
No wonder it stops, mIRC floods infinitely..
I did have the inc... Sometime after...
|
|
|
|
Joined: Jan 2004
Posts: 509
Fjord artisan
|
OP
Fjord artisan
Joined: Jan 2004
Posts: 509 |
What is the loop for and did you inc %i inside the loop? So far I got..
on *:op:#: {
if (($opnick == $me) && ($nick != $me)) {
/echo $chan hi
var %i = 1
echo $chan %i
while (%i < 20) {
echo $chan %i
if ($address($me,%i) isban $chan) {
/mode $chan -bbbb $v1 $v1
inc %i
}
}
}
<Other stuff>
}
|
|
|
|
Joined: Dec 2002
Posts: 2,033
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,033 |
You're trying to remove any channel bans that match your address when you're opped by someone other than yourself? on *:OP:#: {
if (($opnick == $me) && ($nick != $me)) {
var %i = 1,%bans
while ($ibl(#,%i)) {
if ($v1 iswm $address($me,5)) {
var %bans = %bans $v1
if ($numtok(%bans,32) == $modespl) {
.timer 1 %i mode # $+(-,$str(b,$v1)) %bans
var %bans
}
}
inc %i
}
if (%bans) .timer 1 %i mode # $+(-,$str(b,$numtok(%bans,32))) %bans
}
; <Other stuff>
} ~ Edit ~
Fixed mistake & shortened the code a tiny bit. This should really be move to Scripts & Popups.
|
|
|
|
Joined: Dec 2002
Posts: 503
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 503 |
|
|
|
|
Joined: Dec 2002
Posts: 2,033
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,033 |
Oops. Fixed .. thanks. It must've been ' i swim' because I've been thinking about going out back and floating in the pool with a cold beer.
|
|
|
|
Joined: Jan 2004
Posts: 509
Fjord artisan
|
OP
Fjord artisan
Joined: Jan 2004
Posts: 509 |
Wow Rocks thanks. Well I think this topic can be deleted too.
|
|
|
|
|