cr0ne Posted February 24, 2014 Share Posted February 24, 2014 (edited) 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.7Linux Client 1.2.7Linux Server 1.2.7Sample murmur.ini fileTo 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 typehttp://i.imgur.com/oAzghiX.pngA Kappa will appear In the chat http://i.imgur.com/2Dakxsv.pngif 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 June 16, 2014 by cr0ne Link to comment Share on other sites More sharing options...
Administrators kissaki Posted February 24, 2014 Administrators Share Posted February 24, 2014 Using Git to version changes would make it a lot easier to follow and mange the changes. :) Link to comment Share on other sites More sharing options...
cr0ne Posted February 24, 2014 Author Share Posted February 24, 2014 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/d41c1481188a66e58e36f3537cc184847196f0f4Edit: Or I should probably just fork it now that I'm reading about about itEdit2: Done Link to comment Share on other sites More sharing options...
Administrators kissaki Posted February 25, 2014 Administrators Share Posted February 25, 2014 Yes.Even if you don’t want to work on integrating it into the main branch, forking the projects repository and applying your changes there, then linking to that would be very helpful if someone wants to use or start work on top of it. Link to comment Share on other sites More sharing options...
cr0ne Posted March 3, 2014 Author Share Posted March 3, 2014 Added windows 1.2.5 msi installer link to op Link to comment Share on other sites More sharing options...
cr0ne Posted June 16, 2014 Author Share Posted June 16, 2014 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 More sharing options...
Administrators kissaki Posted June 18, 2014 Administrators Share Posted June 18, 2014 Note that OpenSSL was updated for security fixes. So I would discourage downloading or distributing a version without those fixes. Link to comment Share on other sites More sharing options...
KaLam1ty Posted September 29, 2015 Share Posted September 29, 2015 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 More sharing options...
Administrators kissaki Posted November 10, 2015 Administrators Share Posted November 10, 2015 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 More sharing options...
KaLam1ty Posted November 10, 2015 Share Posted November 10, 2015 I figured that would be the best approach anyway.cr0ne's implementation works in that regard, where you just link to a webserver location.Although, the safest option is to try to grab a file locally as well, which I assume wouldn't be too difficult to change. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now