]> jfr.im git - solanum.git/blobdiff - modules/m_set.c
irc_string.h -> match.h, irc_string.h; includes changed
[solanum.git] / modules / m_set.c
index a61329de7fafc138d87aeb32d999648fea5d2e8c..dfa7a8e456303dc09a1d50088317e7d5040e145e 100644 (file)
 
 #include "stdinc.h"
 #include "client.h"
-#include "event.h"
-#include "irc_string.h"
-#include "sprintf_irc.h"
+#include "match.h"
 #include "ircd.h"
 #include "numeric.h"
-#include "commio.h"
 #include "s_serv.h"
 #include "send.h"
 #include "common.h"
@@ -217,18 +214,18 @@ quote_max(struct Client *source_p, int newval)
 {
        if(newval > 0)
        {
-               if(newval > ServerInfo.max_clients)
+               if(newval > maxconnections - MAX_BUFFER)
                {
                        sendto_one_notice(source_p,
-                                  ":You cannot set MAXCLIENTS to > max_clients (%d)",
-                                  ServerInfo.max_clients);
+                                         ":You cannot set MAXCLIENTS to > %d",
+                                         maxconnections - MAX_BUFFER);
                        return;
                }
 
                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;
                }
 
@@ -259,7 +256,7 @@ quote_operstring(struct Client *source_p, const char *arg)
        }
        else
        {
-               strlcpy(GlobalSetOptions.operstring, arg,
+               rb_strlcpy(GlobalSetOptions.operstring, arg,
                        sizeof(GlobalSetOptions.operstring));
                
                sendto_realops_snomask(SNO_GENERAL, L_ALL,
@@ -278,7 +275,7 @@ quote_adminstring(struct Client *source_p, const char *arg)
        }
        else
        {
-               strlcpy(GlobalSetOptions.adminstring, arg,
+               rb_strlcpy(GlobalSetOptions.adminstring, arg,
                        sizeof(GlobalSetOptions.adminstring));
                
                sendto_realops_snomask(SNO_GENERAL, L_ALL,
@@ -380,7 +377,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 +391,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)