Hoi allemaal
Ik probeer een teller te maken die bijhoudt of er meer dan 1 persoon in de channel is.
on *:join:#: {
set %personen $nick(#,0)
if (%personen > 1) && (%personen < 3) { doe iets }
}
(die < 3 voorkomt dat het iedere keer wordt uitgevoerd als er weer iemand binnen komt)
Dit werkt goed. Het probleem zit hem in de PART en QUIT
on *:part:#: {
set %personen $nick(#,0)
if (%personen < 2) { doe iets }
} <~~ zelfde met quit.
Dit echter werkt niet goed. Zien jullie de fout?
Alvast bedankt
Aaron
There is an offchance that someone that speaks your language frequents the forum, but for the most part--this is an English speaking forum. If you happen to know any english, please translate.
Well, I *think* the problem is that as far as mIRC is concerned the person is still on the channel until after the part/quit event is finished.
See
/help /updatenl for a way to overcome this.
on *:part:#:{
[color:blue]updatenl[/color]
set %personen $nick(#,0)
if (%personen < 2) { doe iets }
}
[translation]
Hello everybody
I'm tring to create a counter wich counts wheter there are more then 1 person on the channel
on *:join:#: {
set %pers $nick(#,0)
if (%pers > 1) && (%pers < 3) { do something }
}
(The < 4 prevents to do this everytime if somebody gets back in the channel)
This all works good. The problem is in the PART and QUIT
on *:part:#: {
set %pers $nick(#,0)
if (%pers < 2) { do something }
} <~~ same with QUIT
This doesn't work good. Can you see the error?
Thanks in advance
Aaron
[/translation]
[footer in dutch]
(Aaron: aangezien dit engels board is graag engels praten, ik vertaal je reactie maar eenmalig, indien je geen engels kan kun je beter een nederlands forum opzoeken denk ik)
[/footer in dutch]
hi all.
I'm sorry. i will ask my question again in english
point is that %personen = 1 when only the bot is in the channnel. As soon someon joins the room the %personen will increase with 1. As long there are more people then 1 in the channel a timer gives some messages each hour. This need to stop as they leave and the bot is alone again. So with part/quit the counter needs to decrease.
increase works, but decrease not.
thanxs in advange
Aaron
I figured the problem was something like that just from the code.. :[/b])
Did you try with the /updatenl command I suggested?
Hi again.
well, i made the routine like this
on *:part:#mychannel: {
Set %personen $nick(#,0)
/updatenl
if (%personen < 2) { doesomething }
}
in the channel are me and the bot and the counter =2 like it should. But when i part the channel the counter still stays on 2.
so it didn't work.
Hope someone can help me
Greetz
aaron
well, i made the routine like this
on *:part:#mychannel: {
Set %personen $nick(#,0)
/updatenl
if (%personen < 2) { doesomething }
}
Look at where I put the updatenl command
on *:part:#mychannel:{
[color:blue] updatenl[/color]
Set %personen $nick(#,0)
if (%personen < 2) { doesomething }
}
The idea is to update the nicklist BEFORE you set the variable.
Yeeeeeeeeeeeeeeeeeeeeeeee. it worked.
Thanks Iori and others.
greetz
Aaron