equal
deleted
inserted
replaced
370 elseif chain_info.type ~= "event" then |
370 elseif chain_info.type ~= "event" then |
371 return nil, errmsg("Only event chains supported at the moment"); |
371 return nil, errmsg("Only event chains supported at the moment"); |
372 end |
372 end |
373 ruleset[chain] = ruleset[chain] or {}; |
373 ruleset[chain] = ruleset[chain] or {}; |
374 elseif not(state) and line:sub(1,1) == "%" then -- Definition (zone, limit, etc.) |
374 elseif not(state) and line:sub(1,1) == "%" then -- Definition (zone, limit, etc.) |
375 local what, name = line:match("^%%%s*(%w+) +([^ :]+)"); |
375 local what, name = line:match("^%%%s*([%w_]+) +([^ :]+)"); |
376 if not definition_handlers[what] then |
376 if not definition_handlers[what] then |
377 return nil, errmsg("Definition of unknown object: "..what); |
377 return nil, errmsg("Definition of unknown object: "..what); |
378 elseif not name or not idsafe(name) then |
378 elseif not name or not idsafe(name) then |
379 return nil, errmsg("Invalid "..what.." name"); |
379 return nil, errmsg("Invalid "..what.." name"); |
380 end |
380 end |