citadel
About: Citadel is an advanced messaging and collaboration system for groupware and BBS applications (preferred OS: Linux).
![]() ![]() |
#include "../../sysdep.h"
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <fcntl.h>
#include <signal.h>
#include <pwd.h>
#include <errno.h>
#include <sys/types.h>
#include <assert.h>
#include <time.h>
#include <sys/wait.h>
#include <string.h>
#include <limits.h>
#include <libcitadel.h>
#include "../../citadel_defs.h"
#include "../../server.h"
#include "../../citserver.h"
#include "../../support.h"
#include "../../config.h"
#include "../../msgbase.h"
#include "../../user_ops.h"
#include "../../ctdl_module.h"
Go to the source code of this file.
Data Structures | |
struct | chatmsg |
Functions | |
void | roomchat_timer (void) |
void | roomchat_shutdown (void) |
void | add_to_chat_queue (char *msg) |
void | roomchat_send (char *argbuf) |
void | roomchat_poll (char *argbuf) |
void | roomchat_rwho (char *argbuf) |
void | cmd_rcht (char *argbuf) |
char * | ctdl_module_init_roomchat (void) |
Variables | |
struct chatmsg * | first_chat_msg = NULL |
struct chatmsg * | last_chat_msg = NULL |
void add_to_chat_queue | ( | char * | msg | ) |
Definition at line 85 of file serv_roomchat.c.
References begin_critical_section(), CC, end_critical_section(), first_chat_msg, free(), last_chat_msg, malloc(), chatmsg::msgtext, chatmsg::next, chatmsg::roomnum, S_CHATQUEUE, chatmsg::sender, chatmsg::seq, and chatmsg::timestamp.
Referenced by roomchat_send().
void cmd_rcht | ( | char * | argbuf | ) |
Definition at line 210 of file serv_roomchat.c.
References ac_logged_in, CC, CIT_OK, CMD_NOT_SUPPORTED, cprintf(), CS_CHAT, CtdlAccessCheck(), ERROR, roomchat_poll(), roomchat_rwho(), and roomchat_send().
Referenced by ctdl_module_init_roomchat().
char * ctdl_module_init_roomchat | ( | void | ) |
Definition at line 242 of file serv_roomchat.c.
References cmd_rcht(), CtdlRegisterProtoHook(), CtdlRegisterSessionHook(), EVT_SHUTDOWN, EVT_TIMER, PRIO_CLEANUP, PRIO_SHUTDOWN, roomchat_shutdown(), roomchat_timer(), and threading.
Referenced by initialize_modules().
void roomchat_poll | ( | char * | argbuf | ) |
Definition at line 144 of file serv_roomchat.c.
References begin_critical_section(), CC, cprintf(), CS_CHAT, end_critical_section(), ERROR, first_chat_msg, LISTING_FOLLOWS, MESSAGE_NOT_FOUND, chatmsg::msgtext, chatmsg::next, chatmsg::roomnum, S_CHATQUEUE, chatmsg::sender, chatmsg::seq, and chatmsg::timestamp.
Referenced by cmd_rcht().
void roomchat_rwho | ( | char * | argbuf | ) |
Definition at line 179 of file serv_roomchat.c.
References CC, cprintf(), CS_CHAT, CitContext::cs_flags, CtdlCheckExpress(), CtdlGetContextArray(), ERROR, free(), ctdluser::fullname, LISTING_FOLLOWS, ctdlroom::QRnumber, CitContext::room, and CitContext::user.
Referenced by cmd_rcht().
void roomchat_send | ( | char * | argbuf | ) |
Definition at line 126 of file serv_roomchat.c.
References add_to_chat_queue(), CC, client_getln(), cprintf(), CS_CHAT, ERROR, and SEND_LISTING.
Referenced by cmd_rcht().
void roomchat_shutdown | ( | void | ) |
Definition at line 77 of file serv_roomchat.c.
Referenced by ctdl_module_init_roomchat().
void roomchat_timer | ( | void | ) |
Definition at line 54 of file serv_roomchat.c.
References begin_critical_section(), end_critical_section(), first_chat_msg, free(), last_chat_msg, chatmsg::msgtext, chatmsg::next, S_CHATQUEUE, chatmsg::sender, and chatmsg::timestamp.
Referenced by ctdl_module_init_roomchat().
struct chatmsg* first_chat_msg = NULL |
Definition at line 47 of file serv_roomchat.c.
Referenced by add_to_chat_queue(), roomchat_poll(), and roomchat_timer().
struct chatmsg* last_chat_msg = NULL |
Definition at line 48 of file serv_roomchat.c.
Referenced by add_to_chat_queue(), and roomchat_timer().