<commit_before>#  -*- coding: utf-8 -*-
#  ping.rb
#  Author: <NAME>
#  ------------------------
#  A canonical Cinch plugin for yossarian-bot.
#  Responds to a user's 'ping' with a 'pong'.
#  ------------------------
#  This code is licensed by <NAME> under the MIT License.
#  http://opensource.org/licenses/MIT

require_relative 'yossarian_plugin'

class Ping < YossarianPlugin
	include Cinch::Plugin

	def usage
		'!ping - Ping the bot for a timestamped response.'
	end

	def match?(cmd)
		cmd =~ /^(!)?ping$/
	end

	match /ping$/, method: :ping

	def ping(m)
		msec = ((Time.now.usec - m.time.usec) / 1000)
		m.reply "pong (#{msec}ms)", true
	end
end<commit_msg>revert until i create a CTCP PING system<commit_after>#  -*- coding: utf-8 -*-
#  ping.rb
#  Author: <NAME>
#  ------------------------
#  A canonical Cinch plugin for yossarian-bot.
#  Responds to a user's 'ping' with a 'pong'.
#  ------------------------
#  This code is licensed by <NAME> under the MIT License.
#  http://opensource.org/licenses/MIT

require_relative 'yossarian_plugin'

class Ping < YossarianPlugin
	include Cinch::Plugin

	def usage
		'!ping - Ping the bot for a timestamped response.'
	end

	def match?(cmd)
		cmd =~ /^(!)?ping$/
	end

	match /ping$/, method: :ping

	def ping(m)
		m.reply "pong #{Time.now.to_i}", true
	end
end
{'fraction_non_alphanumeric': 0.20409711684370258, 'fraction_numerical': 0.004552352048558422, 'mean_word_length': 2.4438642297650133, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5851938', 'n_tokens_mistral': 491, 'n_tokens_neox': 465, 'n_words': 142}