Skip to content

Commit

Permalink
whatever i changed
Browse files Browse the repository at this point in the history
  • Loading branch information
crutchy- committed Dec 11, 2014
1 parent 12d586e commit 485629c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
1 change: 1 addition & 0 deletions scripts/execfs.php
Expand Up @@ -60,6 +60,7 @@
break;
case "~ls":
# ~ls %path%
execfs_ls();
break;
case "~cd":
# ~cd %path%
Expand Down
19 changes: 17 additions & 2 deletions scripts/execfs_lib.php
Expand Up @@ -47,7 +47,19 @@ function set_fs()

function get_path(&$directory)
{

global $false;
$result=$directory["name"];
$parent=$directory["parent"];
while ($parent<>$false)
{
if ($parent["name"]<>PATH_DELIM)
{
$result=PATH_DELIM.$result;
}
$result=$parent["name"].$result;
$parent=$parent["parent"];
}
return $result;
}

#####################################################################################################
Expand Down Expand Up @@ -150,7 +162,7 @@ function execfs_set($nick,$name,$value)
global $fs;
global $false;
# create path as required
#$path=get_current_path($nick);
#$path=get_current_directory($nick);
$directory=&set_directory("/Level1/Level2/Level3");
if ($directory==$false)
{
Expand Down Expand Up @@ -192,6 +204,9 @@ function execfs_rm()
function execfs_ls()
{
global $fs;
$directory=&get_directory("/Level1/Level2/Level3/Level4");
$path=get_path($directory);
privmsg($path);
}

#####################################################################################################
Expand Down

0 comments on commit 485629c

Please sign in to comment.