From 3f4fd52cff4b97c1d2cf73c82c1251fcea009f5f Mon Sep 17 00:00:00 2001 From: luke Date: Tue, 7 May 2002 22:34:44 +0000 Subject: [PATCH] Bug fixes, temp kline fix. --- Changes | 9 +++++++++ src/dbuf.c | 2 +- src/s_conf.c | 12 ++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/Changes b/Changes index f0dbb2de8..7cca4a98b 100644 --- a/Changes +++ b/Changes @@ -314,3 +314,12 @@ Fixed m_kick more Made "is a bot.." not bold --Luke =================================== + +Fixed a bug with \r\n being mistakenly parsed +wrong. Thanks to John_z +--Luke +=================================== + +Added temp patch to m_kline to stop segfault +--Luke +=================================== diff --git a/src/dbuf.c b/src/dbuf.c index e03621407..17d8318f2 100644 --- a/src/dbuf.c +++ b/src/dbuf.c @@ -312,7 +312,7 @@ int dbuf_getmsg(dyn, buf, length) while (length > 0 && dlen > 0) { dlen--; - if (*s == '\n' /* || *s == '\r' */ ) /*let stop at \n now .. */ + if (*s == '\n' || *s == '\r' ) { copy = dyn->length - dlen; /* diff --git a/src/s_conf.c b/src/s_conf.c index 9376b04df..a1b5fa2eb 100644 --- a/src/s_conf.c +++ b/src/s_conf.c @@ -2247,6 +2247,18 @@ int m_kline(cptr, sptr, parc, parv) } add_temp_conf(CONF_KILL, uhost, parv[2], name, 0, 0, 1); + + if (find_kill(cptr) || find_kill(sptr)) + { + sendto_failops_whoare_opers("k:line error: mask=%s parsed=%s I tried to kill cptr", + mask, userhost); + sendto_serv_butone(NULL, + ":%s GLOBOPS :k:line error: mask=%s parsed=%s I tried to kill cptr", + me.name, mask, userhost); + flush_connections(me.fd); + (void)rehash(&me, &me, 0); + return; + } check_pings(TStime(), 1); }