# Type: Input # Category: Assistance # Description: Cancels previous action (if possible) # Uses: YesNo (called from there) # Author: Andriy Lesyuk new Orangutan::Context( response => [ '^You did(?:n\'t| not) (?:understand|get)(?: it)?!*\.*$', '^You(?:\'ve| have)? made (?:a )?mistake!*\.*$', '^Undo(?: (?:it|this|last action))?!*\.*$', '^(?:You are )?(?:wrong|not right)!*\.*$', '^Do(?:n\'t| not)(?: do this)?!*\.*$', '^Cancel(?: (?:it|this))?!*\.*$', '^Forget(?: (?:about )?it)?!*\.*$' ], handler => sub { my ($context, $user, $item) = @_; if (!$user->Undo) { $user->SendMessage([ "Sorry if I did something wrong... But I can't fix it.", "Can't understand what are you talking about...", 'I do not get it...' ]); } }, weight => -50 ); # kate: syntax perl