- void OnChannelDelete(Channel* chan)
- {
- StatsIter a = sh->find(chan->name);
- if (a != sh->end())
- {
- sh->erase(a);
- }
- this->changed = true;
- }
-
- void OnUserJoin(User* user, Channel* channel, bool sync, bool &silent)
- {
- StatsIter a = sh->find(channel->name);
- if (a != sh->end())
- {
- a->second++;
- }
- else
- {
- irc::string name = channel->name;
- sh->insert(std::pair<irc::string,int>(name,1));
- }
- this->changed = true;
- }
-
- void OnUserPart(User* user, Channel* channel, const std::string &partmessage, bool &silent)
- {
- StatsIter a = sh->find(channel->name);
- if (a != sh->end())
- {
- a->second--;
- }
- this->changed = true;
- }
-
- void OnUserQuit(User* user, const std::string &message, const std::string &oper_message)
- {
- for (UCListIter v = user->chans.begin(); v != user->chans.end(); v++)
- {
- Channel* c = v->first;
- StatsIter a = sh->find(c->name);
- if (a != sh->end())
- {
- a->second--;
- }
- }
- this->changed = true;
- }
-
- const char* OnRequest(Request* request)
- {
- return NULL;
- }
-
-
- virtual ~ModuleHttpStats()
- {
- delete sh;
- delete so;
- }
-