We can talk to TL admins to spit out JSON for mafia forums for security reasons, ask them to just add an API Token.
Mafia Votecount Tool - Page 2
Forum Index > TL Mafia |
ShoCkeyy
7815 Posts
We can talk to TL admins to spit out JSON for mafia forums for security reasons, ask them to just add an API Token. | ||
Alakaslam
United States17334 Posts
+ Show Spoiler + I am not a tool!+ Show Spoiler + lol | ||
Xatalos
Finland9675 Posts
https://github.com/Xatalos/mafia-votecount JQuery is used a bit, but not Node.js. | ||
Xatalos
Finland9675 Posts
| ||
ShoCkeyy
7815 Posts
| ||
Xatalos
Finland9675 Posts
![]() | ||
ShoCkeyy
7815 Posts
On July 10 2015 06:33 Xatalos wrote: Clojure was chosen because my friend (TripleSnail) wanted to learn Clojure, so I suggested this idea to him ![]() Javascript treating you right? ![]() | ||
Xatalos
Finland9675 Posts
On July 10 2015 23:04 ShoCkeyy wrote: Javascript treating you right? ![]() It's been a pretty interesting journey. I've learned quite a few new things about JavaScript/CSS (especially the one page approach implementation) and also a bit of Clojure. By the way I don't think there's much need for a JSON feed or something like that. TripleSnail said that the easy part is finding the posts and their content as well. The problems are with sorting the content of the posts and giving the content in a different form wouldn't help with that really. You're free to use the code for something else if you want to. You can also make a pull request if you notice something that needs fixing. I should get back to working on the project in the near future ![]() | ||
gonzaw
Uruguay4911 Posts
Nice choice to use Clojure. If you start learning more of it surely you'll come up with new ways to improve your app. On July 06 2015 21:24 Xatalos wrote: 1) The votes of the current day could perhaps also be displayed in the same format as the regular votecount posts on the forum. That way the host/co-host could simply always copy the most recent vote listing of this format to the thread when there's a need for another votecount post. However, there's a major problem with this idea: it's that many players vote with all kinds of "nicknames" or just misspell when they're voting. That causes huge difficulties for displaying votes neatly in such a format. Like people said, ignore the "nicknames" and stuff. People should be able to know how CTRL+C works. If you do allow hosts to pre-define the list of players, then you can only allow votes on those players, and give out warnings if someone voted for someone differently. Or if you want it to be more flexible (for instance if you allow stuff like "#Vote: GLaDOS"), just leave it like it is. 2) There could be some sort of an authentication system for creating new games. This way only actual hosts could create new games and there wouldn't be any need to worry about trolls ruining the website by spamming the "Create New Game" button. Hopefully there wouldn't even be a need for this, but... Nah, that'd make it overly-complicated. You'd have to manage those accounts manually, only for people in TL. If someone new wants to start using your app you have to create a new account just for him, etc. With tools like a Captcha (to prevent bots from creating games), and some mild moderating, there won't be problems. Alternatively give someone the "job" of accepting which game is created or not. Each "create new game" button creates an application which you can accept or reject. But until that problem actually happens, I'd say ignore it. Also, in the near/mid future, you may want to expose your vote-counter as a service (web services and all that). That way you could create games, receive notifications for new votes, get a list of all games/current votes by bots and other apps. It'd be easier to add security there too (you can give credentials to certain bots/apps and never worry again), etc. Might come handy in the future. Once I finish my bachelors degree (is it called that in USA?), I have a craving for starting a project similar to this. I just need some free time to get rolling. | ||
Xatalos
Finland9675 Posts
I, too, hope that nobody decides to troll the app :D My current idea is to do it just like rayn suggested. We'll see how it goes. Going to be away from home for a bit now though. | ||
Xatalos
Finland9675 Posts
It looks kind of like this at the moment: --- Current Day Votecount Bill Murray (2): jcarlsoniv,Lord Tolkien lord tolkien (0): BillMurray (2): AsmodeusXI,ComaDose vote: jcarlsoniv (1): Bill Murray jcarlsoniv (1): Bill Murray yomato (1): ComaDose --- Source for the example: https://mafia-votecount.herokuapp.com/#487695-ot-vs-the-mods-mafia Feedback is welcome! At the moment I'm considering that it could be nice to also add things like: - The list of non-voters - Unvotes don't delete the vote but just overwrite it in the view - Ordering of the votes in highest -> lowest order? But that's enough for this session :D | ||
Xatalos
Finland9675 Posts
| ||
Xatalos
Finland9675 Posts
| ||
Xatalos
Finland9675 Posts
| ||
Xatalos
Finland9675 Posts
| ||
Holyflare
United Kingdom30774 Posts
On July 15 2015 05:32 Xatalos wrote: I'm actually not sure what should be done in that situation (a player voting another player without unvoting). Should it be considered as an unvote+vote? Or an invalid vote? Opinions? unvote and vote since he clearly meant to vote someone new | ||
Xatalos
Finland9675 Posts
| ||
Xatalos
Finland9675 Posts
| ||
Holyflare
United Kingdom30774 Posts
| ||
Xatalos
Finland9675 Posts
![]() | ||
| ||