Closed jbzdarkid closed 9 years ago
I just discovered the user list is redundant because the API base URL you linked sends an XML which has names of all the files in the CDN, so you just need to parse that with SAX or something, then parse out the last part of each path minus the .png, add that to a map or something and then use that to look for emotes in chat.
And for downloading them of course you just request each path and save the files somewhere. I would suggest implementing on-demand downloading if this is to be integrated though because there are a LOT of emotes which will only sometimes get used. And currently chat emotes which aren't downloaded are never substituted. I should maybe make that a separate issue.
It would probably be easiest to do both in one patch, since creating an on-demand system is going to involve rewriting a decent bit of the current emote code, as would adding FFZ emotes. FFZ has special Donator and Bot icons. Image url is: http://cdn.frankerfacez.com/channel/global/LilZ.png http://cdn.frankerfacez.com/channel/00greenbean00/BeanAhab.png
I'm not really clear on how you would actually use FFZ emotes. As far as I see, they only function on the channels they were created for, except for the global emotes.
Well you could add a check to make sure a user is in the correct channel, or of course make it configurable whether or not to just always allow FFZ emotes.
I'm just wondering why people want them if they can't normally use them. I suspect I'm missing something...
Well, if you use Botnak as a general chat client you be in another channel. Smaller channels might also use Botnak and have their own emotes. Also, I thought it could be an idea to add an option (off by default) to show all emotes in Botnak, although I just realised that may be less useful as other people will not see the emotes.
So in fact, botnak can just get an array of valid emote names for the channel. There shouldn't even be that many, most channels have 10-30.
Just a note: I'm not allowing support for the custom mod icons. Sorry.
http://frankerfacez.storage.googleapis.com/ is deprecated. The updated cdn.frankerfacez.com URL is current.
Yes, but it's private. I was planning on using the googleapis page for the listing and getting images from cdn.frankerfacez.com.
In that case use the users.txt URL.
But my idea for the implementation was going to be on a per-channel basis. When you request to join a channel, it'll also throw a request for FFZ to check and download the faces of the channel on another thread.
There's not gonna be a text document saving for this, but rather folders of everyone's FFZ emotes per channel in a "FrankerFaceZ" folder, which will be scanned on boot, and updated on channel join.
It doesn't really look like the data is available per-channel, so this is going to be referencing the entire users.txt anyways. I see the merit of downloading faces on-demand, though, there are a lot of them.
Yeah, I'll be parsing the .css files.
For example: http://cdn.frankerfacez.com/channel/geoff.css
That seems to be awfully complex way of going about it...
User list: http://frankerfacez.com/users.txt http://frankerfacez.storage.googleapis.com/" + user + "/" + emoteName + ".png
The internal loader uses: