summaryrefslogtreecommitdiff
path: root/data/rbot/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'data/rbot/plugins')
-rw-r--r--data/rbot/plugins/points.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/data/rbot/plugins/points.rb b/data/rbot/plugins/points.rb
index 21157f3d..58f24501 100644
--- a/data/rbot/plugins/points.rb
+++ b/data/rbot/plugins/points.rb
@@ -78,13 +78,17 @@ class PointsPlugin < Plugin
op = nil
ac = Hash.new
m.message.split.each_with_index do |tok, i|
+ # ignore preceeding +/-
+ if op && arg.nil?
+ op = nil
+ end
tok.sub!(/[:,]$/, '') if i == 0
catch :me_if_you_can do
if m.channel.users[tok].nil?
- if (tok =~ /^(?:--)(.*[^-].*)$/) || (tok =~ /^(.*[^-].*)(?:--)$/)
+ if tok =~ /^(.*[^-].*)(?:--)$/
op, arg = '--', $1
next
- elsif (tok =~ /^(?:\+\+)(.*[^+].*)$/)||(tok =~ /^(.*[^+].*)(?:\+\+)$/)
+ elsif tok =~ /^(.*[^+].*)(?:\+\+)$/
op, arg = '++', $1
next
end