azlux / pymumble

Mumble client implementation in Python
GNU General Public License v3.0
128 stars 61 forks source link

Unable to send images? #27

Closed DuckBoss closed 5 years ago

DuckBoss commented 5 years ago

Hello! I've been trying to send image data in the chat but I keep hitting the 5000 maximum character limit when using channel.send_text_message(). Is there any way to do a channel.send_image() to send image data instead?

azlux commented 5 years ago

Hi The limitation is hard-coded here : https://github.com/azlux/pymumble/blob/pymumble_py3/pymumble_py3/mumble.py#L94 The server can override this value https://github.com/azlux/pymumble/blob/pymumble_py3/pymumble_py3/mumble.py#L428 but I'm not sure current servers are doing it. I need to speak with the sever developers.

Az

DuckBoss commented 5 years ago

Thanks for the help! I am currently using a private mumble server so I can override the value as needed.

azlux commented 5 years ago

Hi, Please reopen the issue. There are one bug here (You have close it when I was reading the mumble protocol) In mumble, when you send image, it doesn't follow the same limit. If you check the murmur configuration, you will have :

I've checked, pymumble use only the textmessagelength. So I need to implement the image limit.

Az

DuckBoss commented 5 years ago

Okay thanks for bringing up this bug. Some images under 10kb worked with the current system but anything over that limit crashed the python program.

azlux commented 5 years ago

Can you give me the error ?

DuckBoss commented 5 years ago

I wasn't able to retrieve any error from the crash. The script froze until it eventually crashed. It doesn't seem to be consistent with how it crashes either. I'm currently trying a work-around by publishing an image to the web and using its urls to post in the channel chat via html tags since that would be under the 5000 character limit.

DuckBoss commented 5 years ago

I will check the commit tomorrow and let you know how it works out.

DuckBoss commented 5 years ago

Works as intended! Thanks!