summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/channel.c2
-rw-r--r--src/client.c4
-rw-r--r--src/hash.c2
-rw-r--r--src/ircd.c26
-rw-r--r--src/listener.c4
-rw-r--r--src/packet.c18
-rw-r--r--src/s_auth.c4
-rw-r--r--src/send.c20
8 files changed, 17 insertions, 63 deletions
diff --git a/src/channel.c b/src/channel.c
index 14abc87..5ee5977 100644
--- a/src/channel.c
+++ b/src/channel.c
@@ -58,7 +58,7 @@ static char parabuf[MODEBUFLEN];
/*! \brief Initializes the channel blockheap, adds known channel CAPAB
*/
void
-init_channels(void)
+channel_init(void)
{
add_capability("EX", CAP_EX, 1);
add_capability("IE", CAP_IE, 1);
diff --git a/src/client.c b/src/client.c
index 0077fa6..17e5b34 100644
--- a/src/client.c
+++ b/src/client.c
@@ -78,14 +78,14 @@ static void check_unknowns_list(void);
static void ban_them(struct Client *, struct MaskItem *);
-/* init_client()
+/* client_init()
*
* inputs - NONE
* output - NONE
* side effects - initialize client free memory
*/
void
-init_client(void)
+client_init(void)
{
/* start off the check ping event .. -- adrian
* Every 30 seconds is plenty -- db
diff --git a/src/hash.c b/src/hash.c
index 45b410b..085338d 100644
--- a/src/hash.c
+++ b/src/hash.c
@@ -68,7 +68,7 @@ static struct MaskItem *resvchannelTable[HASHSIZE];
* functions and clear the tables
*/
void
-init_hash(void)
+hash_init(void)
{
/* Default the userhost/namehost sizes to CLIENT_HEAP_SIZE for now,
* should be a good close approximation anyway
diff --git a/src/ircd.c b/src/ircd.c
index ebd43fc..7581747 100644
--- a/src/ircd.c
+++ b/src/ircd.c
@@ -432,7 +432,7 @@ setup_corefile(void)
* side effects - setups SSL context.
*/
static void
-init_ssl(void)
+ssl_init(void)
{
#ifdef HAVE_LIBCRYPTO
SSL_load_error_strings();
@@ -466,19 +466,6 @@ init_ssl(void)
#endif /* HAVE_LIBCRYPTO */
}
-/* init_callbacks()
- *
- * inputs - nothing
- * output - nothing
- * side effects - setups standard hook points
- */
-static void
-init_callbacks(void)
-{
- iorecv_cb = register_callback("iorecv", iorecv_default);
- iosend_cb = register_callback("iosend", iosend_default);
-}
-
int
main(int argc, char *argv[])
{
@@ -531,7 +518,7 @@ main(int argc, char *argv[])
exit(EXIT_FAILURE);
}
- init_ssl();
+ ssl_init();
if (!server_state.foreground)
{
@@ -555,24 +542,23 @@ main(int argc, char *argv[])
mp_pool_init();
init_dlink_nodes();
- init_callbacks();
initialize_message_files();
dbuf_init();
- init_hash();
+ hash_init();
init_ip_hash_table(); /* client host ip hash table */
init_host_hash(); /* Host-hashtable. */
- init_client();
+ client_init();
class_init();
whowas_init();
watch_init();
- init_auth(); /* Initialise the auth code */
+ auth_init(); /* Initialise the auth code */
init_resolver(); /* Needs to be setup before the io loop */
modules_init();
read_conf_files(1); /* cold start init conf files */
init_uid();
initialize_server_capabs(); /* Set up default_server_capabs */
initialize_global_set_options();
- init_channels();
+ channel_init();
if (EmptyString(ServerInfo.sid))
{
diff --git a/src/listener.c b/src/listener.c
index 2486980..bd577a7 100644
--- a/src/listener.c
+++ b/src/listener.c
@@ -57,7 +57,7 @@ free_listener(struct Listener *listener)
{
assert(listener != NULL);
- dlinkDelete(&listener->listener_node, &ListenerPollList);
+ dlinkDelete(&listener->node, &ListenerPollList);
MyFree(listener);
}
@@ -298,7 +298,7 @@ add_listener(int port, const char *vhost_ip, unsigned int flags)
else
{
listener = make_listener(port, &vaddr);
- dlinkAdd(listener, &listener->listener_node, &ListenerPollList);
+ dlinkAdd(listener, &listener->node, &ListenerPollList);
listener->flags = flags;
}
diff --git a/src/packet.c b/src/packet.c
index b6224e6..0d23553 100644
--- a/src/packet.c
+++ b/src/packet.c
@@ -39,8 +39,6 @@
#define READBUF_SIZE 16384
-struct Callback *iorecv_cb = NULL;
-
static char readBuf[READBUF_SIZE];
static void client_dopacket(struct Client *, char *, size_t);
@@ -271,20 +269,6 @@ flood_recalc(fde_t *fd, void *data)
}
/*
- * iorecv_default - append a packet to the recvq dbuf
- */
-void *
-iorecv_default(va_list args)
-{
- struct Client *client_p = va_arg(args, struct Client *);
- int length = va_arg(args, int);
- char *buf = va_arg(args, char *);
-
- dbuf_put(&client_p->localClient->buf_recvq, buf, length);
- return NULL;
-}
-
-/*
* read_packet - Read a 'packet' of data from a connection and process it.
*/
void
@@ -347,7 +331,7 @@ read_packet(fde_t *fd, void *data)
return;
}
- execute_callback(iorecv_cb, client_p, length, readBuf);
+ dbuf_put(&client_p->localClient->buf_recvq, readBuf, length);
if (client_p->localClient->lasttime < CurrentTime)
client_p->localClient->lasttime = CurrentTime;
diff --git a/src/s_auth.c b/src/s_auth.c
index 3c4f2a7..9be758f 100644
--- a/src/s_auth.c
+++ b/src/s_auth.c
@@ -87,12 +87,12 @@ static CBFUNC start_auth;
struct Callback *auth_cb = NULL;
-/* init_auth()
+/* auth_init
*
* Initialise the auth code
*/
void
-init_auth(void)
+auth_init(void)
{
auth_pool = mp_pool_new(sizeof(struct AuthRequest), MP_CHUNK_SIZE_AUTH);
auth_cb = register_callback("start_auth", start_auth);
diff --git a/src/send.c b/src/send.c
index 2c2b729..b7bf044 100644
--- a/src/send.c
+++ b/src/send.c
@@ -37,11 +37,9 @@
#include "conf.h"
#include "log.h"
#include "memory.h"
-#include "hook.h"
#include "packet.h"
-struct Callback *iosend_cb = NULL;
static unsigned int current_serial = 0;
@@ -81,20 +79,6 @@ send_format(char *lsendbuf, int bufsize, const char *pattern, va_list args)
}
/*
- * iosend_default - append a packet to the client's sendq.
- */
-void *
-iosend_default(va_list args)
-{
- struct Client *to = va_arg(args, struct Client *);
- int length = va_arg(args, int);
- char *buf = va_arg(args, char *);
-
- dbuf_put(&to->localClient->buf_sendq, buf, length);
- return NULL;
-}
-
-/*
** send_message
** Internal utility which appends given buffer to the sockets
** sendq.
@@ -118,8 +102,8 @@ send_message(struct Client *to, char *buf, int len)
dead_link_on_write(to, 0);
return;
}
-
- execute_callback(iosend_cb, to, len, buf);
+
+ dbuf_put(&to->localClient->buf_sendq, buf, len);
/*
** Update statistics. The following is slightly incorrect