summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/regchannel.h10
-rw-r--r--include/services.h1
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. */