1
/*******************************************************************************
3
* Copyright (c) 2004 Guillaume Cottenceau
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License version 2, as
7
* published by the Free Software Foundation.
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
******************************************************************************/
20
#include <sys/types.h>
21
#include <sys/socket.h>
28
#define MSG_NOSIGNAL 0
31
extern const int proto_major;
32
extern const int proto_minor;
34
extern char* current_command;
36
extern char* user_to_switch;
37
extern GList* alert_words;
39
extern int amount_talk_flood[256];
41
ssize_t send_line_log(int fd, char* dest_msg, char* inco_msg);
42
ssize_t send_line_log_push(int fd, char* dest_msg);
43
ssize_t send_line_log_push_binary(int fd, char* dest_msg, char* printable_msg);
44
ssize_t send_ok(int fd, char* inco_msg);
46
void connections_manager();
47
void conn_terminated(int fd, char* reason);
48
void create_server(int argc, char **argv);
49
void register_server();
50
void unregister_server();
55
void add_prio(int fd);