Raised This Month: $ Target: $400
 0% 

nVault bug?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Misery
Senior Member
Join Date: Dec 2010
Old 06-19-2012 , 09:23   nVault bug?
Reply With Quote #1

Hi,

I'm maintaining a ban vault... It's a short one, since all bans contained in it are only temporary.
I'm running down problems...

You see, I don't need to put a value in the key. So the key can be empty. In fact only timestamp and the key name are what matters.
I use nvault_touch() to set the empty key and update the timestamp to make it the an unban timestamp (i.e. time() + banlength_in_seconds). The advantage is that I can then prune the vault to remove exprired bans... based on timestamps.

However, the vault crashes miserably...
Give it a look too...

Code:
#include <amxmodx>
#include <nvault>

public plugin_init()
{
	new pvault = nvault_open("testvault");
	nvault_touch(pvault, "STEAM_0:0:56423", time() + 3600); // Will create an empty key
	nvault_close(pvault);
}
Now, add it to plugins.ini, load your hlds install. Once AMXX plugins are all loaded, type "exit" in the server console. Repeat once and you will get a nice crash...

Do I miss something?

Cordially,
Misery

Last edited by Misery; 06-19-2012 at 09:26.
Misery is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:13.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode