summaryrefslogtreecommitdiff
path: root/functions.h
diff options
context:
space:
mode:
Diffstat (limited to 'functions.h')
-rw-r--r--functions.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/functions.h b/functions.h
index c91bfdc..29ebff5 100644
--- a/functions.h
+++ b/functions.h
@@ -103,7 +103,7 @@ int sendtoserver(SSL *server_ssl, char *strsrc, int str_len, int clientfd, struc
// it from the array of clients.
// Also set its authentication and registration statuses to 0.
// Also set the pending statuses to 0
-int disconnectclient(int fd, struct client *clients, struct ircdstate *ircdstate, struct settings *settings);
+int disconnectclient(int fd, struct client *clients, struct ircdstate *ircdstate, struct settings *settings, struct clientcodes *clientcodes);
int createchannel(struct channel *channels, char *name, char *topic, char *topicwho, char *topicwhen);
@@ -166,4 +166,16 @@ int rehash(struct settings *settings, char *failuremsg);
// Return 0 for password mismatch, or 1 for password match.
int checkpassword(char *password, struct settings *settings);
+// Adds a client code to the clientcode structure if it doesn't already exist.
+// On success, copy it to the client's clientcode field.
+// Returns 1 on adding a new code, 0 if the code already existed, or -1 on error.
+int addclientcode(int sourcefd, char *code, struct clientcodes *clientcodes, struct client *clients);
+
+// Sets a given client code as last disconnecting at the current time.
+// Returns 1 on success or 0 on failure.
+int setclientcodetime(char *code, struct clientcodes *clientcodes);
+
+// Return the timestamp that a given client last disconnected, or 0 on failure.
+int getclientcodetime(char *code, struct clientcodes *clientcodes);
+
#endif