Random Chitchat 2012-2016
I tried it once in professional and it worked. Wasn't faster though I think
Thanks given by:
I'm gonna try implement entity saving into Anvil. So that finally those minecarts don't disappearTongue
Thanks given by: NiLSPACE
i'm trying to create a plugin where you can see who broke/placed a block and when, but i have a problem. when the server reloads or restarts and a player destroys a block the ini file gets reset. maybe someone can take a look at it?


Attached Files
.zip   BlockerLogger.zip (Size: 1.54 KB / Downloads: 321)
Thanks given by:
Without even looking, I'm guessing you're not doing cIniFile:Read() on the file first, before storing any data to the cIniFile object. This effectively means, you're asking MCServer to "create a new file, fill it with this data and dump it onto the disk" - ergo the overwrite.

That said, ini files are one of the poorest choices for this kind of database, especially performance-wise. In order to write such a file, MCServer needs first to read the entire file into memory. Bam, megabyte-eater born.

I'd recommend using a flat text file, and create a new one each time the server gets (re)started - that is, in the Initialize function of the plugin; base the file name on current time (is there enough API for that?) to avoid collisions. Lua should support file IO out of the box without any external API, so it should be possible to read and write normal text files without a problem.
Thanks given by:
yes i used io for my login plugin but for every player it creates a new file with in there his password stored as a md5 hash. i also made a plugin already where i can see who destroyed/placed a block but i now have it for about one week in Redcraft Reopened and it has about 21000 files so i need to find another way of storing imported information.
Thanks given by:
i have a small update for the core plugin. you can now configurate the PortsIPv6 with the webadmin. maybe we can finaly change the version now Wink


Attached Files
.lua   web_serversettings.lua (Size: 9.65 KB / Downloads: 249)
Thanks given by:
Have you tested the IPv6 functionality? 'Cause I couldn't test it thoroughly, so I have no idea if it really works Smile
Thanks given by:
no i haven't tested becouse i can't test it either but at least if someone managed to test it than we have the webadmin part Wink
Thanks given by:
i was thinking about adding hardcore mode to the core plugin, that when you die you are banned. shall i try to import that or should it be implented in the source?
Thanks given by:
Doesn't the Core plugin handle bans already? If so, it makes sense to implement hardcore-ban there, too. Togglable, of course Smile
Thanks given by:




Users browsing this thread: 66 Guest(s)