lib/ricer4/autopaste/auto_paste.rb
### Build the autopaste and send it
Build the autopaste and send it
Build the autopaste and send it
def build_and_send_pastepin(messages)
      threaded {
        Thread.current[:ricer_message] = messages.first
        Thread.current[:ricer_user] = sender
        sender.localize!.send_message(t(:msg_autopasting, :count => messages.length))
        get_plugin('Paste/Paste').
          send_pastebin(
            autopaste_title(messages),
            autopaste_message(messages),
            messages.length,
            'text',
            'ricer4.plugins.paste.auto_paste.msg_autopasted',
          )
      }
    end
def build_and_send_pastepin ( messages ) threaded { Thread . current [ :ricer_message ] = messages . first Thread . current [ :ricer_user ] = sender sender . localize! . send_message ( t ( :msg_autopasting , :count => messages . length ) ) get_plugin ( 'Paste/Paste' ) . send_pastebin ( autopaste_title ( messages ) , autopaste_message ( messages ) , messages . length , 'text' , 'ricer4.plugins.paste.auto_paste.msg_autopasted' , ) } end
Build the autopaste and send it
Build the autopaste and send it
# XXX: start a thread with a new message scope (ugly) # The message that caused all this! # Inform_user # Paste it!
messages