diff options
Diffstat (limited to 'chatroom.h')
-rw-r--r-- | chatroom.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/chatroom.h b/chatroom.h new file mode 100644 index 0000000..a51f984 --- /dev/null +++ b/chatroom.h @@ -0,0 +1,23 @@ +#ifndef CHATROOM_H +#define CHATROOM_H + +#define MAX_CHATROOMS 32 + +typedef struct { + char name[50]; + int users; + char created[20]; + char time[20]; + char topic[100]; +} chatroom_t; + +extern chatroom_t chatrooms[MAX_CHATROOMS]; +extern int chatroom_count; + +void load_chatrooms(const char *filename); +void print_chatroom_list(int sock); +int join_chatroom(const char *name, client_t *cli); +void leave_chatroom(client_t *cli); + +#endif + |