* | Inspire Internet Relay Chat Daemon |
* +------------------------------------+
*
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
+ * InspIRCd: (C) 2002-2010 InspIRCd Development Team
* See: http://wiki.inspircd.org/Credits
*
* This program is free but copyrighted software; see
/*
* loop over all local users..
*/
- std::vector<User*>::reverse_iterator count2 = this->Users->local_users.rbegin();
+ std::vector<LocalUser*>::reverse_iterator count2 = this->Users->local_users.rbegin();
while (count2 != this->Users->local_users.rend())
{
- User *curr = *count2;
+ LocalUser *curr = *count2;
count2++;
if (curr->quitting)
continue;
- if (curr->Penalty)
+ if (curr->CommandFloodPenalty)
{
- curr->Penalty--;
- curr->OnDataReady();
+ unsigned int rate = curr->MyClass->GetCommandRate();
+ if (curr->CommandFloodPenalty > rate)
+ curr->CommandFloodPenalty -= rate;
+ else
+ curr->CommandFloodPenalty = 0;
+ curr->eh.OnDataReady();
}
switch (curr->registered)