Comments (3)
Logging in general is something I've been thinking about as well, we could do a lot there that could be useful.
However, the problem with logging IPs and MACs is that by my understanding it's illegal in some countries, like Germany, so in my opinion we should make that optional. And if it's optional, we can't make banning and double login checks depend on it.
For double login I would propose a simple bool on the account and/or character table, so we can easily query who is logged in with which character. Since we save characters even on abnormal connection terminations, we should always be able to unset it, unless the server is killed. That information can also easily be used by control panels and the like. (Btw, what happens if you try to double login on ToS? In Mabi there was a prompt like "You're logged in already, request logout?")
For banning I think we should ban just the account by default, but with an option to ban MACs and IPs. Although, truth be told, banning either one is pretty useless. In parts of the world, again, like Germany, you rarely even see static IPs, and MACs can easily be changed anyway, so if you're banned you're a router restart, a regedit, and a registration away from playing again. Even with static IPs there are proxies. Banning people for good in a F2P game is really hard.
The downside you've mentioned is another reason to make it optional and come up with different solutions to allow for the functionality without it I think.
from melia.
For double login I would propose a simple bool on the account and/or character table, so we can easily query who is logged in with which character.
This is something I had been thinking about for awhile. The reason I had not done anything yet was because the database must be representative of reality. Most of all the existing queries make use of transactions such that if anything interrupts the process of persistence, the account and data is left in a state that preserves integrity.
However, this doesn't apply for the problem we are discussing here. If an exception happens, database fails to update, or the server is incorrectly shutdown, a player could be locked out without manual intervention. One solution could be to reset all of the "logged in" bools on an account table when the server starts up I suppose.
from melia.
Most of all the existing queries make use of transactions such that if anything interrupts the process of persistence
You are right, the login state update needs to be a separate call/query. On login: Db.UpdateLoginState(account, true)
, on disconnect: Db.UpdateLoginState(account, false)
. (Talking about separate queries, we might want to have regular updates of location, level, etc. for use in online lists or CPs.)
A problem is if the server is killed without properly saving the characters. That's why I asked how officials handle that. On Mabinogi, when the server thinks you're online already for some reason, you get a prompt upon login, saying something along the lines of "You're logged in already, request logout?", which then kills your previous session and lets you login. This may also happen if the server just has a hickup, or wasn't shut down properly, and nobody is actually online with that account.
Thinking about it, I guess it would be very rare for someone not to click "Yes" on that prompt. You have control over the account, you want to play, so you won't go "Oh, I'm logged in already? K, gonna be back later." So, maybe it would be fine to just kill potential other sessions? Preventing double login by simply, potentially kicking someone else?
from melia.
Related Issues (20)
- Base Server Reimagining
- Add client scripting API HOT 4
- Create GUI Host Application HOT 3
- Add warehouse HOT 2
- Add basic social server HOT 1
- Fine-tune basic combat HOT 1
- Add class advancement HOT 1
- Create Client Launcher
- Refactor calculated properties HOT 2
- Sub-weapons not displaying
- Previously selected character not selected on Barracks
- Add Base Job Skills HOT 5
- Add Cooldown System
- Add Quest System
- Add Ability System HOT 2
- Add Ability Learning Times HOT 2
- Add Weaknesses and Damage Modifiers HOT 9
- Add Trading
- Add Mail System HOT 1
- Add Layers/Instances/Phasing
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from melia.