]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - modules/m_set.c
Fixing time_t warnings
[irc/rqf/shadowircd.git] / modules / m_set.c
index de01753347bfd3528c2f20691fa164f5fcb9f673..3f336c1edebe3af2c5f73e257a26fde265a13a5f 100644 (file)
 
 #include "stdinc.h"
 #include "client.h"
-#include "event.h"
 #include "irc_string.h"
 #include "sprintf_irc.h"
 #include "ircd.h"
 #include "numeric.h"
-#include "commio.h"
 #include "s_serv.h"
 #include "send.h"
 #include "common.h"
@@ -217,18 +215,18 @@ quote_max(struct Client *source_p, int newval)
 {
        if(newval > 0)
        {
-               if(newval > ServerInfo.max_clients)
-               {
-                       sendto_one_notice(source_p,
-                                  ":You cannot set MAXCLIENTS to > max_clients (%d)",
-                                  ServerInfo.max_clients);
-                       return;
+               if(newval > maxconnections - MAX_BUFFER)\r
+               {\r
+                       sendto_one_notice(source_p,\r
+                                         ":You cannot set MAXCLIENTS to > %d",\r
+                                         maxconnections - MAX_BUFFER);\r
+                       return;\r
                }
 
                if(newval < 32)
                {
                        sendto_one_notice(source_p, ":You cannot set MAXCLIENTS to < 32 (%d:%d)",
-                                  GlobalSetOptions.maxclients, highest_fd);
+                                  GlobalSetOptions.maxclients, rb_getmaxconnect());
                        return;
                }
 
@@ -238,14 +236,14 @@ quote_max(struct Client *source_p, int newval)
                                     "%s!%s@%s set new MAXCLIENTS to %d (%lu current)",
                                     source_p->name, source_p->username, source_p->host,
                                     GlobalSetOptions.maxclients, 
-                                    dlink_list_length(&lclient_list));
+                                    rb_dlink_list_length(&lclient_list));
 
                return;
        }
        else
        {
                sendto_one_notice(source_p, ":Current Maxclients = %d (%lu)",
-                          GlobalSetOptions.maxclients, dlink_list_length(&lclient_list));
+                          GlobalSetOptions.maxclients, rb_dlink_list_length(&lclient_list));
        }
 }
 
@@ -380,7 +378,8 @@ quote_splitmode(struct Client *source_p, char *charval)
                        splitmode = 0;
                        splitchecking = 0;
 
-                       eventDelete(check_splitmode, NULL);
+                       rb_event_delete(check_splitmode_ev);
+                       check_splitmode_ev = NULL;
                }
                /* ON */
                else if(newval == 1)
@@ -393,7 +392,8 @@ quote_splitmode(struct Client *source_p, char *charval)
                        splitchecking = 0;
 
                        /* we might be deactivating an automatic splitmode, so pull the event */
-                       eventDelete(check_splitmode, NULL);
+                       rb_event_delete(check_splitmode_ev);
+                       check_splitmode_ev = NULL;
                }
                /* AUTO */
                else if(newval == 2)