]> git.donarmstrong.com Git - infobot.git/commitdiff
If topicAuthor is on then show it in topic, otherwise just topic -- contribution...
authorsimonraven <simonraven@c11ca15a-4712-0410-83d8-924469b57eb5>
Tue, 6 Mar 2007 21:41:41 +0000 (21:41 +0000)
committersimonraven <simonraven@c11ca15a-4712-0410-83d8-924469b57eb5>
Tue, 6 Mar 2007 21:41:41 +0000 (21:41 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk@1301 c11ca15a-4712-0410-83d8-924469b57eb5

blootbot/files/sample/blootbot.config
blootbot/src/Modules/Topic.pl

index 246ed2ed46c76c53201ba8f37a345755b7aad7fa..1ac6c8c7a072a05932b7c90894b234d4a0ec9aa5 100644 (file)
@@ -216,6 +216,11 @@ set useStrict              1
 #   CLI                -- Command Line Interface
 set Interface          IRC
 
+# [0/1] Show topic author (troubled)
+# If 1, topics managed with !topic add foo will show the nick in ()'s
+# If 0, the nick of the creator will be recorded for !topic list, but not shown in the topic itself
+set topicAuthor 1
+
 ####
 # Now modify blootbot.chan for per-channel specific configuration see
 # sample.chans for info.
index 2a07c2ee59b99cfb519d172be22850933a05b2cb..96b0b3ff61932991a25c53e6afa89cac50a47f8b 100644 (file)
@@ -62,8 +62,11 @@ sub topicCipher {
 
        if ($setby =~ /^(unknown|)$/i) {
            push(@topic, $subtopic);
-       } else {
+       # If topicAuthor is on then show it in topic, otherwise just topic -- troubled
+       } elsif ($param{'topicAuthor'} eq "1") {
            push(@topic, "$subtopic ($setby)");
+       } else {
+           push(@topic, "$subtopic");
        }
     }