diff options
author | Your Name <admin@zero.net> | 2025-04-30 11:53:44 +0200 |
---|---|---|
committer | Your Name <admin@zero.net> | 2025-04-30 11:53:44 +0200 |
commit | 0efd01a956e0f524f3c084548b314f40f6831441 (patch) | |
tree | 35a464f15151afa6d7b34a46d005950fa7a222b9 /chatroom.h |
base project
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 + |