
spktbl
Member-
Content count
5 -
Joined
-
Last visited
Posts posted by spktbl
-
-
So right now what you want to do is, while not impossible, extremely hard...Thank you for answering!
So, I think, there is only one way to do it now: full emulation through WinAPI user's action, like selecting user, "Send private command" and etc.
-
Okey, I got it and download latest source code for plugins.No there isn't... but if there was it would be very unlikely that what you'd work with was UserData.From old source:
BASE_HUB_SEND_PM(dcpp, user->object, result.c_str(), thirdPerson);
From latest (1.3.6):BASE_HUB_SEND_PM(dcpp, ((UserDataPtr)cmd->object)->object, result.c_str(), thirdPerson)
1) What is structure of UserData->object? From "PluginDefs.h" - it's just a pointer:dcptr_t object;
dcptr_t declared as:typedef void *hookHandle, *dcptr_t, *subsHandle;
2) Can I fill this structure manually and what I need if can?
If there is no API for algorithm from my post above - I can try to get current userlist with WinAPI, but only username and it's hard as hell to use EnumWindows() / SendMessage() to do that...
Any suggestions?
Thanks in advance.
-
Thank you for your answer!
Oh, I see. Is there any chance that something like this would be added in future releases?No there isn't... but if there was it would be very unlikely that what you'd work with was UserData.
No-no-no. It's not for blocking uploads.What would you want it for exactly anyways? And if it is for blocking uploads, that is a) not really something we want to encourage andalready possible for a plugin to do, although it's a rather roundabout way.
The basic idea behind all of this: if someone trying to download something from me he / she recieve message about HTTP site where you can find description, screenshots and other infromation related to this files.
Algorithm (what I'm try to achieve):
1) Send message to user when he / she start uploading something.
2) Add user and current datetime to list.
3) If user not in list or time difference between now and datetime from list for current user more than 24 hours - user recieve this message again and list updated with current datetime.
4) Optionally user can send private command and this message won't be shown anymore.
-
Hello all!
I like to use ApexDC++, because it's very light, simply and easy to use!
And want to thank all of the developers!
I have a question about plugin API.
I'm trying to write a plugin which send private message to user when he/she start to Upload something from me.
So, I have question: is there something like QUEUE_ADD for HOOK_QUEUE, but for Upload, not Download?
For example:
Bool DCAPI pluginProc(uint32_t eventId, dcptr_t pData) { switch(eventId) { /* default actions */ case ON_INSTALL: case ON_LOAD: return onLoad(eventId, (DCCorePtr)pData); case ON_UNINSTALL: case ON_UNLOAD: return onUnload(eventId); case QUEUE_ADD_UPLOAD: /* <-- I need this action to hook! */ BASE_HUB_SEND_PM(dcpp, ((UserDataPtr)pData)->object, "Hello world!", TRUE); return True; default: return False; } }
Thanks in advance.
Delphi Plugin API
in Plugins
Posted
I hope I can help a bit - actually I'm using Delphi 7, not C++, so I just rewrite header file a bit for my needs.
1) Here is a code for very simple plugin.
2) I want to warn you that I don't test all functions and you may crash ApexDC++ when using it.
3) It is not a complete port for header file - only things what I need.
4) This code may a bit rough for someone, but, as I say, I did that for myself and put it here only to help anyone who don't know how to start.
5) The code below is legal only for version 1.3.6 and may be not compatible with later version of ApexDC++ - don't forget to check PluginDefs.h from latest source code package.
ApexTest.pas