+ mycommand = NULL;
+
+ if (q_file.empty())
+ {
+ throw ModuleException("m_randquote: Quotefile not specified - Please check your config.");
+ }
+
+ quotes = new FileReader(ServerInstance, q_file);
+ if(!quotes->Exists())
+ {
+ throw ModuleException("m_randquote: QuoteFile not Found!! Please check your config - module will not function.");
+ }
+ else
+ {
+ /* Hidden Command -- Mode clients assume /quote sends raw data to an IRCd >:D */
+ mycommand = new CommandRandquote(ServerInstance);
+ ServerInstance->AddCommand(mycommand);
+ }
+ Implementation eventlist[] = { I_OnUserConnect };
+ ServerInstance->Modules->Attach(eventlist, this, 1);