module ChanReport
Constants
- STYLE_TITLE
- TAG
Public Instance Methods
Source
# File lib/chan_report.rb, line 33 def action_label(action) action.to_s.tr("_", " ") end
Source
# File lib/chan_report.rb, line 29 def denied error("Only channel ops and registered admins can control channels.") end
Source
# File lib/chan_report.rb, line 25 def error(message) IrcReply.error(tag: TAG, message: message, heading_style: STYLE_TITLE) end
Source
# File lib/chan_report.rb, line 12 def success(action:, channel:, detail: nil) body = ["#{action_label(action)} queued."] body << detail.to_s unless detail.to_s.strip.empty? IrcReply.card( tag: TAG, title: "#{action} #{channel}", body_lines: body, footer_parts: "channel control", heading_style: STYLE_TITLE ) end