DCC Whiteboard Specification
|
|
Visual IRC Features & Screenshots Download ViRC! Scripts Visual IRC Forum Chat in Undernet #ViRC Awards and Reviews About the Author About the Technology ViRC Antique Shop |
CTCP HandshakeDCC CHAT wboard encoded-ip port
OverviewDCC Whiteboard sessions are line-based, similar to DCC Chat. Each line is terminated by LF or CRLF. Lines that begin with any character other than ASCII 001 (^A) are chat messages to be sent to the user's DCC console. Lines that begin with ^A are whiteboard commands to be processed by the client. A session typically starts with option negotiation, where the two clients exchange commands to agree on a set of features they may use during the session. Only features that are supported by both clients may be used. Chat MessagesAny line that does not start with ASCII 001 (^A) is a chat message. Chat messages allow users to talk to each other, as in DCC Chat. They may contain IRC formatting codes. Whiteboard CommandsEach command is on its own line, introduced by ASCII 001 (^A) and optionally terminated by another ^A. Commands that accept parameters are separated from the parameter list with a single space, and the parameters themselves are separated by single commas.
BLTBLT x1src,y1src,x2src,y2src,xdest,ydest Copies a rectangular region from one area of the canvas to another. x2src must be greater than x1src, and y2src must be greater than y1src; the column x2src and the row y2src are not included in the region. CANCAN option Indicates that the sender supports the named option. If the recipient also supports the option, it should respond with a DO command and begin using the indicated feature; otherwise, the recipient should respond with a DONT command. CANTCANT option Indicates that the sender does not support the named option. The recipient must not use the corresponding features, and must not respond to this command with a DO or DONT. CLIPCLIP x1,y1,x2,y2 (Not implemented in ViRC 2.0.) Sets the canvas's clipping region to the specified rectangle. x2 must be greater than x1 and y2 must be greater than y1; the column x2 and the row y2 are not included in the region. Once a CLIP command is received, the recipient should not allow the user to start or end any drawing command outside the clipping region, until it receives a NOCLIP command. CLSCLS Clears the canvas to all white. DODO option Indicates that the sender supports the named option, and wants the recipient to use it. If the recipient also supports the option, it should respond with a CAN command (unless it has already sent a CAN for this option) and begin using the indicated feature; otherwise, the recipient should respond with a CANT command. DONTDONT option Indicates that the sender does not support the named option, and does not want the recipient to use it. The recipient must not use the corresponding features, and must not respond to this command with a CAN or CANT. DRDR tooltype,width,pencolor,brushcolor,x1,y1,x2,y2 Draws with the specified tool. The exact behavior of this command depends on tooltype (see below). Not all parameters are used with all tool types; when sending a DR command, the unused parameters should be 0. pencolor and brushcolor are given as decimal integers representing an RGB color, where the low byte is R, second lowest byte is G, and third lowest byte is B. For example, the color orange (100% red, 50% green, 0% blue) can be converted to hex as $007FFF, and then converted to decimal and sent as "32767". Tool types and their behaviors:
ENTRYENTRY x,y (Not implemented in ViRC 2.0.) Prompts the user to enter text at the location (x,y), as if he had clicked there with the text tool selected. IMGIMG ??? (Not implemented in ViRC 2.0.) To be discussed. IMG and IMGDATA will work together to transfer small bitmap images over the DCC Whiteboard connection, so that they can be placed with the STAMP command. IMGDATAIMGDATA ??? (Not implemented in ViRC 2.0.) To be discussed. See IMG above. MAKEIMGMAKEIMG name,x1,y1,x2,y2 (Not implemented in ViRC 2.0.) Copies a rectangular region from the canvas, specified by the corners (x1,y1) and (x2-1,y2-1), and saves it with the specified name for use with the STAMP command. NOCLIPNOCLIP (Not implemented in ViRC 2.0.) Cancels a previous CLIP command, allowing the user to draw anywhere on the canvas. SETSTAMPSETSTAMP name (Not implemented in ViRC 2.0.) Selects the rubber stamp tool and the stamp image identified by name, which has previously been created with IMG or MAKEIMG. This is intended for automated whiteboard systems or games, which may want to force a user to use a specific tool at a certain time, and it should be used sparingly. SETTOOLSETTOOL tooltype (Not implemented in ViRC 2.0.) Selects the tool identified by tooltype, which must be one of the tool types that can be used with the DR command. This is intended for automated whiteboard systems or games, which may want to force a user to use a specific tool at a certain time, and it should be used sparingly. STAMPSTAMP tooltype,x,y,name (Not implemented in ViRC 2.0.) Draws the stamp image identified by name, centered at the location (x,y). tooltype is reserved for future use and should be left as 0. TXTTXT x,y,text Writes text with its upper left corner at (x,y). The font, text color, and background color are unspecified and should be set to defaults chosen by the client. (ViRC 2.0 uses Tahoma 8 point, in the system default window text color, on a white background.) TXTEXTXTEX x,y,fontname,ptsize,style,textcolor,bgcolor,text Writes text with its upper left corner at (x,y), using the specified font and style information. ptsize is the text size in points. textcolor and bgcolor are given as decimal integers, as in the DR command. style is a decimal integer formed by adding the constants for the desired text style: 1 for bold, 2 for italic, 4 for underline, and 8 for strikeout. Option NegotiationThere is one option defined at the time of this writing: use-wb2. If this option is not enabled, only the CLS, DR, and TXT commands may be used. Also, the DR command may only be used with tools 0 through 6. All clients that implement this specification should support the use-wb2 option. |
© Tara McGrew 2001-2023 |