diff options
author | June McEnroe <june@causal.agency> | 2020-12-30 16:49:55 -0500 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2020-12-30 16:54:03 -0500 |
commit | 519fcc436fb5d432c6dbc971c2afb40203abe422 (patch) | |
tree | 750b62cda2289d10d8facebe2508415271b2b64b /chat.h | |
parent | Add /whowas (diff) | |
download | catgirl-519fcc436fb5d432c6dbc971c2afb40203abe422.tar.gz catgirl-519fcc436fb5d432c6dbc971c2afb40203abe422.zip |
Factor out reply count checking and decrementing
Diffstat (limited to 'chat.h')
-rw-r--r-- | chat.h | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/chat.h b/chat.h index e1f6584..c7af680 100644 --- a/chat.h +++ b/chat.h @@ -247,21 +247,24 @@ static inline void utilPush(struct Util *util, const char *arg) { } } -extern struct Replies { - uint away; - uint ban; - uint excepts; - uint help; - uint invex; - uint join; - uint list; - uint mode; - uint names; - uint topic; - uint who; - uint whois; - uint whowas; -} replies; +enum Reply { + ReplyAway = 1, + ReplyBan, + ReplyExcepts, + ReplyHelp, + ReplyInvex, + ReplyJoin, + ReplyList, + ReplyMode, + ReplyNames, + ReplyTopic, + ReplyWho, + ReplyWhois, + ReplyWhowas, + ReplyCap, +}; + +extern uint replies[ReplyCap]; void handle(struct Message *msg); void command(uint id, char *input); |