willox / hash.js

Horrific chat bot that was once used in the "Garry's Mod Coders" Steam group chat
http://steamcommunity.com/groups/glua
Creative Commons Zero v1.0 Universal
3 stars 0 forks source link

cookie.GetPrivate() doesn't save on restart #164

Closed ottworks closed 8 years ago

ottworks commented 8 years ago
5:29 PM - Ott: #me.pandora
5:29 PM - $: 8
5:29 PM - Ott: wat
5:29 PM - Verideth: cocksize = ( math.random(0, 10))
5:29 PM - Verideth: me.cocksize
5:29 PM - Ott: I don't think it saved
5:29 PM - Velkon.: .restart
5:29 PM - Verideth: print(cocksize)
5:29 PM - Ott: #me.pandora
5:29 PM - $: 7
5:30 PM - Ott: RIP
SwadicalRag commented 8 years ago

it's cookie.GetRestricted() and you have to call cookie.Save() manually to save it including cookies

after the episode with Markov, the autosave timer was raised to have a period of 1 hour

mcd1992 commented 8 years ago

Ehh I looked into saving the cookie before .update/.restart and I'm too lazy to do it. It would require making some of the lua.js stuff global and putting a lock on .restart that waits until the cookie.Save finishes.

meepen commented 8 years ago

@mcd1992 pls close