~ubuntu-branches/ubuntu/precise/gozerbot/precise

« back to all changes in this revision

Viewing changes to gozerplugs/plugs/reverse.py

  • Committer: Bazaar Package Importer
  • Author(s): Jeremy Malcolm
  • Date: 2008-06-02 19:26:39 UTC
  • mfrom: (1.1.3 upstream) (3.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080602192639-3rn65nx4q1sgd6sy
Tags: 0.8.1-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# plugs/reverse.py
 
1
# gozerplugs/plugs/reverse.py
2
2
#
3
 
# Hans van Kranenburg <hans@knorrie.org>
4
 
 
5
 
""" reverse string or list """
 
3
6
4
 
7
5
__copyright__ = 'this file is in the public domain'
 
6
__author__ = 'Hans van Kranenburg <hans@knorrie.org>'
8
7
 
9
8
from gozerbot.generic import waitforqueue
10
9
from gozerbot.commands import cmnds
25
24
    ievent.reply(result[::-1])
26
25
 
27
26
cmnds.add('reverse', handle_reverse, 'USER')
28
 
examples.add('reverse', 'reverse text', '!reverse gozerbot')
 
27
examples.add('reverse', 'reverse text or pipeline', '1) reverse gozerbot 2) list | \
 
28
reverse')