Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bot.connect / room.register does not have section #183

Open
Izzmo opened this issue Apr 30, 2013 · 6 comments
Open

bot.connect / room.register does not have section #183

Izzmo opened this issue Apr 30, 2013 · 6 comments

Comments

@Izzmo
Copy link
Collaborator

Izzmo commented Apr 30, 2013

I have noticed that if you try to connect right now, it will always try and connect to section 0 of a room, full or not. If there is another section, it will not try to connect to it.

The poses a couple problems:

  1. There is nothing in place to try and reconnect to a different section.
  2. When connecting to a different section other than 0, the whichServer method no longer works since it was not written with sections in mind, so you will get a wrong chat server, potentially. In my case, the chat server has always been wrong.

The only way around this is probably to parse the error message (unless there is an appropriate API call), and get the chat server that way for the section and then reconnect using it.

I have some code written, but I'm not sure if anyone really needs it or not, as most people will not have to deal with multiple sections when joining a room, and/or would not want to join a section other than the main one.

@alaingilbert
Copy link
Owner

I wasn't even aware of the "sections" !
You should create a branch with what you have.
I'll try to help !

@Izzmo
Copy link
Collaborator Author

Izzmo commented Apr 30, 2013

I am still testing some things out. I was speaking with Frick last night about it, and it looks like his "room.which_server" API call does support sections, but if you try to join a section which is already full, you get an Error Message 4: Room Is full, so then you would have to increase the section by 1 and attempt to join that room.

Unfortunately, in some cases, rooms don't have another section available you get an error 5: Section not found.

In that last case, which happened and is still happening a lot, a bot is unable to join the section and you get a "wrong chat server" error, and it will redirect you to another chat server and room, which you must parse. I am currently working on this.

@Izzmo
Copy link
Collaborator Author

Izzmo commented Apr 30, 2013

Quick update: looks like in the process of working through this, Frick & I found a potential security risk with sections and joining section 0 (which apparently is not the main room, but a section that does not actually exist). So, he patched that up, and now I think I have commitable code for this.

@Izzmo
Copy link
Collaborator Author

Izzmo commented May 2, 2013

I am going to wait until another large >300+ event happens to confirm this is all well and working.

@alaingilbert
Copy link
Owner

ok :)

@Izzmo
Copy link
Collaborator Author

Izzmo commented Jun 24, 2013

So, just a quick update. I haven't really been able to test this lately since Turntable.fm's global numbers have been down and no rooms have even gone over 200 daily right now.

There were a few problems I was running into with getting a correct response back from Turntable.fm on the whichServer method.

Side note: Now that Frick is gone from Turntable.fm, it might be a little harder to ask technical questions about their code 😦

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

No branches or pull requests

2 participants