defendtheweb / hackthis.co.uk

HackThis!!
http://www.hackthis.co.uk
Other
46 stars 55 forks source link

WeChall integration #129

Closed lwward closed 9 years ago

lwward commented 10 years ago

http://www.wechall.net/join_us

IAmDevil- commented 10 years ago

👍 Seems to be great. Also not much implementations to do, to integrate into the WeChall network.

Pawda commented 10 years ago

Meh, I had one working version already, I'll just drop the patch here so you can compare. Mine supports users exclusion from the ladder and it was written on the same form as the current web api.

https://github.com/Pawda/hackthis.co.uk/compare/patch-wechall?expand=1

lwward commented 10 years ago

Your class looks a lot nicer than my hacky code, maybe I will combine the two. There are a number of other things I would like to expose via an API so might be worth while looking in to a more flexible solution that can be reused in the future.

Pawda commented 10 years ago

A lot nicer I don't know but I tried to make it by respecting the convention you used for the current api. I was thinking maybe you will want to integrate a few api, a public one, one for wechall and maybe one for nexbot ? In that case, one thing that will need to change IMO, is the way they are called under index.php. A loop would be more appropriate.

A thing I can see with your implementation is that two users can have the same position on the ladder, is it an acceptable behaviour ?

lwward commented 10 years ago

That sounds good to me. The current class.api.php could easily be extended to handle everything.

The scoreboard on the site allows more than one user share a position, I always felt it unfair to put one person above another based on anything other than score.