mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Use a set instead of a vector in CModule
CModule has two vectors: A list of timers and a list of sockets for this module. Since one shouldn't be able to add items multiple times it makes sense to use a set here instead. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1643 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -121,7 +121,7 @@ public:
|
||||
|
||||
virtual void OnClientLogin()
|
||||
{
|
||||
vector<CSocket*>::const_iterator it;
|
||||
set<CSocket*>::const_iterator it;
|
||||
for (it = BeginSockets(); it != EndSockets(); it++) {
|
||||
CSChatSock *p = (CSChatSock*) *it;
|
||||
|
||||
@@ -154,7 +154,7 @@ public:
|
||||
|
||||
if (sCom.Equals("chat") && !sArgs.empty()) {
|
||||
CString sNick = "(s)" + sArgs;
|
||||
vector<CSocket*>::const_iterator it;
|
||||
set<CSocket*>::const_iterator it;
|
||||
for (it = BeginSockets(); it != EndSockets(); it++) {
|
||||
CSChatSock *pSock = (CSChatSock*) *it;
|
||||
|
||||
@@ -193,7 +193,7 @@ public:
|
||||
Table.AddColumn("Status");
|
||||
Table.AddColumn("Cipher");
|
||||
|
||||
vector<CSocket*>::const_iterator it;
|
||||
set<CSocket*>::const_iterator it;
|
||||
for (it = BeginSockets(); it != EndSockets(); it++) {
|
||||
Table.AddRow();
|
||||
|
||||
@@ -230,7 +230,7 @@ public:
|
||||
if (!sArgs.Equals("(s)", false, 3))
|
||||
sArgs = "(s)" + sArgs;
|
||||
|
||||
vector<CSocket*>::const_iterator it;
|
||||
set<CSocket*>::const_iterator it;
|
||||
for (it = BeginSockets(); it != EndSockets(); it++) {
|
||||
CSChatSock *pSock = (CSChatSock*) *it;
|
||||
|
||||
@@ -249,7 +249,7 @@ public:
|
||||
Table.AddColumn("Type");
|
||||
Table.AddColumn("Cipher");
|
||||
|
||||
vector<CSocket*>::const_iterator it;
|
||||
set<CSocket*>::const_iterator it;
|
||||
for (it = BeginSockets(); it != EndSockets(); it++) {
|
||||
Table.AddRow();
|
||||
Csock *pSock = *it;
|
||||
|
||||
Reference in New Issue
Block a user