Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

Delayed join / command-order #662

Open
samboman opened this issue Apr 28, 2016 · 6 comments
Open

Delayed join / command-order #662

samboman opened this issue Apr 28, 2016 · 6 comments

Comments

@samboman
Copy link

I have a list of Channels I auto join. And I have setup a commands-entry in the user configuration file to identify myself.

"commands": [
  "/msg NickServ identify my-pass"
],

The problem are channels that require registered nicks to join (eg. #openvpn on freenode). The commands seems to be sent after the join-commands.

//Sam

@samboman
Copy link
Author

I simply fixed this by using:
"password": "my-pass"

Maybe a better solution!

//Sam

@erming
Copy link
Owner

erming commented Apr 28, 2016

Glad to hear you solved it!

Just remember that the password property is not the same as NickServ identify. And to make sure that commands property wasn't broken, I tried using

"commands": ["/msg #chan test"]

and that worked for me.

@dgw
Copy link

dgw commented Apr 28, 2016

I think the issue wasn't so much commands not being sent as it was commands being sent too late. The client tries to join channels before the command to identify with NickServ is sent, and thus is denied joining channels that require the use of a registered nickname.

@samboman
Copy link
Author

@erming Yes, it worked for me... The command worked:

"commands": ["/msg NickServ identify my-pass"]

But as @dgw commented, its a timing issue... Joins happens before Identify are done. Is there a /msg wait 1000ms command to delay?

Like having:

"commands": ["/msg NickServ identify my-pass",
  "/wait 1000",
  "/join #authenticatedChan"]

@erming
Copy link
Owner

erming commented Apr 28, 2016

@dgw is right.

However, there is already a 1000ms delay in place, but maybe it's not enough. The code for running commands and joining channels can be found here: https://github.com/erming/shout/blob/master/src/client.js#L196

@samboman if you put everything in commands (but remove /wait 1000), does that work?

@samboman
Copy link
Author

@erming No, it does not work:
"commands": ["/msg NickServ identify my-pass", "/join #authenticatedChan"]
It seems to fire off the commands to quick... Before they are finished.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants