src/comsys.h

Go to the documentation of this file.
00001 
00002 /* comsys.h */
00003 
00004 /* $Id: comsys.h,v 1.1 2005/06/13 20:50:46 murrayma Exp $ */
00005 
00006 #include "commac.h"
00007 #ifdef CHANNEL_HISTORY
00008 #include "myfifo.h"
00009 #endif
00010 #ifndef __COMSYS_H__
00011 #define __COMSYS_H__
00012 
00013 typedef struct chanentry CHANENT;
00014 struct chanentry {
00015     char *channame;
00016     struct channel *chan;
00017 };
00018 
00019 #define CHAN_NAME_LEN 50
00020 struct comuser {
00021     dbref who;
00022     int on;
00023     char *title;
00024     struct comuser *on_next;
00025 };
00026 
00027 struct channel {
00028     char name[CHAN_NAME_LEN];
00029     int type;
00030     int temp1;
00031     int temp2;
00032     int charge;
00033     int charge_who;
00034     int amount_col;
00035     int num_users;
00036     int max_users;
00037     int chan_obj;
00038     struct comuser **users;
00039     struct comuser *on_users;   /* Linked list of who is on */
00040 #ifdef CHANNEL_HISTORY
00041     myfifo *last_messages;
00042 #endif
00043     int num_messages;
00044 };
00045 
00046 typedef struct {
00047     time_t time;
00048     char *msg;
00049 } chmsg;
00050 
00051 int num_channels;
00052 int max_channels;
00053 
00054 /* some extern functions. */
00055 extern int In_IC_Loc(dbref player);
00056 
00057 #define CHANNEL_JOIN            0x001
00058 #define CHANNEL_TRANSMIT        0x002
00059 #define CHANNEL_RECIEVE         0x004
00060 
00061 #define CHANNEL_PL_MULT         0x001
00062 #define CHANNEL_OBJ_MULT        0x010
00063 #define CHANNEL_LOUD            0x100
00064 #define CHANNEL_PUBLIC          0x200
00065 #define CHANNEL_TRANSPARENT     0x400
00066 
00067 #define UNDEAD(x) (((!God(Owner(x))) || !(Going(x))) && \
00068             ((Typeof(x) != TYPE_PLAYER) || (Connected(x))))
00069 
00070 /* explanation of logic... If it's not owned by god, and it's either not a
00071 player, or a connected player, it's good... If it is owned by god, then if
00072 it's going, assume it's already gone, no matter what it is. :) */
00073 #endif                          /* __COMSYS_H__ */

Generated on Mon May 28 04:25:19 2007 for BattletechMUX by  doxygen 1.4.7