X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=data%2Frbot%2Fplugins%2Fpoll.rb;h=814b2673ff67390a65dbb346d7475c10734672eb;hb=052217de30c59206d7025b582d4604557a747470;hp=79f663f155df7e9c3e83ccf9797fd06d63e37310;hpb=c320012ebd38fe5498cfa8435fa3724729334ec9;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git diff --git a/data/rbot/plugins/poll.rb b/data/rbot/plugins/poll.rb index 79f663f1..814b2673 100644 --- a/data/rbot/plugins/poll.rb +++ b/data/rbot/plugins/poll.rb @@ -67,6 +67,7 @@ class ::Poll @voters[voter] = choice return _("recorded your vote for %{choice}: %{value}") % { + :choice => choice, :value => @answers[choice][:value] } else @@ -87,7 +88,7 @@ class ::Poll end def options - options = _("options are: ") + options = _("options are: ").dup @answers.each { |letter, info| options << "#{Bold}#{letter}#{NormalText}) #{info[:value]} " } @@ -201,7 +202,7 @@ class PollPlugin < Plugin command = _("poll vote %{id} ") % { :id => poll.id } - instructions = _("you have %{duration}, vote with ") + instructions = _("you have %{duration}, vote with ").dup instructions << _("%{priv} or %{public}") m.reply instructions % { :duration => "#{Bold}#{target_duration}#{Bold}", @@ -327,12 +328,12 @@ class PollPlugin < Plugin outcome << " #{poll.outcome}" end - m.reply (to_reply % { + m.reply((to_reply % { :bold => Bold, :id => poll.id, :author => poll.author, :channel => poll.channel, :started => poll.started, :end => poll.ends_at - }) + options + outcome + }) + options + outcome) end def help(plugin,topic="")