SFTtech / sftmumblebot

Mumble/IRC text chat bridge :microphone: :love_letter:
GNU General Public License v3.0
49 stars 16 forks source link

Fixed the way the bot breaks on large messages from a mumble server #21

Open narenniranjan opened 8 years ago

narenniranjan commented 8 years ago

When size is large, the bot will try to get the full message with socket.recv(size), which breaks horribly. I fixed this with some changes to MumbleConnection.py. I made some personal changes to my fork in main.py that can be safely ignored, the actual changes are in MumbleConnection.py

narenniranjan commented 8 years ago

I can resubmit the pull request with only the MumbleConnection.py changes if that's better, I'm pretty new to github.

TheJJ commented 8 years ago

Thanks for your fixes. It would be convenient if you submitted just the changes relevant for the upstream project, otherwise i'll update the commits made by you, but then they'll no longer be part of this pullrequest although you're stil recorded as author.

If you like i can give you some pointers (you may also follow this guide, but of course it's a bit different for the mumblebot.)

narenniranjan commented 8 years ago

Yes, how should I do that? Fork the repo again, make just those changes, then pull?

TheJJ commented 8 years ago

Basically yes, but you can do that without starting with a clean repo.

Just type git checkout upstream/master so your repo content equals the upstream master branch (if you don't have the upstream remote yet, add it via git remote add upstream https://github.com/SFTtech/sftmumblebot.git)

Then you branch of from there, e.g. by git checkout -b welcomemsgbuffer to create a new branch starting at upstream/master (as you were on that before).

Now you can apply the changes, either directly and then git add, or by cherry-picking the commits you already pushed to that pullrequest (see man git-cherrypick for that). You can reorder, meld, change and update commits with git rebase -i upstream/master. All this is also in the guide i linked you above.

mic-e commented 7 years ago

What about this?