implement IAUTH client code to query a separate server before allowing
[ircu2.10.12-pk.git] / ircd / ircd_lexer.l
index ea9ccb89b70cdb3ee73125fec3bb60e48165eca5..7abff8f26a0aa66d27a30fff5a85372c4a9eea32 100644 (file)
  */
 
 %{
-extern int conf_fd, lineno;
 #include <unistd.h>
+#include <stdio.h>
+#include "ircd.h"
 #include "y.tab.h"
-#undef YY_INPUT
-/* Just stop the lexer at EOF or error. */
-#define YY_INPUT(buf,result,max_size) \
-          if ((result = read(conf_fd, buf, max_size)) <= 0) \
-            result = 0;
+
+extern int lineno;
+
+void
+init_lexer(void)
+{
+  yyin = fopen(configfile, "r");
+  if (yyin == NULL)
+    yy_fatal_error("Could not open the configuration file.");
+  YY_NEW_FILE;
+  lineno = 1;
+}
+
 %}
 %option noyywrap
 %option case-insensitive
 %option nounput
 
+
 WHITE [ \t\r]+
 SHCOMMENT #[^\n]*
 NUMBER [0-9]+
@@ -110,6 +120,39 @@ all return ALL;
 ip return IP;
 crule return CRULE;
 kill return KILL;
+quarantine return QUARANTINE;
+iauth return IAUTH;
+timeout return TIMEOUT;
 features return FEATURES;
+channel return CHANNEL;
+chan_limit return TPRIV_CHAN_LIMIT;
+mode_lchan return TPRIV_MODE_LCHAN;
+deop_lchan return TPRIV_DEOP_LCHAN;
+walk_lchan return TPRIV_WALK_LCHAN;
+local_kill return TPRIV_LOCAL_KILL;
+rehash return TPRIV_REHASH;
+restart return TPRIV_RESTART;
+die return TPRIV_DIE;
+gline return TPRIV_GLINE;
+local_gline return TPRIV_LOCAL_GLINE;
+local_jupe return TPRIV_LOCAL_JUPE;
+opmode return TPRIV_OPMODE;
+set return TPRIV_SET;
+whox return TPRIV_WHOX;
+badchan return TPRIV_BADCHAN;
+local_badchan return TPRIV_LOCAL_BADCHAN;
+see_chan return TPRIV_SEE_CHAN;
+show_invis return TPRIV_SHOW_INVIS;
+show_all_invis return TPRIV_SHOW_ALL_INVIS;
+propagate return TPRIV_PROPAGATE;
+unlimit_query return TPRIV_UNLIMIT_QUERY;
+display return TPRIV_DISPLAY;
+see_opers return TPRIV_SEE_OPERS;
+wide_gline return TPRIV_WIDE_GLINE;
+force_opmode return TPRIV_FORCE_OPMODE;
+force_local_opmode return TPRIV_FORCE_LOCAL_OPMODE;
+pseudo return PSEUDO;
+prepend return PREPEND;
+usermode return USERMODE;
 \n lineno++;
 . return yytext[0];