summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDukePyrolator <DukePyrolator@anope.org>2011-03-12 09:27:16 +0100
committerDukePyrolator <DukePyrolator@anope.org>2011-03-12 09:27:16 +0100
commitfbae3344ff70f9e035292fdc9a6e09efc2702aed (patch)
tree440df041a811317db159365a6322bae9cd596643 /include
parent95469fde3055e1a257fd4e1027617892b912d07c (diff)
added ns_cert
Diffstat (limited to 'include')
-rw-r--r--include/account.h42
-rw-r--r--include/modules.h18
-rw-r--r--include/services.h1
-rw-r--r--include/users.h7
4 files changed, 68 insertions, 0 deletions
diff --git a/include/account.h b/include/account.h
index 8615083b9..635606f62 100644
--- a/include/account.h
+++ b/include/account.h
@@ -152,6 +152,7 @@ class CoreExport NickCore : public Extensible, public Flags<NickCoreFlag, NI_END
Anope::string greet; /* Greet associated to the nick */
Anope::string language; /* Language name */
std::vector<Anope::string> access; /* Access list, vector of strings */
+ std::vector<Anope::string> cert; /* ssl certificate list, vector of strings */
MemoInfo memos;
uint16 channelcount; /* Number of channels currently registered */
@@ -217,6 +218,47 @@ class CoreExport NickCore : public Extensible, public Flags<NickCoreFlag, NI_END
* Deletes all the memory allocated in the access list vector and then clears the vector.
*/
void ClearAccess();
+
+ /** Add an entry to the nick's certificate list
+ *
+ * @param entry The fingerprint to add to the cert list
+ *
+ * Adds a new entry into the cert list.
+ */
+ void AddCert(const Anope::string &entry);
+
+ /** Get an entry from the nick's cert list by index
+ *
+ * @param entry Index in the certificaate list vector to retrieve
+ * @return The fingerprint entry of the given index if within bounds, an empty string if the vector is empty or the index is out of bounds
+ *
+ * Retrieves an entry from the certificate list corresponding to the given index.
+ */
+ Anope::string GetCert(unsigned entry) const;
+
+ /** Find an entry in the nick's cert list
+ *
+ * @param entry The fingerprint to search for
+ * @return True if the fingerprint is found in the cert list, false otherwise
+ *
+ * Search for an fingerprint within the cert list.
+ */
+ bool FindCert(const Anope::string &entry);
+
+ /** Erase a fingerprint from the nick's certificate list
+ *
+ * @param entry The fingerprint to remove
+ *
+ * Removes the specified fingerprint from the cert list.
+ */
+ void EraseCert(const Anope::string &entry);
+
+ /** Clears the entire nick's cert list
+ *
+ * Deletes all the memory allocated in the certificate list vector and then clears the vector.
+ */
+ void ClearCert();
+
};
/** Timer for colliding nicks to force people off of nicknames
diff --git a/include/modules.h b/include/modules.h
index 8367b084f..97cb49697 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -887,6 +887,23 @@ class CoreExport Module : public Extensible
*/
virtual void OnNickEraseAccess(NickCore *nc, const Anope::string &entry) { }
+ /** called from NickCore::ClearCert()
+ * @param nc pointer to the NickCore
+ */
+ virtual void OnNickClearCert(NickCore *nc) { }
+
+ /** Called when a user adds an entry to their cert list
+ * @param nc The nick
+ * @param entry The entry
+ */
+ virtual void OnNickAddCert(NickCore *nc, const Anope::string &entry) { }
+
+ /** Called from NickCore::EraseCert()
+ * @param nc pointer to the NickCore
+ * @param entry The fingerprint
+ */
+ virtual void OnNickEraseCert(NickCore *nc, const Anope::string &entry) { }
+
/** Called when a user requests info for a nick
* @param source The user requesting info
* @param na The nick the user is requesting info from
@@ -1059,6 +1076,7 @@ enum Implementation
I_OnNickRegister, I_OnNickSuspended, I_OnNickUnsuspended,
I_OnDelNick, I_OnDelCore, I_OnChangeCoreDisplay,
I_OnNickClearAccess, I_OnNickAddAccess, I_OnNickEraseAccess,
+ I_OnNickClearCert, I_OnNickAddCert, I_OnNickEraseCert,
I_OnNickInfo, I_OnFindNick, I_OnFindCore,
/* ChanServ */
diff --git a/include/services.h b/include/services.h
index 3500e532f..75e21a5cf 100644
--- a/include/services.h
+++ b/include/services.h
@@ -486,6 +486,7 @@ struct IRCDVar
int ts6; /* ircd is TS6 */
const char *globaltldprefix; /* TLD prefix used for Global */
unsigned maxmodes; /* Max modes to send per line */
+ int certfp; /* IRCd sends a SSL users certificate fingerprint */
};
/*************************************************************************/
diff --git a/include/users.h b/include/users.h
index 667293a3f..30f5c8275 100644
--- a/include/users.h
+++ b/include/users.h
@@ -164,6 +164,13 @@ class CoreExport User : public Extensible
*/
void Collide(NickAlias *na);
+ /** Identify the user to the Nick
+ * updates last_seen, logs the user in,
+ * send messages, checks for mails, set vhost and more
+ * @param the NickAlias
+ */
+ void Identify(NickAlias *na);
+
/** Login the user to a NickCore
* @param core The account the user is useing
*/