From 2a197705ac8785e01a48fa1ac5893d3bb876fd0a Mon Sep 17 00:00:00 2001 From: faketruth Date: Thu, 18 Oct 2012 21:54:56 +0000 Subject: Converted some const char*s and std::strings to AStrings Added a cPlayer:RemoveFromGroup() so players can be removed from groups programmatically Added a cClientHandle:SetUsername to be used by Lua. I'm curious what ThuGie can do with his plugin. git-svn-id: http://mc-server.googlecode.com/svn/trunk@978 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/Player.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'source/Player.h') diff --git a/source/Player.h b/source/Player.h index 0b0a0a12c..b074b430d 100644 --- a/source/Player.h +++ b/source/Player.h @@ -74,12 +74,16 @@ public: typedef std::list< cGroup* > GroupList; typedef std::list< std::string > StringList; - void AddToGroup( const char* a_GroupName ); //tolua_export - bool CanUseCommand( const char* a_Command ); //tolua_export - bool HasPermission( const char* a_Permission ); //tolua_export + + /// Adds a player to existing group or creates a new group when it doesn't exist + void AddToGroup( const AString & a_GroupName ); //tolua_export + /// Removes a player from the group, resolves permissions and group inheritance (case sensitive) + void RemoveFromGroup( const AString & a_GroupName ); //tolua_export + bool CanUseCommand( const AString & a_Command ); //tolua_export + bool HasPermission( const AString & a_Permission ); //tolua_export const GroupList & GetGroups() { return m_Groups; } // >> EXPORTED IN MANUALBINDINGS << StringList GetResolvedPermissions(); // >> EXPORTED IN MANUALBINDINGS << - bool IsInGroup( const char* a_Group ); //tolua_export + bool IsInGroup( const AString & a_Group ); //tolua_export AString GetColor(void) const; //tolua_export -- cgit v1.2.3