From 5a0d13d9faf1b71c067ca015b41258b41e249fdb Mon Sep 17 00:00:00 2001 From: codemastr Date: Thu, 31 Jan 2002 17:50:56 +0000 Subject: [PATCH] Fixed a umode system error with unknown modes --- Changes | 4 +++- src/s_user.c | 11 +++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Changes b/Changes index 57d5c10eb..f44cacf46 100644 --- a/Changes +++ b/Changes @@ -1154,9 +1154,11 @@ v- Fixed some bugreport stuff - Fix for /version crash, reported by RaYmAn - Made all functions use new-style parameter lists - Moved set::socks::ban-time to set::scan::bantime, and remove the other set::socks::* (not used) - also added set::scan::timeout to specify how long the scanner should wait for a response before giving up + also added set::scan::timeout to specify how long the scanner should wait for a response + before giving up - Added HOOKTYPE_STATS - allows modules to respond to certain /stats (so far only S is supported) - Changed some m_ functions into CMD_FUNC(m_*) - Fixed a win32 bug with the scanner code changes - Added a win32 menu item that lets you view log files - Documented the net set::scan::* directives in doc/conf.doc +- Fixed a bug in the new usermode system that caused odd Unknown mode flag reporting. diff --git a/src/s_user.c b/src/s_user.c index 4d6210ed9..7f15a9bf6 100644 --- a/src/s_user.c +++ b/src/s_user.c @@ -2086,7 +2086,6 @@ void set_snomask(aClient *sptr, char *snomask) { */ CMD_FUNC(m_umode) { - int flag = 0; int i; char **p, *m; aClient *acptr; @@ -2198,11 +2197,11 @@ CMD_FUNC(m_umode) sptr->umodes &= ~Usermode_Table[i].mode; break; } - if (flag == 0 && MyConnect(sptr) && !rpterror) - { - sendto_one(sptr, - err_str(ERR_UMODEUNKNOWNFLAG), - me.name, parv[0]); + else if (i == Usermode_highest && MyConnect(sptr) && !rpterror) + { + sendto_one(sptr, + err_str(ERR_UMODEUNKNOWNFLAG), + me.name, parv[0]); rpterror = 1; } }