From b684eb8f3efde42e96e1aaaa1e0230aa5d20fa4d Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Thu, 20 Sep 2007 13:49:16 +0000 Subject: [PATCH] reaction plugin: missing \! in string-to-chance conversion --- data/rbot/plugins/reaction.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/rbot/plugins/reaction.rb b/data/rbot/plugins/reaction.rb index c1c3074e..448794b2 100644 --- a/data/rbot/plugins/reaction.rb +++ b/data/rbot/plugins/reaction.rb @@ -216,7 +216,7 @@ class ReactionPlugin < Plugin reply = params[:reply].to_s pct = params[:chance] || "1" - if pct.sub(/%$/,'') + if pct.sub!(/%$/,'') pct = (pct.to_f/100).clip(0,1) else pct = pct.to_f.clip(0,1) -- 2.39.5