Skip to content

Commit

Permalink
CTCP: TIMEの応答をRFC 2822形式で返す
Browse files Browse the repository at this point in the history
strftimeの部分を簡潔に書く
  • Loading branch information
ochaochaocha3 committed Sep 26, 2019
1 parent b32ae5c commit 25a3145
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/rgrb/plugin/ctcp/irc_adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

require 'rgrb/plugin_base/irc_adapter'

require 'time'

module RGRB
module Plugin
# CTCP 応答プラグイン
Expand Down Expand Up @@ -35,7 +37,7 @@ def ctcp_version(m)
end

def ctcp_time(m)
ctcp_reply(m, Time.now.strftime('%a, %d %b %Y %T %z'))
ctcp_reply(m, Time.now.rfc2822)
end

def ctcp_ping(m)
Expand Down

0 comments on commit 25a3145

Please sign in to comment.