From 5eb102e01e2bc056aaa9830bc4b03444eac75202 Mon Sep 17 00:00:00 2001 From: Peter Gerwinski <peter.gerwinski@hs-bochum.de> Date: Thu, 5 Nov 2020 18:11:53 +0100 Subject: [PATCH] Korrekturen am cvh-bot (mumbleBot) 5.11.2020 --- 20201105/mumbleBot-20201105.diff | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 20201105/mumbleBot-20201105.diff diff --git a/20201105/mumbleBot-20201105.diff b/20201105/mumbleBot-20201105.diff new file mode 100644 index 0000000..c1fb850 --- /dev/null +++ b/20201105/mumbleBot-20201105.diff @@ -0,0 +1,26 @@ +diff --git a/commands/poll.go b/commands/poll.go +index 1729be5..cb6291a 100644 +--- a/commands/poll.go ++++ b/commands/poll.go +@@ -90,11 +90,12 @@ func (c *PollCommand) Execute(user *gumble.User, private bool, args ...string) { + var voteMsg bytes.Buffer + switch len(args) { + case 0: //Classic poll +- ResultNames = []string{"yes", "no"} + standardVote = true ++ ResultNames = []string{"yes", "no"} + votingMessages = []string{"yes", "ja", "+", "no", "nein", "-"} + voteMsg.WriteString(" yes/no/ja/nein/+/-") + case 1: //Range poll ++ standardVote = false + voteMsg.WriteString(" anything between") + colonIndex := strings.Index(args[0], ":") + if colonIndex != -1 { +@@ -158,6 +159,7 @@ func (c *PollCommand) Execute(user *gumble.User, private bool, args ...string) { + } + votingMessages = ResultNames + default: //Poll with given answer possibilites ++ standardVote = false + ResultNames = make([]string, len(args)) + votingMessages = make([]string, len(args)) + for i, name := range args { -- GitLab