/* 4m v2.15 (protocol.h)
 * (C) Copyright 1990 by Carrick Sean Casey
 * (C) Copyright 1993 by Scott Chasin and Michaeljon Miller
 *
 * 3-22-93 See file COPYING for copyright information.
 *
 * Protocol Definition
 *
 */

#include <sys/types.h>


/* macros */

/* limits */

#define MAX_FIELDS	20	/* fields in a packet */
#define MAX_GROUPLEN	8	/* chars in a group name */
#define MAX_GROUPUSERS	25	/* people in the same group */
#define MAX_IDLEN	12	/* chars in a login id */
#define MAX_INPUTSTR	(250 - MAX_NICKLEN - MAX_NICKLEN - 6) /* input line */
#define MAX_INVITES	25	/* invitations in a group */
#define MAX_NICKLEN	12	/* chars in a username */
#define MAX_GECOS       24      /* Max gecos field */
#define MAX_NODELEN	64	/* chars in a node name */
#define MAX_NOPONG	600	/* seconds a client may not PONG a PING */
#define MAX_TEXTLEN	(80 - MAX_NICKLEN - 5) 	/* max chars in a message */
#define MAX_TOPICLEN	32	/* chars in a group topic */
#define MAX_IDLE	3600	/* maximum idle seconds before disconnect */
#define MAX_XFERS       10

#define IDLE_POLLWAIT	10000	/* how long for select() */
#define BUSY_POLLWAIT	10000	/* polltimeout (msecs) when users >= 1 */
#define POLL_DELAY	100	/* how long to read input */

#define M_LOGIN         100     /* login packet */
#define M_LOGINOK       101     /* login packet */
#define M_OPEN          102     /* open msg to group */
#define M_PERSONAL      103     /* personal msg */
#define M_STATUS        104     /* status update message */

#ifdef SOLARIS
# define _M_ERROR       105
#else
# define M_ERROR        105     /* error message */
#endif  /* SOLARIS */

#define M_IMPORTANT     106     /* special important announcement */
#define M_EXIT          107     /* tell other side to exit */
#define M_COMMAND       108     /* send a command from user */
#define M_CMDOUT        109     /* output from a command */

#if defined(ESIX) || defined(SOLARIS)
# define _M_PROTO       110     /* protocol version information */
#else
# define M_PROTO        110     /* protocol version information */
#endif /* ESIX || SOLARIS */

#define M_BEEP          111     /* beeps */
#define M_PING          112     /* ping packet */
#define M_PONG          113     /* return for ping packet */
#define M_ADMIN         114     /* status, private, error, messages to admins */
#define M_OUT           115     /* Output */
#define M_WHOLIST	116	/* Who listing */
#define M_WHOHEADER     117     /* Who header */
#define M_GROUPHEADER	118     /* Group header */
#define M_OUTPUTPAGE    119     /* Output page */
#define M_SIGNOFF       120     /* Signoff notice */
#define M_SIGNON	121     /* Signon notice */
#define M_JOIN		122     /* Join */
#define M_PART		123     /* Part */
#define M_RESTRICTED	124     /* Group is restricted */
#define M_KICK		125     /* User kick */
#define M_INVITE	126     /* Invite notice */
#define M_NOSUCHNICK	127     /* No such nickname */
#define M_NICKINUSE	128     /* Nick in use */
#define M_CHGROUP	129     /* Group change notice */
#define M_CHNICK	130     /* Nickname change */
#define M_ACTION	131     /* Action notice */
#define M_AWAY		132     /* Away flags */
#define M_NAME		133     /* User nickname change */
#define M_MODE          134     /* Mode change */
#define M_TOPIC         135     /* Topic display */
#define M_CHTOPIC       136     /* Topic change */
#define M_MEMBERS	137     /* Member listing */
#define M_WHOIS		138     /* Whois protocol */
#define M_MOTD		139     /* MOTD */
#define M_AWAYMSG       140     /* Away message */
#define M_HERE          141     /* Here */
#define M_ECHOBACKP	142     /* Echoback format */
#define M_USERISAWAY	143     /* User is away */
#define M_GROUPMISC     144     /* Misc group stats */
#define M_GROUPMODS     145     /* Group moderator list */
#define M_GROUPINVITES  146     /* Group invite list */
#define M_GROUPMODE	147     /* Mode */
#define M_CHMODE	148     /* Changed mode */
#define M_CLAIM		149     /* Group claim */
#define M_DEMOTED       150     /* User demoted */
#define M_PROMOTED      151     /* user promoted */
#define M_REFUSE	152     /* */
#define M_KICKED	153     /* User kicked */
#define M_NOTIFY	154     /* Notify */
#define M_SHORTWHO      155
#define M_SENDINGTO     156
#define M_SERVERS       157     /* Server listing */
#define M_SERVHEADER    158
