* Variable names, comments, documentation, etc... removed the acronym 'BBS'
[citadel.git] / citadel / techdoc / chat.txt
1 Chat subsystem information
2 Brian Costello <btx@calyx.net>
3 [Edits in brackets by Michael Hampton <error@citadel.org>]
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.  [This could apply to
13 both private and public rooms; though we already have chat on-demand, this
14 would allow specific participants to indicate their interest in a given chat.]
15
16 Meetings will be scheduled by the system scheduler.  The scheduler is not
17 part of this project -- the scheduler will do the work of determining a time
18 when all participants are free.  When a time is decided on, the scheduler
19 will call the chat subsystem which will write this schedule to a file.  This
20 is to make sure that if the chat subsystem is shut down for some reason, it
21 will remember the reserved rooms and invite lists.
22
23 Rooms
24 -----
25 I think a conference call-like system would be good.  Chat sessions can be
26 scheduled with a predetermined list of people or started manually and their
27 invite lists manually made.  Either someone is designated a conference
28 leader or whoever created the room is the conference leader.  The conference
29 leader(s) can invite new people to the room, and kick & ban people out of
30 the room.
31
32 Messages should be able to be sent to any logged in user from the page system
33 to the chat system and vice versa.
34
35 This can be implemented with the current citadel clients.  [I can't send a
36 message from a user to a chat unless that user is already in the chat or has
37 access to it.  The other way round is just fine, though.]
38
39 Transfers
40 ---------
41 An addition that would be useful here would be the ability to send a file to
42 everyone in a room as well as individual users.
43
44 This cannot be implemented with the current citadel clients -- I DON'T
45 THINK.  I'm not sure.  [You're right.  We have no way to "push" files to
46 users at present.]
47
48 Graphics transfers
49 ------------------
50 The idea is to allow slides to be shown to clients.  The transfers mechanism
51 will be used to send the graphics so you would be able to send slides to
52 everyone or just one user.
53
54 This will have to be written into the client (Unix client calls xv, for
55 example).  [I've already started on file/graphics viewing for the text client.]
56
57 Structures
58 ----------
59
60 /* hold the invite / ban info in this structure.  Username and host are each
61  * used only if they are specified.  This allows banning all hosts from a
62  * particular site.
63  */
64
65 typedef struct s_chat_userlist          
66 {
67    char username[32];
68    char host[64];
69    struct s_chat_userlist *next;
70 } chat_userlist;
71
72 typedef struct s_chat_joinlist
73 {
74    struct CitContext *user_context;
75    struct s_chat_joinlist *next;
76 } chat_joinlist;
77
78 /* Simple chatroom definition */
79
80 typedef struct s_chatroom
81 {
82    char room_name[20];
83    char room_password[20];
84    time_t scheduled_start;
85    time_t scheduled_stop;
86    int room_flags;
87    chat_userlist *invite_list;
88    chat_userlist *ban_list;
89    chat_joinlist *join_list;            /* Context's of who's in this room */
90    chat_joinlist *chanops_list;         /* Context's of channel ops */
91    struct s_chatroom *next;
92 } chatroom;
93
94
95 Definitions
96 -----------
97 #define CHATROOM_PRIVATE        1       /* Invite only */
98 #define CHATROOM_HIDDEN         2       /* Hidden from listing */
99 #define CHATROOM_PASSWORD       4       /* Password protected */
100
101 Schedule
102 --------
103 The stuff that can be implemented in terms of the current client will go
104 first.  The transfers will come next.