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

Messages with emoji or text smileys entirely dropped #26

Open
Hugo2607 opened this issue Sep 2, 2014 · 2 comments
Open

Messages with emoji or text smileys entirely dropped #26

Hugo2607 opened this issue Sep 2, 2014 · 2 comments

Comments

@Hugo2607
Copy link

Hugo2607 commented Sep 2, 2014

First off, this script is great, just what I was looking for. So thanks very much to the devs.

However I did run into a few bugs I thought I'd report:
The ASCII conversion doesn't pick up the emoji, wich is to be expected but instead of the emoji just being ignored the whole message including the regular text is dropped.

Also, technically unrelated but most text smileys contain a ":" which this script uses to signal a username and as a result the message is also dropped, for example, if someone sends the message "Smileys are great :D" the message shows up in IRC as "D". I use this mostly to connect a group chat to an IRC channel so this could be easily resolved by dropping the username detection from group chats but that isn't exactly the best solution.

Thanks in advance,
Hugo2607

@stenyak
Copy link
Owner

stenyak commented Sep 8, 2014

I need more information regarding the emoji issue. Is it the problem described in #6, or the problem described in #24, or is it something else entirely?
If it's different than those two issues, I need you to please attach the logs generated by the bot (log.txt), so that I can try to find the problem.

@Hugo2607
Copy link
Author

Hugo2607 commented Sep 8, 2014

It seems to be the same problem described in #6, however the script was able to mirror all the example characters he named and in my case I just wasn't able to send emoji.

The other issue I named is the same as #24.

I was able to find two fixes for both of those issues, but they're not perfect since I can't write python code myself.

I fixed issue #24 by changing line 20 of bot.py from "split = msg.split(":", 1)" to "split = msg.split(":", 0)" this breaks the private messaging feature, however if you're only using the bot for group chats it's probably worth it to prevent half of a message being dropped if it's got a ":" in it.

I found a workaround for issue #6 by changing Python's default encoding from ASCII to UTF-8.

I did this by changing "encoding = "ascii"" to " encoding = "utf-8"" in /usr/lib/python2.7/site.py

This is not recommended as it might cause problems with other python scripts however the server I'm running this on doesn't run any other python scripts so this works for me.

Once again these more workarounds than they are fixes, so any actual fixes would be appreciated but maybe these will help anyone who's also having these issues.

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