about summary refs log tree commit diff
path: root/pkgs/development/tools/haskell/lambdabot/custom-config.patch
blob: db467f8dd29b0adc430a1c7d2d5688afa847ed4a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
diff --git a/src/Main.hs b/src/Main.hs
index 61da2f3..39e5c9b 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -73,11 +73,14 @@ main = do
     config' <- sequence config
     dir <- P.getDataDir
     exitWith <=< lambdabotMain modulesInfo $
-        [dataDir ==> dir, lbVersion ==> P.version] ++ config'
+        [dataDir ==> dir, lbVersion ==> P.version] ++ configInfo ++ config'
 
 -- special online target for ghci use
 online :: [String] -> IO ()
 online strs = do
     dir <- P.getDataDir
-    void $ lambdabotMain modulesInfo
-        [dataDir ==> dir, lbVersion ==> P.version, onStartupCmds ==> strs]
+    void $ lambdabotMain modulesInfo $
+        [dataDir ==> dir, lbVersion ==> P.version, onStartupCmds ==> strs] ++ configInfo
+
+configInfo :: [DSum Config Identity]
+configInfo = @config@
diff --git a/src/Modules.hs b/src/Modules.hs
index 036ea1f..eaafa50 100644
--- a/src/Modules.hs
+++ b/src/Modules.hs
@@ -14,10 +14,15 @@ import Lambdabot.Plugin.Reference
 import Lambdabot.Plugin.Social
 
 modulesInfo :: Modules
-modulesInfo = $(modules $ corePlugins
-    ++ haskellPlugins
-    ++ ["irc", "localtime", "topic"] -- ircPlugins
-    ++ ["dummy", "fresh", "todo"] -- miscPlugins
-    ++ ["bf", "dice", "elite", "filter", "quote", "slap", "unlambda", "vixen"] -- noveltyPlugins
-    ++ referencePlugins
-    ++ socialPlugins)
+modulesInfo =
+  $(modules $
+    let oldDefaultModules =
+          corePlugins
+          ++ haskellPlugins
+          ++ ["irc", "localtime", "topic"] -- ircPlugins
+          ++ ["dummy", "fresh", "todo"] -- miscPlugins
+          ++ ["bf", "dice", "elite", "filter", "quote", "slap", "unlambda", "vixen"] -- noveltyPlugins
+          ++ referencePlugins
+          ++ socialPlugins
+    in @modules@
+   )