Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #3 from motemen/master

hcig.rb: 認証のチェック方法を追加
  • Loading branch information...
commit 5bb50b22c9005f9e48ded823673058390eeeac07 2 parents ca0ea86 + 90e10e7
@cho45 authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 examples/hcig.rb
View
5 examples/hcig.rb
@@ -161,8 +161,9 @@ def create_observer(channel)
end
info[:time] += 1
end
- unless ret.code.to_i == 200
- post nil, NOTICE, channel, "Server returned #{code}. Please refresh rk by /me rk [new rk]"
+ unless ret.code.to_i == 200 && ret.uri.to_s == uri
+ @log.error "Server returned [#{ret.code}] #{ret.uri}"
+ post nil, NOTICE, channel, "Server returned [#{ret.code}] #{ret.uri}. Please refresh rk by /me rk [new rk]"
end
rescue Exception => e
@log.error "Error: #{e.inspect}"
Please sign in to comment.
Something went wrong with that request. Please try again.