From: brain Date: Sun, 5 Mar 2006 00:08:48 +0000 (+0000) Subject: Sped up introduction of nicks using vector::resize() rather than the craq++ loop... X-Git-Tag: v2.0.23~8635 X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=aa223a7d91019c5fe30acc86b69d73530c4ddcf5;p=user%2Fhenk%2Fcode%2Finspircd.git Sped up introduction of nicks using vector::resize() rather than the craq++ loop (wtf was i thinking doing it that way?) Removed 'client connecting notices dont show locally during burst' -- this is silly as it doesnt work remotely and is pretty much pointless git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3460 e03df62e-2008-0410-955e-edbf42e46eb7 --- diff --git a/include/channels.h b/include/channels.h index 3947ffc2b..03c636d9b 100644 --- a/include/channels.h +++ b/include/channels.h @@ -270,7 +270,7 @@ class ucrec : public classbase */ chanrec *channel; - ucrec() { /* stub */ } + ucrec() : uc_modes(0), channel(NULL) { /* stub */ } virtual ~ucrec() { /* stub */ } }; diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index b06a76d15..16000a5ec 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -1107,13 +1107,10 @@ class TreeSocket : public InspSocket ucrec a; a.channel = NULL; a.uc_modes = 0; - for (int i = 0; i < MAXCHANS; i++) - clientlist[tempnick]->chans.push_back(a); + clientlist[tempnick]->chans.resize(MAXCHANS); + + WriteOpers("*** Client connecting at %s: %s!%s@%s [%s]",clientlist[tempnick]->server,clientlist[tempnick]->nick,clientlist[tempnick]->ident,clientlist[tempnick]->host,(char*)inet_ntoa(clientlist[tempnick]->ip4)); - if (!this->bursting) - { - WriteOpers("*** Client connecting at %s: %s!%s@%s [%s]",clientlist[tempnick]->server,clientlist[tempnick]->nick,clientlist[tempnick]->ident,clientlist[tempnick]->host,(char*)inet_ntoa(clientlist[tempnick]->ip4)); - } params[7] = ":" + params[7]; DoOneToAllButSender(source,"NICK",params,source); diff --git a/src/svn-rev.sh b/src/svn-rev.sh index 86cc01a73..25451a415 100755 --- a/src/svn-rev.sh +++ b/src/svn-rev.sh @@ -1 +1 @@ -echo 3457 +echo 3459 diff --git a/src/users.cpp b/src/users.cpp index 90c1ddcf9..e4d2546a9 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -612,8 +612,7 @@ void AddClient(int socket, int port, bool iscached, in_addr ip4) ucrec a; a.channel = NULL; a.uc_modes = 0; - for (int i = 0; i < MAXCHANS; i++) - clientlist[tempnick]->chans.push_back(a); + clientlist[tempnick]->chans.resize(MAXCHANS); fd_ref_table[socket] = clientlist[tempnick]; local_users.push_back(clientlist[tempnick]);