• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

[SOLVED] RBAC removal errors

Status
Not open for further replies.

Noven

Exalted Member
Sooo, I followed "EmuDevs: TrinityCore - Removing RBAC [Recent]" on "YouTube" did everything as the guy was showing, but still I get shit loads of errors :s

I posted the errors into pastebin "http://pastebin.com/J8W73DHw"

Any help would be appreciated ! :)
 
Last edited:

Tommy

Founder
For the most part Chat, ChatHandler, WorldSession, AccountMgr, files were the most important. After those files it is pretty straight forward on how to fix the rest of the errors. I went through some RBAC errors in Player.cpp to show everyone how to do it and less hard it can be. Since you followed everything in the video, you can compile to see the errors left to fix. You will still have more errors to fix in Player.cpp, All the command files, etc - but the most important portions of the RBAC removal I went through in the video. I never said that was the end of getting rid of errors in the video.

People need to learn how to get rid of errors themselves, it can't be handed to people. If I went through every single error, the video would be way too long and I wasn't going to do that despite the length. Double click the errors, read the permission data type to see what security level you think it is for and supply it with a security level.
 

Noven

Exalted Member
Thanks for the tutorial, but as for know as I have no clue on how that stuff works, I am gonna leave it.
 

Tommy

Founder
Thanks for the tutorial, but as for know as I have no clue on how that stuff works, I am gonna leave it.

If you leave it, you will never learn. It is simple as reading the RBAC PERM data type and giving that specific permission a security level.

Security Levels:

  • SEC_PLAYER
  • SEC_MODERATOR
  • SEC_ADMINISTRATOR
  • SEC_CONSOLE

If you're in Player.cpp:

Code:
if (GetSession()->GetSecurity() > SEC_MODERATOR) // If players security level is greater than SEC_MODERATOR (GAMEMASTER+)

Outside of Player.cpp: (Using a variable)

Code:
if (player->GetSession()->GetSecurity() > SEC_MODERATOR) // If players security level is greater than SEC_MODERATOR (GAMEMASTER+)

RBAC data type example:

Code:
RBAC_PERM_USE_START_GM_LEVEL

The above shows us that X can start by the gamemaster level in the configuration file. This obviously is not a SEC_PLAYER security level. It is for SEC_GAMEMASTER+. So the code would be:

Code:
if (GetSession()->GetSecurity() > SEC_MODERATOR)
    // Allow to use start GM level

Just a matter of getting rid of the errors and adding the security level checks back how they were before RBAC. I didn't learn how to do this just by quitting. :p
 
Last edited:

Tommy

Founder
RBAC Systems is quite easy to config with customs ranks aswell :)

The reasons why people want to remove it isn't because it's "easy" with custom ranks, it is because it doesn't work half (all) the time. If you logout when commands were working and log back in, commands will stop working. If you restart the worldserver when the commands were working, commands will stop working. Even if you start up the worldserver and try out the commands, sometimes they won't work until you keep restarting the server. That is mainly why people hate it.

The old security system was actually allot easier with ranks than RBAC. All you had to do was create a new SEC_XXX data type and give it a number value, done. :p
 

Noven

Exalted Member
I get an error on this line

if (sAccountMgr->GetName(player->GetSession()->GetAccountId(), accName))

Saying "function does not take 2 arguments"

And this " error C4430: missing type specifier - int assumed. Note: C++ does not support default-int "

"static std::string CalculateShaPassHash(std::string const& name, std::string const& password);"

Haven't even touched that still getting an error :s
 
Last edited:

Noven

Exalted Member
Build: 14 succeeded, 4 failed, 0 up-to-date, 0 skipped :D, started at only 4 succeeded, now 14, getting there
 

Noven

Exalted Member
Almost all of the errors left is " use of undefined type 'WorldSession' " which I have no clue what means ..
 

Rochet2

Moderator / Eluna Dev
That means WorldSession class is not defined where you try to use it.
You need to include WorldSession.h for example to fix it.
 

Noven

Exalted Member
Do you by any chance see any wrong in these lines?

std::string safe_user = user;
AccountMgr::normalizeString(safe_user);

std::string safe_pass = pass;
AccountMgr::normalizeString(safe_pass);

std::string hash = AccountMgr::CalculateShaPassHash(safe_user, safe_pass);
 

Noven

Exalted Member
Okei, i've now fixed every error I know of, the rest of the errors, are errors I have no clue to fix

"http://pastebin.com/ycGbaRjU"
 

Noven

Exalted Member
Think I am gonna stop here, and just wait until they remove it thereselves after getting alot of complaints.
 

Tommy

Founder
:`(

All my hard work for nothing, been sitting for 9 hours trying to fix this, but the error list just gets longer and longer ..

http://pastebin.com/8MxtSBiJ

Think I am gonna stop here, and just wait until they remove it thereselves after getting alot of complaints.

I'm pretty sure half of those errors are most likely caused by things you forgot to add, like semi-colons next to parenthesis or vice versa:

12>C:/TC/src/server/game/Accounts\AccountMgr.h(74): error C2143: syntax error : missing ')' before ';'

And missing parenthesis:

12>C:/TC/src/server/game/Accounts\AccountMgr.h(74): error C2059: syntax error : ')'

Since that is all I see throughout those errors.

If I'm not mistaken they are getting more praises.

Yeah, sadly they won't ever remove it, no matter how horrible it has become.
 
Status
Not open for further replies.
Top