1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-10 11:43:14 +02:00

various fixes

This commit is contained in:
codemastr
2001-07-03 21:38:37 +00:00
parent 80c9185de9
commit 55becdc356
3 changed files with 32 additions and 29 deletions
+2
View File
@@ -657,3 +657,5 @@ seen. gmtime warning still there
- Win32 fixes
- Made a /scan fix, and fixed some version numbers found by Morbid
- Updated m_template.c to use module version 2
- Removed a // comment in src/ircd.c
- Fixed a bunch of updconf bugs reported by DarkSypher
+1 -1
View File
@@ -1291,7 +1291,7 @@ void SocketLoop(void *dummy)
}
#endif
//Debug((DEBUG_DEBUG, "Got message(s)"));
/*Debug((DEBUG_DEBUG, "Got message(s)")); */
/*
** ...perhaps should not do these loops every time,
** but only if there is some chance of something
+29 -28
View File
@@ -337,10 +337,9 @@ int main(int argc, char *argv[]) {
fprintf(fd2, "/* Created using the UnrealIRCd configuration file updater */\n\n");
while (fgets(buf, 1023, fd)) {
if (buf[0] == '#')
if (buf[0] == '#' || buf[0] == '\n' || buf[0] == '\r')
continue;
iCstrip(buf);
if (buf[1] == ':') {
/* Regular config line, switch! */
switch(buf[0]) {
@@ -664,32 +663,34 @@ int main(int argc, char *argv[]) {
break;
}
}
tmp = strtok(buf, " ");
if (!strcmp(tmp, "deny")) {
fprintf(fd2, "deny dcc {\n");
fprintf(fd2, "\tmask \"%s\";\n",strtok(NULL, " "));
fprintf(fd2, "\treason \"%s\"\n};\n",strtok(NULL,""));
continue;
}
if (!strcmp(tmp, "allow")) {
fprintf(fd2, "allow channel {\n");
fprintf(fd2, "\tchannel \"%s\";\n",strtok(NULL, " "));
continue;
}
if (!strcmp(tmp, "vhost")) {
char host[100];
tmp = strtok(&buf[2]," ");
vh = add_vhost(strtok(NULL, " "));
AllocCpy(vh->vhost,tmp);
AllocCpy(vh->pass,strtok(NULL," "));
tmp = strtok(NULL, "");
strcpy(host,tmp);
if (!strchr(tmp,'@'))
sprintf(host, "*@%s",tmp);
else
strcpy(host, tmp);
if (!find_vhost_host(vh, host))
add_vhost_host(vh, host);
else {
tmp = strtok(buf, " ");
if (!strcmp(tmp, "deny")) {
fprintf(fd2, "deny dcc {\n");
fprintf(fd2, "\tmask \"%s\";\n",strtok(NULL, " "));
fprintf(fd2, "\treason \"%s\"\n};\n",strtok(NULL,""));
continue;
}
else if (!strcmp(tmp, "allow")) {
fprintf(fd2, "allow channel {\n");
fprintf(fd2, "\tchannel \"%s\";\n",strtok(NULL, " "));
continue;
}
else if (!strcmp(tmp, "vhost")) {
char host[100];
tmp = strtok(NULL," ");
vh = add_vhost(tmp);
AllocCpy(vh->vhost,tmp);
AllocCpy(vh->pass,strtok(NULL," "));
tmp = strtok(NULL, "");
strcpy(host,tmp);
if (!strchr(tmp,'@'))
sprintf(host, "*@%s",tmp);
else
strcpy(host, tmp);
if (!find_vhost_host(vh, host))
add_vhost_host(vh, host);
}
}
}