* scripts without a special permission level assigned will now have 255 (highest permission) by default.
* forgot to remove some '\n'
This commit is contained in:
parent
6c4ae79a87
commit
fda133b660
@ -724,7 +724,8 @@ void DefScriptPackage::My_LoadUserPermissions(VarSet &vs)
|
|||||||
|
|
||||||
void DefScriptPackage::My_Run(std::string line, std::string username)
|
void DefScriptPackage::My_Run(std::string line, std::string username)
|
||||||
{
|
{
|
||||||
uint8 scperm=0,usrperm=0;
|
uint8 scperm=255; // builtin functions that have no explicit req. permission level assigned should be secure from beeing called
|
||||||
|
uint8 usrperm=0; // users/players that have no explicit permission assigned should have minimal permission
|
||||||
|
|
||||||
for (std::map<std::string,unsigned char>::iterator i = my_usrPermissionMap.begin(); i != my_usrPermissionMap.end(); i++)
|
for (std::map<std::string,unsigned char>::iterator i = my_usrPermissionMap.begin(); i != my_usrPermissionMap.end(); i++)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -95,8 +95,8 @@ bool PlayerNameCache::ReadFromFile(void){
|
|||||||
fh.read((char*)&(cacheItem->_guid),sizeof(uint64));
|
fh.read((char*)&(cacheItem->_guid),sizeof(uint64));
|
||||||
fh.read((char*)&len,sizeof(uint8));
|
fh.read((char*)&len,sizeof(uint8));
|
||||||
if(len>12 || len<2){
|
if(len>12 || len<2){
|
||||||
logerror("\nPlayerNameCache data seem corrupt [namelength=%d, should be <=12]",len);
|
logerror("PlayerNameCache data seem corrupt [namelength=%d, should be <=12]",len);
|
||||||
log("-> Clearing cache, creating new.\n");
|
log("-> Clearing cache, creating new.");
|
||||||
_cache.clear();
|
_cache.clear();
|
||||||
success=false;
|
success=false;
|
||||||
break;
|
break;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user