thanks for reply... so, i check something and i think bools are not mix, this is the problem with getting nick for check i think... but let take a look:
for update settings on connect: [client.cpp]
Code: Select all
void Client::reloadSettings(bool updateNick) { [...]
// CDM START
setUserProtected(hub->getUserProtected());
setCheckOnConnect(hub->getCheckOnConnect());
setCheckClients(hub->getCheckClients());
setCheckFilelists(hub->getCheckFilelists());
// CDM END
to start check and set client [Client* client defined in client.h, private]
Code: Select all
void Client::ThreadedCheck::startCheck(Client* c) {
client = c;
start();
}
void for start thread and update settings
Code: Select all
void startCheckOnConnect(bool checkC, bool checkF) {
if(!checker.isChecking()) {
checker.setCheckClients(checkC);
checker.setCheckFilelists(checkF);
checker.setCheckOnConnect(true);
checker.startCheck(this);
}
}
for start check on connect [in nmdchub.cpp]
Code: Select all
if(ou.getUser() == getMyIdentity().getUser()) {
setMyIdentity(ou.getIdentity());
if(getCheckOnConnect()) {
startCheckOnConnect(getCheckClients(), getCheckFilelists());
}
}
/*clean it up*/
}
to get nicks i use
Code: Select all
typedef HASH_MULTIMAP_X(CID, OnlineUser*, CID::Hash, equal_to<CID>, less<CID>) OnlineMap;
typedef OnlineMap::const_iterator OnlineIter;
typedef pair<OnlineIter> OnlinePair;
OnlineMap onlineUsers;
from client manager, and i think that make problem...?
also for check getting settings fro each hub i add
Code: Select all
if(client->getCheckClients()) { [...]
LogManager::getInstance()->message(client->getHubName() + " " + i->second->getIdentity().getNick() + "(client)");
}
[...]
if(client->getCheckFilelists()) { [...]
LogManager::getInstance()->message(client->getHubName() + " " + i->second->getIdentity().getNick() + "(list)");
}
and it show normal settings for each hub, but users are not good
for example:
i connect to x and y hub, on x i check client, on y i check filelist and on x hub i check a,b,c users and on y e,f,g users and i get msgs in log like:
x[first hub] e[user from second hub] (client)
y[second] a[user from first hub] (filelist)
i hope you will understand this mess