Oh Teh Commandx0rz!
725
3
Advertisement
Yes, I was right. I was up early. But not as early as I could have been, thankfully. So I got up at 9am, after 4 hours sleep...
First up, congratulations to Drew_Benton who got to #1 on the Top 50 Rated Posters list. We'd been fairly close for a while, at around positiong 6 to 8, and then he flew past from 6 to 1 in a little over a day. I'll have to try to be more helpful I think [wink]
Stuff I got done to the MUD today:
Actions are now completely implemented, as are commands to add, remove, and edit them
Kick/ban controls are in place
Banking is in place
There's now a very brief TOS when you register (basicly saying you can't sell anything in the game for real money)
Commands added to allow admins (I.e. me) to change the flooding parameters on a per-user basis
TA2 and Druink protocol .who's are done - although .ta2who is only used by Pouya's TA client, PClient v3. I'll do a plugin for DruinkIM soon, which will use .druinkwho to display avatars. Which reminds me -
Avatars are done. You can set your avatar image URL, and .druinkwho will tell capable clients who has avatars, when they changed (for caching), and where to find them. I'll eventually have an avatar upload page on my website I expect
IP banning is in place - Untested, but the code is identical to my old MUD, and it worked fine in that
.serverstats command added, which shows pointless information like uptime, data sent / received, and database sizes
You can change your password from in the MUD
You can change your E-Mail address and website URL from in the MUD
.stats is done, so you can get info on other users
And, for your enjoyment, here's the entire command list, dumped from .help:
Also, I discovered that my MUD's been randomly crashing. I thought my idiot future brother-in-law had been closing my MUD somehow, via VNC, so I added some logging at shutdown. And that log never got written. Now, what's odd, is that the executable just exits, no error code or anything like that. I suspect it might be because I'm running the debug .exe on my server in order to make the most of assert() and so on. However, I'm not entirely sure what happens when you hit a __asm{int 3;} when you're not attached to a debugger. Perhaps that's the problem.
Anyway, my solution to the problem is to stick a Sleep(1000) in the main loop, and log every tick. At this very moment, my hard drive is filling up with useless logging at the rate of around 50 bytes per second. At this rate I'll hit the 4Gb limit in a little under 3 years, and since the MUD has been crashing on average after 10 hours or so, I should be ok.
I also thought it could be a threading issue. I have 4 threads running at once:
The main thread - where all the processing goes on
The database sync thread - where I do MySQL UPDATE statements to update dirty users
The accept() thread - calls a blocking accept() to accept new connections
The recv() thread - polls the socket every 100ms for data (And if there's nothing pending, checks if it's exit event is set)
However, the accept thread is blocked (unless it's crashing when someone connects for some reason), as is the database thread. And if there's noone connected, then the recv() thread is sleeping for 100ms and then waking up, doing nothing and going back to sleep again.
So, I don't really know. Once the server crashes again, I can narrow the logging down a bit, and hopefully in 2 or 3 itterations I'll find the problem.
Anyway - the end result is that the MUD is running very slowly just now. You can still use it if you want, but you'll have to wait at 1 second on top of your ping time for anything to get done.
Well, I'm going to procrastinate for a while, and then attempt to have an early night.
EDIT: What the hell, have a screenshot:

EDIT: Thumbnailed screenshot, since it was breaking the tables
First up, congratulations to Drew_Benton who got to #1 on the Top 50 Rated Posters list. We'd been fairly close for a while, at around positiong 6 to 8, and then he flew past from 6 to 1 in a little over a day. I'll have to try to be more helpful I think [wink]
Stuff I got done to the MUD today:
And, for your enjoyment, here's the entire command list, dumped from .help:
Quote:Note that some commands are aliases for others (e.g. n is an alias for north, @ is an alias for who). Also note that some of the commands are moderator / admin / server only. In the real .help they're highlighted different colours, and you can only see commands that are at your permission level.
action action's actionlist actions addipban afk balance ban busy colors colours deleteaction deposit desc druinkwho e east email help ipban iplist kick listipbans loadscript look makeadmin makemoderator makeuser me me's mes mutter n newaction north password quit reloadscript removeipban review s sayto serverstats setactiontext1 setactiontext2 setavatarurl setdesc setemail setfloodmax setfloodreduce setidletimeout setmaxbuffer setpassword setprotocol setshowname setwebsite shout showname shutdown south stats ta2who tell tempban unban verifypassword w website west who whois widewho withdraw @ @@
Also, I discovered that my MUD's been randomly crashing. I thought my idiot future brother-in-law had been closing my MUD somehow, via VNC, so I added some logging at shutdown. And that log never got written. Now, what's odd, is that the executable just exits, no error code or anything like that. I suspect it might be because I'm running the debug .exe on my server in order to make the most of assert() and so on. However, I'm not entirely sure what happens when you hit a __asm{int 3;} when you're not attached to a debugger. Perhaps that's the problem.
Anyway, my solution to the problem is to stick a Sleep(1000) in the main loop, and log every tick. At this very moment, my hard drive is filling up with useless logging at the rate of around 50 bytes per second. At this rate I'll hit the 4Gb limit in a little under 3 years, and since the MUD has been crashing on average after 10 hours or so, I should be ok.
I also thought it could be a threading issue. I have 4 threads running at once:
However, the accept thread is blocked (unless it's crashing when someone connects for some reason), as is the database thread. And if there's noone connected, then the recv() thread is sleeping for 100ms and then waking up, doing nothing and going back to sleep again.
So, I don't really know. Once the server crashes again, I can narrow the logging down a bit, and hopefully in 2 or 3 itterations I'll find the problem.
Anyway - the end result is that the MUD is running very slowly just now. You can still use it if you want, but you'll have to wait at 1 second on top of your ping time for anything to get done.
Well, I'm going to procrastinate for a while, and then attempt to have an early night.
EDIT: What the hell, have a screenshot:

EDIT: Thumbnailed screenshot, since it was breaking the tables
Advertisement
Advertisement
Advertisement
Discussion