ConfigReader *conf;
FileReader *quotes;
- string q_file;
- string prefix;
- string suffix;
+ std::string q_file;
+ std::string prefix;
+ std::string suffix;
public:
ModuleRandQuote()
Srv = new Server;
conf = new ConfigReader;
+
q_file = conf->ReadValue("randquote","file",0);
prefix = conf->ReadValue("randquote","prefix",0);
suffix = conf->ReadValue("randquote","suffix",0);
+ if (q_file == "") {
+ printf("m_randquote: Quotefile not specified.. Please check your config.\n\n");
+ exit(0);
+ }
+
+
quotes = new FileReader(q_file);
+ if(!quotes->Exists())
+ {
+ printf("m_randquote: QuoteFile not Found!! Please check your config.\n\n");
+ exit(0);
+ }
}
virtual ~ModuleRandQuote()
virtual void OnUserConnect(userrec* user)
{
- string str;
+ std::string str;
int fsize;
char buf[MAXBUF];