mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-03 07:33:13 +02:00
+ and dynconf, chrestrict
This commit is contained in:
@@ -562,3 +562,5 @@
|
||||
it encrypts X and N lines too.
|
||||
- Fixed empty mode sends in register_user, reported by Bagge
|
||||
- Added some portability stuff
|
||||
- Fixed some empty-line/missing parameter stuff in dccdeny, vhost,
|
||||
and dynconf, chrestrict
|
||||
|
||||
+13
-3
@@ -118,7 +118,8 @@ int load_conf(char *filename, int type)
|
||||
iCstrip(buf);
|
||||
version = strtok(buf, "^");
|
||||
version = strtok(NULL, "");
|
||||
|
||||
if (!version)
|
||||
goto malformed;
|
||||
/* is this a unrealircd.conf file? */
|
||||
if (!match("1.*", version))
|
||||
{
|
||||
@@ -189,6 +190,7 @@ int load_conf(char *filename, int type)
|
||||
}
|
||||
else
|
||||
{
|
||||
malformed:
|
||||
if (type == 1)
|
||||
{
|
||||
sendto_ops
|
||||
@@ -255,8 +257,12 @@ int load_conf2(FILE * conf, char *filename, int type)
|
||||
if (*var == '\0')
|
||||
continue;
|
||||
|
||||
strtok(NULL, " ");
|
||||
setto = strtok(NULL, " ");
|
||||
if (!setto)
|
||||
continue;
|
||||
setto = strtok(NULL, "");
|
||||
if (!setto)
|
||||
continue;
|
||||
/* Is it a aint variable */
|
||||
if (strcmp(var, "MODE_X") == 0)
|
||||
{
|
||||
@@ -428,8 +434,12 @@ int load_conf3(FILE * conf, char *filename, int type)
|
||||
if (*var == '\0')
|
||||
continue;
|
||||
|
||||
strtok(NULL, " ");
|
||||
setto = strtok(NULL, " ");
|
||||
if (!setto)
|
||||
continue;
|
||||
setto = strtok(NULL, "");
|
||||
if (!setto)
|
||||
continue;
|
||||
/* Is it a aint variable */
|
||||
if (strcmp(var, "iNAH") == 0)
|
||||
{
|
||||
|
||||
+6
-1
@@ -271,6 +271,8 @@ int dcc_loadconf(void)
|
||||
if (buf[0] == '#' || buf[0] == '/' || buf[0] == '\0')
|
||||
continue;
|
||||
iCstrip(buf);
|
||||
if (buf[0] == '#' || buf[0] == '/' || buf[0] == '\0')
|
||||
continue;
|
||||
x = strtok(buf, " ");
|
||||
if (strcmp("deny", x) == 0)
|
||||
{
|
||||
@@ -526,6 +528,8 @@ int cr_loadconf(void)
|
||||
if (buf[0] == '#' || buf[0] == '/' || buf[0] == '\0')
|
||||
continue;
|
||||
iCstrip(buf);
|
||||
if (buf[0] == '#' || buf[0] == '/' || buf[0] == '\0')
|
||||
continue;
|
||||
x = strtok(buf, " ");
|
||||
if (strcmp("allow", x) == 0)
|
||||
{
|
||||
@@ -668,9 +672,10 @@ int vhost_loadconf(void)
|
||||
while (fgets(buf, 2048, f))
|
||||
{
|
||||
if (buf[0] == '#' || buf[0] == '/' || buf[0] == '\0')
|
||||
|
||||
continue;
|
||||
iCstrip(buf);
|
||||
if (buf[0] == '#' || buf[0] == '/' || buf[0] == '\0')
|
||||
continue;
|
||||
x = strtok(buf, " ");
|
||||
if (strcmp("vhost", x) == 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user