po-devs / pokemon-online

Online Pokemon Battle Simulator
http://pokemon-online.eu
GNU General Public License v3.0
289 stars 170 forks source link

Implement Tempban support. #54

Closed lamperi closed 11 years ago

lamperi commented 12 years ago

By adding a new field into SecurityManager::Member.

Protocol does not need to be broken for this, can be implemented to master branch.

Think about the client GUI a bit. Maybe add on player list right click: Tempban for -> one hour | one day | choose time

Controlpanel could use "Change ban time" and "Unban on..". Server could just readjust the ban length. Needs to think about the two scenaries: Ban for xxx time and ban until xxx datetime.

What about auth levels? Put everything on auth >= 2 or grant a short tempban to mods?

Also needs scripts functions: sys.tempBan(name, time_as_seconds) or extend sys.ban().

Dimbreath commented 12 years ago

Well, how this would work exactly? I mean, updating the bans, checking if the time has run out. Everything else seems easy. o.O

lamperi commented 12 years ago

How would the sys.banList function change? This probably needs some internal data structure changes, not much though.

On Thursday 1. March 2012 at 4.19, Blastcore wrote:

Well, how this would work exactly? I mean, updating the bans, checking if the time has run out. Everything else seems easy. o.O


Reply to this email directly or view it on GitHub: https://github.com/coyotte508/pokemon-online/issues/54#issuecomment-4251289

Dimbreath commented 12 years ago

I mean... Gah, i suck at explaining. When you ban someone, there needs to be something running on background to check each banned user and see if it's ban expired. (Threaded?, like deleting inactive members and updating tiers...?)

lamperi commented 12 years ago

Much more efficient would be doing that on demand. The daily member remover could do this too, if needed.

On Thursday 1. March 2012 at 20.20, Blastcore wrote:

I mean... Gah, i suck at explaining. When you ban someone, there needs to be something running on background to check each banned user and see if it's ban expired. (Threaded?, like deleting inactive members and updating tiers...?)


Reply to this email directly or view it on GitHub: https://github.com/coyotte508/pokemon-online/issues/54#issuecomment-4265196

Dimbreath commented 12 years ago

But the daily how it says, does the update EACH day. When there are 1 day, 1 hour or 1 minute ban.

Dimbreath commented 12 years ago

Well, now. After some of my inactivity (preparing stuff for classes), i've figured out this could be threaded, to work like the Database Cleaner does. Threaded, works exactly like the cleaner. What i've figured out, that it's pretty easy to do. We don't need to be checking each 1 minute if someone is banned. Just when required (Someone logins, script functions, or when looking at Players in Server, i'll look into this now to see how it works :))

EDIT: As how i said, before login in a player, we check if he's still banned. Right? EDIT2: And we could use QDateTime or however it is for this. :)

I'd say to implement it on devel, as it may not work how we want. And devel wont take too much to be released, as we're going fine with the stuff.

lamperi commented 12 years ago

You might want to look into https://github.com/lamperi/pokemon-online/tree/feature-tempban

I just pushed something I coded a month ago. It would be ideal for you to use that as a starting point if possible.

IOn Saturday 10. March 2012 at 6.24, Blastcore wrote:

Well, now. After some of my inactivity (preparing stuff for classes), i've figured out this could be threaded, to work like the Database Cleaner does. Threaded, works exactly like the cleaner. What i've figured out, that it's pretty easy to do. We don't need to be checking each 1 minute if someone is banned. Just when required (Someone logins, script functions, or when looking at Players in Server, i'll look into this now to see how it works :))


Reply to this email directly or view it on GitHub: https://github.com/coyotte508/pokemon-online/issues/54#issuecomment-4428776

Dimbreath commented 12 years ago

Well, actually i had other idea instead of that. Whatever, what's missing on it? :confusedface:

Dimbreath commented 12 years ago

@lamperi Okay, so seems like coyo merged it into devel (If i'm not wrong), whatever it doesn't work, it does normal ban.

lamperi commented 12 years ago

He merged only one of the commits ...

lamperi commented 12 years ago

Tempban works now in devel, but we might want to fully use it.

Referring to: """Controlpanel could use "Change ban time" and "Unban on..". Server could just readjust the ban length. Needs to think about the two scenaries: Ban for xxx time and ban until xxx datetime."""

It would be very cool for admins to set unban dates in Control Panel. Basically, only a GUI is needed, server should behave nicely already.

coyotte508 commented 12 years ago

Also protocol should be added http://wiki.pokemon-online.eu/view/Network_Protocol_v2

lamperi commented 11 years ago

I believe this issue can be closed.

coyotte508 commented 11 years ago

Idk, i didn't get "change expire to" to work correctly (or i didn't understand the format of the date set)

lamperi commented 11 years ago

you can just click the arrows which allow you to choose from calendar

Dimbreath commented 11 years ago

Should we use that or make it work like it does server-side? (Instead of date, minutes.)

lamperi commented 11 years ago

I have used the calendar successfully to set unban dates to people :)

If you change it, please make sure it is still possible to select unban dates.