From 4e11095441fc98e59611008735949900d72d7465 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Sat, 14 Dec 2013 02:02:26 +0000 Subject: Groups.ini and Users.ini are now generated --- src/Entities/Player.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/Entities') diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp index 7a5ff5696..ff519f890 100644 --- a/src/Entities/Player.cpp +++ b/src/Entities/Player.cpp @@ -1393,7 +1393,12 @@ void cPlayer::LoadPermissionsFromDisk() } else { - LOGWARN("Failed to read the users.ini file. The player will be added only to the Default group."); + LOGWARN("Regenerating users.ini, player %s will be added to the \"Default\" group", m_PlayerName.c_str()); + IniFile.AddHeaderComment(" This is the file in which the group the player belongs to is stored"); + IniFile.AddHeaderComment(" The format is: [PlayerName] | Groups=GroupName"); + + IniFile.SetValue(m_PlayerName, "Groups", "Default"); + IniFile.WriteFile("users.ini"); AddToGroup("Default"); } ResolvePermissions(); -- cgit v1.2.3 From 0aeece7fdaccc8f20e96f9560c4f4c1b5a6bc5cc Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Sat, 14 Dec 2013 02:40:54 +0000 Subject: Fixes to redstone wire and torches + Wires now power blocks around the block beneath * Torches no longer power off if it is on a linked powered block * Enhanced code, split functions, etc. --- src/Entities/Player.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Entities') diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp index ff519f890..34caa340b 100644 --- a/src/Entities/Player.cpp +++ b/src/Entities/Player.cpp @@ -1415,7 +1415,7 @@ bool cPlayer::LoadFromDisk() LOGINFO("Player %s has permissions:", m_PlayerName.c_str() ); for( PermissionMap::iterator itr = m_ResolvedPermissions.begin(); itr != m_ResolvedPermissions.end(); ++itr ) { - if( itr->second ) LOGINFO("%s", itr->first.c_str() ); + if( itr->second ) LOG(" %s", itr->first.c_str() ); } AString SourceFile; -- cgit v1.2.3 From 4622d4ac09f612614368674b443e4205ede2a416 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Sat, 14 Dec 2013 02:54:08 +0000 Subject: Improved player permissions logging --- src/Entities/Player.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Entities') diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp index 34caa340b..85833f31d 100644 --- a/src/Entities/Player.cpp +++ b/src/Entities/Player.cpp @@ -1415,7 +1415,7 @@ bool cPlayer::LoadFromDisk() LOGINFO("Player %s has permissions:", m_PlayerName.c_str() ); for( PermissionMap::iterator itr = m_ResolvedPermissions.begin(); itr != m_ResolvedPermissions.end(); ++itr ) { - if( itr->second ) LOG(" %s", itr->first.c_str() ); + if( itr->second ) LOG(" - %s", itr->first.c_str() ); } AString SourceFile; -- cgit v1.2.3