diff options
author | June McEnroe <june@causal.agency> | 2018-08-04 01:37:07 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2018-08-04 01:37:07 -0400 |
commit | fc5bf09c4666f8e364275e926506b1690e00e3d1 (patch) | |
tree | a3f6ba7d90fb971a247fdbcd16de71d687f0f866 | |
parent | Handle /nick and /quit (diff) | |
download | catgirl-fc5bf09c4666f8e364275e926506b1690e00e3d1.tar.gz catgirl-fc5bf09c4666f8e364275e926506b1690e00e3d1.zip |
Handle nick errors
-rw-r--r-- | chat.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/chat.c b/chat.c index f799687..20a4290 100644 --- a/chat.c +++ b/chat.c @@ -260,6 +260,16 @@ static void handlePing(char *prefix, char *params) { clientFmt("PONG %s\r\n", params); } +static void handle432(char *prefix, char *params) { + (void)prefix; + shift(¶ms); + shift(¶ms); + char *mesg = shift(¶ms); + uiFmt("You can't use that name here"); + uiFmt("Sheriff says, \"%s\"", mesg); + uiFmt("Type /nick <name> to choose a new one"); +} + static void handle001(char *prefix, char *params) { (void)prefix; char *nick = shift(¶ms); @@ -416,6 +426,8 @@ static const struct { { "332", handle332 }, { "352", handle352 }, { "366", handle366 }, + { "432", handle432 }, + { "433", handle432 }, { "JOIN", handleJoin }, { "KICK", handleKick }, { "NICK", handleNick }, |