Build a !ban command.

• The first thing we need to do is to tell your client, that it is receiving a UserCommand.
   In order to do this we just type.

$UserCommand

• The next thing we need to do is to tell the client, it´s sending a raw command.
• 1 = Tells the client it is a raw command.
• 2 = Is the same as above, with the exception that it only takes the %[nick] argument once.
         This it to prevent of disconnecting more then one user at the time.
         So this is only good in the fillist and search window, so we use 1 here.

1

• The Next number tells the client where it will be visible.
• 1 = Hubtab
• 2 = Userlist
• 4 = Search window
• 8 = Filelist window (Only works with DC++ 0.669 or newer)
• In this case we making a ban command, so this will need a nick argument.

2

• Next we need to give the command a name. So we will name it Ban here.

Ban

• Then we need to tell the client that the title is done and the command should begin.

$

• Now we have come to the actual command.
   So we will start it by telling the hub it is you who sending the command.

<%[mynick]>

• Then we need to type in the hubcommand. In this case !ban.

!ban

• And we need to know who we should ban, so type

%[nick]

• Then we need a reason box to type the kick message in.

%[line:Reason]

• The last step is to tell the client that the command is finished.

&#124;|

• Now should your UserCommand look like this.

$UserCommands 1 2 Ban$<%[mynick]> !ban %[nick] %[line:Reason]&#124;|

• Then we have one more thing to tell the client.
   We don´t want the command sent to us all the time when you log in and out of the hub,
   without erasing the old one first. If we wouldn't erase it, the we will have Ban multiple times in    our right-click. So we type it like this.

$UserCommand 255 7|

• 255 is a erasing command.
• 7 is all the UserCommands. Hubtab,Userlist,search window.
• 1 + 2 + 4 = 7 (look further up for the different numbers) Simple hu?

• But this command should only be used once in the UserCommands.
• You put it before all your UserCommands. Like this.

$UserCommand 255 7| $UserCommands 1 2 Ban$<%[mynick]> !ban %[nick] %[line:Reason]&#124;|