diff options
author | frostycoolslug <frostycoolslug@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-04-01 14:47:59 +0000 |
---|---|---|
committer | frostycoolslug <frostycoolslug@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-04-01 14:47:59 +0000 |
commit | 19aa5d081acc8e35fb6a49016ffebeb447f1d375 (patch) | |
tree | 5b7a5af5979c04e29784bb26d233c6ebf0cb8a83 | |
parent | 1b7fc83311f4454b782a430b2e43eebfbe8ae4d7 (diff) |
Fixed Crash bug cause by multiple declarations of 'Srv' (Bug #35)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@935 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/modules/m_randquote.cpp | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/src/modules/m_randquote.cpp b/src/modules/m_randquote.cpp index 197efcdb6..01a6e3270 100644 --- a/src/modules/m_randquote.cpp +++ b/src/modules/m_randquote.cpp @@ -34,26 +34,27 @@ std::string suffix; void handle_randquote(char** parameters, int pcntl, userrec *user) { - std::string str; - int fsize; - char buf[MAXBUF]; + std::string str; + int fsize; + char buf[MAXBUF]; - fsize = quotes->FileSize(); - srand(time(NULL)); - str = quotes->GetLine(rand() % fsize); + fsize = quotes->FileSize(); + srand(time(NULL)); + str = quotes->GetLine(rand() % fsize); - sprintf(buf,"NOTICE %s :%s%s%s",user->nick,prefix.c_str(),str.c_str(),suffix.c_str()); - Srv->SendServ(user->fd, buf); - return; + sprintf(buf,"NOTICE %s :%s%s%s",user->nick,prefix.c_str(),str.c_str(),suffix.c_str()); + Srv->SendServ(user->fd, buf); + return; } + + + class ModuleRandQuote : public Module { private: - Server *Srv; - ConfigReader *conf; - + ConfigReader *conf; public: ModuleRandQuote() { |