Conditions to then actions #11


  • Enhancment
  • Accepted
Open
Assigned to erronload
  • _ForgeUser10121129 created this issue Aug 28, 2013

    It would be nice to add some conditions to determine if then action is triggered or not.

    for example, I have rule to match bad language and change entirely message to something innocent. I want to keep it that way for players, but for staff i want only (silently) block message.

    something like:

    match ^.*swear.*$
    if permission perm.staff
        then warn Watch your language, there are kids this server!
        then deny
    else
        then replace I am uneducated person.

  • _ForgeUser10121129 added the tags New Enhancment Aug 28, 2013
  • _ForgeUser10620973 posted a comment Sep 25, 2013

    This can currently be done as follows:

    match ^.*swear.*$ require permission perm.staff then warn Watch your language, there are kids on this server! then deny

    match ^.*swear.*$ ignore permission perm.staff then replace I am an uneducated person

    Do you think that having the ability to do conditional execution is a better approach?

  • _ForgeUser10121129 posted a comment Oct 1, 2013

    @Sage905: Go

    i think. your way only make rules file large and its not good for performance, if server have to match same regex over and over only because i want another 'then' action depend on permission. also very large rules file is intricate


    Edited Oct 1, 2013
  • _ForgeUser10620973 removed a tag New Nov 8, 2013
  • _ForgeUser10620973 added a tag Accepted Nov 8, 2013
  • _ForgeUser10620973 posted a comment Nov 8, 2013

    I'm going to accept this ticket, though I need to think through it a bit more before coming to a solution. It's not at the top of my priority list, but I will get to it after I finish up a few other features I've been working on.

    -Sage


To post a comment, please login or register a new account.