Fix bug #52 - [Request] Chat history command

This commit is contained in:
Jan Vidar Krey
2009-07-26 05:23:56 +02:00
parent 76b84499bc
commit b125ffe3c1
6 changed files with 102 additions and 19 deletions

View File

@@ -98,7 +98,9 @@ struct hub_info
int status;
char* recvbuf; /* Global receive buffer */
char* sendbuf; /* Global send buffer */
struct linked_list* chat_history; /* Chat history */
#ifdef SSL_SUPPORT
SSL_METHOD* ssl_method;
SSL_CTX* ssl_ctx;
@@ -135,6 +137,16 @@ extern int hub_handle_password(struct hub_info* hub, struct hub_user* u, struct
*/
extern int hub_handle_chat_message(struct hub_info* hub, struct hub_user* u, struct adc_message* cmd);
/**
* Add a chat message to the chat history
*/
extern void hub_chat_history_add(struct hub_info* hub, struct hub_user* user, struct adc_message* cmd);
/**
* Clear the chat history.
*/
extern void hub_chat_history_clear(struct hub_info* hub);
/**
* Used internally by hub_handle_info
* @return 1 if nickname is OK, or 0 if nickname is not accepted.