[telepathy-ashes/master] Update comments to reflect code.

David Laban david.laban at collabora.co.uk
Thu Oct 15 08:17:52 PDT 2009


---
 ashes/tools/commands.py     |    6 +++++-
 ashes/tools/media_echoer.py |    4 ++--
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/ashes/tools/commands.py b/ashes/tools/commands.py
index ed95f07..c636e06 100644
--- a/ashes/tools/commands.py
+++ b/ashes/tools/commands.py
@@ -21,7 +21,11 @@ class CommandExecutor(TextChannelEchoer):
     """
     Handles !commands.
 
-    FIXME: The flow control in this whole class is really quite ugly.
+    A message of the form !command will be dispatched to do_command().
+    Similarly, !othercommand will be dispatched to do_othercommand()
+    Adding a command is as simple as writing a new function do_commandname()
+    which has the same signature as Received(), but returns whatever text you
+    want to be sent back over the channel.
     """
 
     def Received(self, id, timestamp, sender, type, flags, text):
diff --git a/ashes/tools/media_echoer.py b/ashes/tools/media_echoer.py
index 46a39af..74b9ecb 100644
--- a/ashes/tools/media_echoer.py
+++ b/ashes/tools/media_echoer.py
@@ -78,8 +78,8 @@ class MediaChannelEchoer(MemberAcceptor):
 
     def stream_created(self, channel, stream):
         """
-        connects (audio|video)testsrc to the input of the stream, and sets up
-        self.src_pad_added to handle incoming media pads.
+        Sets up self.src_pad_added to handle incoming media pads, so that
+        media can be echoed back.
         """
         stream.connect("src-pad-added", self.src_pad_added)
         print green('Waiting for incoming audio/video.')
-- 
1.5.6.5



More information about the telepathy-commits mailing list