summaryrefslogtreecommitdiff
path: root/include/commands
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2012-07-22 23:18:06 +0200
committerattilamolnar <attilamolnar@hush.com>2013-08-12 20:00:10 +0200
commit558eea33dc323518dba505a99ffbb19b8fbe1267 (patch)
tree705c1ced95339f75392f737c625839f0614fec00 /include/commands
parent6d39615998dee7b30565d34a9f209b569678fb6a (diff)
cmd_whowas Major cleanup, fix inefficiencies
Diffstat (limited to 'include/commands')
-rw-r--r--include/commands/cmd_whowas.h17
1 files changed, 7 insertions, 10 deletions
diff --git a/include/commands/cmd_whowas.h b/include/commands/cmd_whowas.h
index 7e1eeefc9..0a38b44f1 100644
--- a/include/commands/cmd_whowas.h
+++ b/include/commands/cmd_whowas.h
@@ -46,27 +46,27 @@ typedef std::deque<std::pair<time_t,irc::string> > whowas_users_fifo;
class CommandWhowas : public Command
{
private:
- /** Whowas container, contains a map of vectors of users tracked by WHOWAS
+ /** Primary container, links nicknames tracked by WHOWAS to a list of records
*/
whowas_users whowas;
- /** Whowas container, contains a map of time_t to users tracked by WHOWAS
+ /** List of nicknames in the order they were inserted into the map
*/
whowas_users_fifo whowas_fifo;
public:
/** Max number of WhoWas entries per user.
*/
- int WhoWasGroupSize;
+ unsigned int GroupSize;
/** Max number of cumulative user-entries in WhoWas.
* When max reached and added to, push out oldest entry FIFO style.
*/
- int WhoWasMaxGroups;
+ unsigned int MaxGroups;
/** Max seconds a user is kept in WhoWas before being pruned.
*/
- int WhoWasMaxKeep;
+ unsigned int MaxKeep;
CommandWhowas(Module* parent);
/** Handle command.
@@ -78,8 +78,8 @@ class CommandWhowas : public Command
CmdResult Handle(const std::vector<std::string>& parameters, User *user);
void AddToWhoWas(User* user);
std::string GetStats();
- void PruneWhoWas(time_t t);
- void MaintainWhoWas(time_t t);
+ void Prune();
+ void Maintain();
~CommandWhowas();
};
@@ -110,7 +110,4 @@ class WhoWasGroup
/** Initialize this WhoWasFroup with a user
*/
WhoWasGroup(User* user);
- /** Destructor
- */
- ~WhoWasGroup();
};