<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Config</title><link>https://sourceforge.net/p/gribble/wiki/Config/</link><description>Recent changes to Config</description><atom:link href="https://sourceforge.net/p/gribble/wiki/Config/feed" rel="self"/><language>en</language><lastBuildDate>Fri, 05 Apr 2013 15:36:33 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/gribble/wiki/Config/feed" rel="self" type="application/rss+xml"/><item><title>Config modified by nanotube</title><link>https://sourceforge.net/p/gribble/wiki/Config/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v2
+++ v3
@@ -1,4 +1,4 @@
-There is some good documentation on the Config system already, in some of the doc files in the _docs_ directory of the supybot distribution. You will get some introduction in the basic 'PLUGIN_TUTORIAL' file, and some more details in the 'CONFIGURATION' and 'ADVANCED_PLUGIN_CONFIG'. 
+There is some good documentation on the Config system already, in the doc files in the [docs directory](http://supybot.git.sourceforge.net/git/gitweb.cgi?p=supybot/supybot;a=tree;f=docs;hb=HEAD) of the supybot distribution. You will get some introduction in the basic [PLUGIN_TUTORIAL](http://supybot.git.sourceforge.net/git/gitweb.cgi?p=supybot/supybot;a=blob_plain;f=docs/PLUGIN_TUTORIAL;hb=HEAD) file, and some more details in the [CONFIGURATION](http://supybot.git.sourceforge.net/git/gitweb.cgi?p=supybot/supybot;a=blob_plain;f=docs/CONFIGURATION;hb=HEAD) and [ADVANCED_PLUGIN_CONFIG](http://supybot.git.sourceforge.net/git/gitweb.cgi?p=supybot/supybot;a=blob_plain;f=docs/ADVANCED_PLUGIN_CONFIG;hb=HEAD).

 This page will collect some extra info on particularly useful pieces. 

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">nanotube</dc:creator><pubDate>Fri, 05 Apr 2013 15:36:33 -0000</pubDate><guid>https://sourceforge.netd316c949867ed595bdd16ec38ec5699aa72ecbac</guid></item><item><title>Config modified by nanotube</title><link>https://sourceforge.net/p/gribble/wiki/Config/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v1
+++ v2
@@ -8,14 +8,19 @@

 ## Get a global config value

-Example (from callbacks._addressed()): 
+Examples (from Factoids plugin.py). 
+
+For a channel-specific value, such as _supybot.reply.whenAddressedBy.chars_: 

     import supybot.conf as conf
-    def get(group):
-        if ircutils.isChannel(target):
-            group = group.get(target)
-        return group()
-    (target, payload) = msg.args
-    get(conf.supybot.reply.whenAddressedBy.chars)
+    channel=msg.args[0]
+    conf.get(conf.supybot.reply.whenAddressedBy.chars, channel)

+
+If not channel-specific value, such as _supybot.reply.format.time_: 
+    
+    
+    import supybot.conf as conf
+    conf.supybot.reply.format.time()
+    
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">nanotube</dc:creator><pubDate>Fri, 05 Apr 2013 15:36:33 -0000</pubDate><guid>https://sourceforge.nete0b7cae3cf2e1581f91a31e2ca4b166c5a192425</guid></item><item><title>Config modified by nanotube</title><link>https://sourceforge.net/p/gribble/wiki/Config/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;There is some good documentation on the Config system already, in some of the doc files in the &lt;em&gt;docs&lt;/em&gt; directory of the supybot distribution. You will get some introduction in the basic 'PLUGIN_TUTORIAL' file, and some more details in the 'CONFIGURATION' and 'ADVANCED_PLUGIN_CONFIG'. &lt;/p&gt;
&lt;p&gt;This page will collect some extra info on particularly useful pieces. &lt;/p&gt;
&lt;h2 id="get-plugin-conf-value"&gt;Get plugin conf value&lt;/h2&gt;
&lt;p&gt;Talk about &amp;lt;plugin&amp;gt;.registryValue() &lt;/p&gt;
&lt;h2 id="get-a-global-config-value"&gt;Get a global config value&lt;/h2&gt;
&lt;p&gt;Example (from callbacks._addressed()): &lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="n"&gt;import&lt;/span&gt; &lt;span class="n"&gt;supybot&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;conf&lt;/span&gt; &lt;span class="n"&gt;as&lt;/span&gt; &lt;span class="n"&gt;conf&lt;/span&gt;
&lt;span class="n"&gt;def&lt;/span&gt; &lt;span class="n"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;group&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;ircutils&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;isChannel&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;target&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;group&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;group&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;target&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;group&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;target&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;args&lt;/span&gt;
&lt;span class="n"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;conf&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;supybot&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;reply&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;whenAddressedBy&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;chars&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">nanotube</dc:creator><pubDate>Fri, 05 Apr 2013 15:36:33 -0000</pubDate><guid>https://sourceforge.nete1cb8d9883f0effbe7c3a7a00461f2c5b82c0e74</guid></item></channel></rss>