You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(42) |
Sep
(42) |
Oct
(57) |
Nov
(12) |
Dec
(47) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(14) |
Feb
(4) |
Mar
(52) |
Apr
(13) |
May
(89) |
Jun
(38) |
Jul
(5) |
Aug
(32) |
Sep
(68) |
Oct
(27) |
Nov
(2) |
Dec
(13) |
2004 |
Jan
(3) |
Feb
(6) |
Mar
(3) |
Apr
(1) |
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <no...@us...> - 2003-06-20 12:37:43
|
Log Message: ----------- Shortcircuit IDs... yay. Modified Files: -------------- /cvsroot/decaldev/source/DecalFilters: IdentifyQueue.cpp Revision Data ------------- Index: IdentifyQueue.cpp =================================================================== RCS file: /cvsroot/decaldev/source/DecalFilters/IdentifyQueue.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- IdentifyQueue.cpp 20 Jun 2003 10:48:00 -0000 1.14 +++ IdentifyQueue.cpp 20 Jun 2003 12:37:12 -0000 1.15 @@ -96,12 +96,12 @@ { if( !m_Queue.empty() ) { - for( IDContainer::iterator pDeque = m_Queue.begin(); pDeque != m_Queue.end(); pDeque++ ) - { - if ( (*pDeque)->lObjectID == lObjectID ) - return S_OK; - } - } + for( IDContainer::iterator pDeque = m_Queue.begin(); pDeque != m_Queue.end(); ++pDeque ) + { + if( (*pDeque)->lObjectID == lObjectID ) + return S_OK; + } + } IDStruct *QueueObj = new IDStruct(); QueueObj->lObjectID = lObjectID; @@ -118,12 +118,15 @@ { if( !m_Queue.empty() ) { - for( IDContainer::iterator pDeque = m_Queue.begin(); pDeque != m_Queue.end(); pDeque++ ) - { + for( IDContainer::iterator pDeque = m_Queue.begin(); pDeque != m_Queue.end(); ++pDeque ) + { if ( (*pDeque)->lObjectID == lObjectID ) - pDeque = m_Queue.erase( pDeque ); - } - } + { + m_Queue.erase( pDeque ); + break; + } + } + } IDStruct *QueueObj = new IDStruct(); QueueObj->lObjectID = lObjectID; |
From: <no...@us...> - 2003-06-20 12:36:19
|
Log Message: ----------- Shortcircuit IDs... yay. Modified Files: -------------- /cvsroot/decaldev/source/Decal: ACHooks.cpp ACHooks.h Revision Data ------------- Index: ACHooks.cpp =================================================================== RCS file: /cvsroot/decaldev/source/Decal/ACHooks.cpp,v retrieving revision 1.56 retrieving revision 1.57 diff -u -d -r1.56 -r1.57 --- ACHooks.cpp 20 Jun 2003 10:47:18 -0000 1.56 +++ ACHooks.cpp 20 Jun 2003 12:36:17 -0000 1.57 @@ -26,6 +26,7 @@ cACHooks* cACHooks::s_pACHooks = NULL; long g_lObjectDestroyedProc = 0; long g_lSelectItemHijackProc = 0; +long g_lIdentifyHijackProc = 0; void (__fastcall *pfnOldChatMessage)(int _ecx, int _edx, char *, DWORD ) = NULL; void (*pfnOldChatText)() = NULL; @@ -47,6 +48,7 @@ extern void __fastcall OnChatMessage( int _ecx, int _edx, char* pText, long dwColor ); extern void OnChatText(); +extern void IdentifyShortcircuit(); extern void SelectItemHook(); extern void ObjectDestroyedHook(); extern DWORD HookCall (DWORD dwCallAddress, DWORD dwReplacement); @@ -95,6 +97,7 @@ m_bGetVitalInfo = false; m_bSelectItemHook = false; m_bUstAddItem_Useable = false; + m_bRequestShortcircuit = false; m_Hooks = 0; memset(m_HooksEx, 0, sizeof(m_HooksEx)); @@ -714,32 +717,68 @@ bool m_bUstAddItem = false; - bool m_bUstAddItem_Off1 = false; - bool m_bUstAddItem_Off2 = false; - if (QueryMemLoc(BSTRT( "UstAddItem" ), &Val) == S_OK) - { - m_lUstAddItem = Val; - m_bUstAddItem = true; - } + bool m_bUstAddItem_Off1 = false; + bool m_bUstAddItem_Off2 = false; + if (QueryMemLoc(BSTRT( "UstAddItem" ), &Val) == S_OK) + { + m_lUstAddItem = Val; + m_bUstAddItem = true; + } - if (QueryMemLoc(BSTRT( "UstAddItem_Off1" ), &Val) == S_OK) - { - m_lUstAddItem_Off1 = Val; - m_bUstAddItem_Off1 = true; - } + if (QueryMemLoc(BSTRT( "UstAddItem_Off1" ), &Val) == S_OK) + { + m_lUstAddItem_Off1 = Val; + m_bUstAddItem_Off1 = true; + } - if (QueryMemLoc(BSTRT( "UstAddItem_Off2" ), &Val) == S_OK) - { - m_lUstAddItem_Off2 = Val; - m_bUstAddItem_Off2 = true; - } + if (QueryMemLoc(BSTRT( "UstAddItem_Off2" ), &Val) == S_OK) + { + m_lUstAddItem_Off2 = Val; + m_bUstAddItem_Off2 = true; + } - if (m_bUstAddItem && m_bUstAddItem_Off1 && m_bUstAddItem_Off2 && m_bChatMessageAddy) + if (m_bUstAddItem && m_bUstAddItem_Off1 && m_bUstAddItem_Off2 && m_bChatMessageAddy) { - SetHookEx(eUstAddItem); + SetHookEx(eUstAddItem); m_bUstAddItem_Useable = true; - } + } + m_lRequestShortcircuit1 = 0; + m_lRequestShortcircuit2 = 0; + m_lRequestShortcircuit3 = 0; + m_lRequestShortcircuit4 = 0; + + if( QueryMemLoc( BSTRT( "RequestShortcircuit1" ), &Val ) == S_OK ) + m_lRequestShortcircuit1 = Val; + if( QueryMemLoc( BSTRT( "RequestShortcircuit2" ), &Val ) == S_OK ) + m_lRequestShortcircuit2 = Val; + if( QueryMemLoc( BSTRT( "RequestShortcircuit3" ), &Val ) == S_OK ) + m_lRequestShortcircuit3 = Val; + if( QueryMemLoc( BSTRT( "RequestShortcircuit4" ), &Val ) == S_OK ) + m_lRequestShortcircuit4 = Val; + + if( m_lRequestShortcircuit1 && m_lRequestShortcircuit2 && m_lRequestShortcircuit3 && m_lRequestShortcircuit4 ) + { + DWORD dwHook1 = HookCall( m_lRequestShortcircuit1, (DWORD) IdentifyShortcircuit ); + DWORD dwHook2 = HookCall( m_lRequestShortcircuit2, (DWORD) IdentifyShortcircuit ); + DWORD dwHook3 = HookCall( m_lRequestShortcircuit3, (DWORD) IdentifyShortcircuit ); + DWORD dwHook4 = HookCall( m_lRequestShortcircuit4, (DWORD) IdentifyShortcircuit ); + + if( dwHook1 && dwHook2 && dwHook3 && dwHook4 && (dwHook1 == dwHook2) && (dwHook2 == dwHook3) && (dwHook3 == dwHook4) ) + { + m_bRequestShortcircuit = true; + g_lIdentifyHijackProc = dwHook1; + } + + else + { + // Something's wrong. + HookCall( m_lRequestShortcircuit1, dwHook1 ); + HookCall( m_lRequestShortcircuit2, dwHook2 ); + HookCall( m_lRequestShortcircuit3, dwHook3 ); + HookCall( m_lRequestShortcircuit4, dwHook4 ); + } + } } @@ -766,6 +805,14 @@ HookCall( lCall2, g_lObjectDestroyedProc ); } + if( m_bRequestShortcircuit ) + { + HookCall( m_lRequestShortcircuit1, g_lIdentifyHijackProc ); + HookCall( m_lRequestShortcircuit2, g_lIdentifyHijackProc ); + HookCall( m_lRequestShortcircuit3, g_lIdentifyHijackProc ); + HookCall( m_lRequestShortcircuit4, g_lIdentifyHijackProc ); + } + s_pACHooks = NULL; g_lObjectDestroyedProc = 0; @@ -1988,6 +2035,12 @@ cACHooks::s_pACHooks->InternalSelectItem( dwID ); } +void Shortcircuit( DWORD dwID ) +{ + if( cACHooks::s_pACHooks ) + cACHooks::s_pACHooks->m_pIdQueue->ShortcircuitID( dwID ); +} + void __declspec(naked) SelectItemHook() { _asm @@ -2017,6 +2070,26 @@ mov [esp+8],eax jmp g_lObjectDestroyedProc + } +} + +void __declspec(naked) IdentifyShortcircuit() +{ + __asm + { + mov eax,[esp+4] + push eax + push ecx + + push eax + call Shortcircuit + add esp, 4 + + pop ecx + pop eax + mov [esp+4], eax + + jmp g_lIdentifyHijackProc } } Index: ACHooks.h =================================================================== RCS file: /cvsroot/decaldev/source/Decal/ACHooks.h,v retrieving revision 1.41 retrieving revision 1.42 diff -u -d -r1.41 -r1.42 --- ACHooks.h 19 Jun 2003 21:53:02 -0000 1.41 +++ ACHooks.h 20 Jun 2003 12:36:17 -0000 1.42 @@ -212,34 +212,39 @@ bool m_bSecureTrade_Add; long m_lSecureTrade_Add; - bool m_bSecureTrade_Add_Off1; - long m_lSecureTrade_Add_Off1; - bool m_bSecureTrade_Add_Off2; - long m_lSecureTrade_Add_Off2; + bool m_bSecureTrade_Add_Off1; + long m_lSecureTrade_Add_Off1; + bool m_bSecureTrade_Add_Off2; + long m_lSecureTrade_Add_Off2; - bool m_bGetSkillInfo; - long m_lGetSkillInfo, m_lGetSkillInfo_vT; - bool m_bGetAttributeInfo; - long m_lGetAttributeInfo, m_lGetAttributeInfo_vT; - bool m_bGetVitalInfo; - long m_lGetVitalInfo, m_lGetVitalInfo_vT; + bool m_bGetSkillInfo; + long m_lGetSkillInfo, m_lGetSkillInfo_vT; + bool m_bGetAttributeInfo; + long m_lGetAttributeInfo, m_lGetAttributeInfo_vT; + bool m_bGetVitalInfo; + long m_lGetVitalInfo, m_lGetVitalInfo_vT; - bool m_bChatColor; - long m_lChatColor; + bool m_bChatColor; + long m_lChatColor; bool m_bSelectItemHook; long m_lSelectItemHook; - - bool m_bUstAddItem_Useable; + + bool m_bUstAddItem_Useable; long m_lUstAddItem; - long m_lUstAddItem_Off1; - long m_lUstAddItem_Off2; - + long m_lUstAddItem_Off1; + long m_lUstAddItem_Off2; + + bool m_bRequestShortcircuit; + long m_lRequestShortcircuit1; + long m_lRequestShortcircuit2; + long m_lRequestShortcircuit3; + long m_lRequestShortcircuit4; + unsigned int m_HooksEx[1]; unsigned int m_HookCount; CComPtr< IDecal > m_pDecal; - CComPtr< IKitchenSink > m_pIdQueue; public: static cACHooks* s_pACHooks; @@ -248,6 +253,7 @@ bool InternalChatText( char *szText ); bool InternalChatMessage( char *szText, long lColor ); void SetHookEx(enum eAvailableHooksEx HookID); + CComPtr< IKitchenSink > m_pIdQueue; STDMETHOD(MoveItemEx)(long lObjectID, long lDestinationID); STDMETHOD(get_PointerState)(long *pVal); |
From: <no...@us...> - 2003-06-20 10:48:01
|
Log Message: ----------- Add framework for shortcircuit Modified Files: -------------- /cvsroot/decaldev/source/DecalFilters: IdentifyQueue.cpp IdentifyQueue.h Revision Data ------------- Index: IdentifyQueue.cpp =================================================================== RCS file: /cvsroot/decaldev/source/DecalFilters/IdentifyQueue.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- IdentifyQueue.cpp 20 Jun 2003 10:33:36 -0000 1.13 +++ IdentifyQueue.cpp 20 Jun 2003 10:48:00 -0000 1.14 @@ -34,11 +34,10 @@ m_pRequest = reinterpret_cast< RequestPtr >( lRequestIDMemloc ); return S_OK; } - - else - return E_FAIL; } + + m_pService.Release(); return E_FAIL; } @@ -103,12 +102,34 @@ return S_OK; } } - + IDStruct *QueueObj = new IDStruct(); QueueObj->lObjectID = lObjectID; QueueObj->lTime = timeGetTime(); m_Queue.push_back( QueueObj ); - + + if( !m_bWaiting ) + Request(); + + return S_OK; +} + +STDMETHODIMP CIdentifyQueue::ShortcircuitID( long lObjectID ) +{ + if( !m_Queue.empty() ) + { + for( IDContainer::iterator pDeque = m_Queue.begin(); pDeque != m_Queue.end(); pDeque++ ) + { + if ( (*pDeque)->lObjectID == lObjectID ) + pDeque = m_Queue.erase( pDeque ); + } + } + + IDStruct *QueueObj = new IDStruct(); + QueueObj->lObjectID = lObjectID; + QueueObj->lTime = timeGetTime(); + m_Queue.push_front( QueueObj ); + if( !m_bWaiting ) Request(); @@ -133,8 +154,8 @@ long lObjectID; pMembers->get_NextInt( _bstr_t( "object" ), &lObjectID ); - - + + for( IDContainer::iterator pDeque = m_Queue.begin(); pDeque != m_Queue.end(); pDeque++ ) { if ( (*pDeque)->lObjectID == lObjectID ) Index: IdentifyQueue.h =================================================================== RCS file: /cvsroot/decaldev/source/DecalFilters/IdentifyQueue.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- IdentifyQueue.h 20 Jun 2003 10:30:57 -0000 1.5 +++ IdentifyQueue.h 20 Jun 2003 10:48:00 -0000 1.6 @@ -72,6 +72,7 @@ // IKitchenSink STDMETHOD(AddToQueue)( long lObjectID ); + STDMETHOD(ShortcircuitID)( long lObjectID ); }; #endif //__IDQUEUE_H_ |
From: <no...@us...> - 2003-06-20 10:47:20
|
Log Message: ----------- Add framework for shortcircuit IDs Modified Files: -------------- /cvsroot/decaldev/source/Decal: ACHooks.cpp Revision Data ------------- Index: ACHooks.cpp =================================================================== RCS file: /cvsroot/decaldev/source/Decal/ACHooks.cpp,v retrieving revision 1.55 retrieving revision 1.56 diff -u -d -r1.55 -r1.56 --- ACHooks.cpp 20 Jun 2003 06:37:37 -0000 1.55 +++ ACHooks.cpp 20 Jun 2003 10:47:18 -0000 1.56 @@ -2198,6 +2198,7 @@ return S_OK; } + STDMETHODIMP cACHooks::SendMessageByMask( long lMask, BSTR szMessage ) { if( !(m_bInternalStringConstructor && m_bInternalStringDestructor && m_bSendMessageToMask) ) |
From: <no...@us...> - 2003-06-20 10:46:45
|
Log Message: ----------- Add framework for shortcircuit IDs Modified Files: -------------- /cvsroot/decaldev/source/Include: Decal.idl Revision Data ------------- Index: Decal.idl =================================================================== RCS file: /cvsroot/decaldev/source/Include/Decal.idl,v retrieving revision 1.39 retrieving revision 1.40 diff -u -d -r1.39 -r1.40 --- Decal.idl 19 Jun 2003 21:53:11 -0000 1.39 +++ Decal.idl 20 Jun 2003 10:46:44 -0000 1.40 @@ -212,6 +212,7 @@ interface IKitchenSink : IUnknown { [helpstring("method AddToQueue")] HRESULT AddToQueue([in]long lObjectID); + [helpstring("method ShortcircuitID")] HRESULT ShortcircuitID([in] long lObjectID); }; [ |
From: <no...@us...> - 2003-06-20 10:33:38
|
Log Message: ----------- Add queue empty -> call id(0) Modified Files: -------------- /cvsroot/decaldev/source/DecalFilters: IdentifyQueue.cpp Revision Data ------------- Index: IdentifyQueue.cpp =================================================================== RCS file: /cvsroot/decaldev/source/DecalFilters/IdentifyQueue.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- IdentifyQueue.cpp 20 Jun 2003 10:30:57 -0000 1.12 +++ IdentifyQueue.cpp 20 Jun 2003 10:33:36 -0000 1.13 @@ -155,7 +155,10 @@ void CIdentifyQueue::Request() { if( m_Queue.empty() ) + { + m_pRequest( 0 ); return; + } if( !m_bWaiting ) { |
From: <no...@us...> - 2003-06-20 10:30:59
|
Log Message: ----------- Fix for IDQueue crash Modified Files: -------------- /cvsroot/decaldev/source/DecalFilters: IdentifyQueue.cpp IdentifyQueue.h Revision Data ------------- Index: IdentifyQueue.cpp =================================================================== RCS file: /cvsroot/decaldev/source/DecalFilters/IdentifyQueue.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- IdentifyQueue.cpp 19 Jun 2003 12:31:32 -0000 1.11 +++ IdentifyQueue.cpp 20 Jun 2003 10:30:57 -0000 1.12 @@ -6,6 +6,8 @@ // Timeout in millisec to re-request ID #define TIMEOUT 700 + + enum AcMessages { msgGameEvent = 0xF7B0, @@ -23,9 +25,21 @@ { if( m_pService->get_Decal( &m_pDecal ) == S_OK ) if( m_pDecal->get_Hooks( &m_pHooks ) == S_OK ) + { m_pHooks->SetIDFilter( this ); - return S_OK; + long lRequestIDMemloc; + if( m_pHooks->QueryMemLoc( _bstr_t( "RequestID" ), &lRequestIDMemloc ) == S_OK ) + { + m_pRequest = reinterpret_cast< RequestPtr >( lRequestIDMemloc ); + return S_OK; + } + + else + return E_FAIL; + } + + return E_FAIL; } HRESULT CIdentifyQueue::onTerminate() @@ -33,6 +47,8 @@ m_pDecal.Release(); m_pHooks.Release(); + m_pRequest = NULL; + return S_OK; } @@ -139,13 +155,11 @@ void CIdentifyQueue::Request() { if( m_Queue.empty() ) - { - m_pHooks->RequestID( 0 ); return; - } + if( !m_bWaiting ) { - m_pHooks->RequestID( m_Queue[0]->lObjectID ); + m_pRequest( m_Queue[0]->lObjectID ); m_bWaiting = true; if( m_Queue[0]->lObjectID == 0 ) Index: IdentifyQueue.h =================================================================== RCS file: /cvsroot/decaldev/source/DecalFilters/IdentifyQueue.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- IdentifyQueue.h 1 Apr 2003 22:55:18 -0000 1.4 +++ IdentifyQueue.h 20 Jun 2003 10:30:57 -0000 1.5 @@ -11,6 +11,8 @@ #include "..\include\decal.h" #include <deque> +typedef void(*RequestPtr)( long ); + struct IDStruct { long lObjectID; @@ -51,7 +53,9 @@ IDContainer m_Queue; bool m_bWaiting; long m_lAttempts; - + + // Id Func pointer + RequestPtr m_pRequest; void DoGameEvent( IMessageIterator *pMembers ); void DoIDItem( IMessageIterator *pMembers ); |
From: <no...@us...> - 2003-06-20 06:47:31
|
Log Message: ----------- Er, forgot something Modified Files: -------------- /cvsroot/decaldev/source/Installer/Res: Install.vbs Revision Data ------------- Index: Install.vbs =================================================================== RCS file: /cvsroot/decaldev/source/Installer/Res/Install.vbs,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- Install.vbs 20 Jun 2003 06:44:35 -0000 1.35 +++ Install.vbs 20 Jun 2003 06:47:30 -0000 1.36 @@ -56,7 +56,7 @@ 'All of these -must- be specified Private Const ThisProduct = "Decal" ' The name of your product, used it dialogs and such -Private Const ThisVersion = "2.5.0.5" ' The version of your product, used in dialogs and such +Private Const ThisVersion = "2.5.2.0 RC1" ' The version of your product, used in dialogs and such Private Const MSIFileName = "Decal.msi" ' The name of the MSI file that will be excuted 'Add all of your previous product IDs to the dictionary for removal by the installer AllProducts.Add "1.0.1.0", "{4AFA7857-D10F-4A74-A504-9C10320A6DB9}" |
From: <no...@us...> - 2003-06-20 06:44:37
|
Log Message: ----------- Update for 2.5.2.0 RC1 installer Modified Files: -------------- /cvsroot/decaldev/source/Installer/Res: Install.vbs Revision Data ------------- Index: Install.vbs =================================================================== RCS file: /cvsroot/decaldev/source/Installer/Res/Install.vbs,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- Install.vbs 27 May 2003 11:58:58 -0000 1.34 +++ Install.vbs 20 Jun 2003 06:44:35 -0000 1.35 @@ -99,6 +99,8 @@ AllProducts.Add "2.5.0.2", "{F794642A-63D5-11D7-B2DA-009027B6A4F1}" AllProducts.Add "2.5.0.4", "{29E8FB17-4C4E-4F5D-8C5D-F3826ECE2CF6}" AllProducts.Add "2.5.0.5", "{35012CC1-DC9F-49C3-9593-2B246AE68D3A}" +AllProducts.Add "2.5.2.0 RC1", "{ED4744B7-3F12-453B-9908-D192E0F5477A}" + |
From: <no...@us...> - 2003-06-20 06:42:30
|
Log Message: ----------- Update for 2.5.2.0 RC1 Installer Modified Files: -------------- /cvsroot/decaldev/source/DecalInstaller: DecalInstaller.vdproj Revision Data ------------- Index: DecalInstaller.vdproj =================================================================== RCS file: /cvsroot/decaldev/source/DecalInstaller/DecalInstaller.vdproj,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- DecalInstaller.vdproj 19 Jun 2003 09:43:20 -0000 1.9 +++ DecalInstaller.vdproj 20 Jun 2003 06:42:29 -0000 1.10 @@ -27,12 +27,84 @@ } "Entry" { + "MsmKey" = "8:_10D01E415273DFB80A6309EC12D187D8" + "OwnerKey" = "8:_0593B7A6B4D74017A43CC5F9741D078B" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_10D01E415273DFB80A6309EC12D187D8" + "OwnerKey" = "8:_F7B461AAFB7641F699DAEAF49904A662" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_10D01E415273DFB80A6309EC12D187D8" + "OwnerKey" = "8:_BD4EC7DFE26A40BA84001249533EC862" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_10D01E415273DFB80A6309EC12D187D8" + "OwnerKey" = "8:_AC7940677AFA439D9D75C9827A0003A2" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_10D01E415273DFB80A6309EC12D187D8" + "OwnerKey" = "8:_A03B9AE58553491581FA0975DF6E6E88" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_10D01E415273DFB80A6309EC12D187D8" + "OwnerKey" = "8:_8E9B4D574D014738B94369502A191459" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_10D01E415273DFB80A6309EC12D187D8" + "OwnerKey" = "8:_287894F290604710B0E99CD646021261" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_10D01E415273DFB80A6309EC12D187D8" + "OwnerKey" = "8:_11AE7CD5CB2A43E395B33FDD50522940" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_10D01E415273DFB80A6309EC12D187D8" + "OwnerKey" = "8:_10B736524B444A95B8CC8D36B521F980" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { "MsmKey" = "8:_11AE7CD5CB2A43E395B33FDD50522940" "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" } "Entry" { + "MsmKey" = "8:_1F778A8672BE4C839269BAB167E9614C" + "OwnerKey" = "8:_0593B7A6B4D74017A43CC5F9741D078B" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_1F778A8672BE4C839269BAB167E9614C" + "OwnerKey" = "8:_11AE7CD5CB2A43E395B33FDD50522940" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_1F778A8672BE4C839269BAB167E9614C" + "OwnerKey" = "8:_10B736524B444A95B8CC8D36B521F980" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { "MsmKey" = "8:_287894F290604710B0E99CD646021261" "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" @@ -51,6 +123,24 @@ } "Entry" { + "MsmKey" = "8:_41F2E99B0C1B72CFD51382D5E140A7E8" + "OwnerKey" = "8:_10B736524B444A95B8CC8D36B521F980" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_41F2E99B0C1B72CFD51382D5E140A7E8" + "OwnerKey" = "8:_A03B9AE58553491581FA0975DF6E6E88" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_41F2E99B0C1B72CFD51382D5E140A7E8" + "OwnerKey" = "8:_287894F290604710B0E99CD646021261" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { "MsmKey" = "8:_422DA789643D4CFC8308DBB6EB58ED8B" "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" @@ -93,24 +183,90 @@ } "Entry" { + "MsmKey" = "8:_942AAA28BB647CF0EF1C6137B296D4FE" + "OwnerKey" = "8:_BD4EC7DFE26A40BA84001249533EC862" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_9455E238CE65423791E3468D3B46A687" + "OwnerKey" = "8:_10B736524B444A95B8CC8D36B521F980" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_9455E238CE65423791E3468D3B46A687" + "OwnerKey" = "8:_A03B9AE58553491581FA0975DF6E6E88" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_9455E238CE65423791E3468D3B46A687" + "OwnerKey" = "8:_11AE7CD5CB2A43E395B33FDD50522940" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { "MsmKey" = "8:_A03B9AE58553491581FA0975DF6E6E88" "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" } "Entry" { + "MsmKey" = "8:_A363B66FCAE3DB5C7CECA058D6C5B2B4" + "OwnerKey" = "8:_287894F290604710B0E99CD646021261" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { "MsmKey" = "8:_A8236153441A4A2295B6EB7344BAF9E6" "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" } "Entry" { + "MsmKey" = "8:_AB8B779E801448568C9C2869BFA349A8" + "OwnerKey" = "8:_287894F290604710B0E99CD646021261" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_AB8B779E801448568C9C2869BFA349A8" + "OwnerKey" = "8:_E256A97055264EB5B195F1414117D027" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_AB8B779E801448568C9C2869BFA349A8" + "OwnerKey" = "8:_673044C5656142EBAA86D07A36EFFF5A" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { "MsmKey" = "8:_AC7940677AFA439D9D75C9827A0003A2" "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" } "Entry" { + "MsmKey" = "8:_B4C386BF2CC7BBF4F0C31E1D7755BA73" + "OwnerKey" = "8:_287894F290604710B0E99CD646021261" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_BC87E37B7AD8F9835E2A3AC4B4EDBC61" + "OwnerKey" = "8:_A03B9AE58553491581FA0975DF6E6E88" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_BC87E37B7AD8F9835E2A3AC4B4EDBC61" + "OwnerKey" = "8:_BD4EC7DFE26A40BA84001249533EC862" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { "MsmKey" = "8:_BD4EC7DFE26A40BA84001249533EC862" "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" @@ -123,6 +279,24 @@ } "Entry" { + "MsmKey" = "8:_E2BCDE09C4E942E2AA8D04B5BD84DCF3" + "OwnerKey" = "8:_0593B7A6B4D74017A43CC5F9741D078B" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_E2BCDE09C4E942E2AA8D04B5BD84DCF3" + "OwnerKey" = "8:_11AE7CD5CB2A43E395B33FDD50522940" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_E2BCDE09C4E942E2AA8D04B5BD84DCF3" + "OwnerKey" = "8:_10B736524B444A95B8CC8D36B521F980" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { "MsmKey" = "8:_F7B461AAFB7641F699DAEAF49904A662" "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" @@ -133,6 +307,18 @@ "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" } + "Entry" + { + "MsmKey" = "8:_FD2F9BAB00E2CB44E03A93E604085DE2" + "OwnerKey" = "8:_0593B7A6B4D74017A43CC5F9741D078B" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_FD2F9BAB00E2CB44E03A93E604085DE2" + "OwnerKey" = "8:_287894F290604710B0E99CD646021261" + "MsmSig" = "8:_UNDEFINED" + } } "Configurations" { @@ -191,6 +377,26 @@ } "File" { + "{A582A373-4685-4296-BEFE-614B80A702C3}:_10D01E415273DFB80A6309EC12D187D8" + { + "SourcePath" = "8:msxml.dll" + "TargetName" = "8:msxml.dll" + "Tag" = "8:" + "Folder" = "8:_8166ECC1DA234550B1E7EF74BD46A69F" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Vital" = "11:TRUE" + "ReadOnly" = "11:FALSE" + "Hidden" = "11:FALSE" + "System" = "11:FALSE" + "Permanent" = "11:FALSE" + "SharedLegacy" = "11:FALSE" + "PackageAs" = "3:1" + "Register" = "3:4" + "Exclude" = "11:FALSE" + "IsDependency" = "11:TRUE" + "IsolateTo" = "8:" + } "{A582A373-4685-4296-BEFE-614B80A702C3}:_2946BCB3B3574315816189D84E505D59" { "SourcePath" = "8:..\\Release\\Tab-Active.bmp" @@ -231,6 +437,26 @@ "IsDependency" = "11:FALSE" "IsolateTo" = "8:" } + "{A582A373-4685-4296-BEFE-614B80A702C3}:_41F2E99B0C1B72CFD51382D5E140A7E8" + { + "SourcePath" = "8:VERSION.dll" + "TargetName" = "8:VERSION.dll" + "Tag" = "8:" + "Folder" = "8:_8166ECC1DA234550B1E7EF74BD46A69F" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Vital" = "11:TRUE" + "ReadOnly" = "11:FALSE" + "Hidden" = "11:FALSE" + "System" = "11:FALSE" + "Permanent" = "11:FALSE" + "SharedLegacy" = "11:FALSE" + "PackageAs" = "3:1" + "Register" = "3:1" + "Exclude" = "11:FALSE" + "IsDependency" = "11:TRUE" + "IsolateTo" = "8:" + } "{A582A373-4685-4296-BEFE-614B80A702C3}:_422DA789643D4CFC8308DBB6EB58ED8B" { "SourcePath" = "8:..\\Release\\Switch-Active.bmp" @@ -331,6 +557,46 @@ "IsDependency" = "11:FALSE" "IsolateTo" = "8:" } + "{A582A373-4685-4296-BEFE-614B80A702C3}:_942AAA28BB647CF0EF1C6137B296D4FE" + { + "SourcePath" = "8:DDRAW.dll" + "TargetName" = "8:DDRAW.dll" + "Tag" = "8:" + "Folder" = "8:_8166ECC1DA234550B1E7EF74BD46A69F" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Vital" = "11:TRUE" + "ReadOnly" = "11:FALSE" + "Hidden" = "11:FALSE" + "System" = "11:FALSE" + "Permanent" = "11:FALSE" + "SharedLegacy" = "11:FALSE" + "PackageAs" = "3:1" + "Register" = "3:1" + "Exclude" = "11:TRUE" + "IsDependency" = "11:TRUE" + "IsolateTo" = "8:" + } + "{A582A373-4685-4296-BEFE-614B80A702C3}:_A363B66FCAE3DB5C7CECA058D6C5B2B4" + { + "SourcePath" = "8:comdlg32.dll" + "TargetName" = "8:comdlg32.dll" + "Tag" = "8:" + "Folder" = "8:_8166ECC1DA234550B1E7EF74BD46A69F" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Vital" = "11:TRUE" + "ReadOnly" = "11:FALSE" + "Hidden" = "11:FALSE" + "System" = "11:FALSE" + "Permanent" = "11:FALSE" + "SharedLegacy" = "11:FALSE" + "PackageAs" = "3:1" + "Register" = "3:1" + "Exclude" = "11:FALSE" + "IsDependency" = "11:TRUE" + "IsolateTo" = "8:" + } "{A582A373-4685-4296-BEFE-614B80A702C3}:_A8236153441A4A2295B6EB7344BAF9E6" { "SourcePath" = "8:..\\Release\\ForceLibrary.dll" @@ -351,6 +617,66 @@ "IsDependency" = "11:FALSE" "IsolateTo" = "8:" } + "{A582A373-4685-4296-BEFE-614B80A702C3}:_AB8B779E801448568C9C2869BFA349A8" + { + "SourcePath" = "8:ForceLibrary.dll" + "TargetName" = "8:ForceLibrary.dll" + "Tag" = "8:" + "Folder" = "8:_8166ECC1DA234550B1E7EF74BD46A69F" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Vital" = "11:TRUE" + "ReadOnly" = "11:FALSE" + "Hidden" = "11:FALSE" + "System" = "11:FALSE" + "Permanent" = "11:FALSE" + "SharedLegacy" = "11:FALSE" + "PackageAs" = "3:1" + "Register" = "3:1" + "Exclude" = "11:FALSE" + "IsDependency" = "11:TRUE" + "IsolateTo" = "8:" + } + "{A582A373-4685-4296-BEFE-614B80A702C3}:_B4C386BF2CC7BBF4F0C31E1D7755BA73" + { + "SourcePath" = "8:Inject.DLL" + "TargetName" = "8:Inject.DLL" + "Tag" = "8:" + "Folder" = "8:_8166ECC1DA234550B1E7EF74BD46A69F" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Vital" = "11:TRUE" + "ReadOnly" = "11:FALSE" + "Hidden" = "11:FALSE" + "System" = "11:FALSE" + "Permanent" = "11:FALSE" + "SharedLegacy" = "11:FALSE" + "PackageAs" = "3:1" + "Register" = "3:1" + "Exclude" = "11:TRUE" + "IsDependency" = "11:TRUE" + "IsolateTo" = "8:" + } + "{A582A373-4685-4296-BEFE-614B80A702C3}:_BC87E37B7AD8F9835E2A3AC4B4EDBC61" + { + "SourcePath" = "8:inject.tlb" + "TargetName" = "8:inject.tlb" + "Tag" = "8:" + "Folder" = "8:_8166ECC1DA234550B1E7EF74BD46A69F" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Vital" = "11:TRUE" + "ReadOnly" = "11:FALSE" + "Hidden" = "11:FALSE" + "System" = "11:FALSE" + "Permanent" = "11:FALSE" + "SharedLegacy" = "11:FALSE" + "PackageAs" = "3:1" + "Register" = "3:2" + "Exclude" = "11:FALSE" + "IsDependency" = "11:TRUE" + "IsolateTo" = "8:" + } "{A582A373-4685-4296-BEFE-614B80A702C3}:_F9CC1A2472E24A2BB88C84B8A01C2922" { "SourcePath" = "8:..\\Installer\\Res\\readme.rtf" @@ -371,6 +697,26 @@ "IsDependency" = "11:FALSE" "IsolateTo" = "8:" } + "{A582A373-4685-4296-BEFE-614B80A702C3}:_FD2F9BAB00E2CB44E03A93E604085DE2" + { + "SourcePath" = "8:urlmon.dll" + "TargetName" = "8:urlmon.dll" + "Tag" = "8:" + "Folder" = "8:_8166ECC1DA234550B1E7EF74BD46A69F" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Vital" = "11:TRUE" + "ReadOnly" = "11:FALSE" + "Hidden" = "11:FALSE" + "System" = "11:FALSE" + "Permanent" = "11:FALSE" + "SharedLegacy" = "11:FALSE" + "PackageAs" = "3:1" + "Register" = "3:4" + "Exclude" = "11:FALSE" + "IsDependency" = "11:TRUE" + "IsolateTo" = "8:" + } } "FileType" { @@ -448,13 +794,13 @@ { "Name" = "8:Microsoft Visual Studio" "ProductName" = "8:Decal" - "ProductCode" = "8:{35012CC1-DC9F-49C3-9593-2B246AE68D3A}" - "PackageCode" = "8:{11023854-71C3-49B7-8A2C-5483B05E439A}" + "ProductCode" = "8:{ED4744B7-3F12-453B-9908-D192E0F5477A}" + "PackageCode" = "8:{62BF5C10-C74E-40A6-A1EA-8F629ADBEE34}" "UpgradeCode" = "8:{3025AB1B-80B9-46B7-9CE9-9887ADA2914F}" "RestartWWWService" = "11:FALSE" "RemovePreviousVersions" = "11:TRUE" "DetectNewerInstalledVersion" = "11:TRUE" - "ProductVersion" = "8:2.5.05" + "ProductVersion" = "8:2.5.20" "Manufacturer" = "8:Decal Developers" "ARPHELPTELEPHONE" = "8:" "ARPHELPLINK" = "8:http://forums.acdev.org/" @@ -954,6 +1300,48 @@ } "MergeModule" { + "{35A69C6E-5BA4-440D-803D-762B59A45393}:_1F778A8672BE4C839269BAB167E9614C" + { + "UseDynamicProperties" = "11:TRUE" + "IsDependency" = "11:TRUE" + "SourcePath" = "8:vc_user_stl71_rtl_x86_---.msm" + "Properties" + { + } + "LanguageId" = "3:0" + "Exclude" = "11:FALSE" + "Folder" = "8:" + "Feature" = "8:" + "IsolateTo" = "8:" + } + "{35A69C6E-5BA4-440D-803D-762B59A45393}:_9455E238CE65423791E3468D3B46A687" + { + "UseDynamicProperties" = "11:TRUE" + "IsDependency" = "11:TRUE" + "SourcePath" = "8:vc_user_atl71_rtl_x86_---.msm" + "Properties" + { + } + "LanguageId" = "3:0" + "Exclude" = "11:FALSE" + "Folder" = "8:" + "Feature" = "8:" + "IsolateTo" = "8:" + } + "{35A69C6E-5BA4-440D-803D-762B59A45393}:_E2BCDE09C4E942E2AA8D04B5BD84DCF3" + { + "UseDynamicProperties" = "11:TRUE" + "IsDependency" = "11:TRUE" + "SourcePath" = "8:vc_user_crt71_rtl_x86_---.msm" + "Properties" + { + } + "LanguageId" = "3:0" + "Exclude" = "11:FALSE" + "Folder" = "8:" + "Feature" = "8:" + "IsolateTo" = "8:" + } } "ProjectOutput" { |
From: <no...@us...> - 2003-06-20 06:41:20
|
Log Message: ----------- Add Old Inject Option Modified Files: -------------- /cvsroot/decaldev/source/DenAgent: TrayWnd.cpp resource.h OptionsDlg.cpp DenAgent.vcproj DenAgent.rc Revision Data ------------- Index: TrayWnd.cpp =================================================================== RCS file: /cvsroot/decaldev/source/DenAgent/TrayWnd.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- TrayWnd.cpp 12 Jun 2003 12:36:20 -0000 1.13 +++ TrayWnd.cpp 20 Jun 2003 06:41:19 -0000 1.14 @@ -4,8 +4,8 @@ #include "stdafx.h" #include "DenAgent.h" #include "TrayWnd.h" +#include "..\Inject\InjectApi.h" -//#include "madCodeHookLib.h" #include "forcelib.h" #include "DenAgentDlg.h" @@ -21,6 +21,8 @@ const UINT s_uTaskbarRestart = RegisterWindowMessage(TEXT("TaskbarCreated")); +bool g_bOldInject; + // This is for our windows enumeration process BOOL CALLBACK EnumerationCallbackProc( HWND, LPARAM ); @@ -106,7 +108,37 @@ } else { - m_uiTimer = SetTimer (1, 1000, NULL); + RegKey key; + DWORD dwOldInj; + if( key.Create( HKEY_LOCAL_MACHINE, _T( "SOFTWARE\\Decal" )) != ERROR_SUCCESS ) + { + g_bOldInject = false; + m_uiTimer = SetTimer (1, 1000, NULL); + } + + else + { + if( key.QueryDWORDValue( "OldInjection", dwOldInj ) == ERROR_SUCCESS ) + { + if( dwOldInj == 1 ) + { + g_bOldInject = true; + ::InjectEnable(); + } + + else + { + g_bOldInject = false; + m_uiTimer = SetTimer (1, 1000, NULL); + } + } + + else + { + g_bOldInject = false; + m_uiTimer = SetTimer (1, 1000, NULL); + } + } } // Create the system tray icon @@ -152,11 +184,19 @@ ::Shell_NotifyIcon( NIM_DELETE, &nid ); - if (m_uiTimer) - { - KillTimer (m_uiTimer); - m_uiTimer = 0; - } + if( g_bOldInject ) + { + if( bEnabled ) + ::InjectDisable(); + } + + else + if (m_uiTimer) + { + KillTimer (m_uiTimer); + m_uiTimer = 0; + } + ::CoUninitialize(); } @@ -244,8 +284,26 @@ DWORD dwError = GetLastError(); char szBuffer[256]; - _snprintf( szBuffer, sizeof( szBuffer ), "ForceLibraryNow (ForceLibrary.dll) failed: 0x%08lx", dwError ); - MessageBox( NULL, szBuffer, _T( "DenAgent" ), MB_OK ); +// _snprintf( szBuffer, sizeof( szBuffer ), "ForceLibraryNow (ForceLibrary.dll) failed: 0x%08lx", dwError ); +// MessageBox( NULL, szBuffer, _T( "DenAgent" ), MB_OK ); + + _snprintf( szBuffer, sizeof( szBuffer ), "ForceLibraryNow (LobbyHook.dll) has failed( 0x%08lx )\nDo you want to switch to old style injection?\nIf Decal is loading in AC properly answer no.", dwError ); + int iRet = MessageBox( NULL, szBuffer, _T( "DenAgent" ), MB_YESNO ); + if( iRet == IDYES ) + { + RegKey key; + key.Create( HKEY_LOCAL_MACHINE, _T( "SOFTWARE\\Decal" ) ); + key.SetDWORDValue("OldInjection", 0x1L); + MessageBox( NULL, "You must restart DenAgent for this option to take effect!", "DenAgent", MB_OK ); + ::PostQuitMessage( 0 ); + } + + else // no + { + MessageBox( NULL, "Restart DenAgent to enable Decal again.", "DenAgent", MB_OK ); + ::PostQuitMessage( 0 ); + } + } lstrcpy( szDll, szDllPath ); @@ -257,8 +315,25 @@ DWORD dwError = GetLastError(); char szBuffer[256]; - _snprintf( szBuffer, sizeof( szBuffer ), "ForceLibraryNow (LobbyHook.dll) failed: 0x%08lx", dwError ); - MessageBox( NULL, szBuffer, _T( "DenAgent" ), MB_OK ); +// _snprintf( szBuffer, sizeof( szBuffer ), "ForceLibraryNow (LobbyHook.dll) failed: 0x%08lx", dwError ); +// MessageBox( NULL, szBuffer, _T( "DenAgent" ), MB_OK ); + + _snprintf( szBuffer, sizeof( szBuffer ), "ForceLibraryNow (LobbyHook.dll) has failed( 0x%08lx )\nDo you want to switch to old style injection?\nIf Decal is loading in AC properly answer no.", dwError ); + int iRet = MessageBox( NULL, szBuffer, _T( "DenAgent" ), MB_YESNO ); + if( iRet == IDYES ) + { + RegKey key; + key.Create( HKEY_LOCAL_MACHINE, _T( "SOFTWARE\\Decal" ) ); + key.SetDWORDValue("OldInjection", 0x1L); + MessageBox( NULL, "You must restart DenAgent for this option to take effect!", "DenAgent", MB_OK ); + ::PostQuitMessage( 0 ); + } + + else // no + { + MessageBox( NULL, "Restart DenAgent to enable Decal again.", "DenAgent", MB_OK ); + ::PostQuitMessage( 0 ); + } } } Index: resource.h =================================================================== RCS file: /cvsroot/decaldev/source/DenAgent/resource.h,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- resource.h 30 Mar 2003 08:51:19 -0000 1.20 +++ resource.h 20 Jun 2003 06:41:19 -0000 1.21 @@ -78,6 +78,8 @@ #define IDC_COMBO 1052 #define IDC_FORMATCLR 1052 #define IDC_FORMATSTR 1053 +#define IDC_CHECK1 1054 +#define IDC_OLDINJECT 1054 #define ID_SYSTRAY_CONFIGURE 32771 #define ID_SYSTRAY_EXIT 32772 @@ -87,7 +89,7 @@ #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 152 #define _APS_NEXT_COMMAND_VALUE 32776 -#define _APS_NEXT_CONTROL_VALUE 1054 +#define _APS_NEXT_CONTROL_VALUE 1055 #define _APS_NEXT_SYMED_VALUE 105 #endif #endif Index: OptionsDlg.cpp =================================================================== RCS file: /cvsroot/decaldev/source/DenAgent/OptionsDlg.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- OptionsDlg.cpp 30 May 2003 02:12:33 -0000 1.18 +++ OptionsDlg.cpp 20 Jun 2003 06:41:19 -0000 1.19 @@ -146,32 +146,26 @@ DWORD dwAlphaBlendMode; - if(key.QueryDWORDValue("AlphaBlendMode", dwAlphaBlendMode)==ERROR_SUCCESS) // para - dialog clean up - //{ + if(key.QueryDWORDValue("AlphaBlendMode", dwAlphaBlendMode)==ERROR_SUCCESS) if(dwAlphaBlendMode==0x2) ::SendMessage(GetDlgItem(IDC_BLENDINGGDIPLUS)->m_hWnd, BM_SETCHECK, 1, 0); - //else - // ::SendMessage(GetDlgItem(IDC_BLENDINGSOFTWARE)->m_hWnd, BM_SETCHECK, 1, 0); - //} - //else - // ::SendMessage(GetDlgItem(IDC_BLENDINGSOFTWARE)->m_hWnd, BM_SETCHECK, 1, 0); DWORD dwViewMode; - if( key.QueryDWORDValue( "ViewMode", dwViewMode )== ERROR_SUCCESS ) // para - dialog clean up - //{ + if( key.QueryDWORDValue( "ViewMode", dwViewMode )== ERROR_SUCCESS ) if( dwViewMode == 1 ) ::SendMessage( GetDlgItem( IDC_VIEWMULTI )->m_hWnd, BM_SETCHECK, 1, 0 ); - //else - // ::SendMessage( GetDlgItem( IDC_VIEWSINGLE )->m_hWnd, BM_SETCHECK, 1, 0 ); - //} - //else - // ::SendMessage( GetDlgItem( IDC_VIEWSINGLE )->m_hWnd, BM_SETCHECK, 1, 0 ); - key.Close(); + // haz - added old inject option + if( key.QueryDWORDValue( "OldInjection", dwViewMode )== ERROR_SUCCESS ) + if( dwViewMode == 1 ) + ::SendMessage( GetDlgItem( IDC_OLDINJECT )->m_hWnd, BM_SETCHECK, 1, 0 ); + + + key.Close(); if( key.Create( HKEY_LOCAL_MACHINE, _T( "SOFTWARE\\Decal\\Agent" )) != ERROR_SUCCESS ) return TRUE; @@ -280,6 +274,27 @@ else key.SetDWORDValue("AlphaBlendMode", 0x1L); + // cbt hook injection + DWORD dwViewMode = 0; + if(::SendMessage(GetDlgItem(IDC_OLDINJECT)->m_hWnd, BM_GETCHECK, 0, 0)) + { + if( key.QueryDWORDValue( "OldInjection", dwViewMode )== ERROR_SUCCESS ) + if( dwViewMode != 1 ) + { + key.SetDWORDValue("OldInjection", 0x1L); + MessageBox( "You must restart DenAgent for this option to take effect!", "DenAgent", MB_OK ); + } + } + + else + { + if( key.QueryDWORDValue( "OldInjection", dwViewMode )== ERROR_SUCCESS ) + if( dwViewMode != 0 ) + { + key.SetDWORDValue("OldInjection", 0x0L); + MessageBox( "You must restart DenAgent for this option to take effect!", "DenAgent", MB_OK ); + } + } // para - dropped viewsingle, switched around if( ::SendMessage( GetDlgItem( IDC_VIEWMULTI )->m_hWnd, BM_GETCHECK, 0, 0 ) ) Index: DenAgent.vcproj =================================================================== RCS file: /cvsroot/decaldev/source/DenAgent/DenAgent.vcproj,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- DenAgent.vcproj 23 May 2003 02:20:47 -0000 1.2 +++ DenAgent.vcproj 20 Jun 2003 06:41:19 -0000 1.3 @@ -46,7 +46,7 @@ <Tool Name="VCLinkerTool" IgnoreImportLibrary="TRUE" - AdditionalDependencies="version.lib shlwapi.lib forcelibrary.lib" + AdditionalDependencies="version.lib shlwapi.lib forcelibrary.lib ..\release\inject.lib" OutputFile=".\..\Release/DenAgent.exe" LinkIncremental="1" SuppressStartupBanner="TRUE" Index: DenAgent.rc =================================================================== RCS file: /cvsroot/decaldev/source/DenAgent/DenAgent.rc,v retrieving revision 1.72 retrieving revision 1.73 diff -u -d -r1.72 -r1.73 --- DenAgent.rc 19 Jun 2003 22:03:35 -0000 1.72 +++ DenAgent.rc 20 Jun 2003 06:41:19 -0000 1.73 @@ -1,7 +1,6 @@ // Microsoft Visual C++ generated resource script. // #include "resource.h" -#include "..\Include\DecalVersion.h" #define APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// @@ -143,7 +142,7 @@ CONTROL "Spin2",IDC_VIEWALPHA_SPIN,"msctls_updown32", UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,47,31,11,14 - CTEXT "0 is Transparent - 255 is Opaque",IDC_STATIC,21,47,120, + CTEXT "0 is Transparent - 255 is Opaque",IDC_STATIC,21,46,106, 9 GROUPBOX "Decal Update URL",IDC_STATIC,7,125,257,27 LTEXT "http://decaldev.sourceforge.net",IDC_PLUGINDIR,14,136, @@ -176,6 +175,8 @@ LTEXT "Color",IDC_STATIC,71,101,19,11 LTEXT "Format",IDC_STATIC,125,101,25,9 PUSHBUTTON "?",IDC_FORMATHELP,244,99,7,12 + CONTROL "Use Old Injection Method",IDC_OLDINJECT,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,144,46,114,10 END IDD_DOWNLOADER DIALOG 0, 0, 202, 86 @@ -201,8 +202,8 @@ // VS_VERSION_INFO VERSIONINFO - FILEVERSION DECAL_MAJOR, DECAL_MINOR, DECAL_BUGFIX, DECAL_RELEASE - PRODUCTVERSION DECAL_MAJOR, DECAL_MINOR, DECAL_BUGFIX, DECAL_RELEASE + FILEVERSION 2,5,2,0 + PRODUCTVERSION 2,5,2,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -219,12 +220,12 @@ BEGIN VALUE "Comments", "DenAgent is the program that manages Decal settings" VALUE "FileDescription", "DenAgent MFC Application" - VALUE "FileVersion", DECAL_VERSION_STRING + VALUE "FileVersion", "2, 5, 2, 0" VALUE "InternalName", "DenAgent" VALUE "LegalCopyright", "Copyright (C) 2000, 2001" VALUE "OriginalFilename", "DenAgent.EXE" VALUE "ProductName", "DenAgent Application" - VALUE "ProductVersion", DECAL_VERSION_STRING + VALUE "ProductVersion", "2, 5, 2, 0" END END BLOCK "VarFileInfo" |
From: <no...@us...> - 2003-06-20 06:39:55
|
Log Message: ----------- Add Old Inject Option Modified Files: -------------- /cvsroot/decaldev/source/Inject: Manager.cpp InjectApi.h Inject.cpp Revision Data ------------- Index: Manager.cpp =================================================================== RCS file: /cvsroot/decaldev/source/Inject/Manager.cpp,v retrieving revision 1.71 retrieving revision 1.72 diff -u -d -r1.71 -r1.72 --- Manager.cpp 30 May 2003 01:49:30 -0000 1.71 +++ Manager.cpp 20 Jun 2003 06:39:54 -0000 1.72 @@ -423,7 +423,7 @@ D3DCLIPSTATUS cs; m_p3DDevice->GetClipStatus( &cs ); - ptm.y -= ( 28 - static_cast< long >( cs.miny ) ); + ptm.y -= ( 28 - static_cast< short >( cs.miny ) ); } POINT ptLocal; Index: InjectApi.h =================================================================== RCS file: /cvsroot/decaldev/source/Inject/InjectApi.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- InjectApi.h 13 May 2003 07:16:12 -0000 1.7 +++ InjectApi.h 20 Jun 2003 06:39:54 -0000 1.8 @@ -22,6 +22,11 @@ }; // Exported functions from Inject.dll +// Adds a reference to the registered hook function +void INJECT_API InjectEnable(); + +// Removes a reference to the registered hook function +void INJECT_API InjectDisable(); // Prepends a path to your filename, returns szBuffer LPTSTR INJECT_API InjectMapPath( eInjectPath pathType, LPCTSTR szFilename, LPTSTR szBuffer ); Index: Inject.cpp =================================================================== RCS file: /cvsroot/decaldev/source/Inject/Inject.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- Inject.cpp 30 May 2003 01:49:30 -0000 1.21 +++ Inject.cpp 20 Jun 2003 06:39:54 -0000 1.22 @@ -157,6 +157,37 @@ return _Module.UnregisterServer(TRUE); } +// The hook function - all it does is continue calls +LRESULT CALLBACK hookCBTProc( int nCode, WPARAM wParam, LPARAM lParam ) +{ + return ::CallNextHookEx( g_hHook, nCode, wParam, lParam ); +} + +// Functions from inject api +void InjectEnable() +{ + // Get the image path (path of parent executable) + TCHAR szImagePath[ MAX_PATH ]; + ::GetModuleFileName( NULL, szImagePath, MAX_PATH ); + + LPTSTR strProcessName = ::_tcsrchr( szImagePath, _T( '\\' ) ); + *( strProcessName + 1 ) = _T( '\0' ); + + RegKey key; + key.Create( HKEY_LOCAL_MACHINE, _T( "SOFTWARE\\Decal\\Agent" ) ); + key.SetStringValue( _T( "AgentPath" ), szImagePath ); + + // Install the global hook, injecting this DLL into every other process + g_hHook = ::SetWindowsHookEx( WH_CBT, hookCBTProc, _Module.m_hInst, 0 ); +} + +void InjectDisable() +{ + ::UnhookWindowsHookEx( g_hHook ); + g_hHook = NULL; + // Send a broadcast message, this forces the hook to trigger, and thus unload + SendMessage(HWND_BROADCAST,WM_NULL,0,0); +} struct cPathRegistry { |
From: <no...@us...> - 2003-06-20 06:37:38
|
Log Message: ----------- Update goddamn Modified Files: -------------- /cvsroot/decaldev/source/Decal: ACHooks.cpp Revision Data ------------- Index: ACHooks.cpp =================================================================== RCS file: /cvsroot/decaldev/source/Decal/ACHooks.cpp,v retrieving revision 1.54 retrieving revision 1.55 diff -u -d -r1.54 -r1.55 --- ACHooks.cpp 19 Jun 2003 21:53:02 -0000 1.54 +++ ACHooks.cpp 20 Jun 2003 06:37:37 -0000 1.55 @@ -559,6 +559,8 @@ if( m_bInternalStringConstructor && m_bInternalStringDestructor && m_bLocalChatEmote ) m_Hooks |= eLocalChatEmote; + if( m_bInternalStringConstructor && m_bInternalStringDestructor && m_bSendMessageToMask ) + SetHookEx( eSendMessageByMask ); if( QueryMemLoc( BSTRT( "VitalBase" ), &Val ) == S_OK ) { @@ -733,7 +735,7 @@ } if (m_bUstAddItem && m_bUstAddItem_Off1 && m_bUstAddItem_Off2 && m_bChatMessageAddy) - { + { SetHookEx(eUstAddItem); m_bUstAddItem_Useable = true; } |
From: <no...@us...> - 2003-06-19 22:05:28
|
Log Message: ----------- Add DecalVersion.h to Decal project Modified Files: -------------- /cvsroot/decaldev/source/Decal: Decal.dsp Revision Data ------------- Index: Decal.dsp =================================================================== RCS file: /cvsroot/decaldev/source/Decal/Decal.dsp,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- Decal.dsp 15 May 2003 04:12:37 -0000 1.10 +++ Decal.dsp 19 Jun 2003 22:05:27 -0000 1.11 @@ -208,6 +208,10 @@ # End Source File # Begin Source File +SOURCE=.\DecalVersion.h +# End Source File +# Begin Source File + SOURCE=.\PluginSite.h # End Source File # Begin Source File |
From: <no...@us...> - 2003-06-19 22:04:03
|
Log Message: ----------- Add DecalVersion.h to Decal project Modified Files: -------------- /cvsroot/decaldev/source/Decal: Decal.vcproj Revision Data ------------- Index: Decal.vcproj =================================================================== RCS file: /cvsroot/decaldev/source/Decal/Decal.vcproj,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Decal.vcproj 23 May 2003 02:20:46 -0000 1.2 +++ Decal.vcproj 19 Jun 2003 22:04:03 -0000 1.3 @@ -938,6 +938,9 @@ RelativePath="DecalRes.h"> </File> <File + RelativePath="..\Include\DecalVersion.h"> + </File> + <File RelativePath="PluginSite.h"> </File> <File |
From: <no...@us...> - 2003-06-19 22:03:35
|
Log Message: ----------- DenAgent uses DecalVersion.h now also. Modified Files: -------------- /cvsroot/decaldev/source/DenAgent: DenAgent.rc Revision Data ------------- Index: DenAgent.rc =================================================================== RCS file: /cvsroot/decaldev/source/DenAgent/DenAgent.rc,v retrieving revision 1.71 retrieving revision 1.72 diff -u -d -r1.71 -r1.72 --- DenAgent.rc 30 May 2003 01:37:52 -0000 1.71 +++ DenAgent.rc 19 Jun 2003 22:03:35 -0000 1.72 @@ -1,6 +1,7 @@ // Microsoft Visual C++ generated resource script. // #include "resource.h" +#include "..\Include\DecalVersion.h" #define APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// @@ -200,8 +201,8 @@ // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,5,0,5 - PRODUCTVERSION 2,5,0,5 + FILEVERSION DECAL_MAJOR, DECAL_MINOR, DECAL_BUGFIX, DECAL_RELEASE + PRODUCTVERSION DECAL_MAJOR, DECAL_MINOR, DECAL_BUGFIX, DECAL_RELEASE FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -218,12 +219,12 @@ BEGIN VALUE "Comments", "DenAgent is the program that manages Decal settings" VALUE "FileDescription", "DenAgent MFC Application" - VALUE "FileVersion", "2, 5, 0, 5" + VALUE "FileVersion", DECAL_VERSION_STRING VALUE "InternalName", "DenAgent" VALUE "LegalCopyright", "Copyright (C) 2000, 2001" VALUE "OriginalFilename", "DenAgent.EXE" VALUE "ProductName", "DenAgent Application" - VALUE "ProductVersion", "2, 5, 0, 5" + VALUE "ProductVersion", DECAL_VERSION_STRING END END BLOCK "VarFileInfo" |
From: <no...@us...> - 2003-06-19 21:58:13
|
Log Message: ----------- Update Version to 2.5.2.0... going to push an RC this weekend Modified Files: -------------- /cvsroot/decaldev/source/Include: DecalVersion.h Revision Data ------------- Index: DecalVersion.h =================================================================== RCS file: /cvsroot/decaldev/source/Include/DecalVersion.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- DecalVersion.h 27 May 2003 11:34:29 -0000 1.1 +++ DecalVersion.h 19 Jun 2003 21:58:12 -0000 1.2 @@ -6,9 +6,9 @@ #define DECAL_MAJOR 2 #define DECAL_MINOR 5 -#define DECAL_BUGFIX 0 -#define DECAL_RELEASE 5 +#define DECAL_BUGFIX 2 +#define DECAL_RELEASE 0 -#define DECAL_VERSION_STRING "2, 5, 0, 5" +#define DECAL_VERSION_STRING "2, 5, 2, 0" #endif |
From: <no...@us...> - 2003-06-19 21:53:12
|
Log Message: ----------- Update for SendMessageByMask + Various Hooks stuff Modified Files: -------------- /cvsroot/decaldev/source/Include: Decal.idl Revision Data ------------- Index: Decal.idl =================================================================== RCS file: /cvsroot/decaldev/source/Include/Decal.idl,v retrieving revision 1.38 retrieving revision 1.39 diff -u -d -r1.38 -r1.39 --- Decal.idl 19 Jun 2003 12:33:05 -0000 1.38 +++ Decal.idl 19 Jun 2003 21:53:11 -0000 1.39 @@ -7,7 +7,18 @@ import "oaidl.idl"; import "ocidl.idl"; -/* I'm not 100% sure about this */ +// For SendMessageByMask +enum eMessageMasks +{ + eFellowship = 0x800, + eVassals = 0x1000, + ePatron = 0x2000, + eMonarch = 0x4000, + eCovassals = 0x1000000, + eAllegiance = 0x2000000, + eMasks_DWORD = 0x7FFFFFFF +}; + enum eTrainLevel { eUntrained = 1, @@ -173,10 +184,10 @@ eRequestID = 9, eIDQueueAdd = 10, eUstAddItem = 11, + eSendMessageByMask = 12, eAvailableHooksEx_DWORD = 0x7FFFFFFF // coerce enums into 4 byte instead of two }; - interface IPluginSite2; @@ -297,7 +308,8 @@ [id(55), helpstring("method RequestID")] HRESULT RequestID([in] long lObjectID); [id(56), helpstring("method IDQueueAdd")] HRESULT IDQueueAdd([in] long lObjectID); [id(57), helpstring("method SetIDFilter")] HRESULT SetIDFilter([in] IKitchenSink* pIDFilter); - [id(58), helpstring("method USTAddItem")] HRESULT USTAddItem([in] long lObjectID); + [id(58), helpstring("method UstAddItem")] HRESULT UstAddItem([in] long lObjectID); + [id(59), helpstring("method SendMessageByMask")] HRESULT SendMessageByMask([in] LONG lMask, [in] BSTR szMessage); }; [ |
From: <no...@us...> - 2003-06-19 21:53:03
|
Log Message: ----------- Update for SendMessageByMask + Various Hooks stuff Modified Files: -------------- /cvsroot/decaldev/source/Decal: ACHooks.h ACHooks.cpp Revision Data ------------- Index: ACHooks.h =================================================================== RCS file: /cvsroot/decaldev/source/Decal/ACHooks.h,v retrieving revision 1.40 retrieving revision 1.41 diff -u -d -r1.40 -r1.41 --- ACHooks.h 19 Jun 2003 12:33:05 -0000 1.40 +++ ACHooks.h 19 Jun 2003 21:53:02 -0000 1.41 @@ -1,5 +1,9 @@ // ACHooks.h: Definition of the ACHooks class +#ifndef __ACHOOKS_H_ +#define __ACHOOKS_H_ + + #include "resource.h" // main symbols #include "Decal.h" #include "DecalManager.h" @@ -180,6 +184,7 @@ bool m_bInternalStringDestructor; bool m_bSendMessageToID; bool m_bSendMessageToName; + bool m_bSendMessageToMask; bool m_bLocalChatText; bool m_bLocalChatEmote; @@ -187,6 +192,7 @@ long m_lInternalStringDestructor; long m_lSendMessageToID; long m_lSendMessageToName; + long m_lSendMessageToMask; long m_lLocalChatText; long m_lLocalChatEmote; @@ -310,5 +316,8 @@ STDMETHOD(RequestID)(long lObjectID); STDMETHOD(IDQueueAdd)(long lObjectID); STDMETHOD(SetIDFilter)(IKitchenSink* pIDFilter); - STDMETHOD(USTAddItem)(long lObjectID); + STDMETHOD(UstAddItem)(long lObjectID); + STDMETHOD(SendMessageByMask)(LONG lMask, BSTR szMessage); }; + +#endif // __ACHOOKS_H_ \ No newline at end of file Index: ACHooks.cpp =================================================================== RCS file: /cvsroot/decaldev/source/Decal/ACHooks.cpp,v retrieving revision 1.53 retrieving revision 1.54 diff -u -d -r1.53 -r1.54 --- ACHooks.cpp 19 Jun 2003 12:33:05 -0000 1.53 +++ ACHooks.cpp 19 Jun 2003 21:53:02 -0000 1.54 @@ -4,6 +4,7 @@ #include "ACHooks.h" #include <math.h> #include <time.h> /* Heyus 23 March 2003 */ +#include ".\achooks.h" /* I believe in VC6, the limit of unnamed variables (_bstr_t("foo")) has been reached, @@ -33,6 +34,7 @@ void ( __fastcall *pfnInternalStringDestructor)( qString * ) = NULL; long (*pfnSendMessageToID)( qString *, long ) = NULL; long (*pfnSendMessageToName)( qString *, qString * ) = NULL; +long (*pfnSendMessageByMask)( long, qString * ) = NULL; long (*pfnLocalChatText)( qString * ) = NULL; long (*pfnLocalChatEmote)( qString * ) = NULL; qString* ( __fastcall *pfnInternalStringConstructor)( qString *, long, char * ) = NULL; @@ -77,6 +79,7 @@ m_bChatMessageAddy = false; m_bSendMessageToID = false; m_bSendMessageToName = false; + m_bSendMessageToMask = false; m_bLocalChatText = false; m_bLocalChatEmote = false; m_bSetAutorun = false; @@ -520,6 +523,14 @@ pfnSendMessageToName = reinterpret_cast< long(*)(qString *, qString *) >( Val ); } + if( QueryMemLoc( BSTRT( "SendMessageToMask" ), &Val ) == S_OK) + { + m_bSendMessageToMask = true; + m_lSendMessageToMask = Val; + + pfnSendMessageByMask = reinterpret_cast< long(*)( long, qString * ) >( Val ); + } + if( QueryMemLoc( BSTRT( "LocalChatText" ), &Val ) == S_OK) { m_bLocalChatText = true; @@ -1429,13 +1440,14 @@ STDMETHODIMP cACHooks::ItemIsKnown(long lGUID, VARIANT_BOOL* pRetval) { - if (!m_bObjectFromGuid) { + if (!m_bObjectFromGuid) + { *pRetval = VARIANT_FALSE; return S_FALSE; } DWORD dwTemp = m_lObjectFromGuid ; - DWORD dwClass = *((DWORD*) m_lObjectFromGuidClass) ; + DWORD dwClass = *((DWORD*) m_lObjectFromGuidClass); long lResult = 0; @@ -1664,22 +1676,21 @@ STDMETHODIMP cACHooks::SecureTrade_Add(long ItemID, VARIANT_BOOL *pVal) { void ( __fastcall *Internal_SecureTrade_Add )( struct qPointerList *, int, long ); - struct qPointerList *p; + struct qPointerList *p; VARIANT_BOOL ItemExists; - HRESULT hr; if (pVal) /* Should probably return an error code. Tough. */ { - *pVal = VARIANT_FALSE; - } + *pVal = VARIANT_FALSE; + } + + else + return E_FAIL; if ( m_bSecureTrade_Add && m_bSecureTrade_Add_Off1 && m_bSecureTrade_Add_Off2 && m_bCombatState ) - { - hr = ItemIsKnown(ItemID, &ItemExists); - if (FAILED(hr)) - { - return hr; - } + { + if( ItemIsKnown(ItemID, &ItemExists) != S_OK ) + return E_FAIL; if (ItemExists == VARIANT_FALSE) { @@ -2120,6 +2131,9 @@ if( !m_bRequestID ) return S_FALSE; + if( m_bIdQueueRef ) + return m_pIdQueue->AddToQueue( lObjectID ); + typedef void(*RequestPtr)( long ); RequestPtr pRequest = reinterpret_cast< RequestPtr >( m_lRequestID ); pRequest( lObjectID ); @@ -2147,43 +2161,54 @@ return S_OK; } -STDMETHODIMP cACHooks::USTAddItem(long lObjectID) +STDMETHODIMP cACHooks::UstAddItem(long lObjectID) { - VARIANT_BOOL ItemExists; - HRESULT hr; + VARIANT_BOOL ItemExists; - if ( !m_bUstAddItem_Useable ) - { - return S_FALSE; - } + if ( !m_bUstAddItem_Useable ) + return S_FALSE; - hr = ItemIsKnown(lObjectID, &ItemExists); - if ( FAILED(hr) ) - { - return hr; - } - - if ( ItemExists == VARIANT_FALSE ) - { - return S_FALSE; - } - - //Calculate the THIS pointer - //DWORD thisPtr = *((long *)(*((long *)(*((long *)0x77A618) + 0x324)) + 0xE0)); - //DWORD tmp; - //DWORD func = 0x005556C0; - DWORD thisPtr = *((long *)(*((long *)(*((long *)m_lChatMessageAddy) + m_lUstAddItem_Off1)) + m_lUstAddItem_Off2)); - DWORD tmp; - DWORD func = (DWORD)m_lUstAddItem; - __asm - { - mov tmp, ecx - mov ecx, thisPtr + if( ItemIsKnown( lObjectID, &ItemExists ) != S_OK ) + return E_FAIL; + + if( ItemExists == VARIANT_FALSE ) + return S_FALSE; + + //Calculate the THIS pointer + //DWORD thisPtr = *((long *)(*((long *)(*((long *)0x77A618) + 0x324)) + 0xE0)); + //DWORD tmp; + //DWORD func = 0x005556C0; + + DWORD thisPtr = *((long *)(*((long *)(*((long *)m_lChatMessageAddy) + m_lUstAddItem_Off1)) + m_lUstAddItem_Off2)); + DWORD tmp; + DWORD func = (DWORD)m_lUstAddItem; + + __asm + { + mov tmp, ecx + mov ecx, thisPtr push lObjectID call func mov ecx, tmp - } - return S_OK; -} \ No newline at end of file + } + + return S_OK; +} +STDMETHODIMP cACHooks::SendMessageByMask( long lMask, BSTR szMessage ) +{ + if( !(m_bInternalStringConstructor && m_bInternalStringDestructor && m_bSendMessageToMask) ) + return S_FALSE; + + USES_CONVERSION; + char *szText = OLE2A( szMessage ); + + long retval; + qString Msg; + pfnInternalStringConstructor( &Msg, 0, szText ); + retval = pfnSendMessageByMask( lMask, &Msg ); + pfnInternalStringDestructor( &Msg ); + + return S_OK; +} |
From: <no...@us...> - 2003-06-19 12:31:34
|
Log Message: ----------- Added ID 0 When Queue Empties Modified Files: -------------- /cvsroot/decaldev/source/DecalFilters: IdentifyQueue.cpp Revision Data ------------- Index: IdentifyQueue.cpp =================================================================== RCS file: /cvsroot/decaldev/source/DecalFilters/IdentifyQueue.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- IdentifyQueue.cpp 1 Apr 2003 22:55:18 -0000 1.10 +++ IdentifyQueue.cpp 19 Jun 2003 12:31:32 -0000 1.11 @@ -139,8 +139,10 @@ void CIdentifyQueue::Request() { if( m_Queue.empty() ) + { + m_pHooks->RequestID( 0 ); return; - + } if( !m_bWaiting ) { m_pHooks->RequestID( m_Queue[0]->lObjectID ); |
From: <no...@us...> - 2003-06-19 09:43:23
|
Log Message: ----------- Add a program files menu with shortcuts, added the readme file to the installer. Updated the path. Modified Files: -------------- /cvsroot/decaldev/source/DecalInstaller: DecalInstaller.vdproj Revision Data ------------- Index: DecalInstaller.vdproj =================================================================== RCS file: /cvsroot/decaldev/source/DecalInstaller/DecalInstaller.vdproj,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- DecalInstaller.vdproj 28 May 2003 17:07:24 -0000 1.8 +++ DecalInstaller.vdproj 19 Jun 2003 09:43:20 -0000 1.9 @@ -27,60 +27,6 @@ } "Entry" { - "MsmKey" = "8:_10D01E415273DFB80A6309EC12D187D8" - "OwnerKey" = "8:_0593B7A6B4D74017A43CC5F9741D078B" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_10D01E415273DFB80A6309EC12D187D8" - "OwnerKey" = "8:_8E9B4D574D014738B94369502A191459" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_10D01E415273DFB80A6309EC12D187D8" - "OwnerKey" = "8:_F7B461AAFB7641F699DAEAF49904A662" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_10D01E415273DFB80A6309EC12D187D8" - "OwnerKey" = "8:_287894F290604710B0E99CD646021261" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_10D01E415273DFB80A6309EC12D187D8" - "OwnerKey" = "8:_11AE7CD5CB2A43E395B33FDD50522940" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_10D01E415273DFB80A6309EC12D187D8" - "OwnerKey" = "8:_10B736524B444A95B8CC8D36B521F980" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_10D01E415273DFB80A6309EC12D187D8" - "OwnerKey" = "8:_BD4EC7DFE26A40BA84001249533EC862" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_10D01E415273DFB80A6309EC12D187D8" - "OwnerKey" = "8:_AC7940677AFA439D9D75C9827A0003A2" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_10D01E415273DFB80A6309EC12D187D8" - "OwnerKey" = "8:_A03B9AE58553491581FA0975DF6E6E88" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { "MsmKey" = "8:_11AE7CD5CB2A43E395B33FDD50522940" "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" @@ -105,24 +51,6 @@ } "Entry" { - "MsmKey" = "8:_41F2E99B0C1B72CFD51382D5E140A7E8" - "OwnerKey" = "8:_A03B9AE58553491581FA0975DF6E6E88" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_41F2E99B0C1B72CFD51382D5E140A7E8" - "OwnerKey" = "8:_287894F290604710B0E99CD646021261" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_41F2E99B0C1B72CFD51382D5E140A7E8" - "OwnerKey" = "8:_10B736524B444A95B8CC8D36B521F980" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { "MsmKey" = "8:_422DA789643D4CFC8308DBB6EB58ED8B" "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" @@ -159,60 +87,18 @@ } "Entry" { - "MsmKey" = "8:_8CCEE5C8AADEB950D9A797DE0530965E" - "OwnerKey" = "8:_A03B9AE58553491581FA0975DF6E6E88" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_8CCEE5C8AADEB950D9A797DE0530965E" - "OwnerKey" = "8:_BD4EC7DFE26A40BA84001249533EC862" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { "MsmKey" = "8:_8E9B4D574D014738B94369502A191459" "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_942AAA28BB647CF0EF1C6137B296D4FE" - "OwnerKey" = "8:_BD4EC7DFE26A40BA84001249533EC862" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { "MsmKey" = "8:_A03B9AE58553491581FA0975DF6E6E88" "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_A363B66FCAE3DB5C7CECA058D6C5B2B4" - "OwnerKey" = "8:_287894F290604710B0E99CD646021261" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_A760FCE25F8EA4B31587E634E1F0EC16" - "OwnerKey" = "8:_287894F290604710B0E99CD646021261" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_A760FCE25F8EA4B31587E634E1F0EC16" - "OwnerKey" = "8:_E256A97055264EB5B195F1414117D027" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_A760FCE25F8EA4B31587E634E1F0EC16" - "OwnerKey" = "8:_673044C5656142EBAA86D07A36EFFF5A" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { "MsmKey" = "8:_A8236153441A4A2295B6EB7344BAF9E6" "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" @@ -237,38 +123,14 @@ } "Entry" { - "MsmKey" = "8:_F15C1E871CB4434F80337303C80EA804" - "OwnerKey" = "8:_A03B9AE58553491581FA0975DF6E6E88" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_F15C1E871CB4434F80337303C80EA804" - "OwnerKey" = "8:_11AE7CD5CB2A43E395B33FDD50522940" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_F15C1E871CB4434F80337303C80EA804" - "OwnerKey" = "8:_10B736524B444A95B8CC8D36B521F980" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { "MsmKey" = "8:_F7B461AAFB7641F699DAEAF49904A662" "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_FD2F9BAB00E2CB44E03A93E604085DE2" - "OwnerKey" = "8:_0593B7A6B4D74017A43CC5F9741D078B" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_FD2F9BAB00E2CB44E03A93E604085DE2" - "OwnerKey" = "8:_287894F290604710B0E99CD646021261" + "MsmKey" = "8:_F9CC1A2472E24A2BB88C84B8A01C2922" + "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" } } @@ -329,26 +191,6 @@ } "File" { - "{A582A373-4685-4296-BEFE-614B80A702C3}:_10D01E415273DFB80A6309EC12D187D8" - { - "SourcePath" = "8:msxml.dll" - "TargetName" = "8:msxml.dll" - "Tag" = "8:" - "Folder" = "8:_8166ECC1DA234550B1E7EF74BD46A69F" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:4" - "Exclude" = "11:TRUE" - "IsDependency" = "11:TRUE" - "IsolateTo" = "8:" - } "{A582A373-4685-4296-BEFE-614B80A702C3}:_2946BCB3B3574315816189D84E505D59" { "SourcePath" = "8:..\\Release\\Tab-Active.bmp" @@ -389,26 +231,6 @@ "IsDependency" = "11:FALSE" "IsolateTo" = "8:" } - "{A582A373-4685-4296-BEFE-614B80A702C3}:_41F2E99B0C1B72CFD51382D5E140A7E8" - { - "SourcePath" = "8:VERSION.dll" - "TargetName" = "8:VERSION.dll" - "Tag" = "8:" - "Folder" = "8:_8166ECC1DA234550B1E7EF74BD46A69F" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:TRUE" - "IsDependency" = "11:TRUE" - "IsolateTo" = "8:" - } "{A582A373-4685-4296-BEFE-614B80A702C3}:_422DA789643D4CFC8308DBB6EB58ED8B" { "SourcePath" = "8:..\\Release\\Switch-Active.bmp" @@ -509,86 +331,6 @@ "IsDependency" = "11:FALSE" "IsolateTo" = "8:" } - "{A582A373-4685-4296-BEFE-614B80A702C3}:_8CCEE5C8AADEB950D9A797DE0530965E" - { - "SourcePath" = "8:inject.tlb" - "TargetName" = "8:inject.tlb" - "Tag" = "8:" - "Folder" = "8:_8166ECC1DA234550B1E7EF74BD46A69F" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:2" - "Exclude" = "11:TRUE" - "IsDependency" = "11:TRUE" - "IsolateTo" = "8:" - } - "{A582A373-4685-4296-BEFE-614B80A702C3}:_942AAA28BB647CF0EF1C6137B296D4FE" - { - "SourcePath" = "8:DDRAW.dll" - "TargetName" = "8:DDRAW.dll" - "Tag" = "8:" - "Folder" = "8:_8166ECC1DA234550B1E7EF74BD46A69F" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:TRUE" - "IsDependency" = "11:TRUE" - "IsolateTo" = "8:" - } - "{A582A373-4685-4296-BEFE-614B80A702C3}:_A363B66FCAE3DB5C7CECA058D6C5B2B4" - { - "SourcePath" = "8:comdlg32.dll" - "TargetName" = "8:comdlg32.dll" - "Tag" = "8:" - "Folder" = "8:_8166ECC1DA234550B1E7EF74BD46A69F" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:TRUE" - "IsDependency" = "11:TRUE" - "IsolateTo" = "8:" - } - "{A582A373-4685-4296-BEFE-614B80A702C3}:_A760FCE25F8EA4B31587E634E1F0EC16" - { - "SourcePath" = "8:ForceLibrary.dll" - "TargetName" = "8:ForceLibrary.dll" - "Tag" = "8:" - "Folder" = "8:_8166ECC1DA234550B1E7EF74BD46A69F" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:TRUE" - "IsDependency" = "11:TRUE" - "IsolateTo" = "8:" - } "{A582A373-4685-4296-BEFE-614B80A702C3}:_A8236153441A4A2295B6EB7344BAF9E6" { "SourcePath" = "8:..\\Release\\ForceLibrary.dll" @@ -609,10 +351,10 @@ "IsDependency" = "11:FALSE" "IsolateTo" = "8:" } - "{A582A373-4685-4296-BEFE-614B80A702C3}:_FD2F9BAB00E2CB44E03A93E604085DE2" + "{A582A373-4685-4296-BEFE-614B80A702C3}:_F9CC1A2472E24A2BB88C84B8A01C2922" { - "SourcePath" = "8:urlmon.dll" - "TargetName" = "8:urlmon.dll" + "SourcePath" = "8:..\\Installer\\Res\\readme.rtf" + "TargetName" = "8:readme.rtf" "Tag" = "8:" "Folder" = "8:_8166ECC1DA234550B1E7EF74BD46A69F" "Condition" = "8:" @@ -624,9 +366,9 @@ "Permanent" = "11:FALSE" "SharedLegacy" = "11:FALSE" "PackageAs" = "3:1" - "Register" = "3:4" - "Exclude" = "11:TRUE" - "IsDependency" = "11:TRUE" + "Register" = "3:1" + "Exclude" = "11:FALSE" + "IsDependency" = "11:FALSE" "IsolateTo" = "8:" } } @@ -644,6 +386,17 @@ "Property" = "8:ProgramMenuFolder" "Folders" { + "{F27BD5C5-A65D-4608-96D4-7C5DA1F76302}:_27132AA40CB046048F657FAC11D8A040" + { + "Name" = "8:Decal" + "AlwaysCreate" = "11:FALSE" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Property" = "8:_44C415856E854C739A298262A1418272" + "Folders" + { + } + } } } "{78BAF5CE-F2E5-45BE-83BC-DB6AF387E941}:_7A37445AF6294D2685784C887BC78D12" @@ -659,7 +412,7 @@ } "{58C0ADA3-3CEA-43BD-A3B3-2EA121BC8217}:_8166ECC1DA234550B1E7EF74BD46A69F" { - "DefaultLocation" = "8:[ProgramFilesFolder][Manufacturer]\\[ProductName]" + "DefaultLocation" = "8:[ProgramFilesFolder][ProductName]" "Name" = "8:#1925" "AlwaysCreate" = "11:FALSE" "Condition" = "8:" @@ -790,6 +543,20 @@ } "Shortcut" { + "{478F747B-8505-45D1-9AAE-8C3B645C26E3}:_A370A569506448DE9ED277D594578B44" + { + "Name" = "8:Decal" + "Arguments" = "8:" + "Description" = "8:Starts the Decal Agent" + "ShowCmd" = "3:1" + "IconIndex" = "3:101" + "Transitive" = "11:FALSE" + "Target" = "8:_287894F290604710B0E99CD646021261" + "Folder" = "8:_27132AA40CB046048F657FAC11D8A040" + "WorkingFolder" = "8:_8166ECC1DA234550B1E7EF74BD46A69F" + "Icon" = "8:_287894F290604710B0E99CD646021261" + "Feature" = "8:" + } "{478F747B-8505-45D1-9AAE-8C3B645C26E3}:_A8285E902C994E8091DED2049A8A078F" { "Name" = "8:Decal" @@ -1187,20 +954,6 @@ } "MergeModule" { - "{35A69C6E-5BA4-440D-803D-762B59A45393}:_F15C1E871CB4434F80337303C80EA804" - { - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:TRUE" - "SourcePath" = "8:vc_user_atl71_rtl_x86_---.msm" - "Properties" - { - } - "LanguageId" = "3:0" - "Exclude" = "11:FALSE" - "Folder" = "8:" - "Feature" = "8:" - "IsolateTo" = "8:" - } } "ProjectOutput" { @@ -1512,9 +1265,6 @@ { } } - } - "VJSharpPlugin" - { } } } |
From: <no...@us...> - 2003-06-12 12:36:22
|
Log Message: ----------- No longer does ForceLibrary have to be in system32. Modified Files: -------------- /cvsroot/decaldev/source/DenAgent: TrayWnd.cpp Revision Data ------------- Index: TrayWnd.cpp =================================================================== RCS file: /cvsroot/decaldev/source/DenAgent/TrayWnd.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- TrayWnd.cpp 30 May 2003 01:37:51 -0000 1.12 +++ TrayWnd.cpp 12 Jun 2003 12:36:20 -0000 1.13 @@ -204,6 +204,7 @@ RegKey key; + TCHAR szDll[ MAX_PATH ]; TCHAR szDllPath[ MAX_PATH ]; memset( szDllPath, 0, sizeof( szDllPath ) / sizeof( szDllPath[0] ) ); @@ -211,7 +212,11 @@ { DWORD dwChars = MAX_PATH - 1; if( key.QueryStringValue( _T( "AgentPath" ), szDllPath, &dwChars ) == ERROR_SUCCESS ) - lstrcat( szDllPath, _T( "\\LobbyHook.dll" ) ); + { + lstrcpy( szDll, szDllPath ); + lstrcat( szDll, _T( "\\ForceLibrary.dll" ) ); + } + else { DWORD dwError = GetLastError(); @@ -233,14 +238,26 @@ if( szDllPath[0] ) { - HMODULE hLib = (HMODULE) ForceLibraryNow( dwProcessId, szDllPath ); + HMODULE hLib = (HMODULE) ForceLibraryNow( dwProcessId, szDll ); + if( hLib == NULL ) + { + DWORD dwError = GetLastError(); + char szBuffer[256]; + + _snprintf( szBuffer, sizeof( szBuffer ), "ForceLibraryNow (ForceLibrary.dll) failed: 0x%08lx", dwError ); + MessageBox( NULL, szBuffer, _T( "DenAgent" ), MB_OK ); + } + + lstrcpy( szDll, szDllPath ); + lstrcat( szDll, _T( "\\LobbyHook.dll" ) ); + hLib = (HMODULE) ForceLibraryNow( dwProcessId, szDll ); if( hLib == NULL ) { DWORD dwError = GetLastError(); char szBuffer[256]; - _snprintf( szBuffer, sizeof( szBuffer ), "ForceLibraryNow failed: 0x%08lx", dwError ); + _snprintf( szBuffer, sizeof( szBuffer ), "ForceLibraryNow (LobbyHook.dll) failed: 0x%08lx", dwError ); MessageBox( NULL, szBuffer, _T( "DenAgent" ), MB_OK ); } } |
From: <no...@us...> - 2003-06-03 16:26:38
|
Log Message: ----------- simplified the subject (forgot this was a commit-only list :p) added the diffs back in (doh!) Modified Files: -------------- /cvsroot/decaldev/CVSROOT: loginfo |
From: <yo...@us...> - 2003-06-03 15:40:54
|
Update of /cvsroot/decaldev/CVSROOT In directory sc8-pr-cvs1:/tmp/cvs-serv26595 Modified Files: commitinfo loginfo Log Message: Changing to activitymail Index: commitinfo =================================================================== RCS file: /cvsroot/decaldev/CVSROOT/commitinfo,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** commitinfo 14 Aug 2001 16:10:56 -0000 1.1 --- commitinfo 3 Jun 2003 15:40:50 -0000 1.2 *************** *** 14,15 **** --- 14,17 ---- # If the name "ALL" appears as a regular expression it is always used # in addition to the first matching regex or "DEFAULT". + + ALL $CVSROOT/CVSROOT/activitymail -lg Index: loginfo =================================================================== RCS file: /cvsroot/decaldev/CVSROOT/loginfo,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** loginfo 1 Aug 2002 14:49:20 -0000 1.7 --- loginfo 3 Jun 2003 15:40:50 -0000 1.8 *************** *** 29,33 **** # (Gouru - send commit notices all to cvscommit mailing list ! CVSROOT $CVSROOT/CVSROOT/syncmail %{sVv} dec...@li... ! DEFAULT $CVSROOT/CVSROOT/syncmail %{sVv} dec...@li... --- 29,35 ---- # (Gouru - send commit notices all to cvscommit mailing list ! # CVSROOT $CVSROOT/CVSROOT/syncmail %{sVv} dec...@li... ! # DEFAULT $CVSROOT/CVSROOT/syncmail %{sVv} dec...@li... + # (yourgod - changing to activitymail to preserve what's left of my sanity) + DEFAULT $CVSROOT/CVSROOT/activitymail -u nobody -cpgf %{sVv} -t dec...@li... -m"CVS Commit: " |
From: <yo...@us...> - 2003-06-03 15:38:25
|
Update of /cvsroot/decaldev/CVSROOT In directory sc8-pr-cvs1:/tmp/cvs-serv25511 Modified Files: checkoutlist Added Files: activitymail Log Message: changing to activitymail so I can read these damn commit messages --- NEW FILE: activitymail --- #!/usr/bin/perl -w # $Id: activitymail,v 1.1 2003/06/03 15:38:21 yourgod Exp $ use strict; use Getopt::Std; use File::Basename qw(basename dirname); use vars qw($VERSION); $VERSION = '1.04'; $|++; ############################################################################## # Set up catdir and tmpdir. Hopefully we can just use File::Spec::Functions # and not worry about it. ############################################################################## BEGIN { # Use File::Spec if we can. Otherwise assume simple Unix semantics. eval "require File::Spec::Functions"; if ($@) { *catdir = sub { join '/', @_ }; *tmpdir = sub { '/tmp' }; } else { # These have to be eval'd in order to avoid the silly "used only once" # warnings. eval "*catdir = *File::Spec::Functions::catdir"; eval "*tmpdir = *File::Spec::Functions::tmpdir"; } # Get the command-line arugments. use vars qw($opt_f $opt_r $opt_l $opt_m $opt_t $opt_n $opt_i $opt_p $opt_c $opt_s $opt_h $opt_d $opt_a $opt_D $opt_o $opt_e $opt_u $opt_g ); getopts('f:lr:m:t:nipcs:dhaDo:e:u:g'); } ############################################################################## # Set up the variables and constants we'll need later. ############################################################################## # Set constants. use constant DEBUG => $opt_D ? 1 : 0; use constant SMLOCS => qw(/usr/lib/sendmail /usr/sbin/sendmail /usr/ucblib/sendmail); # When we do forking to get diff files, we want to ignore the children. $SIG{CHLD} = 'IGNORE'; # These will be used by tmp_file_name(). my $tmpdir = tmpdir(); my $pgrp = $opt_g ? $ENV{USER} : getpgrp; # Determin location of CVS binary. $opt_e ||= 'cvs'; # These hashes will be used in several of the functions below. my %map = ( mod => 'Modified Files', add => 'Added Files', rem => 'Removed Files', rev => 'Revision Data'); ############################################################################## # The main part of the program. ############################################################################## # Check for required command-line arguments. usage() if $opt_h || (!$opt_l && !($opt_f && $opt_t)); # Run the directory logging mode, if specified. log_dir($ARGV[0]) if $opt_l; # Set the diffs option to its default. $opt_o ||= '-u --minimal'; # Get the current working directory, the name of the repository module, and a # list of the files being revised in the current directory. my ($mod, $dir, $revs) = parse_file_list($opt_f); # Unless we're in commit mode, just send the current message. syncmail($mod, $revs) unless $opt_c; # So if we got here, parse the contents of STDIN. my ($msg, $files) = parse_stdin($dir); # If it's the last directory, send the message. Otherwise, save the data to # disk for later in the commit. is_last_dir($dir) ? notify($mod, $msg, $revs, $files) : save_data($revs, $files); # That's it! ############################################################################## # FUNCTIONS # ############################################################################## ############################################################################## # This function logs the currently-processed directory. Used when -l is passed # -- that is, in the commitinfo file. ############################################################################## sub log_dir { # Grab the directory name. (my $dir = $_[0]) =~ s|^$ENV{CVSROOT}/?||; DEBUG && dbpnt("Directory: '$dir'\n"); my $file = tmp_file_name('lastdir'); DEBUG && dbpnt("Writing to '$file'\n"); local *FILE; open FILE, ">$file" or mydie("Cannot open '$file' for writing: $!\n"); print FILE $dir; close FILE; exit; } ############################################################################## # These functions simply build a temporary filename. Pass in a string to make # the filename unique. tmp_file_name() includes the full bath to the temp # file, while tmp_base_name returns just the basename of the file. ############################################################################## sub tmp_file_name { catdir($tmpdir, "#cvs\.$_[0]\.$pgrp") } sub tmp_base_name { "#cvs\.$_[0]\.$pgrp" } ############################################################################## # This function takes $opt_f as an argument, and returns the directory on # which the current action is being processed, and an anonymous array of the # file specs in in that directory that are affected by this action. ############################################################################## sub parse_file_list { # Get the directory, list of file specs, and the module name. my ($dir, @revs) = split ' ', shift; my ($mod) = split '/', $dir; DEBUG && dbpnt("Directory: '$dir'; Module: $mod\n"); if ($revs[0] eq '-') { # This is a special status message, not really a version update or # anything. Just add more items here if you want to simply send the # notification and exit. my @chk = ([$opt_n, 'New', 'directory', 'New Directory'], [$opt_i, 'Imported', 'sources', 'Imported Sources']); # So test for the simple checks. foreach my $c (@chk) { if ($revs[1] eq $c->[1] && $revs[2] eq $c->[2]) { # If we have a match, either exit or send the notice. DEBUG && dbpnt("Action: $c->[3]"); exit if $c->[0]; mail(mk_subject($c->[3], $mod), slurp_file()); } } } return ($mod, $dir, \@revs); } ############################################################################## # This function sends notices in roughly the same style as syncmail. It's used # when -c is not specified. ############################################################################## sub syncmail { my ($mod, $revs) = @_; # Get the subject and the message body. my $subject = mk_subject($opt_f, $mod); (my $body = slurp_file()) =~ s/\s+/\n/s; if ($opt_d) { # We want diffs. So we have to fork. unless (fork) { # In the child. Wait for CVS to let go! sleep 2; # Now get the diffs and send the message. $body .= attach($subject) if $opt_a; $body .= "\n" . get_diffs($revs); mail($subject, $body); } # Exit the parent process. exit; } else { # No diffs. Just send the mail. Delete temp files, just in case. mail($subject, $body); } } ############################################################################## # This function builds an email subject. Pass in the message being logged, and # it'll return a subject with the message truncated to the first words that # will fit in 72 characters or less. This length includes the optional message # that can be passed in via the -m argument as well as the module name if the # -p argument has been specified. ############################################################################## sub mk_subject { my ($msg, $mod) = @_; # Strip out all carriage returns. $msg =~ s/\n/ /g; # Truncate to first period after a minimum of 10 characters. my $i = index $msg, '. '; $msg = substr($msg, 0, $i + 1) if $i > 0; # Prepend the module name. $msg = "$mod: $msg" if $opt_p; # Prepend the optional message. $msg = "$opt_m $msg" if $opt_m; # Truncate to the last word under 72 characters. $msg =~ s/^(.{0,72}\s+).*$/$1/m if length $msg > 72; return $msg; } ############################################################################## # This function simply returns the entire contents of a file passed in as the # first argument. If there is no first argument, it'll read in STDIN. ############################################################################## sub slurp_file { local $/; if ($_[0]) { # Get the contents of the file. local *FILE; open FILE, "<$_[0]" or mydie("Cannot open file $_[0] for reading: $!\n"); my $cont = <FILE>; close FILE; return $cont; } else { # Return the contents of STDIN. return <STDIN>; } } ############################################################################## # This function actually sends the notification message. Pass in the message # subject and body. ############################################################################## sub mail { my ($subject, $body) = @_; print "Sending mail to $opt_t..."; $opt_s ||= find_sendmail() or mydie("Cannot find sendmail. Use -s.\n"); open(SENDMAIL, "|$opt_s -oi -t") or mydie("Cannot fork for sendmail: $!\n"); print SENDMAIL "MIME-Version: 1.0\n"; print SENDMAIL "From: $opt_u\n" if $opt_u; print SENDMAIL "To: $opt_t\nSubject: $subject\n"; print SENDMAIL "Reply-To: $opt_r\n" if $opt_r; print SENDMAIL qq{Content-Type: multipart/mixed; boundary="$opt_a"\n\n} . "--$opt_a\nContent-Type: text/plain\n" if $opt_a; print SENDMAIL "X-Mailer: activitymail $VERSION, " . "http://search.cpan.org/dist/activitymail/\n"; print SENDMAIL "\n$body"; print SENDMAIL "--$opt_a--\n" if $opt_a; close SENDMAIL; print "Done\n"; # Delete any temp files. exit; } ############################################################################## # This function finds the sendmail executable and returns it. ############################################################################## sub find_sendmail { for (($opt_s ? $opt_s : ()), SMLOCS) { return $_ if -x } } ############################################################################## # This function gets the diffs for all the files passed to it via an array ref # of the file spec and returns them. ############################################################################## sub get_diffs { my $revs = shift; # Initialize the diff string. my $diffs = ''; # Change into the first directory. foreach (@$revs) { # Get the file name and version numbers from the file spec. my ($file, $old, $new) = split ','; # Okay, now process this sucker. if ($old eq 'NONE') { # It's a new file. Note it. $diffs .= "--- NEW FILE: $file ---\n"; if (-e $file) { # If the file exists, simply grab its contents. $diffs .= slurp_file($file); } else { # Otherwise, read the file from a non-changing update. $diffs .= `$opt_e -fn update -r $new -p $file`; } } elsif ($new eq 'NONE') { # The file has been deleted. Simply note that fact. $diffs .= "--- $file DELETED ---\n"; } else { # We actually have to get a diff! $diffs .= `$opt_e -f diff -kk $opt_o -r $old -r $new '$file'`; } } return $diffs; } ############################################################################## # This function parses the contents of STDIN. It grabs the message and # assembles lists of the files that were affected. ############################################################################## sub parse_stdin { my $dir = shift; my ($msg, $flag, $files) = ('', '', { mod => [], add => [], rem => [] } ); while (<STDIN>) { if (/^Modified Files/) { $flag = 'mod'; DEBUG && dbpnt("Grabbing $map{$flag}\n"); next; } elsif (/^Added Files/) { $flag = 'add'; DEBUG && dbpnt("Grabbing $map{$flag}\n"); next; } elsif (/^Removed Files/) { $flag = 'rem'; DEBUG && dbpnt("Grabbing $map{$flag}\n"); next; } elsif (/^Log Message/) { $flag = 'log'; DEBUG && dbpnt("Grabbing log message\n"); next; } next unless $flag; if ($flag eq 'log') { # Grab it for the log. $msg .= $_; } else { # Add it to the relevant list. ## Need to add code to check for "Tag:" here... chomp; push @{ $files->{$flag} }, ( map { catdir($ENV{CVSROOT}, $dir, $_) } split) if $_; } } # Make sure there're no carriage returns or spaces at the end of $msg. $msg =~ s/\s+$//s; return ($msg, $files); } ############################################################################## # This function compares the currently-processed directory to the directory # logged during the commitinfo phase (by the -l option) and returns true if # they're the same. ############################################################################## sub is_last_dir { my $dir = shift; my $file = tmp_file_name('lastdir'); local *FILE; open FILE, "<$file" or mydie("Cannot open '$file' for reading: $!\n"); my $logged = <FILE>; close FILE; DEBUG && ($dir eq $logged ? dbpnt("'$dir' is the last directory\n") : dbpnt("'$dir' is NOT the last directory\n")); return unless $dir eq $logged; # If we got here, there's a match. Delete the file. unlink($file); return 1; } ############################################################################## # This function grabs all the data from the log files and actually sends the # accumulated notification message. ############################################################################## sub notify { my ($mod, $msg, $revs, $files) = @_; print "Collecting file lists..."; if ($opt_d) { # We want diffs. That means we have to fork so that CVS will let go # of the files. unless (fork) { # It's the child process. Grab the files. $files = get_files($files); # Grab the diffs for the latest files. $files->{rev} .= get_diffs($revs); my $subject = mk_subject($msg, $mod); mail($subject, build_msg($msg, $files, $subject)); exit; } } else { # No need for diffs. Just send it as is. $files = get_files($files); mail(mk_subject($msg, $mod), build_msg($msg, $files)); exit; } # Exit the parent process. exit; } ############################################################################## # This function retreives the lists of all the files affected by this action # and saves them into a hashref, which it returns. Pass in a hashref with the # current list of files to have the lists from the log files prepended to that # list. It also will fetch the diffs stored by previous instances of # activitymail so that they can all be concatenated together for the entire # commit. ############################################################################## sub get_files { my $files = shift; my $fetched = {}; foreach my $flag (qw(mod add rem)) { my $file = tmp_file_name($flag); if (-T $file) { # The file exists, so grab its contents. DEBUG && dbpnt("Grabbing $map{$flag} from '$file'\n"); local *FILE; open FILE, "<$file" or mydie("Cannot open '$file' for writing: $!\n"); while (<FILE>) { chomp; push @{ $fetched->{$flag} }, $_; } close FILE; } # Delete the file. unlink($file); # Add the files that we had already. push @{ $fetched->{$flag} }, @{ $files->{$flag} }; } # Return the files unless we need diffs. unless ($opt_d) { print "Done.\n"; return $fetched; } # Okay, now get the diffs. Get the name of the lock files and wait until # they're all gone. print "Collecting diffs..."; my $locks = tmp_base_name('lock'); DEBUG && dbpnt("Waiting for all '$locks' files...\n"); # We avoid glob() here because some systems may not have it! That is, with # older versions of Perl and where csh isn't installed. Such is the case # on SourceForge, for example. opendir(TMP, $tmpdir) or mydie("Cannot open '$tmpdir': $!\n"); foreach (grep { /$locks/ } readdir(TMP)) { my $f = catdir($tmpdir, $_); sleep 1 while -e $f; } # Okay, the locks are gone. Go ahead and get the diffs. rewinddir(TMP); my $revs = tmp_base_name('rev'); foreach my $file (grep { /$revs/ } readdir(TMP)) { $file = catdir($tmpdir, $file); DEBUG && dbpnt("Grabbing $map{rev} from '$file'\n"); local *FILE; open FILE, "<$file" or mydie("Cannot open '$file' for writing: $!\n"); local $/; $fetched->{rev} .= <FILE>; close FILE; unlink($file); } closedir(TMP); print "Done\n"; return $fetched; } ############################################################################## # This function takes an existing message, a files href, and the message # suject as arguments, and returns a fully formatted message that includes the # list of files. The subject is used for attachments (see attach() below). ############################################################################## sub build_msg { my ($msg, $files, $subject) = @_; DEBUG && dbpnt("Building message body.\n"); $msg = "Log Message:\n-----------\n$msg\n"; # Create the lines that will go underneath the above in the message. my %dash = ( map { $_ => '-' x length($map{$_}) } keys %map ); foreach (qw(mod add rem)) { # Skip it if there's nothing to report. next unless @{ $files->{$_} }; # Identify the action. $msg .= "\n$map{$_}:\n$dash{$_}\n"; # Grab the first directory name. my $lastdir = dirname($files->{$_}[0]); $msg .= " $lastdir:\n"; foreach my $f (@{ $files->{$_} }) { my $curdir = dirname($f); if ($curdir ne $lastdir) { # Different directory. Record that. $lastdir = $curdir; $msg .= " $lastdir:\n"; } # Record the name of the file altered. $msg .= " " . basename($f) . "\n"; } } # Okay, now add the diffs. if ($opt_d) { # Make it either an attachment or inline, depending on -a. $msg .= $opt_a ? attach($subject) : "\n$map{rev}\n$dash{rev}\n"; # Attach those diffs! $msg .= $files->{rev}; } return $msg; } ############################################################################## # This function saves the file and diff data to log files so that the data can # be fetched later. Pass in the files revised in this directory and a list of # all the files. ############################################################################## sub save_data { my ($revs, $files) = @_; foreach (qw(mod add rem)) { # Just skip it if there are no files to record. next unless @{ $files->{$_} }; my $file = tmp_file_name($_); DEBUG && dbpnt("Saving $map{$_} to '$file'\n"); local *FILE; open FILE, ">>$file" or mydie("Cannot open '$file' for writing: $!\n"); local $" = "\n"; print FILE "@{ $files->{$_} }\n"; close FILE; } # Exit unles we have diffs to save. exit unless $opt_d && $revs; # Okay, now get the diffs and save them. if (my $pid = fork) { # In the parent. Write a lock file. my $lock = tmp_file_name('lock') . "\.$pid"; open LOCK, ">$lock" or mydie("Cannot open '$lock' for writing: $!\n"); close LOCK; exit; } else { # In the child. Wait for CVS to let go! sleep 2; # Now save the diffs to disk. Each process gets its own file. my $file = tmp_file_name('rev') . "\.$$"; DEBUG && dbpnt("Saving $map{rev} to '$file'\n"); local *FILE; open FILE, ">$file" or mydie("Cannot open '$file' for writing: $!\n"); print FILE get_diffs($revs); close FILE; # Okay, now delete the lock file created by the parent and exit. DEBUG && dbpnt("Deleting lock file" . tmp_file_name('lock') . "\.$$" . "\n"); unlink(tmp_file_name('lock') . "\.$$"); exit; } } ############################################################################## # This function generates the text necessary to attach the diffs file. It # takes the subject as the first argument and uses it to create a hash that # uniquely identifies the attachment. ############################################################################## sub attach { # Create the attachment boundary string. MD5 would be better, but we can't # count on its presence, and it's not really crucial, anyway. my $salt = join '', ('.', '/', 0..9, 'A'..'Z', 'a'..'z')[rand 64, rand 64]; $opt_a = crypt($_[0], $salt); # Get the date (UTC). my @gm = gmtime; $gm[5] += 1900; $gm[4] += 1; # Get the username. my $user = getlogin || getpwuid($<) || "unknown"; # Return the attachment headers. local $" = ''; return qq{--$opt_a Content-Disposition: attachment; filename=$user-@gm[5,4,3,2,1,0]-diff.txt Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=ISO-8859-1 }; } ############################################################################## # This function takes an error message for its argument, prints it, and exits. # The reason it's a separate function is that it prepends a string to the # error message so that it'll stand out during commits, and so that the # program won't actually die. ############################################################################## sub mydie { print "######## activitymail error: $_[0]"; exit } ############################################################################## # This function prints debug messages. The reason it's a separate function is # that it prepends a string to the message so that it'll stand out during # commits. ############################################################################## sub dbpnt { print "\n" if $_[1]; print "@@@@@@@@ activitymail debug: $_[0]" } ############################################################################## # This function prints a usage message. ############################################################################## sub usage { my $exe = basename($0); print qq{ Usage: $exe -l $exe -f %{sVv} -t admins\@example.com [options] Supported options: -l Directory logging mode. Required unless -c. -c Commit mode. Required unless -l. -f %{sVv} The file spec argument from CVS. Required unless -l -t <email> The notification destination email address. Required unless -l. -e <cvs> Location of CVS executable. Defaults to "cvs" (i.e., in path). -d Include the diffs for all the files processed. -o <opts> Otions to pass to diff command. -a Attach the diffs to the message. -r <email> Reply-to address. -n Ignore New directory commits. -i Ignore imports. -m <message> Optional message to put at the beginning of the email subject. -p Add the name of the CVS module to the message subject. -s <sendmail> Location of sendmail. -u <email> User email address from which email should be sent. -g Use \$USER environment variable to group collection of commits. -h Print this usage statement. -D Debug mode. }; exit; } __END__ =head1 NAME activitymail - CVS activity notification. =head1 SYNOPSIS # In commitinfo: DEFAULT $CVSROOT/CVSROOT/activitymail -l # In loginfo: DEFAULT $CVSROOT/CVSROOT/activitymail -dacf %{sVv} -t ad...@ex... =head1 DESCRIPTION This program may be used for sending email messages for CVS repository activity. There are a number of different modes supported. It can send messages for every change to the repository (like C<syncmail>), or it can be used to send a single message for each commit. In the latter case, a list of all the files affected by the commit will be assembled and listed in the single message. This is similar to how C<commit_prep> and C<log_accum> work, but is more efficient. An additional option allows for diffs to be calculated for the recent changes, and either appended to the message (like syncmail) or added as an attachment (neater). See the -d and -a options below. =head1 PREREQUISITES This script requires L<Getopt::Std|Getopt::Std> and L<File::Basename|File::Basename>. See L<"Known Issues"> for more information. =head1 COREQUISITES This script works best with L<File::Spec|File::Spec> installed. See L<"Known Issues"> for more information. =head1 USAGE To use this program, you need to check out your CVSROOT respository from CVS and edit some files. Here are the steps to follow: =over 4 =item 1. Copy activitymail into your CVSROOT checkout. =item 2. Add activitymail to the CVSROOT repository. =item 3. Add activitymail to the checkoutlist file. =item 4. If you plan to use commit mode (see L<"Commit Mode"> below), add a call (or calls) to activitymail with the -l argument to the F<commitinfo> file. Read the CVS docs to determine the format for this file, and to decide which repositories for which you want it run. Here's an example: DEFAULT $CVSROOT/CVSROOT/activitymail -l =item 5. Add a call (or calls) to activitymail to the F<loginfo> file. Note that the -f and -t arguments are required here. Use the -c argument if you're running commit mode (i.e., you've added a call with -l to the F<commitinfo> file -- see L<"Commit Mode"> below). Here's an example: DEFAULT $CVSROOT/CVSROOT/activitymail -cf %{sVv} -t ad...@ex... =item 6. Commit your changes to CVSROOT. =back =head1 OPTIONS =over 4 =item -l Directory logging mode. Use this mode in the F<commitinfo> file to log the current directory. Best if used with -c in the F<loginfo> file -- otherwise it's just a waste. =item -c Commit mode. This will aggregate all the actions on a single commit and send a single message. Must have specified -l in the F<commitinfo> file. =item -f %{sVv} The file spec argument from CVS. It must be called as C<-f %{sVv}>. Required unless -l. =item -t <email> The email address or addresses to send notifications to. Required unless -l. =item -e Location of the CVS executable, e.g., F</usr/bin/cvs>. Defaults to F<cvs>, thus assuming that the cvs executable is in the path. =item -d Include the diffs for all the files processed. These will be appended to the notification message unless the -a option has been specified. =item -o <diff options> Options to pass to the C<cvs diff> command. Useful for changing the behavior of the diff command. Be sure to include these options inside quotation marks so that they will be distinguished from the options parsed by activitymail itself. See L<diff> for a list of available options. Defaults to C<-u --minimal> if not specified. =item -a Attach diffs to the notification message. The diffs for all the files processed will be calculated, and then they will be added to the message as an attachment. =item -r <email> An optional reply-to address. This address will be added to a Reply-To header in the notification email. =item -n Ignore "New directory" commits. By default, activitymail sends mail when a directory has been added. Pass this optional argument to ignore those actions. =item -i Ignore imports. By default, activitymail sends mail when a files have been imported. Pass this optional argument to ignore those actions. =item -m <message> An optional message to put at the beginning of the email subject. =item -p Optional argument to add the name of the CVS module to the message subject. =item -s <sendmail> Location of sendmail. If not specified, activitymail will search for sendmail in the following locations: C</usr/lib/sendmail>. C</usr/sbin/sendmail>, C</usr/ucblib/sendmail>. If activitymail cannot find sendmail, it'll throw an exception. =item -u <user email> Email address to use in the From header of the commit email message. Typical usage is to use the CVS C<$USER> variable to specify an address, e.g., C<-u ${USER}@example.com>. Default is to provide no From header and to let Sendmail do it. =item -g Group collection of CVS transactions in a single commit by the C<$USER> environment variable. This is most useful for when connecting to CVS via C<:pserver:>, since the usual method of collecting transactions -- by relying on the value returned by C<pgrp>, won't work. Use in both the F<commitinfo> and L<loginfo> files, or else it won't work at all! =item -h Print usage statement. It's a simplified version of this section of the docs, intended to remind the user of all the options. Be sure to read the detailed descriptions here, first. =item -D Enables debug mode. This will trigger lots of output. All activitymail debug messages will start with the string "@@@@@@@@ activitymail debug:" so that they can be spotted easily. =back =head1 MODES =head2 Standard Mode In this mode, a notification message will be sent for every directory affected by a single commit to the repository. This could be a lot of messages if you've made a lot of changes, and is thus highly redundant. To use it, all you need to is add a call to activitymail to your F<loginfo> file with (at minimum) the -f and -t arguments: DEFAULT $CVSROOT/CVSROOT/activitymail -f %{sVv} -t ad...@ex... To mimic the behavior of syncmail, add the -d argument to append diffs: DEFAULT $CVSROOT/CVSROOT/activitymail -df %{sVv} -t ad...@ex... =head2 Commit Mode This mode takes a just a little more work to put in place, but manages your email resources much more efficiently. In this mode, activitymail tracks all the files changed throughout a single commit and sends a single email when all the changes have been made. This is especially useful in circumstances where many files have been changed at once. In standard mode, many messages will be sent, but in commit mode, only one will be sent. An additional advantge of commit mode is that activitymail will construct a custom subject for the notification messages. In standard mode, the subject is simply the contents of the -f argument. In commit mode, however, activitymail will use either the first sentence of the log message, or the maximum number of words that take up less than 72 characters (includinng the -m and/or -p arguments, if specified). This offers an easy way to see what was done during the commit based on the context of the beginning of the actual log message. CVS users thus might want to consider making the first sentence of their messages (up to the first period) be a breif summary, and the rest of the message can be a more detailed description of the changes. To use commit mode, you B<must> place a call to activitymail with the -l argument in your F<commitinfo> file for every repository package you want to manage in commit mode. Usually, that's everything, so you can just use the line (as long as you have no other lines -- see L<cvs> for more information): DEFAULT $CVSROOT/CVSROOT/activitymail -l Then, you'll need to add a second call to activitymail to your F<loginfo> file for the same repository packages as in the F<commitinfo> file's call to activitymail. A convenient line for this purpose (even if you have other log filters in place) is the ALL line: ALL $CVSROOT/CVSROOT/activitymail -cf %{sVv} -t ad...@ex... The DEFAULT line will work equally well. Perhaps you want to have mail sent to different addresses for different repository pacakges. see L<cvs> for more information on the F<loginfo> file syntax. If you'd like to see diffs for the changes for any particular commit, add the -d argument. All of the changes to the repository will be recoreded in diff format and appended to the end of the message: ALL $CVSROOT/CVSROOT/activitymail -cdf %{sVv} -t ad...@ex... Better still, have the diffs added to the message as attachments by adding the -a option. ALL $CVSROOT/CVSROOT/activitymail -cdaf %{sVv} -t ad...@ex... Finally, If you commit to CVS via C<:pserver:>, you should use the -g option to get activitymail to properly group all of the CVS activity for a commit. By default, activitymail uses the value returned by C<pgrp> to determine what's part of a single commit action and what's another action. However, in C<:pserver:> mode, C<pgrp> always returns the same value. The solution is to use the C<$USER> environment variable to group the CVS activity. The assumption is that a single user will not be doing two separate commits at the same time, so this should work fine. Note that if you use the -g option, you B<must> use it in both the F<commitinfo> file: DEFAULT $CVSROOT/CVSROOT/activitymail -lg And the F<loginfo> file: ALL $CVSROOT/CVSROOT/activitymail -cdagf %{sVv} -t ad...@ex... =head1 KNOWN ISSUES This program depends on the presence of several modules that are distributed standard with Perl. They are L<Getopt::Std|Getopt::Std>, L<File::Basename|File::Basename>, and L<File::Spec|File::Spec>. If either Getopt::Std or File::Basename isn't present, activitymail won't run. If File::Spec isn't installed (not uncommon, since it's a fairly recent addition to Perl -- SourceForge, for example, doesn't have it as of this writing), activitymail will assume very simple Unix semantics for creating file names, and will assume that C</tmp> is the temp directory. The principal issue I'd like to eventually get worked out has to do with forking. This script forks a new process whenever it is called with the -d argument. This is because, in order to get CVS to diff two different versions, the script has to exit so that the lock on the files is released. So what activitymail does is fork a child process, exit the parent, and then let the child diff the files and send the mail. This sounds screwy, but it works. (It's how synmail does it, too.) But sometimes CVS commits hang. It can take a while for a commit to go through, and sometimes it's best to cancel the commit and try again later. I believe that this is because once the parent exits, there's nothing to reap the child processes once they've exited. Yes, the OS will clean them up, but I've seen "defunct" activitymail processes hanging around in the process table, so it could take a while. I suspect that what's happening is that, becuase these processes aren't promptly reaped, CVS retains the locks on the files. So if you make several commits to the same file(s) in rapid succession, you can get the hangs. I'm not entirely clear that this is the problem, however, and most of the time, there doesn't seem to be a problem at all. I have been using activitymail with the -d option for the Bricolage project for many months, and there appear to be no serious problems. Nevertheless, I certainly would appreciate it if someone who understood Perl's forking and/or CVS locking better than I do could help me to irradicate this issue. For anyone else who's uncomfortable with the possibility of this issue arrising, don't use the -d option. =head1 BUGS Report all bugs via the CPAN Request Tracker at L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=activitymail>. =head1 AUTHOR David Wheeler <da...@wh...> =head1 SEE ALSO L<syncmail|syncmail>, L<commit_prep|commit_prep>, L<log_accum|log_accum>. =head1 COPYRIGHT AND LICENSE Copyright (c) 2002, David Wheeler. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl. =begin comment =pod SCRIPT CATEGORIES VersionControl/CVS UNIX/System_administration =pod OSNAMES any =pod README This program may be used for sending email messages for CVS repository activity. Messages can be sent for every repository change, or for every commit. In the latter case, a list of all the files affected may be assembled and listed or attached to the single message. =end comment =cut Index: checkoutlist =================================================================== RCS file: /cvsroot/decaldev/CVSROOT/checkoutlist,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** checkoutlist 31 Jul 2002 17:33:19 -0000 1.2 --- checkoutlist 3 Jun 2003 15:38:21 -0000 1.3 *************** *** 13,15 **** # comment lines begin with '#' syncmail ! --- 13,15 ---- # comment lines begin with '#' syncmail ! activitymail |