custom_path.c
ds2.1.1/lib/secure/sefun/custom_path.c · 531 B
From the archive ds2.1.1.zip
Download the archive « Back to the archive contents
#include <lib.h>
string *GetCustomPath(){
string custom_path;
if(!creatorp(this_player())) return ({ DIR_PLAYER_CMDS, DIR_SECURE_PLAYER_CMDS }) ;
custom_path = "/realms/"+this_player()->GetKeyName()+"/cmds";
return ({ custom_path });
}
string GetCustomCommand(string str){
string custom_path;
custom_path = "/realms/"+this_player()->GetKeyName()+"/cmds";
if( file_size(custom_path) != -2 ) return "";
if( file_size(custom_path+"/"+str+".c") < 1 ) return "";
return custom_path+"/"+str+".c";
}