/*
* $Id$
* $Log$
+ * Revision 1.4 2000/10/06 08:10:23 priikone
+ * Added WHOIS to send multiple replies if multiple nicknames are
+ * found.
+ * Added MOTD command and [motd] config section and server also sends
+ * motd to client on connection now.
+ * Fixed TOPIC command some more.
+ *
+ * Revision 1.3 2000/07/10 05:41:20 priikone
+ * Added missing token to administrative information.
+ *
+ * Revision 1.2 2000/07/05 06:14:01 priikone
+ * Global costemic changes.
+ *
* Revision 1.1.1.1 2000/06/27 11:36:56 priikone
- * Importet from internal CVS/Added Log headers.
+ * Imported from internal CVS/Added Log headers.
*
*
*/
SILC_CONFIG_SERVER_SECTION_TYPE_DENY_CONNECTION, 4 },
{ "[RedirectClient]",
SILC_CONFIG_SERVER_SECTION_TYPE_REDIRECT_CLIENT, 2 },
+ { "[motd]",
+ SILC_CONFIG_SERVER_SECTION_TYPE_MOTD, 1 },
{ NULL, SILC_CONFIG_SERVER_SECTION_TYPE_NONE, 0 }
};
silc_free(config->routers);
silc_free(config->denied);
silc_free(config->redirect);
+ silc_free(config->motd);
silc_free(config);
}
}
/* Check for matching sections */
for (cptr = silc_config_server_sections; cptr->section; cptr++)
- if (!strcmp(cp, cptr->section))
+ if (!strncasecmp(cp, cptr->section, strlen(cptr->section)))
break;
if (!cptr->section) {
if (!config->admin_info)
config->admin_info = silc_calloc(1, sizeof(*config->admin_info));
+ /* Get location */
+ ret = silc_config_get_token(line, &config->admin_info->location);
+ if (ret < 0)
+ break;
+
/* Get server type */
ret = silc_config_get_token(line, &config->admin_info->server_type);
if (ret < 0)
check = TRUE;
break;
+ case SILC_CONFIG_SERVER_SECTION_TYPE_MOTD:
+
+ if (!config->motd)
+ config->motd = silc_calloc(1, sizeof(*config->motd));
+
+ /* Get motd file */
+ ret = silc_config_get_token(line, &config->motd->motd_file);
+ if (ret < 0)
+ break;
+
+ check = TRUE;
+ checkmask |= (1L << pc->section->type);
+ break;
+
case SILC_CONFIG_SERVER_SECTION_TYPE_NONE:
default:
/* Error */