summary refs log tree commit diff
path: root/bounce.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--bounce.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/bounce.h b/bounce.h
index 6b376ae..a6ad31f 100644
--- a/bounce.h
+++ b/bounce.h
@@ -184,12 +184,28 @@ void serverEnqueue(const char *format, ...)
 	__attribute__((format(printf, 1, 2)));
 void serverDequeue(void);
 
+enum Need {
+	BIT(NeedHandshake),
+	BIT(NeedNick),
+	BIT(NeedUser),
+	BIT(NeedPass),
+	BIT(NeedCapEnd),
+};
+struct Client {
+	bool error;
+	struct tls *tls;
+	enum Need need;
+	enum Cap caps;
+	size_t consumer;
+	size_t setPos;
+	char buf[MessageCap];
+	size_t len;
+};
 extern enum Cap clientCaps;
 extern char *clientPass;
 extern char *clientAway;
 struct Client *clientAlloc(struct tls *tls);
 void clientFree(struct Client *client);
-bool clientError(const struct Client *client);
 void clientRecv(struct Client *client);
 void clientSend(struct Client *client, const char *ptr, size_t len);
 void clientFormat(struct Client *client, const char *format, ...)
e feedJune McEnroe 2019-07-11Interpret 256color-style SGRsJune McEnroe 2019-07-11Use inline style rather than <b>, <i>, <u>June McEnroe 2019-07-11Factor out clearJune McEnroe 2019-07-11Add bright option to shottyJune McEnroe 2019-07-11Output <b>, <i>, <u> in shottyJune McEnroe 2019-07-10Ignore SM and RMJune McEnroe 2019-07-09Add shotty man page and build itJune McEnroe 2019-07-09Add up -cJune McEnroe 2019-07-09Add options for default colors to shottyJune McEnroe 2019-07-08Use char literals consistentlyJune McEnroe