From d094f868a684c46f9349d8b241e5ac820a494cff Mon Sep 17 00:00:00 2001 From: Robert Gerus Date: Mon, 28 Apr 2014 11:53:42 +0200 Subject: [PATCH] test. --- plugins/commands/jan.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/commands/jan.rb b/plugins/commands/jan.rb index 716fe51..5d85b0b 100644 --- a/plugins/commands/jan.rb +++ b/plugins/commands/jan.rb @@ -1,7 +1,13 @@ Client.register_command("jan") { |args| + if args =~ /ał$/ then + predicate = args + else + predicate = File.readlines(Config[:commands][:jan][:predicates]).sample.strip + end + [ Config[:commands][:jan][:subject], - File.readlines(Config[:commands][:jan][:predicates]).sample.strip, + predicate Config[:commands][:jan][:attribute], File.readlines(Config[:commands][:jan][:object]).sample.strip ].join " "