Archive for August, 2006

Rawwwww at ADC

August 27, 2006

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!

August 27, 2006

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

August 23, 2006

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

August 2, 2006

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.