Git Product home page Git Product logo

Comments (12)

DarthGandalf avatar DarthGandalf commented on June 3, 2024

What ZNC version?
Also please paste output of /znc listmodules

from znc.

Ep0chalypse avatar Ep0chalypse commented on June 3, 2024

znc --version
ZNC 0.200-1.el6 - http://znc.in

<_status> User modules:
<_status> +------------+-----------+
<_status> | Name | Arguments |
<_status> +------------+-----------+
<_status> | bouncedcc | |
<_status> | keepnick | |
<_status> | kickrejoin | |
<_status> | chansaver | |
<_status> | ctcpflood | 4 2 |
<_status> | awaynick | mike[d] |
<*status> +------------+-----------+

from znc.

WanWizard avatar WanWizard commented on June 3, 2024

I've got the same issue. Not very handy that people think you're on, when you're not.

I'm running

version: ZNC 0.200-0.5.rc1.el5

modules loaded:

*status: | keepnick  |                        |
*status: | chansaver |                        |
*status: | awaynick  | WanWizard|away         |
*status: | autoreply | I'm away from my desk. |
*status: | nickserv  |                        |
*status: +-----------+------------------------+

from znc.

kylef avatar kylef commented on June 3, 2024

This appears to work fine for me, I cannot reproduce this:

[01:22:58] *** REMOTENICK: User zynox changed their nickname to zz_zynox
[01:23:27] *** REMOTEKILL: Remote kill by kylef: zz_zynox!efnet@localhost (testing)
[01:23:27] *** REMOTEQUIT: Client exiting on server arc.darkscience.ws: zz_zynox!efnet@localhost [Killed (kylef (testing))] (0::1)
[01:23:29] *** REMOTECONNECT: Client connecting at arc.darkscience.ws: zz_zynox!efnet@localhost [0::1] [efnet - ZNC]

Please re-open if anyone can reproduce this.

from znc.

DarthGandalf avatar DarthGandalf commented on June 3, 2024

And try to unload keepnick, their purposes kinda contradict with each other.

from znc.

WanWizard avatar WanWizard commented on June 3, 2024

I unloaded keepnick some time ago, but that doesn't make any difference.

I have the feeling it has something to do with having an authenticated connection. When ZNC reconnects, the old connection is still there (I guess freenode hasn't timed it out yet), awaynick will try to set the nick, which fails because the nick in already present in the channel...

Is there a way to debug it? Can I log this chain of events somewhere? It usually happens when I'm not around, and find out later that ZNC had me reconnected to the channel without my away nick, and people complain that I don't respond...

from znc.

kylef avatar kylef commented on June 3, 2024

This would be the case if the nickname is in use.

(kylef/darkscience) ZNC -> IRC [NICK zz_kylef]
(kylef/darkscience) ZNC -> IRC [USER efnet "efnet" "efnet" :efnet - ZNC]
(kylef/darkscience) IRC -> ZNC [:sprnt.darkscience.ws 433 * zz_kylef :Nickname is already in use.]
(kylef/darkscience) ZNC -> IRC [NICK kylef_]
(kylef/darkscience) IRC -> ZNC [:sprnt.darkscience.ws 001 kylef_ :Welcome to the darkscience IRC Network]

Perhaps we can check OnQuit for the away nick we want. Then change if that nick quit's IRC. Similar to how keepnick works.

diff --git a/modules/awaynick.cpp b/modules/awaynick.cpp
index fcd94a4..a7c8800 100644
--- a/modules/awaynick.cpp
+++ b/modules/awaynick.cpp
@@ -104,6 +104,13 @@ public:
                return CONTINUE;
        }

+       void OnQuit(const CNick& Nick, const CString& sMessage, const vector<CChan*>& vChans) {
+               if (!m_pNetwork->IsUserAttached() && Nick.GetNick() == GetAwayNick() &&
+                               !FindTimer("AwayNickTimer")) {
+                       StartAwayNickTimer();
+               }
+       }
+
        virtual void OnIRCDisconnected() {
                RemTimer("AwayNickTimer");
                RemTimer("BackNickTimer");

The only downside, is that if our awaynick contains %nick% it might be based on the altnick instead, so the away nick will be different. In my testing this code didn't work because I was using an alt-nick and my away nick would be zz_kylef_ not zz_kylef like the person who just quit.

from znc.

WanWizard avatar WanWizard commented on June 3, 2024

Thanks for looking into this!

from znc.

DarthGandalf avatar DarthGandalf commented on June 3, 2024

That won't work, if away nick will timeout between our initial connection and our joining the first channel.

from znc.

kylef avatar kylef commented on June 3, 2024

Perhaps we could just StartAwayNickTimer on connect and we are away. Then it will try it again when the timer has elapsed?

from znc.

Krinkle avatar Krinkle commented on June 3, 2024

👍

I use "Krinkle|detached" as awaynick. But when for some reason ZNC got disconnected while I was away, it re-connects as my normal nickname as opposed to the "detached" state.

One thing to consider (though both will be the same in most cases) is whether this should be enforced from within "awaynick" (e.g. set away nick when re-connecting, unless/until a client connects) - or to do it from "core" (remember nick from before disconnect - which can be the "awaynick" nick - and use that when connecting).

I think connecting clean with default nick (and letting awaynick set the awaynick right away, if appropiate) is preferred. That way if both get disconnected (znc first; which is not unlikely, depending on what caused the disconnect), it will be connecting correctly (with the awaynick set, even though the state right before disconnect was not "away") - until the client also reconnects, in which case awaynick will naturally restore the default nick again.

from znc.

DarthGandalf avatar DarthGandalf commented on June 3, 2024

With awaynick module removed, this issue is obsolete.

from znc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.