DC++ 0.695!

DC++ 0.695 is now out! A few *nix fixes, a few old bugs worked out and aswell new ones.

If you are using Windows Vista, you are now able to use UPnP.

Something that is very interesting, is that the ADC hublist is now the first of the two possible hublists in DC++!

Rawwwww at ADC

Got a bunch of NMDC (raw) user commands that you want to use also on ADC hubs? Well, you can’t use them without reformatting them.

The first thing you will need to do is enter “adc://” in the “Hub IP / DNS” box. This will set the command to all ADC hubs. And “adc://op” will set it to all ADC hubs where you’re operator. Yeah, yeah, I know. “(empty = all, ‘op’ = where operator)” is incorrect, and the helpfile doesn’t give any information about that either, but I’m giving it to you now! (“adcs://” / “adcs://op” if you want to use ADC hubs with SSL. Though, I’m not sure this works now, but it will eventually.)

The second thing you must make sure is that the command box end with “\n”. In NMDC it was ‘|’, here it is “\n”.

The commands you are probably going to use the most, is MSG (send a message) and DSC (kick/ban/redirect a user). (consult the draft for the other commands.)

The first thing when constructing the command is choosing which type of message it is going to be. This means if it should be broadcast to everyone in the hub, to someone specific, to the hub etc.
The second thing when constructing the command is choosing which action you want to do. (In our case, MSG and DSC.)

When looking at the draft, you will notice “Contexts:”. This is how a message may be received or sent. Eg, the MSG action allow the contexts “From hub” and “To hub”. When “From hub”, it’s the hub that’s sending the message. Like Message of the day or an informational message. The type is here ‘I’ (“Info message”). When it’s “To hub” it’s a standard message from a user to another user (or to the hub). This can be ‘B’ (broadcast to *everyone*) or ‘D’ (“direct message”… To only one specific user/set of users.) And ‘H’ for messages directed to the hub. (Hub scripts etc.)

OK. Now the available escapes you can use. “\s” is used to display ‘ ‘ (space), “\n” to display a new line and “\\” for the character ‘\’. (You aren’t allowed to use other escapes in the current draft.)

Now for the composition of commands. It is; typeaction mysid flag1 flag2 flag3 … flagn\n
Though, mysid is not always required. Only when it is a non-H type, I think. With H type; Haction other user’s sid flag1 flag2 flag3 … flagn\n
Also, if it is D type, it must be; typeaction mysid other user’s sid flag1 flag2 flag3 … flagn\n

Unfortunately for this guide, MSG doesn’t have a flag for the actual message. It is because MSG always contain a message, making a MS-flag unnecessary. Instead, for MSG, it is typeMSG mysid perhaps other’s sid msg flag1 flagn\n

Anyway. Say you want to send a message to everyone, you do BMSG %[mySID] some\smessage\shere\n. %[mySID] is one of the commands that ARE documented in the help file. If you want to send a message to someone specific, it is DMSG %[mySID] %[userSID] some\smessage\shere\n. %[userSID] is also documented… Now, this message will appear as a “main chat message”. If you want it to be displayed as a “private message”, you will need to add the PM parameter after the message; DMSG %[mySID] %[userSID] some\smessage\shere PM%[mySID]\n. (The PM-flag should contain a group-SID if it’s a “multiple user PM”, but I don’t think there exist such a command in DC++.) Further, if you want the message to be in “third-person”, add the ME-flag. (“ME1” will indicate it’s a “third-person” message.) Unfortunately, it is not supported by DC++ (when displaying). (I know of another wonderful client that support it. ;) /shameless plug )

OK. You know now how to send a message to people. How about kicking someone? That’s what we got the DSC action for.

DSC is constructed by HDSC %[userSID] flag1 flagn\n. (You should be able to use other than ‘H’, but this is what’s and will be most used, I think.)
When doing HDSC %[userSID] you basically only disconnect/kick the user. If you want to send a message to the person, use a MS-flag. That is HDSC %[userSID] MSsome\smessage\shere\n. Furthermore, there’s TL which is used to denote time until the user is allowed in (in seconds). (“TL3600” will be for 1 hour.) TL-1 is “forever”. There’s RD which is used as redirect URL. Also, there’s DI which is used when all other clients in the hub should disconnect the user, as it is unwanted in the system (“DI1”).
Notice that with the flags, it is allowed to send them in ANY order you want. So you can do DMSG mysid usersid msg ME1 PMmysid and aswell DMSG mysid usersid msg PMmysid ME1. They both mean the same thing. It will be displayed as “* your_nick msg”.
(Edit: sorry for the weird formatting of the commands… WordPress screwed up the ”… Oh well…)

Dash and space war!

If you are using DC++ 0.694, you will notice that in most NMDC hubs, the name of the hub and “topic” have two dashes (” – – “) instead of just one (” – “), as it was previously.

However, in ADC hubs, everything will appear fine (with just one dash). This is because in ADC, the hubname and description (aka topic) is sent by two flags, NI and DE. What DC++ does is; hubname + ” – ” + description. So if the hub send NIhello DEblah, this is what will appear; hello – blah (someipblabla.com).

But, in NMDC, the hubname and description (topic) sent as one command. $Hubname. (There is $Hubtopic but few support it.) So, in NMDC; $Hubname hello – blah. You see here that there’s no actual way for DC++ to really know what is the hubname and what is the description. Because everything is essentially the hubname. The fact that a “description” is present in today’s hubs is something of a ‘hack’, and not likely anticipated by Jonathan Hess (the author of NMDC).
“Then why is there two dashes now?” Well, what I said earlier about DC++ adding ” – ” between hubname and description apply here too. But here, DC++ have to hack in what is the hubname and what is the description. DC++ does this with the current scheme;
search for breaking-space (‘ ‘); set the hubname to everything before the breaking-space, and the description to everything after the breaking-space.
(I’m sure you can imagine if people send $Hubname h e l l o – there| and use breaking-space after the ‘h’, it will appear in DC++; “h – e l l o – there”.)
So, if you want your hubname to be “h e l l o” and description “there”, the spaces in “h e l l o” must be non-breaking spaces. This will of course break backwards compatibility (for all other clients). There’s a proposed solution. To not search for ‘ ‘, but instead search for ” – “, and assign everything before ” – ” to the hubname and everything after to the description.

(Bugreport #1033 brought forward this issue.)

ADC resources

Since I’ve been promoting ADC so much, it is time I also presented where one could get further information about it, and possibly participate in its development.

In the DC++ wiki, one can find a list of clients and hubs.

Furthermore, one can find a discussion page, where discussion about certain aspects of ADC take place. One can of course also start a new topic. The non-discussion page in the DC++ wiki, show briefly what ADC is, can do and what hasn’t been addressed in the protocol draft or discussion page.

There is also another page where ADC commands, that are extensions of the base protocol, are brought forward.

In this blog, you can also find numerous posts concerning ADC.

The latest draft is probably something you should look at, and as an addition, older draft versions are also available. (Though, I couldn’t find older than 0.5…)

(The old DCTNG-draft is what ADC was based on, so a look at that for historical reasons could be educational.)

The ADC hublist project is interesting as well.

And not to forget, the public DC development hub.

(And as well, the DC++ forum where some discussion happen.)

Hosting change

Thanks to a couple of helpful individuals and two generous ones, I have moved dcpp.net from our old hosting company.  Unfortunately, a couple services were consuming more than their fair share of resources.  That shouldn’t be much of a problem now.  If anything doesn’t work, be sure to let me know via email or on the ADC hub.

Compiling ADCH++ with Visual Studio 2005 on Windows

So, you’ve been trying to compile ADCH++, but have been failing? Well, here’s a nice guide on how to do it with Visual Studio 2005. (For your information, Trem, that little cutie pie, wrote it. I haven’t tried it, so if it doesn’t work, blame him. Well, you can blame him anyway for everything else but that’s besides the point.)

1. Download TortoiseSVN and install, let it reboot.

2. Create a folder for the project (c:\adchpp will be used throughout this guide).

3. In Windows Explorer, right click and select SVN checkout. In the resulting dialog box fill in https://svn.sourceforge.net/svnroot/adchpp/adchpp/trunk/ as the URL and click OK.

4. Download STLport and unpack it in c:\adchpp. This should give you a c:\adchpp\stlport\stlport folder.

5. Download Bjam and unpack the .exe to c:\windows\system32 (assuming Windows is installed on C:). Make sure the folder name isn’t extracted.

6. Download Boost and extract it to c:\adchpp, this should give a c:\adchpp\boost_1_33_1 folder.

7. Open Visual Studio (2005) and go to Tools->Options->Projects and Solutions->VC++ Directories. Select include files from the drop down box. Add c:\adchpp\stlport and c:\adchpp\boost_1_33_1 to the top of the list and save the settings.

8. Open Visual Studio’s command prompt from the start menu (regular cmd won’t work) and change to c:\adchpp\boost_1_33_1\

9. Run the command set: VC80_ROOT=%VCINSTALLDIR%

10. Run the command set: bjam “-sTOOLS=vc-8_0” install (this could take time)

11. In Visual Studio select File->New->Project from Existing code. Select Visual C++ project. Set project file location to c:\adchpp\ and project name to adchpp. In Add files box, remove c:\adchpp and add c:\adchpp\Windows and c:\adchpp\adchpp. Click next and select console application from the drop down box. Put BUILDING_ADCHPP in the preprocessor definitions box and in the Additional include box add c:\adchpp\ and click finish.

12. Right click the adchpp project and select Properties. Go to Linker->Input and input “ws2_32.lib Mswsock.lib” (without the quotes) to the Additional Dependencies box and click ok.

13. Open c:\adchpp\adchpp\config.h and scroll to line 59. It should look like

# if _MSC_VER == 1200 || _MSC_VER == 1300 || _MSC_VER == 1310

Change it to

# if _MSC_VER == 1200 || _MSC_VER == 1300 || _MSC_VER == 1310 || _MSC_VER == 1400 #define _CRT_SECURE_NO_DEPRECATE 1

14. Open c:\adchpp\adchpp\PluginManagerh and go to line 227. It should look like

ADCHPP_DLL static PluginManager* instance;

Change it to

static PluginManager* instance;

15. Go to Build->Build Solution and it should give you a finished adchpp for you to play around with =)

ADCH++!

Always wanted DCH++ which was sort of hard to get? Well, instead, you get ADCH++, the ADC server. Happy hosting!

Number your Result

I assume you are by now a NMDC-search-hating person. All heil ADC’s search!

Yeah, I bit strong I know… But still. The NMDC-suckiness continues with the number of search results you receive.

In NMDC, when sending a search, you will either get (from each user)Â 5 results if you are in Passive mode or 10 if you are in active mode. ADC have this restriction also. “Okay… Then what’s sucky if they’re the same?” Well, it’s a matter of which results you receive.

In NMDC, there are no way to say “I want this, but not that”. In ADC on the other hand, there is; “Each filename (including the path to it) should be matched using case insensitive substring search as follows: match all AN, remove those that match any NO […] “. In layman’s terms, “if I specify in the search that I want only file names (and paths) that have ‘linux’ and doesn’t have ‘ubuntu’ in it (file name/path), I will only receive results that have ‘linux’ in the file name/path and the sender of the results will have discarded all file names and paths matching ‘ubuntu’.”

So you dig through the archives, and find Filtering…, and think “hey! It says there I can filter out search results with -foo!”… Well, you’d be filtering the received results in NMDC. (Ehm, said ADC functionality, in DC++, doesn’t currently exist, mind you…)

If you don’t understand the problem; When you are sending a search in NMDC, the sender of the results does not do ANY filtering. He’ll send you the first 5 or 10 results said client can find. The client couldn’t care less if you don’t want ‘ubuntu’. But, in ADC, the sender of the results will know “hm, I can’t just blindly send results, this person has specifically said ‘ubuntu’ is not desired.”

Securing the version

As DC++ 0.692, 0.693 and 0.694 has come out, DC++ has become more secure. Well, atleast in a use-ADC thing. If you look at the changelog, you’ll notice a myriad of ‘TLS‘ being mentioned. Well, this only work on ADC. So ha! you NMDC-something-something…

Anyway, the new versions… Well, there isn’t much in them (besides the TLS, which I haven’t tested by the way)… In any case, I’d skip DC++ 0.692 and 0.693 since they have some nasty bugs…

Answer to Pop quiz: Downloading in ADC

I think this quiz was a little harder than the previous, but nonetheless we have a winner, and it is (again) poy. Congrats. You win a free trip to the public DC dev hub. (Blatant plug :D)

One of the reason I believe this quiz was more difficult was because I didn’t include the actual answer in the options. (Well, d)…) Another reason is because it (sort of) require that you have been paying attention.

The question was: Why can’t Jake download the file list or any other file from “john111/2”? Because Jake already have a transfer going from “john111”. You see, “foobar” and “john111” is the exact same person, using the same client, but with different user names. I’ll soon get to why they are the same user.

The reason I chose this scenario with university hubs, is because users tied to a university often share IPs. This means that one can’t look at the IP for comparison if two users are the same. (If people wouldn’t have shared IP, this would be a nice clue as to why Jake couldn’t download.)

So, why are “foobar” and “john111” the same user? They have the exact same CID. I wrote in the previous post that DC++ look at the CID to check if two users are the same. ADC natively require CIDs, meaning that DC++ doesn’t “artificially” create the CID of other users. In terms, CIDs are global, (or at least are supposed to be) meaning that your CID is the same in one, two or 40 ADC hubs.

Since DC++ see that they have the same CID, it thinks “hey, same user, don’t start another download because I’m already downloading from that user”.

There is an issue with the scheme DC++ currently use – Most users won’t understand what a CID is (CIDs are in fact displayed in the user list) or why DC++ won’t start another download (“what the… it’s not the same user! crappy program!”). There have been discussion on how one could notify the user, among them; treeview of each download (“click on a ‘+’ to expand the list of usernames”); displaying “username1,username2,username3” (I think this would be the easiest – code-wise); Have DC++ print “You are already downloading from this user. The userlist/file has been queued”; a download mini slot option (like the upload mini slot option – but applying only to certain files, like the file list). Can anyone think of more?

Design a site like this with WordPress.com
Get started