Quellcode durchsuchen

move ISUPPORT regeneration to the end of config loading

tags/v1.2.0-rc1
Shivaram Lingamneni vor 4 Jahren
Ursprung
Commit
c1acf3ea43
1 geänderte Dateien mit 6 neuen und 5 gelöschten Zeilen
  1. 6
    5
      irc/config.go

+ 6
- 5
irc/config.go Datei anzeigen

@@ -827,11 +827,6 @@ func LoadConfig(filename string) (config *Config, err error) {
827 827
 
828 828
 	config.loadMOTD()
829 829
 
830
-	err = config.generateISupport()
831
-	if err != nil {
832
-		return nil, err
833
-	}
834
-
835 830
 	// in the current implementation, we disable history by creating a history buffer
836 831
 	// with zero capacity. but the `enabled` config option MUST be respected regardless
837 832
 	// of this detail
@@ -847,5 +842,11 @@ func LoadConfig(filename string) (config *Config, err error) {
847 842
 		}
848 843
 	}
849 844
 
845
+	// now that all postprocessing is complete, regenerate ISUPPORT:
846
+	err = config.generateISupport()
847
+	if err != nil {
848
+		return nil, err
849
+	}
850
+
850 851
 	return config, nil
851 852
 }

Laden…
Abbrechen
Speichern