~ubuntu-branches/ubuntu/utopic/gozerbot/utopic

« back to all changes in this revision

Viewing changes to build/lib/gplugs/echo.py

  • Committer: Package Import Robot
  • Author(s): Jeremy Malcolm
  • Date: 2012-04-03 21:58:28 UTC
  • mfrom: (3.1.11 sid)
  • Revision ID: package-import@ubuntu.com-20120403215828-6mik0tzug5na93la
Tags: 0.99.1-2
* Removes logfiles on purge (Closes: #668767)
* Reverted location of installed files back to /usr/lib/gozerbot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# plugs/echo.py
 
2
#
 
3
#
 
4
 
 
5
""" simple echo command """
 
6
 
 
7
__copyright__ = 'this file is in the public domain'
 
8
 
 
9
from gozerbot.tests import tests
 
10
from gozerbot.commands import cmnds
 
11
from gozerbot.examples import examples
 
12
from gozerbot.plughelp import plughelp
 
13
 
 
14
plughelp.add('echo', 'simply write back what you tell it')
 
15
 
 
16
def handle_echo(bot, ievent):
 
17
    """ say back what is being said """
 
18
    ievent.reply(ievent.rest)
 
19
 
 
20
cmnds.add('echo', handle_echo, 'USER')
 
21
examples.add('echo', "echo Hello World!", 'echo')
 
22
tests.add('echo booo', 'booo')