Make it so DataBuckets set_data can take time formats such as 1s, 1m, 1d, 1y

This commit is contained in:
Akkadius
2018-07-10 02:24:55 -05:00
parent 623b7b3eee
commit e4d8915c9d
5 changed files with 77 additions and 13 deletions
+3 -3
View File
@@ -826,8 +826,8 @@ void lua_set_data(std::string bucket_key, std::string bucket_value) {
DataBucket::SetData(bucket_key, bucket_value);
}
void lua_set_data(std::string bucket_key, std::string bucket_value, uint32 expires_at_unix) {
DataBucket::SetData(bucket_key, bucket_value, expires_at_unix);
void lua_set_data(std::string bucket_key, std::string bucket_value, std::string expires_at) {
DataBucket::SetData(bucket_key, bucket_value, expires_at);
}
bool lua_delete_data(std::string bucket_key) {
@@ -1677,7 +1677,7 @@ luabind::scope lua_register_general() {
luabind::def("say_link", (std::string(*)(const char*))&lua_say_link),
luabind::def("get_data", (std::string(*)(std::string))&lua_get_data),
luabind::def("set_data", (void(*)(std::string, std::string))&lua_set_data),
luabind::def("set_data", (void(*)(std::string, std::string, uint32))&lua_set_data),
luabind::def("set_data", (void(*)(std::string, std::string, std::string))&lua_set_data),
luabind::def("delete_data", (bool(*)(std::string))&lua_delete_data),
luabind::def("get_guild_name_by_id", &lua_get_guild_name_by_id),
luabind::def("create_instance", &lua_create_instance),