From 3317f406d26d29bd7f009d93b2680fd118b2a0b0 Mon Sep 17 00:00:00 2001 From: Adam- Date: Fri, 6 Nov 2009 02:08:15 +0000 Subject: Added /chanserv access view, which shows the access creator and last time used git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2611 5417fbe8-f217-4b02-8779-1006273d7864 --- include/regchannel.h | 10 ++++++++-- include/services.h | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/regchannel.h b/include/regchannel.h index 708045733..24612c866 100644 --- a/include/regchannel.h +++ b/include/regchannel.h @@ -90,17 +90,23 @@ class CoreExport ChannelInfo : public Extensible * * @param nc The NickCore of the user that the access entry should be tied to * @param level The channel access level the user has on the channel + * @param creator The user who added the access * @param last_seen When the user was last seen within the channel * * Creates a new access list entry and inserts it into the access list. */ - void AddAccess(NickCore *nc, int16 level, int32 last_seen = 0) + void AddAccess(NickCore *nc, int16 level, const std::string &creator, int32 last_seen = 0) { - ChanAccess *new_access = new ChanAccess; + ChanAccess *new_access = new ChanAccess(); new_access->in_use = 1; new_access->nc = nc; new_access->level = level; new_access->last_seen = last_seen; + if (!creator.empty()) + new_access->creator = creator; + else + new_access->creator = "Unknown"; + access.push_back(new_access); } diff --git a/include/services.h b/include/services.h index d5596c833..d90146e41 100644 --- a/include/services.h +++ b/include/services.h @@ -641,6 +641,7 @@ struct ChanAccess { int16 level; NickCore *nc; /* Guaranteed to be non-NULL if in use, NULL if not */ time_t last_seen; + std::string creator; }; /* AutoKick data. */ -- cgit