Bot-Pastebot

 view release on metacpan or  search on metacpan

TODO  view on Meta::CPAN

acknowledgment:

  /msg [admonisher] I sent a paste key to [nick].

*** Private proactive paste prevention.

When someone has expressed the intention of pasting on-channel,
another user can trigger pastebot to send them a key.  This explains
the bot's purpose and creates the paste key all at once.

Someone's joined the channel and said:

  Can I show you some poetry I wrote?

Someone on-channel catches this and rather than explain the bot types:

  /msg [bot] meet [nick]

The bot then sends [nick] this private message:

  /msg [nick] [requester] has requested that you paste via the web.
  You may paste to [channel] by visiting http://host/paste/[key] ...
  To avoid future problems, /msg [bot] help

*** Automatic key generation.

The bot could incorporate flood detection.  On detecting flood, it can
automatically generate a key and send it to the offending person.
Optionally, it can kick the flooder or set them -v.

Channel ops would be upset if it did this to them, so detect and
ignore +o people. :)

*** Disallow anonymous paste.

Remove the personal ID fields from the web form.  Fill them in based
on the channel and nick requesting keys through IRC.  This is a small
convenience as a side effect of the larger inconvenience of using
one-time keys.

-------------
Web accounts.
-------------

Have persistent accounts with information about each user's viewing
preferences.  Per-viewer settings might include:

Tab widths, although it may be better if the paster could specify
this.

Admin flags, so users can maintain the bot via the web.

Having an authenticated web account means not needing to publish your
IP address.

---------------------
Paste Via Form Upload
---------------------

Add a standard "Browse" button and filename field, and let people
upload via the form.

Also let people download verbatim with a link/button, to circumvent
crappy HTML renderers.

---------------
Paste Via Email
---------------

This could be done now with a simple mail gateway, but there's
considerations with being able to block access.

Ideally it would unwrap attachments (maybe just the first attachment)
if any and paste that rather than just pasting the source of the mail.

It should be possible to block abuses in such a way that attempts to
forge the From line fail.

Suggested by Uri on Magnet #perl.

-------------------
Paste via DCC chat.
-------------------

Some people don't have web access, or have really bad browsers, or are
too lazy to be bothered, or just prefer IRC over the web.  Provide a
way for them to DCC chat the bot and paste into it that way.

User:

  /dcc [bot] chat

The bot accepts the chat request.  The user pastes their paste into
the query, then closes the chat to save it.

  /dcc [bot] close

The bot posts the paste on the web.

*** Reverse DCC chat.

Reverse DCC chat, like eggdrops do, will be needed for people behind
firewalls.

  /ctcp [bot] chat

Then the bot sends a DCC chat request to the user.  The user accepts,
and everything else happens as outlined above.

*** Paste shell over DCC chat.

Add a miniature paste editor so people can specify channel, summary,
and other information for the paste.  More importantly, let users
paste multiple things per chat session.

  To: [channel or nick]
  Subject: A nice subject for the web listing/messaging.

  paste
  paste
  paste



( run in 1.100 second using v1.01-cache-2.11-cpan-b16cb0d3907 )