ymskdef.h

00001 /*
00002  $Header: /cvsroot/overdose/overdose/html/ymskdef_8h-source.html,v 1.2 2006/04/11 15:09:07 segin Exp $
00003    
00004 ymskdef.h
00005 Copyright (c) 2006, Alex Mercader
00006 All rights reserved.
00007 
00008 Redistribution and use in source and binary forms, with or without
00009 modification, are permitted provided that the following conditions are met:
00010 
00011   * Redistributions of source code must retain the above copyright notice,this
00012     list of conditions and the following disclaimer.
00013 
00014   * Redistributions in binary form must reproduce the above copyright notice,
00015     this list of conditions and the following disclaimer in the documentation
00016     and/or other materials provided with the distribution.
00017 
00018 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00019 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
00020 THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00021 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
00022 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00023 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00024 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00025 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00026 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00027 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00028 
00029 */
00030 
00031 #define YMSKVER "YMSK v0.2"
00032 #define HDRLEN 16
00033 #define OBUF 512
00034 #define MYBUF OBUF-HDRLEN
00035 #define CMDLEN MYBUF+1
00036 #define PROMPT1  "/> "
00037 #define PROMPT2  "%> "
00038 #define NAMELEN 64
00039 #define PASSWDLEN 64
00040 #define ROOMLEN 64
00041 #define LINELEN 128
00042 #define RCFILE ".ymskrc"
00043 #define CHATSERVER "jcs.chat.dcn.yahoo.com"
00044 #define CHATPORT 8001
00045 #define LOGINPKT 0x01
00046 #define COMMENTPKT 0x41
00047 #define EMOTEPKT 0x43
00048 #define ENTERPKT 0x11
00049 #define EXITPKT 0x12
00050 
00051 typedef struct {
00052         char *name;
00053         char *password;
00054         char *cookie;
00055         char command[CMDLEN];
00056 }yuser_t;
00057 
00058 struct luser {
00059         char *name;
00060         struct luser *next;  /* pointer to next entry */
00061         struct luser *prev;  /* pointer to previous record */
00062 };
00063 
00064 typedef struct chat {
00065         struct luser *firstuser;
00066         struct luser *lastuser;
00067         struct luser *firstignore;
00068         struct luser *lastignore;
00069         yuser_t *user;
00070         char *room;
00071         int sckt;
00072         int quit;
00073         char bufout[OBUF+sizeof(short)+1];
00074 }chat_t;
00075 
00076 typedef struct {
00077         int pcktid;
00078         int errflag;
00079         int ignore;
00080         char *data;
00081         char *val[4];
00082 }msg_t;
00083 
00084 
00085 
00086 
00087 
00088 
00089 
00090 
00091 
00092 
00093 
00094 
00095 
00096 
00097 
00098 
00099 

Generated on Tue Apr 11 11:01:32 2006 by  doxygen 1.4.5