Skip to content

Commit

Permalink
Merge pull request #174 from cre-ne-jp/ctcp-time_rfc2822
Browse files Browse the repository at this point in the history
CTCP: TIMEの応答をRFC 2822形式で返す
  • Loading branch information
ochaochaocha3 authored Sep 26, 2019
2 parents c8d9445 + 25a3145 commit 3e7689b
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 @@ -3,6 +3,8 @@

require 'rgrb/plugin_base/irc_adapter'

require 'time'

module RGRB
module Plugin
# CTCP 応答プラグイン
Expand Down Expand Up @@ -51,7 +53,7 @@ def ctcp_version(m)
# @return [void]
# @see https://tools.ietf.org/id/draft-oakley-irc-ctcp-01.html#time
def ctcp_time(m)
ctcp_reply(m, Time.now.strftime('%a, %d %b %Y %T %z'))
ctcp_reply(m, Time.now.rfc2822)
end

# クエリと同じパラメータを返す
Expand Down

0 comments on commit 3e7689b

Please sign in to comment.