Mumble Emoticons

Mumble about Mumble

Mumble Emoticons

Postby cr0ne » Mon Feb 24, 2014 4:47 pm

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 Image 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

Code: Select all
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

Image

A Kappa will appear In the chat

Image

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/shortcu ... ethump.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.
Last edited by cr0ne on Mon Jun 16, 2014 8:53 pm, edited 23 times in total.
cr0ne
 
Posts: 4
Joined: Mon Feb 24, 2014 3:30 pm

Re: Mumble Emoticons

Postby kissaki » Mon Feb 24, 2014 4:56 pm

Using Git to version changes would make it a lot easier to follow and mange the changes. :)
MumPI: Your Mumble Web Interface in PHP
User avatar
kissaki
Team member
Team member
 
Posts: 1268
Joined: Sat Jan 09, 2010 12:15 pm

Re: Mumble Emoticons

Postby cr0ne » Mon Feb 24, 2014 5:00 pm

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/c ... 847196f0f4

Edit: Or I should probably just fork it now that I'm reading about about it
Edit2: Done
cr0ne
 
Posts: 4
Joined: Mon Feb 24, 2014 3:30 pm

Re: Mumble Emoticons

Postby kissaki » Tue Feb 25, 2014 6:50 pm

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.
MumPI: Your Mumble Web Interface in PHP
User avatar
kissaki
Team member
Team member
 
Posts: 1268
Joined: Sat Jan 09, 2010 12:15 pm

Re: Mumble Emoticons

Postby cr0ne » Mon Mar 03, 2014 4:29 pm

Added windows 1.2.5 msi installer link to op
cr0ne
 
Posts: 4
Joined: Mon Feb 24, 2014 3:30 pm

Re: Mumble Emoticons

Postby cr0ne » Mon Jun 16, 2014 7:56 pm

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.
cr0ne
 
Posts: 4
Joined: Mon Feb 24, 2014 3:30 pm

Re: Mumble Emoticons

Postby kissaki » Wed Jun 18, 2014 4:17 pm

Note that OpenSSL was updated for security fixes. So I would discourage downloading or distributing a version without those fixes.
MumPI: Your Mumble Web Interface in PHP
User avatar
kissaki
Team member
Team member
 
Posts: 1268
Joined: Sat Jan 09, 2010 12:15 pm

Re: Mumble Emoticons

Postby KaLam1ty » Tue Sep 29, 2015 5:47 pm

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:

Code: Select all
+   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?
KaLam1ty
 
Posts: 2
Joined: Tue Sep 29, 2015 5:08 pm

Re: Mumble Emoticons

Postby kissaki » Tue Nov 10, 2015 11:35 pm

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.
MumPI: Your Mumble Web Interface in PHP
User avatar
kissaki
Team member
Team member
 
Posts: 1268
Joined: Sat Jan 09, 2010 12:15 pm

Re: Mumble Emoticons

Postby KaLam1ty » Tue Nov 10, 2015 11:54 pm

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.
KaLam1ty
 
Posts: 2
Joined: Tue Sep 29, 2015 5:08 pm


Return to General

Who is online

Users browsing this forum: No registered users and 5 guests

cron