Temporarily fixed GIB filesystem access until I can work out a system that

better meshes with the new QFS.  Fixed up some GIB scripts a bit.
This commit is contained in:
Brian Koropoff 2003-02-16 21:27:18 +00:00
parent 8f8d866cdf
commit f6da3baa1e
3 changed files with 11 additions and 11 deletions

View file

@ -92,7 +92,7 @@ function infobot::chatEvent {
res = $(regex::extract $mesg "^([^[:space:]]+)[[:space:]]+(is|are)[[:space:]]+(.+)" i)
if #res {
if ($(infobot::defineFactoid $args[1] $res[2] $res[4] $res[3]) && $addr) {
say $from, ": You do not have the privelegdes to alter factoids."
say $from, ": You do not have the privileges to alter factoids."
} else if $addr {
say $from, ": Understood."
}
@ -121,7 +121,7 @@ function infobot::cmdRegister {
function infobot::forget {
ifnot (!$infobot_restrict || $(infobot::hasAccess $args[1])) {
say $args[2], ": You do not have the privelegdes to alter factoids."
say $args[2], ": You do not have the privileges to alter factoids."
return
}
fact = $(infobot::makeKey $args[3])

View file

@ -42,15 +42,13 @@ global cvars = crosshair r_dlight_lightmap r_shadows r_wateralpha show_fps
function cvar::save {
for i in @args[1:] {
dprint "Saving cvar ", $i, ".\n"
global hold_$i = ${$i}
global cvars.$i = ${$i}
}
}
function cvar::restore {
for i in @args[1:] {
dprint "Restoring cvar", $i, " to ", ${hold_$i}, ".\n"
set $i ${hold_$i}
set $i ${cvars.$i}
}
}
@ -66,6 +64,7 @@ function sshot {
// find next available name
name_s = 0
for name_t in `file::find qf???.tga` {
echo "Testing ", `slice $name_t 2 5`
if (`slice $name_t 2 5` > $name_s) {break}
name_s = ($name_s + 1)
}
@ -73,7 +72,7 @@ function sshot {
screenshot
// pad & normalize source
name_s = "00", $name_s
name_s = "qf", `slice $name_s -3 0`, ".tga"
name_s = "qf", `slice $name_s -3`, ".tga"
// destination specified with extension?
name_d = $args[1]
ifnot $(equal $(slice $name_d -4 0) ".tga") {

View file

@ -700,17 +700,18 @@ GIB_File_Transform_Path_Null (dstring_t * path)
static int
GIB_File_Transform_Path_Secure (dstring_t * path)
{
char *s /* , e_dir[MAX_OSPATH] */ ;
char *s, e_dir[MAX_OSPATH];
for (s = strchr (path->str, '\\'); s; s = strchr (s, '\\'))
*s = '/';
if (Sys_PathType (path->str) != PATHTYPE_RELATIVE_BELOW)
return -1;
/* Qexpand_squiggle (fs_userpath->string, e_dir); */
dstring_insertstr (path, 0, "/");
dstring_insertstr (path, 0, /* e_dir */ qfs_gamedir->dir.def);
dstring_insertstr (path, 0, qfs_gamedir->dir.def);
dstring_insertstr (path, 0, "/");
dstring_insertstr (path, 0, fs_userpath->string);
Qexpand_squiggle (fs_userpath->string, e_dir);
dstring_insertstr (path, 0, e_dir);
return 0;
}