Probably use @savefile@ and @readfile@.
Would probably be !lurk Command Message: @if@[@readfile@[Lurk\@user@.txt]||lurk||@user@ has came out of lurking. @savefile@[Lurk\@user@.txt,notlurking]||@user@ is now lurking. @savefile@[Lurk\@user@.txt,lurk]]
You would create a folder in your deepbot folder > custom logs folder > Create folder named "Lurk" (folder is case sensitive, so if you change the command or folder name, you need to make sure it matches up both in command and in the custom logs folder.)