]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - src/listener.c
Merging s_newconf.c from nenolod and me
[irc/rqf/shadowircd.git] / src / listener.c
index 78fd876cb91e551ce1b72c03a736a31afd364d78..e8647cfd7f73a147b17e31dc49ec7a466890d74e 100644 (file)
 #include "ircd.h"
 #include "ircd_defs.h"
 #include "numeric.h"
-#include "commio.h"
 #include "s_conf.h"
 #include "s_newconf.h"
 #include "s_stats.h"
 #include "send.h"
-#include "memory.h"
 #include "s_auth.h"
 #include "reject.h"
 #include "s_conf.h"
@@ -60,7 +58,7 @@ static listener_t *ListenerPollList = NULL;
 static listener_t *
 make_listener(struct irc_sockaddr_storage *addr)
 {
-       listener_t *listener = (listener_t *) MyMalloc(sizeof(listener_t));
+       listener_t *listener = (listener_t *) rb_malloc(sizeof(listener_t));
        s_assert(0 != listener);
 
        listener->name = me.name;
@@ -95,7 +93,7 @@ free_listener(listener_t *listener)
        }
 
        /* free */
-       MyFree(listener);
+       rb_free(listener);
 }
 
 #define PORTNAMELEN 6          /* ":31337" */
@@ -530,12 +528,12 @@ accept_connection(int pfd, void *data)
                /*
                 * slow down the whining to opers bit
                 */
-               if((last_oper_notice + 20) <= CurrentTime)
+               if((last_oper_notice + 20) <= rb_current_time())
                {
                        sendto_realops_snomask(SNO_GENERAL, L_ALL,
                                             "All connections in use. (%s)",
                                             get_listener_name(listener));
-                       last_oper_notice = CurrentTime;
+                       last_oper_notice = rb_current_time();
                }
 
                write(fd, "ERROR :All connections in use\r\n", 32);