From: Perry Lorier Date: Mon, 29 May 2000 10:37:34 +0000 (+0000) Subject: Author: Isomer X-Git-Url: http://git.pk910.de/?p=ircu2.10.12-pk.git;a=commitdiff_plain;h=0bb37b50f9d7b6625548950e8bbdffa709d88cb1 Author: Isomer Log message: * Fixed extra space on /names as reported by poptix. * Fixed incorrect syntax of ERROR message reported by Mr_RIP needs testing: * Throttle message * /names I've not even tried to compile this, I've been awake for over 24hrs now, if it doesn't compile, blame someone else other than me? :) git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@240 c9e4aea6-c8fd-4c43-8297-357d70d61c8c --- diff --git a/ChangeLog b/ChangeLog index 2ca3293..c929282 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2000-05-29 Perry Lorier + * ircd/m_names.c: Removed redundant space. + * ircd/s_bsd.c: Fixed incorrect syntax on ERROR line. + 2000-05-18 Kevin L. Mitchell * ircd/m_burst.c (ms_burst): er...that should have been a ",", not @@ -1150,7 +1154,7 @@ # # ChangeLog for ircu2.10.11 # -# $Id: ChangeLog,v 1.137 2000-05-18 23:05:04 kev Exp $ +# $Id: ChangeLog,v 1.138 2000-05-29 10:37:33 isomer Exp $ # # Insert new changes at beginning of the change list. # diff --git a/ircd/m_names.c b/ircd/m_names.c index 4ff6699..525db66 100644 --- a/ircd/m_names.c +++ b/ircd/m_names.c @@ -118,6 +118,7 @@ int m_names(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) int flag; int len; int mlen; + int needs_space; char* s; char* para = parc > 1 ? parv[1] : 0; char buf[BUFSIZE]; @@ -169,13 +170,15 @@ int m_names(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) *buf = '@'; idx = len + 4; flag = 1; + needs_space = 0; for (member = chptr->members; member; member = member->next_member) { c2ptr = member->user; -#ifndef GODMODE - if (sptr != c2ptr && IsInvisible(c2ptr) && !find_channel_member(sptr, chptr)) - continue; -#endif + if (needs_space) { + strcat(buf, " "); + idx++; + } + needs_space=1; if (IsZombie(member)) { if (member->user != sptr) @@ -197,21 +200,9 @@ int m_names(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) idx++; } strcat(buf, c2ptr->name); - strcat(buf, " "); idx += strlen(c2ptr->name) + 1; flag = 1; -#ifdef GODMODE - { - char yxx[6]; - sprintf_irc(yxx, "%s%s", NumNick(c2ptr)); - assert(c2ptr == findNUser(yxx)); - sprintf_irc(buf + strlen(buf), "(%s) ", yxx); - idx += 6; - } - if (mlen + idx + NICKLEN + 11 > BUFSIZE) -#else if (mlen + idx + NICKLEN + 5 > BUFSIZE) -#endif /* space, modifier, nick, \r \n \0 */ { send_reply(sptr, RPL_NAMREPLY, buf); @@ -225,6 +216,7 @@ int m_names(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) *buf = '@'; idx = len + 4; flag = 0; + needs_space=0; } } if (flag) diff --git a/ircd/s_bsd.c b/ircd/s_bsd.c index 2d82dbb..5e85a75 100644 --- a/ircd/s_bsd.c +++ b/ircd/s_bsd.c @@ -561,7 +561,7 @@ void add_connection(struct Listener* listener, int fd) { time_t next_target = 0; const char* const throttle_message = - "ERROR: Your host is trying to (re)connect too fast -- throttled\r\n"; + "ERROR :Your host is trying to (re)connect too fast -- throttled\r\n"; /* 12345678901234567890123456789012345679012345678901234567890123456 */ assert(0 != listener);