Jump to content
Mumble forums

Mumble Emoticons


cr0ne
 Share

Recommended Posts

Hey guys, first of all I'd like to thank you for mumble, its a sick software and we are getting more into it every day. Now back in October we (me and my cousin) tried to implement emoticons in mumble chat. I know its not a big deal feature since mumble is VOIP, but we are using chat quite a lot so we thought it would be cool. So the idea was to type an alias e.g. Kappa in the chat box of your client and in the chat log a little http://www.chatslang.com/images/shortcuts/twitch/admins/kappa.png would appear. For that we used regex. Following the concept of TextMessage.cpp for html links and quotation marks we setup a regex for emoticons. Now the next problem was that, having the emoticons hardcoded in TextMessage.cpp is super lame and impractical so we needed a way for the server admin to be able to add emoticons on demand and preferably through the murmur.ini file.


So the concept is that the server parses a list of emoticon aliases and their respective images (internet links) from murmur.ini and broadcasts them to the connecting clients through the server sync message (btw thank you for the mumble proto documentation, sick stuff, bible for bots as well). The clients then read that list, and setup regexes for each emoticon. We actually made it work, and now have emoticons in chat. Now I want to make this clear. Our programming knowledge is very basic. This means that, for example, our idea of putting another field in server sync is probably bad, or not a way you write software. So if we break any programming standards or mumble/mumble protocol standards (we most likely did) please be easy on us we were just messing around.


As you can understand this concept requires both a custom client and server.


The code is here, Mumble was in 1.2.4 back then.


For linux I did as the wiki instructed, same for windows, but in windows I compiled with

 

qmake CONFIG-=sse2 CONFIG+=no-asio CONFIG+=no-g15 CONFIG+=no-bonjour CONFIG+=no-elevation -recursive

 

Btw I couldn't find the right G15 files so I gave up.


Update (1.2.7):


This fix of 1.2.7 was really nice.

Warning: The windows msi installer has outdated OpenSSL, as I don't have the time right now to update it.


Windows msi installer 1.2.7

Linux Client 1.2.7

Linux Server 1.2.7

Sample murmur.ini file


To add emoticons, look for the values emoticonnames and emoticonimages in the sample murmur.ini file. Replace the "Alias1, Alias2, ..." in emoticonnames with the names of the emoticons that you want and the "Link1, Link2, ..." with their respective links. For example if you want to have a Kappa emoticon you would:


emoticonnames="Kappa"

emoticonimages="http://www.chatslang.com/images/shortcuts/twitch/admins/kappa.png"


So when I type


http://i.imgur.com/oAzghiX.png


A Kappa will appear In the chat


http://i.imgur.com/2Dakxsv.png


if you want two emoticons you would:


emoticonnames="Kappa, BibleThump"

emoticonimages="http://www.chatslang.com/images/shortcuts/twitch/admins/kappa.png, http://www.chatslang.com/images/shortcuts/twitch/admins/biblethump.png"


You get the memo. The emoticon names and the links must be seperated with a comma and a space like shown in the examples above.

Edited by cr0ne
Link to comment
Share on other sites

Yea I know, at a point I was thinking "I should probably use github for that", but I was a little deep in the post. Its just that I have never used github in that manner before. I'll look it up and change the post if I find time. You are referring to sth like that am I right?


https://github.com/mumble-voip/mumble/commit/d41c1481188a66e58e36f3537cc184847196f0f4


Edit: Or I should probably just fork it now that I'm reading about about it

Edit2: Done

Link to comment
Share on other sites

  • 3 months later...

Updated msi installer to version 1.2.7. The fix that auto scrolls the chat when an image is posted really compliments this feature! I was really happy to see it.


Now this installer has outdated OpenSSL since to have the latest one I would have to rebuild zlib and stuff and I have no time right now. Maybe I'll do it sometime in summer or on the next major release of Mumble.

Link to comment
Share on other sites

  • 1 year later...

Any word on if this is currently being developed? I need more Kappa in my life :(!

It looks like the patch was completed at the time, and the implementation seems simple enough:

 

+	for (int i=0; i<g.qslEmoticonNames.size() ; i++) {
+	    qr.setPattern(QLatin1String("\\b")+g.qslEmoticonNames.at(i)+QLatin1String("\\b"));
+	    qsPlain.replace(qr, QLatin1String("<img src=\"")+g.qslEmoticonImages.at(i)+QLatin1String("\">"));
+	}

 

Just a lot of word replacement it seems. I'd be willing to test this. I'm guessing there aren't any plans of using this at the moment for 1.3.0 though? If not, any way I can pick up where this left off?

Link to comment
Share on other sites

  • 1 month later...
  • Administrators

Also note that licensing may be an issue.

We may not be able to distribute certain images.

For example, twitch answered me that I may not simply use their emoticons elsewhere.

Although I wonder if fair use may apply.


The safe way for us is probably to allow third parties/the community/server admins to provide the images / set them up per server or allow clients to install/download them.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...