Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ General ➜ DeleteTriggerGroup have a bug!!!

DeleteTriggerGroup have a bug!!!

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Randomcho   China  (9 posts)  Bio
Date Sun 20 Nov 2011 11:46 AM (UTC)

Amended on Sun 20 Nov 2011 11:58 AM (UTC) by Randomcho

Message
Is this a bug?

example:

require "addxml" --自动用lua创建trigger的module
addxml.trigger {
match = "^.*已经陷入半昏迷状态,随时都可能摔倒晕去",
regexp = true,
send = "DeleteTriggerGroup('temp_tr')",
sequence = 100,
enabled = true,
send_to="12",
group="temp_tr",
keep_evaluating = "y",
}

but can not delete the trigger group!

---------------------------------------------------

function test()
DeleteTriggerGroup("temp_tr")
end

addxml.trigger {
match = "^.*已经陷入半昏迷状态,随时都可能摔倒晕去",
regexp = true,
send = "test()",
sequence = 100,
enabled = true,
send_to="12",
group="temp_tr",
keep_evaluating = "y",
}

also can not delete the trigger group!
------------------------------------------------------
but use Timer,can delete the trigger group

Top

Posted by Fiendish   USA  (2,536 posts)  Bio   Global Moderator
Date Reply #1 on Sun 20 Nov 2011 03:19 PM (UTC)
Message
This is documented behavior.

Quote:
WARNING - if the trigger is executing a script it cannot be deleted. For example, a trigger cannot delete itself.

If you need to delete a trigger from within itself use DoAfterSpecial to delete it after a short delay. You might also want to use EnableTriggerGroup to disable it first.

http://mushclient.com/scripts/doc.php?function=DeleteTriggerGroup

https://github.com/fiendish/aardwolfclientpackage
Top

Posted by Randomcho   China  (9 posts)  Bio
Date Reply #2 on Sun 20 Nov 2011 11:35 PM (UTC)
Message
thanks!Fiendish
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


11,369 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.