Up to Main Index Up to Journal for September, 2013 JOURNAL FOR FRIDAY 27TH SEPTEMBER, 2013 ______________________________________________________________________________ SUBJECT: Player panic! Oh, never mind... DATE: Fri 27 Sep 22:08:11 BST 2013 WolfMUD Wednesday happened again, but as usual I didn't get time to write anything about it straight away. So what have I been doing? After reworking the loader it became apparent that two packages were nearly always imported together: recordjar and loader. So I've combined the loader package with the recordjar package so only recordjar now needs importing. I've also been documenting the loader. The other thing I've been working on is debugging the player panic issue and sorting out multiple logins of the same player. The player panic is interesting and related to issues with the duplicate logins. I've deliberately tried to keep the login processing lean so that the server cannot be crippled by repeated failed logins - such as brute force password guessing. What I didn't want to do was tie up processing calculating hashes and unmarshaling player files. There are also subtle issues of race conditions when the same account tries to login multiple times at the same time[1]. The next few paragraphs were going to detail the current login parser logic and handover to the player parser and the issues it presented. However I had a sudden thought, realised how thick I was being and deleted them. I will now go away and implement my idea and you will never know about my stupidity ;) Doh! ... time passes ... Just did a little hacking implementing my 'sudden thought' and I've just solved the player panic so half of this post is now redundant *sigh* -- Diddymus [1] I think the key here is to use the PlayerList and it's existing locking to prevent races. At the moment the PlayerList is built around a slice of Player pointers. This could be changed to a map with the key being some hash we can lookup to check if the player is already in the world. Up to Main Index Up to Journal for September, 2013