Permalink
Browse files

Do not break when calling User#unmonitor before having called User#mo…

…nitor

On networks without MONITOR support, User#unmonitor was
unconditionally stopping the monitor timer, even if none existed.
  • Loading branch information...
dominikh committed Aug 18, 2012
1 parent 956d8f4 commit 6de010e0d326c6971dad5957fa7fb8dfb8476915
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/cinch/user.rb
View
@@ -294,7 +294,7 @@ def unmonitor
if @bot.irc.isupport["MONITOR"] > 0
@bot.irc.send "MONITOR - #@name"
else
- @monitored_timer.stop
+ @monitored_timer.stop if @monitored_timer
end
@monitored = false

0 comments on commit 6de010e

Please sign in to comment.