From cbc3eea61e468f9f3339657d5cbbc20130b94271 Mon Sep 17 00:00:00 2001 From: codemastr Date: Sat, 4 Sep 2004 04:26:18 +0000 Subject: [PATCH] Made it so WATCH will not respond with an erroneous reply if the parameter was simply + or - --- Changes | 2 ++ src/s_serv.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/Changes b/Changes index 6a5c59acf..327851fad 100644 --- a/Changes +++ b/Changes @@ -338,3 +338,5 @@ - Added documentation for link::ciphers to unreal32docs.html (#0002019) reported by Bugz. - Updated documentation to reflect that cmode +M allows voiced users to talk, not just registered users (#0002020) reported by crazy. +- Made it so WATCH will not respond with an erroneous reply if the parameter was simply + or - + (#0002017) reported by GouraudShading. diff --git a/src/s_serv.c b/src/s_serv.c index c09cce028..60297faf1 100644 --- a/src/s_serv.c +++ b/src/s_serv.c @@ -439,6 +439,8 @@ CMD_FUNC(m_watch) */ if (*s == '+') { + if (!*(s+1)) + continue; if (do_nick_name(s + 1)) { if (sptr->watches >= MAXWATCH) @@ -463,6 +465,8 @@ CMD_FUNC(m_watch) */ if (*s == '-') { + if (!*(s+1)) + continue; del_from_watch_hash_table(s + 1, sptr); show_watch(sptr, s + 1, RPL_WATCHOFF, RPL_WATCHOFF);