Answer to pop quiz: Searching magically work

Since we had such a gigantic outcome of the last pop quiz, I thought I would wait posting the answer.


Anyway… Let us get down to business. “Why was user B unable to find the file (especially when the switch was off) and why did it ‘magically’ work after 10 minutes?”

Well, I guess we need to clear up if the switch was on or off when he searched those 8-9 times. Of course, it was ON. This can be easily figured out by noticing that user A was able to search and thus meaning “user B” sent out a massive 8-9 searches at once.

So, does this give us more information as to why user B where unable to find the file, after the switch was OFF? First of all, you need to understand a crucial feature of DC++; If DC++ see a user that searches more than 5 searches in 7 seconds, it (DC++) will think of the searching as “search spam”.

Ok. We’ve all seen “search spam” in chat, and it’s pretty easy to figure out what it meant when we see it (though the exact triggering stats may be difficult to guess).

What most people don’t know is what happens after you see that “search spam” notice. What happens is that DC++ see and think: “search spam. huh, that client is trying to spam me with his searches. If he want to play that game, fine. I can play also”. This “playing” that DC++ does, means that DC++ automagically refuses to answer that client’s searches for the following 2 minutes!

So in the case of this problem, user B caused a “search spam” in the other user’s client and it refused to answer user B’s following searches. Since user B waited 10 minutes for the next search, the “search ban” had been lifted and the client was answering to user B’s searches.
And the side question, “Was AHUB a NMDC hub or a ADC hub, or does it not matter?” is most easily answered by looking in NmdcHub.cpp and AdcHub.cpp in the DC++ source. Well, since I don’t require you to do that, I’ll answer it. It was a NMDC hub, and simply because there is no such code for ADC hubs (in DC++). So you won’t see a “search ban”, and not even a “search spam” in ADC hubs.

The inspiring FAQ entry that I had in mind that mention this, is the How do I protect myself from search spam in DC++? article.

Don’t forget that you can make topic suggestions for blog posts in our “Blog Topic Suggestion Box!”

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: