Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addition of TakeIPLog #21

Closed
wants to merge 1 commit into from
Closed

Addition of TakeIPLog #21

wants to merge 1 commit into from

Conversation

HarryS
Copy link
Contributor

@HarryS HarryS commented Feb 21, 2012

Addition of TakeIPLog. Will take screenshots while at lobby, to savee "Last logged in from:" IP. Useful for people catching anyone who gains unallowed access to their game account.

…"Last logged in from:" IP. Useful for people catching anyone who gains unallowed access to their game account.
@cohenadair
Copy link
Member

I think you can call ForceDirectories at the top of the function so there's no need for the if statement. Also, why not use SRL's TheDate and TheTime functions? And I think the function should be added to SRLlog.simba rather than login. That's where I've moved TakeScreen to in the new_randoms branch.

@HarryS
Copy link
Contributor Author

HarryS commented Feb 21, 2012

File accessing (ForceDirectories) shouldn't be called everytime, that's a waste of I/O.

I don't use those functions because they are in a different include file and if I recall correctly could not reference each other due to this. Also TheTime uses ":" which doesn't work in filenames.

Move it if you wish, doesn't really matter, as long as Login.simba is able to execute it. Which I think it won't be able to if it's not in Login.simba. I also think that location is appropriate as it's only used when logging in, but suit yourself.

@ghost
Copy link

ghost commented Feb 26, 2012

Login.simba is (imo) the best place to fit this.
I think it could be renamed to "TakeIPScreen" in order to stop confusion between SRLLog.

@cohenadair
Copy link
Member

Actually, how come you don't just call TakeScreen('IP Screen')?

@HarryS
Copy link
Contributor Author

HarryS commented Feb 26, 2012

Because this adds custom timestamp onto it, uses a different var than SRL's screenshot option, and has its own folder it saves to.

@cohenadair
Copy link
Member

I'd rather all the log stuff be saved in the same folder. Probably doesn't matter that much, I guess. I think you can just do

if (not SRL_DisableIPLog) then
takeScreen(replace(theTime, ':', '-')+' '+players[currentPlayer].name+' IP log');

The SRL/logs/ directory is initialized when a player is logged in I think. If not, it can always be initialized in setupSRL.

@HarryS
Copy link
Contributor Author

HarryS commented Feb 27, 2012

TakeScreen checks if(Screenshot) in it. Making this procedure is easier than messing around with TakeScreen/all those time utils. Just throw it into one and there it goes.

You can change the path if you like, I kept it in Simba/IPLogs/ because more people will see it there, and it'll also serve as a reminder for them to check it/clean it out if they are running low on disk space.

@cohenadair
Copy link
Member

This is done for the next version.

@cohenadair cohenadair closed this Mar 6, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants