changeset 442:0d04cca7b0da

qwebirc macro: usage and configuration docs
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 03 Oct 2009 20:00:43 +0200
parents da901fe39fa9
children 87173eb0f02d
files data/plugin/macro/qwebirc.py
diffstat 1 files changed, 26 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/data/plugin/macro/qwebirc.py	Sat Oct 03 19:25:46 2009 +0200
+++ b/data/plugin/macro/qwebirc.py	Sat Oct 03 20:00:43 2009 +0200
@@ -2,12 +2,35 @@
 """
     MoinMoin - embed a qwebirc based IRC chat iframe
 
+    Usage:
+    ------
+    <<qwebirc(server="freenode",channels="#moin")>>
+
+    # . in nick name will give some random number:
+    <<qwebirc(server="freenode",channels="#moin,#moin-dev",nick="moin.")>>
+
+    # maybe nice for a wiki homepage:
+    <<qwebirc(server="freenode",channels="#moin",nick="mynick",width=900,height=500)>>
+
+    # choose a random nickname, but still show dialogue (so you can change it):
+    <<qwebirc(server="freenode",channels="#moin,#moin-dev",randomnick=1,prompt=1)>>
+
+    Configuration:
+    --------------
+    The macro has a (small) builtin list of qwebirc based chat servers, but you
+    can use your own by defining it in your wiki config:
+
+    qwebirc_servers = {
+        # server name: web based service url
+        'freenode': 'http://webchat.freenode.net/',
+        # add your own ones here
+    }
+
     @copyright: 2009 MoinMoin:ThomasWaldmann
     @license: GNU GPL, see COPYING for details.
 """
 
-# "known" qwebirc servers, you can use cfg.qwebirc_servers to give
-# your own dictionary:
+# "known" qwebirc servers, use cfg.qwebirc_servers to give more
 builtin_servers = {
     'freenode': 'http://webchat.freenode.net/',
 }
@@ -20,10 +43,7 @@
                   server=wikiutil.required_arg(unicode),
                   channels=wikiutil.required_arg(unicode),
                   nick=u'', randomnick=0, prompt=0, width=647, height=400):
-    """ Embed a qwebirc based IRC chat iframe
-
-        <<qwebirc()>>
-    """
+    """ Embed a qwebirc based IRC chat iframe """
     request = macro.request
     cfg = request.cfg
     servers = getattr(cfg, 'qwebirc_servers', builtin_servers)