* 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:
False.Genesis 2007-05-11 21:06:35 +00:00
parent 6c4ae79a87
commit fda133b660
2 changed files with 4 additions and 3 deletions

View File

@ -724,7 +724,8 @@ void DefScriptPackage::My_LoadUserPermissions(VarSet &vs)
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++)
{

View File

@ -95,8 +95,8 @@ bool PlayerNameCache::ReadFromFile(void){
fh.read((char*)&(cacheItem->_guid),sizeof(uint64));
fh.read((char*)&len,sizeof(uint8));
if(len>12 || len<2){
logerror("\nPlayerNameCache data seem corrupt [namelength=%d, should be <=12]",len);
log("-> Clearing cache, creating new.\n");
logerror("PlayerNameCache data seem corrupt [namelength=%d, should be <=12]",len);
log("-> Clearing cache, creating new.");
_cache.clear();
success=false;
break;