From: <Jef...@us...> - 2008-09-30 21:17:11
|
Revision: 18675 http://bzflag.svn.sourceforge.net/bzflag/?rev=18675&view=rev Author: JeffM2501 Date: 2008-09-30 21:16:56 +0000 (Tue, 30 Sep 2008) Log Message: ----------- expand the bz_ePlayerAuthEventData to include info for if the user has a password, or did global auth. call bz_ePlayerAuthEvent when global auth finishes, with both positive and negative results. Modified Paths: -------------- trunk/bzflag/include/bzfsAPI.h trunk/bzflag/src/bzfs/ListServerConnection.cxx trunk/bzflag/src/bzfs/commands.cxx Modified: trunk/bzflag/include/bzfsAPI.h =================================================================== --- trunk/bzflag/include/bzfsAPI.h 2008-09-30 17:39:09 UTC (rev 18674) +++ trunk/bzflag/include/bzfsAPI.h 2008-09-30 21:16:56 UTC (rev 18675) @@ -810,11 +810,13 @@ { public: bz_PlayerAuthEventData_V1() : bz_EventData(bz_ePlayerAuthEvent) - , playerID(-1) + , playerID(-1), password(false), globalAuth(false) { } int playerID; + bool password; + bool globalAuth; }; class BZF_API bz_ServerMsgEventData_V1 : public bz_EventData Modified: trunk/bzflag/src/bzfs/ListServerConnection.cxx =================================================================== --- trunk/bzflag/src/bzfs/ListServerConnection.cxx 2008-09-30 17:39:09 UTC (rev 18674) +++ trunk/bzflag/src/bzfs/ListServerConnection.cxx 2008-09-30 21:16:56 UTC (rev 18675) @@ -193,6 +193,12 @@ if (playerIndex < curMaxPlayers) { if (registered) { + + bz_PlayerAuthEventData_V1 commandData; + commandData.playerID = playerIndex; + commandData.globalAuth = verified; + worldEventManager.callEvents(bz_ePlayerAuthEvent, &commandData); + if (!playerData->accessInfo.isRegistered()) playerData->accessInfo.storeInfo(); if (verified) { playerData->_LSAState = GameKeeper::Player::verified; Modified: trunk/bzflag/src/bzfs/commands.cxx =================================================================== --- trunk/bzflag/src/bzfs/commands.cxx 2008-09-30 17:39:09 UTC (rev 18674) +++ trunk/bzflag/src/bzfs/commands.cxx 2008-09-30 21:16:56 UTC (rev 18675) @@ -965,6 +965,7 @@ // Notify plugins of player authentication change bz_PlayerAuthEventData_V1 commandData; commandData.playerID = t; + commandData.password = true; worldEventManager.callEvents(bz_ePlayerAuthEvent, &commandData); } else { sendMessage(ServerPlayer, t, "Wrong Password!"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |