diff options
| author | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-11-06 02:08:15 +0000 |
|---|---|---|
| committer | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-11-06 02:08:15 +0000 |
| commit | 3317f406d26d29bd7f009d93b2680fd118b2a0b0 (patch) | |
| tree | 60e730e1d154d2624d42eef6e8138633a4c4e21c /include | |
| parent | 95a017db9f3761e209bb3a43d02aad1630cfc022 (diff) | |
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
Diffstat (limited to 'include')
| -rw-r--r-- | include/regchannel.h | 10 | ||||
| -rw-r--r-- | include/services.h | 1 |
2 files changed, 9 insertions, 2 deletions
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. */ |
