-
- conf = new ConfigReader(ServerInstance);
- // Sort the Randomizer thingie..
- srand(time(NULL));
-
- q_file = conf->ReadValue("randquote","file",0);
- prefix = conf->ReadValue("randquote","prefix",0);
- suffix = conf->ReadValue("randquote","suffix",0);
-
- mycommand = NULL;
-
- if (q_file.empty())
- {
- throw ModuleException("m_randquote: Quotefile not specified - Please check your config.");
- }
+ ConfigTag* conf = ServerInstance->Config->ConfValue("randquote");
+ prefix = conf->getString("prefix");
+ suffix = conf->getString("suffix");
+ FileReader reader(conf->getString("file", "quotes"));
+ quotes = reader.GetVector();
+ }