X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/blobdiff_plain/ccfe0e9712b46cedb2a60ab22cd5ac29d65bfc7d..8a78afe43d8c11af9e1d50ef438f0f193dcd12b3:/modules/m_set.c diff --git a/modules/m_set.c b/modules/m_set.c index c27cd95..3f336c1 100644 --- a/modules/m_set.c +++ b/modules/m_set.c @@ -28,12 +28,10 @@ #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) + { + sendto_one_notice(source_p, + ":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)", - GlobalSetOptions.maxclients); + sendto_one_notice(source_p, ":You cannot set MAXCLIENTS to < 32 (%d:%d)", + GlobalSetOptions.maxclients, rb_getmaxconnect()); return; } @@ -381,6 +379,7 @@ quote_splitmode(struct Client *source_p, char *charval) splitchecking = 0; rb_event_delete(check_splitmode_ev); + check_splitmode_ev = NULL; } /* ON */ else if(newval == 1) @@ -394,6 +393,7 @@ quote_splitmode(struct Client *source_p, char *charval) /* we might be deactivating an automatic splitmode, so pull the event */ rb_event_delete(check_splitmode_ev); + check_splitmode_ev = NULL; } /* AUTO */ else if(newval == 2)