Peace and Protection forum
Not logged in [Login - Register]
Go To Bottom

Printable Version  
Author: Subject: anti-idle not working while on znc
snow
Junior Member
**




Posts: 16
Registered: 17-1-2010
Member Is Offline


[*] posted on 10-12-2021 at 18:30
anti-idle not working while on znc


Hi there,

I hope you are all fine these days.

I've noticed that anti-idle isn't working while I am connected to ZNC.

Anything do to in this case?

Regards,

snow
View user's profile View All Posts By User
kap
PnP Developer
***




Posts: 54
Registered: 6-8-2015
Member Is Offline


[*] posted on 15-12-2021 at 11:48


Hi,

I no longer am involved with the script, but figured I'd reply to you anyhow :)
Without a windows computer and mirc I can't test, but perhaps craze might help out.

P.S.: I must say this is out of the ordinary. The purpose of znc is to relay traffic to and fro your mirc client. Anti-idle just sends yourself a message every x seconds. Have you ran a /debug window to see what happens? Have you got any znc scripts running or perhaps another mirc script that intercepts / changes this?

regards,

kap
View user's profile View All Posts By User
snow
Junior Member
**




Posts: 16
Registered: 17-1-2010
Member Is Offline


[*] posted on 19-5-2022 at 22:54


Hi there,

Here is some output from debug.log file:

-> Chicago.IL.US.Undernet.Org 1§
<- @time=2022-05-19T20:51:23.129Z :Chicago.IL.US.Undernet.Org 421 snow 1§ :Unknown command
-> Chicago.IL.US.Undernet.Org CPRIVMSG snow #undernet :antiidle
<- @time=2022-05-19T20:51:28.849Z :snow!snow@10.10.10.69 PRIVMSG snow :antiidle
-> Chicago.IL.US.Undernet.Org CPRIVMSG snow #undernet :antiidle
<- @time=2022-05-19T20:51:32.648Z :snow!snow@10.10.10.69 PRIVMSG snow :antiidle
-> Chicago.IL.US.Undernet.Org 1§
<- @time=2022-05-19T20:51:53.273Z :Chicago.IL.US.Undernet.Org 421 snow 1§ :Unknown command
-> Chicago.IL.US.Undernet.Org 1§
<- @time=2022-05-19T20:52:23.400Z :Chicago.IL.US.Undernet.Org 421 snow 1§ :Unknown command
-> Chicago.IL.US.Undernet.Org CPRIVMSG snow #undernet :antiidle
<- @time=2022-05-19T20:52:35.652Z :snow!snow@10.10.10.69 PRIVMSG snow :antiidle
-> Chicago.IL.US.Undernet.Org 1§
<- @time=2022-05-19T20:52:53.535Z :Chicago.IL.US.Undernet.Org 421 snow 1§ :Unknown command

I see that the message is sent to myself but I don't understant whats "1§ :Unknown command"

---

searching in extras.ppa (i think there is the line with the antiidle) i see nothing about what weird character ("§")


alias aidle {
if (($1 == on) || ($1 == on)) _cfgw antiidle 1
if (($1 == off) || ($1 == off)) { _cfgw antiidle | .timer.antiidle off }
dispa Anti-idle is $:t($_tf2o($_cfgi(antiidle)))
_doidle
}
alias -l _doidle {
if ($_cfgi(antiidle)) {
scid -at1 resetidle
scid -at1 .msg $!me antiidle
.timer.antiidle 1 $r(25,75) _doidle
}
}
on me:^&*:OPEN:?:antiidle:halt
on me:^&*:TEXT:antiidle:*:halt


[Edited on 19-5-2022 by snow]
View user's profile View All Posts By User
snow
Junior Member
**




Posts: 16
Registered: 17-1-2010
Member Is Offline


[*] posted on 21-5-2022 at 13:35


I just found the problem.

When you edit the options into PnP > Configure > Options > Protection is where "421 snow 1§ :Unknown command" shows up. I don't know why.

Also about AIDLE, works great while I don't join any channel (here is where problem about aidle shows up - i think).

-> Pipera.RO.EU.Undernet.Org PRIVMSG `snow :antiidle
<- :`snow!~snow@94.52.181.45 PRIVMSG `snow :antiidle


And right after you join channel (in this case i've tested out with #aidle channel)

<- :`snow!~snow@94.52.181.45 PRIVMSG `snow :antiidle
-> Pipera.RO.EU.Undernet.Org CPRIVMSG `snow #aidle :antiidle

This is correct?
WORKING RESP: <- :`snow!~snow@94.52.181.45 PRIVMSG `snow :antiidle
NOT WORKING RESP: -> Pipera.RO.EU.Undernet.Org CPRIVMSG `snow #aidle :antiidle


[Edited on 21-5-2022 by snow]
View user's profile View All Posts By User
kap
PnP Developer
***




Posts: 54
Registered: 6-8-2015
Member Is Offline


[*] posted on 24-5-2022 at 11:13


Quote: Originally posted by snow  
I see that the message is sent to myself but I don't understant whats "1§ :Unknown command"

---

searching in extras.ppa (i think there is the line with the antiidle) i see nothing about what weird character ("§")


Please read https://www.kristshell.net/pnp/forum/viewthread.php?tid=135 for the strange command characters ("§")

As for antiidle not working properly when connected to ZNC, please be aware that PnP was coded without ZNC in mind. Having said that, a fix might come forward from the community, time permitting.

The purpose of anti idle is to reset the idle time on the server. if you whois yourself does it not reset to 0? How are you sure antiidle is not working?



[Edited on 24-5-2022 by kap]
View user's profile View All Posts By User
snow
Junior Member
**




Posts: 16
Registered: 17-1-2010
Member Is Offline


[*] posted on 24-5-2022 at 18:37


Hello,

Well I have tested with and without ZNC, on different mIRC versions: 7.68, 7.67, 7.66, 7.65, 7.63, 7.61 and isn't working.

When I say "doesn't work", it actually only works when you don't join a channel.

So if you connect and set AIDLE ON without joining any channel, works perfectly but if you join... is not working anymore.

Always I had /debug on and watching debug file.


FROM DEBUG LOG:
This line is without joining any channel (on status window) and with AIDLE ON:
-> Pipera.RO.EU.Undernet.Org PRIVMSG `snow :antiidle
<- :`snow!~snow@94.52.181.45 PRIVMSG `snow :antiidle

I whois myself and I have idle 0 (reseting idle at 30 seconds)

This line is after I join any channel (in this case channel #aidle):
<- :`snow!~snow@94.52.181.45 PRIVMSG `snow :antiidle
-> Pipera.RO.EU.Undernet.Org CPRIVMSG `snow #aidle :antiidle

I whois myself and I have idle growing (actually NOT working after I join any channel)

View user's profile View All Posts By User
snow
Junior Member
**




Posts: 16
Registered: 17-1-2010
Member Is Offline


[*] posted on 25-5-2022 at 00:14


Updating this thread.

I've connected to EFNET Network with all scripts version tested before on Undernet and works perfectly. This is weird.

I don't know what to say...

[Edited on 24-5-2022 by snow]
View user's profile View All Posts By User
kap
PnP Developer
***




Posts: 54
Registered: 6-8-2015
Member Is Offline


[*] posted on 25-5-2022 at 06:37


PnP's antiidle functions by messaging yourself the word 'antiidle'. As demonstrated by this command:

Code:
scid -at1 .msg $!me antiidle


The only difference in your debug log is that in the undernet instance you use CPRIVMSG[1]. When you join a channel on Undernet, you gain ops. Opped or voiced users - when sending PRIVMSG are automatically upgraded to CPRIVMSG by mIRC and somehow the server doesn't reset your idle counter then. Is this a PnP problem or an undernet server problem?
If we were to change the scid -at1 .msg $!me antiidle code in PnP to force a raw PRIVMSG command would this resolve the issue?

[^1]: https://en.wikichip.org/wiki/mirc/behaviors#CPRIVMSG_.2F_CNO...

[Edited on 25-5-2022 by kap]
View user's profile View All Posts By User
kap
PnP Developer
***




Posts: 54
Registered: 6-8-2015
Member Is Offline


[*] posted on 25-5-2022 at 10:26


change the line

Code:
scid -at1 .msg $!me antiidle


to

Code:
scid -at1 raw -q PRIVMSG $!me antiidle


and this will resolve your issue.

edited to add: https://github.com/peace-and-protection/Peace-and-Protection...

[Edited on 25-5-2022 by kap]
View user's profile View All Posts By User
snow
Junior Member
**




Posts: 16
Registered: 17-1-2010
Member Is Offline


[*] posted on 26-5-2022 at 23:43


Many thanks for this one! It's working great now!
View user's profile View All Posts By User

  Go To Top

Powered by XMB
XMB Forum Software © 2001-2017 The XMB Group