UltrosBot / Ultros

Connecting communities, one squid at a time! Ultros is a multi-protocol chat bot written in Python, designed with both the user and developer in mind
http://ultros.io
Artistic License 2.0
23 stars 7 forks source link

Mumble - User comments/channel descriptions #13

Open rakiru opened 11 years ago

rakiru commented 11 years ago

The mumble protocol does not currently store/provide access to users' comments or channels' descriptions because it is non-trivial to implement. Specifically, if a comment/description is too long, only a hash of it is sent. I'm assuming you can then send a message to the server to retrieve the full thing, and that you're supposed to cache it and compare hashes to check if it changes in future.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/7695031-mumble-user-comments-channel-descriptions?utm_campaign=plugin&utm_content=tracker%2F269930&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F269930&utm_medium=issues&utm_source=github).
rakiru commented 11 years ago

The RequestBlob message would appear to be what you use to request the relevant data. The server then replies with a UserState/ChannelState with the actual data instead of its hash.

gdude2002 commented 11 years ago

This all seems pretty convoluted, as protocols go. You seem to be doing a pretty great job of working with it, though

rakiru commented 11 years ago

I can see why it was done, and it shouldn't be too hard to add, but yeah, it's just more code than necessary really. This whole thing's like reverse-engineering a protocol on easy mode though, since all I have to do is figure out how they work together. It's pretty fun.

gdude2002 commented 11 years ago

Well, I'm glad you enjoy it, I hate this kind of thing :P

gdude2002 commented 11 years ago

How's the progress on Mumble going? Can we close this ticket or is it still being worked on?

rakiru commented 11 years ago

This isn't an essential feature, so it's still in the background. The bot's still usable without it, it just won't have absolutely everything in the mumble protocol available. As far as I know, the only thing mumble needs done is dealing with the rejected message (should be a #TODO in there somewhere) and having events added.

gdude2002 commented 11 years ago

Rejected message? What's that one?

rakiru commented 11 years ago

isinstance(message, Mumble_pb2.Reject) You receive that when the server refuses to let you connect for whatever reason. At the moment it only logs that it failed to connect, but nothing else. I wasn't sure how to deal with that, so it's in there as a # TODO.

gdude2002 commented 11 years ago

Ah, okay. I suppose the connect error is sent plaintext?

rakiru commented 11 years ago

message.type and message.reason exist (and is used in the log message). The reason is a human-readable message, the type is one of the following:

0 - None            - Not sure this ever happens
1 - WrongVersion    - 
2 - InvalidUsername - 
3 - WrongUserPW     - 
4 - WrongServerPW   - 
5 - UsernameInUse   - 
6 - ServerFull      - 
7 - NoCertificate   - Cert is required by server