summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorMatthias Hecker <mail@apoc.cc>2020-04-13 20:48:40 +0200
committerMatthias Hecker <mail@apoc.cc>2020-04-13 20:48:40 +0200
commitcc241a9709593491b6a67810ed8a5a5054e19208 (patch)
tree9c5eed30d0547f01002606f15e1299bbaf862f0b /data
parent90656f4203a0a989b6fb110d4a07598dd186b84c (diff)
plugin(points): forgot one special case, see #34
Tokens that include itself ++/-- are now ignored as well.
Diffstat (limited to 'data')
-rw-r--r--data/rbot/plugins/points.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/data/rbot/plugins/points.rb b/data/rbot/plugins/points.rb
index 976594ee..2f67092f 100644
--- a/data/rbot/plugins/points.rb
+++ b/data/rbot/plugins/points.rb
@@ -85,6 +85,9 @@ class PointsPlugin < Plugin
token = $1 # strip ++/-- from token
flag = $2 # remember ++/--
+ # token must not have more than one ++/--
+ next if token.match(/(\+\+|--)/)
+
# each token must include at least one alphanumerical character
next unless token.match /[[:alnum:]]/