readlog.c: small patch to prevent core dumps when reading certain records
[citadel.git] / citadel / techdoc / chat.doc
1 Chat subsystem information
2 Brian Costello
3 btx@calyx.net
4
5 Chat / Messaging system
6 -----------------------
7
8 I envision a chat system that can be used for a variety of uses, from
9 chatting in realtime to file exchange to slide presentations.
10
11 Rooms will be able to have invitation lists -- perfect for scheduling a
12 private meeting with various people around the world.
13
14 Meetings will be scheduled by the system scheduler.  The scheduler is not
15 part of this project -- the scheduler will do the work of determining a time
16 when all participants are free.  When a time is decided on, the scheduler
17 will call the chat subsystem which will write this schedule to a file.  This
18 is to make sure that if the chat subsystem is shut down for some reason, it
19 will remember the reserved rooms and invite lists.
20
21 Rooms
22 -----
23 I think a conference call-like system would be good.  Chat sessions can be
24 scheduled with a predetermined list of people or started manually and their
25 invite lists manually made.  Either someone is designated a conference
26 leader or whoever created the room is the conference leader.  The conference
27 leader(s) can invite new people to the room, and kick & ban people out of
28 the room.
29
30 Messages should be able to be sent to anyone on the bbs from the page system
31 to the chat system and vice versa.
32
33 This can be implemented with the current citadel clients.
34
35 Tranfers
36 --------
37 An addition that would be useful here would be the ability to send a file to
38 everyone in a room as well as individual users.
39
40 This cannot be implemented with the current citadel clients -- I DON'T
41 THINK.  I'm not sure.
42
43 Graphics transfers
44 ------------------
45 The idea is to allow slides to be shown to clients.  The transfers mechanism
46 will be used to send the graphics so you would be able to send slides to
47 everyone or just one user.
48
49 This will have to be written into the client (Unix client calls xv, for
50 example)  
51
52 Structures
53 ----------
54
55 /* hold the invite / ban info in this structure.  Username and host are each
56  * used only if they are specified.  This allows banning all hosts from a
57  * particular site.
58  */
59
60 typedef struct s_chat_userlist          
61 {
62    char username[32];
63    char host[64];
64    struct s_chat_userlist *next;
65 } chat_userlist;
66
67 typedef struct s_chat_joinlist
68 {
69    struct CitContext *user_context;
70    struct s_chat_joinlist *next;
71 } chat_joinlist;
72
73 /* Simple chatroom definition */
74
75 typedef struct s_chatroom
76 {
77    char room_name[20];
78    char room_password[20];
79    time_t scheduled_start;
80    time_t scheduled_stop;
81    int room_flags;
82    chat_userlist *invite_list;
83    chat_userlist *ban_list;
84    chat_joinlist *join_list;            /* Context's of who's in this room */
85    chat_joinlist *chanops_list;         /* Context's of channel ops */
86    struct s_chatroom *next;
87 } chatroom;
88
89
90 Definitions
91 -----------
92 #define CHATROOM_PRIVATE        1       /* Invite only */
93 #define CHATROOM_HIDDEN         2       /* Hidden from listing */
94 #define CHATROOM_PASSWORD       4       /* Password protected */
95
96 Schedule
97 --------
98 The stuff that can be implemented in terms of the currentl client will go
99 first.  The transfers will come next.