diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-02-01 16:33:14 +0000 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-02-01 16:33:14 +0000 |
commit | 2ccffd31d402a301efd7cff771d3ec9a7f831719 (patch) | |
tree | 5b3d7e9ca7084058a5531bcb1dbee6858d93a0f5 /data/rbot/plugins/salut.rb | |
parent | 9d29f400bb3a354779185d61049ce7cdfa7744ee (diff) |
salut plugin: don't try matching something when we know nothing
Diffstat (limited to 'data/rbot/plugins/salut.rb')
-rw-r--r-- | data/rbot/plugins/salut.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/data/rbot/plugins/salut.rb b/data/rbot/plugins/salut.rb index 4582e554..a5f94675 100644 --- a/data/rbot/plugins/salut.rb +++ b/data/rbot/plugins/salut.rb @@ -80,6 +80,7 @@ class SalutPlugin < Plugin end
def listen(m)
+ return unless @match
return unless m.kind_of?(PrivMessage)
to_me = m.address? || m.message =~ /#{Regexp.escape(@bot.nick)}/i
if @bot.config['salut.address_only']
|