From fc5bf09c4666f8e364275e926506b1690e00e3d1 Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Sat, 4 Aug 2018 01:37:07 -0400 Subject: Handle nick errors --- chat.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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 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 }, -- cgit 1.4.1 ?id=c8291091277df30a886f637c91b5d45df876ddf9'>refs log tree commit diff
Commit message (Collapse)Author
2020-06-11Add all VMs to ssh configJune McEnroe
2020-06-08Add additional permission for linking with LibreSSLJune McEnroe
https://www.gnu.org/licenses/gpl-faq.en.html#GPLIncompatibleLibs
2020-06-08Replace __DECONST with regular castsJune McEnroe
sed -E 's/__DECONST[(]([^,]+), ([^)]+)[)]/(\1)(\2)/'
2020-06-08Replace __printflike with __attribute__((format(printf, ...)))June McEnroe
sed -E 's/__printf0?like[(]([^,]+), ([^)]+)[)]/__attribute__((format(printf, \1, \2)))/'
2020-06-08Replace __dead2 with __attribute__((noreturn))June McEnroe
sed 's/__dead2/__attribute__((noreturn))/'
2020-06-08Replace __FBSDID macros with commentsJune McEnroe
sed -E 's|__FBSDID[(]"([^"]+)"[)];|/* \1 */|'
2020-06-08Remove reference to FreeBSD-specific libedit hackJune McEnroe
Newer versions of libedit have sane tab-complete now without FreeBSD's hacks, and in fact the hack is gone in FreeBSD-CURRENT. I'm still a little confused why binding this weird function is necessary at all, but at least it exists everywhere, I guess.
2020-06-08Prefix mandoc with exec in about-filterJune McEnroe
2020-06-07Remove mktemp options from mkbuiltins, mktokensJune McEnroe
Why even?
2020-06-07Cast z_stream fields to size_tJune McEnroe
In the version of zlib in OpenBSD, these fields are of type off_t, which is signed (why?), rather than uLong.
2020-06-07Call static_assert by _Static_assertJune McEnroe
OpenBSD doesn't #define static_assert in assert.h and _Static_assert is its real name I guess so why not?
2020-06-07Add OpenBSD to install.shJune McEnroe
Straightforward.
2020-06-03Add The Song of AchillesJune McEnroe
2020-06-01Allow redirecting input in everJune McEnroe
2020-05-31Add %c conversion to c scriptJune McEnroe
2020-05-31Add c script to READMEJune McEnroe
2020-05-31Add c scriptJune McEnroe
2020-05-31Update mdoc source URLsJune McEnroe
2020-05-26Remove unfinished PSF fontsJune McEnroe