/******************************************************************************
* This file is part of a software distribution, which is furnished under the *
* terms of a license. Use of this software by any means is subject to this *
* license and signifies the acceptance of the licensing terms stated *
* therein. Please see the file LICENSE in the top-level directory of this *
* software distribution for detailed copyright disclaimers and licensing *
* terms. *
******************************************************************************
* Copryight (c) by Andreas S. Wetzel - All rights reserved. *
******************************************************************************/
/* $Id: param.h,v 1.6 2002/06/23 23:29:37 mickey Exp $ */
#ifndef __VPARAM_H__
#define __VPARAM_H__
#define PROTO_REV 0x00040011
#define MAJOR_REV(x) ((x & 0xffff0000) >> 16)
#define MINOR_REV(x) (x & 0xffff)
#define VSERVER_MAGIC 0x84cde8ba
#define VCLIENT_MAGIC 0x4ebc2df7
/********************************************************************
* Maximum sizes of usernames, nicknames, topics and ident strings. *
* All sizes do not include the terminating NUL character. *
********************************************************************/
#define VPNICKSIZE 15
#define VPUSERSIZE 15
#define VPIDENTSIZE 15
#define VPTOPICSIZE 47
#define VPPASSWDSIZE 15
/****************************
* Login phase status codes *
****************************/
#define CONN_OK 0x00 /* Connection handshake o.k. */
#define CONN_EMAGIC 0x01 /* ERROR: Wrong magic number */
#define CONN_EPROTO 0x02 /* ERROR: Incompatible protocol */
#define CONN_ENINVAL 0x03 /* ERROR: Nickname invalid */
#define CONN_ENDUP 0x04 /* ERROR: Duplicated nickname */
#define CONN_ENSIZE 0x05 /* ERROR: Nickname too long */
#define CONN_ECLTYPE 0x06 /* ERROR: Unknown client type */
#define CONN_ENOMEM 0x07 /* ERROR: Server memory failure */
#define CONN_EDENIED 0x08 /* ERROR: Access denied */
#define CONN_EDNSFAIL 0x09 /* ERROR: DNS name invalid */
#define CONN_EAUTHFAIL 0x0A /* ERROR: Authorization failure */
#define CONN_AUTHREQ 0x0B /* Authorization required */
#define CONN_MAX 0x0C /* Total number of messages */
/*******************************
* VChat client software types *
*******************************/
#define CLIENT_FRONTEND 0x92 /* User frontend client (vchat) */
#define CLIENT_GATEWAY 0x93 /* Gateway client (vchatd) */
/***************************************
* Message bytes recognized by vserver *
***************************************/
#define CMD_SIGNOFF 0x20 /* Signoff client */
#define CMD_CHNICK 0x21 /* Change current nickname */
#define CMD_CHCHAN 0x22 /* Change current channel */
#define CMD_PRVMSG 0x23 /* Private message */
#define CMD_PUBMSG 0x24 /* Public message */
#define CMD_INVITE 0x25 /* Invite user to join channel */
#define CMD_VERSION 0x26 /* Show server version information */
#define CMD_STATUS 0x27 /* Show server status report */
#define CMD_ULIST 0x28 /* Request list of active users */
#define CMD_PAGE 0x29 /* Send chat request via mail */
#define CMD_ACTION 0x2A /* Action message */
#define CMD_CHANLIST 0x2B /* Show channel-topic list */
#define CMD_ASSTOPIC 0x2C /* Assign topic to channel */
#define CMD_CHTOPIC 0x2D /* Change topic of channel */
#define CMD_WAKEUP 0x2E /* Wakeup signal */
#define CMD_RTCMP 0x2F /* Roundtrip-Compare packet */
#define CMD_CLIENTINFO 0x30 /* Request client information */
#define CMD_SIGNMSG 0x31 /* Toglle signon/off reception */
#define CMD_CHPASSWD 0x32 /* Change the current password */
#define CMD_SETPASSWD 0x33 /* Set password for specified nick */
#define CMD_ADDNICK 0x34 /* Create new account */
#define CMD_DELNICK 0x35 /* Delete existing user account */
#define CMD_CHMODPERM 0x36 /* Change modification permissions */
#define CMD_CHACCPERM 0x37 /* Change access permissions */
#define CMD_KILL 0x38 /* Kill another user */
#define CMD_QUERY 0x39 /* Query authority data about nick */
#define CMD_BROADCAST 0x3A /* Broadcast message to all users */
#define CMD_ACL_ADD 0x3B /* add ACL command */
#define CMD_ACL_DELETE 0x3C /* delete ACL command */
#define CMD_ACL_FLUSH 0x3D /* flush ACL command */
#define CMD_ACL_LIST 0x3E /* list ACL command */
#define CMD_LASTLOG 0x3F /* Show lastlog entries command */
#define CMD_CLOPT 0x40 /* Get/Set client options */
#define CMD_SVOPT 0x41 /* Get/Set server options */
#define CMD_FIXCHAN 0x42 /* Delete/create fixed channel */
#define CMD_CTXTCMD 0x43 /* Cleartext server command (exp.) */
#define CMD_SVDNSOPT 0x44 /* Set server DNS check options */
#define CMD_EXCLUDE 0x45 /* Exclude users from chat */
/********************************************
* Message bytes recognized by vchat client *
********************************************/
#define SERV_MSG 0xA0 /* Text message from server */
#define SUBMIT_TOPIC 0xA1 /* Submit topic for new channel */
#define WAKEUP 0xA2 /* Signal attention to user */
#define RTCMP_ACK 0xA3 /* Roundtrip-Compare packet */
#define NICK_ACK 0xA4 /* Nickname change acknowledge */
#define CHAN_ACK 0xA5 /* Channel change acknowledge */
#define ULIST_CLEAR 0xA6 /* Clear the clients userlist */
#define ULIST_ADD 0xA7 /* Add entry to clients userlist */
#define ULIST_REMOVE 0xA8 /* Remove entry from clients ulist */
/****************************************
* Specifiers for vserver ulist command *
****************************************/
#define ALL_CHAN 0x70 /* List users on all channels */
#define MY_CHAN 0x71 /* List users on current channel */
#define CHAN 0x72 /* List users on specified channel */
/***************
* Permissions *
***************/
#define AUTH_ADD 0x00000001 /* May create new accounts */
#define AUTH_DELETE 0x00000002 /* May delete accounts */
#define AUTH_CHACCPERM 0x00000004 /* May change access perm */
#define AUTH_CHMODPERM 0x00000008 /* May change modify perm */
#define AUTH_KILL 0x00000010 /* May kill users */
#define AUTH_BROADCAST 0x00000020 /* May send broadcast msgs */
#define AUTH_ACL 0x00000040 /* May modify server ACL */
#define AUTH_QUERY 0x00000080 /* May query user data */
#define AUTH_SOPT 0x00000100 /* May alter server opts */
#define AUTH_FIXCHAN 0x00000200 /* May admin fixed chans */
#define AUTH_STATUS 0x00000400 /* May request server stat */
#define AUTH_EXCLUDE 0x00000800 /* Max exclude users */
#define AUTH_ROOT 0xffffffff /* Mask identifying root */
/******************
* Client Options *
******************/
#define CL_OPT_WAKEUP 0x00000001 /* Wakeup signal disabled */
#define CL_OPT_SGNMSG 0x00000002 /* Hide signon/off messages */
#define CL_OPT_PRVECHO 0x00000004 /* Echo private messages */
/******************
* Server Options *
******************/
#define SV_OPT_SHOW_IP 0x00000001 /* Suppress client IP display */
#define SV_OPT_MAIL_INV 0x00000002 /* Enable e-mail invitations */
/* 0x04 removed as of protocol 4-11 */
#define SV_OPT_REG_ONLY 0x00000008 /* Registered users only */
#define SV_OPT_FLOOD_GUARD 0x00000010 /* Time based flood protection */
/******************************
* Server DNS checking levels *
******************************/
#define SV_DNS_CHK_NONE 0x00 /* no DNS check */
#define SV_DNS_CHK_FWD 0x01 /* forward DNS check */
#define SV_DNS_CHK_REV 0x02 /* forward/reverse DNS check */
#define SV_DNS_CHK_STRICT 0x03 /* strict forward/reverse DNS check */
/***********************************
* One-character attribute/color *
* sequences for internal decoding *
***********************************/
#define C_BOLD 0x77 /* Bold attribute on */
#define C_UL 0x78 /* Underlined attribute on */
#define C_DIM 0x79 /* Half bright attribute on */
#define C_BLINK 0x7a /* Blink attribute on */
#define C_FG_BLK 0x61 /* Foreground color black */
#define C_FG_RED 0x62 /* Foreground color red */
#define C_FG_GRN 0x63 /* Foreground color green */
#define C_FG_YEL 0x64 /* Foreground color yellow */
#define C_FG_BLU 0x65 /* Foreground color blue */
#define C_FG_MAG 0x66 /* Foreground color magenta */
#define C_FG_CYN 0x67 /* Foreground color cyan */
#define C_FG_WHT 0x68 /* Foreground color white */
#define C_BG_BLK 0x41 /* Background color black */
#define C_BG_RED 0x42 /* Background color red */
#define C_BG_GRN 0x43 /* Background color green */
#define C_BG_YEL 0x44 /* Background color yellow */
#define C_BG_BLU 0x45 /* Background color blue */
#define C_BG_MAG 0x46 /* Background color magenta */
#define C_BG_CYN 0x47 /* Background color cyan */
#define C_BG_WHT 0x48 /* Background color white */
#define C_OFF 0x58 /* Attributes off / colors normal */
/************************************
* String attribute/color sequences *
* for printf(3) style encoding *
************************************/
#define S_BOLD "\233w" /* Bold attribute on */
#define S_UL "\233x" /* Underlined attribute on */
#define S_DIM "\233y" /* Half bright attribute on */
#define S_BLINK "\233z" /* Blink attribute on */
#define S_FG_BLK "\233a" /* Foreground color black */
#define S_FG_RED "\233b" /* Foreground color red */
#define S_FG_GRN "\233c" /* Foreground color green */
#define S_FG_YEL "\233d" /* Foreground color yellow */
#define S_FG_BLU "\233e" /* Foreground color blue */
#define S_FG_MAG "\233f" /* Foreground color magenta */
#define S_FG_CYN "\233g" /* Foreground color cyan */
#define S_FG_WHT "\233h" /* Foreground color white */
#define S_BG_BLK "\233A" /* Background coloe black */
#define S_BG_RED "\233B" /* Background coloe red */
#define S_BG_GRN "\233C" /* Background coloe green */
#define S_BG_YEL "\233D" /* Background coloe yellow */
#define S_BG_BLU "\233E" /* Background coloe blue */
#define S_BG_MAG "\233F" /* Background coloe magenta */
#define S_BG_CYN "\233G" /* Background coloe cyan */
#define S_BG_WHT "\233H" /* Background coloe white */
#define S_OFF "\233X" /* Attributes off / colors normal */
#endif /* __VPARAM_H__ */
syntax highlighted by Code2HTML, v. 0.9.1