Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Detecting upload/download (https://forums.graalonline.com/forums/showthread.php?t=134265125)

Emera 11-27-2011 09:29 PM

Detecting upload/download
 
I was wondering if there is any way to detect if something is being uploaded or downloaded from RC. Since it saves when a player uploads or downloads something to the rc log, I was wondering if I could capture a player doing that and act upon it?

fowlplay4 11-27-2011 09:38 PM

There's onLevelFileUpdated(filename) which will let you track uploads/deletions but not who was responsible for it.

I.e:

PHP Code:

function onLevelFileUpdated(filename) {
  if (
fileexists("levels/" filename)) {
    echo(
extractfilename(filenameSPC "was updated!");
  } else {
    echo(
extractfilename(filenameSPC "was deleted!");
  }


I don't think it's possible otherwise.

Emera 11-27-2011 09:40 PM

Quote:

Originally Posted by fowlplay4 (Post 1675607)
There's onLevelFileUpdated(filename) which will let you track uploads/deletions but not who was responsible for it.

I.e:

PHP Code:

function onLevelFileUpdated(filename) {
  if (
fileexists("levels/" filename)) {
    echo(
extractfilename(filenameSPC "was updated!");
  } else {
    echo(
extractfilename(filenameSPC "was deleted!");
  }


I don't think it's possible otherwise.

That's interesting. Thank you.


All times are GMT +2. The time now is 12:24 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.