#include "client.h"
#include "defines.h"
#include "log.h"
+#include "match.h"
#include "resolve.h"
#include "tool.h"
#endif
printf( " MyPassword = %s\n", Conf_Server[i].pwd_in );
printf( " PeerPassword = %s\n", Conf_Server[i].pwd_out );
+ printf( " ServiceMask = %s\n", Conf_Server[i].svs_mask);
printf( " Group = %d\n", Conf_Server[i].group );
printf( " Passive = %s\n\n", Conf_Server[i].flags & CONF_SFLAG_DISABLED ? "yes" : "no");
}
} /* Conf_AddServer */
+/**
+ * Check if the given nick name is an service
+ */
+GLOBAL bool
+Conf_IsService(int ConfServer, char *Nick)
+{
+ return MatchCaseInsensitive(Conf_Server[ConfServer].svs_mask, Nick);
+} /* Conf_IsService */
+
+
static void
Set_Defaults( bool InitServers )
{
New_Server.flags |= CONF_SFLAG_DISABLED;
return;
}
+ if (strcasecmp(Var, "ServiceMask") == 0) {
+ len = strlcpy(New_Server.svs_mask, ngt_LowerStr(Arg),
+ sizeof(New_Server.svs_mask));
+ if (len >= sizeof(New_Server.svs_mask))
+ Config_Error_TooLong(Line, Var);
+ return;
+ }
Config_Error( LOG_ERR, "%s, line %d (section \"Server\"): Unknown variable \"%s\"!",
NGIRCd_ConfFile, Line, Var );