Has anyone been able to get their dch++ Bots to go into the op list (ie. have a key)
Ive looked into the Bots and i can only see a place for the username so i cannot (with my knowledge) create it so it can send a password. So i cannot "Reg" it that way.
Am i missing something or is there a specific thing you can do to "Put" them into the Op list?
Getting dch++ Bots into Operator list
Moderator: Moderators
Well after some excelent help from Pothead i have been able to rectify this and now have the bots in the op list.
And this is how he showed me to do it....
Change the following
clientmanager.h
DLL void addNick(const string& aNick, int aLevel, bool op = false) throw();
to
DLL void addNick(const string& aNick, int aLevel, bool op) throw();
OpCom.cpp
ClientManager::getInstance()->addNick(botNick, 0)
to
ClientManager::getInstance()->addNick(botNick, 0, true);
OpChat.cpp
ClientManager::getInstance()->addNick(nick, minLevel);
to
ClientManager::getInstance()->addNick(nick, minLevel, true);
SimpleLog.cpp
ClientManager::getInstance()->addNick(d_botnick, d_log_minlevel);
to
ClientManager::getInstance()->addNick(d_botnick, d_log_minlevel, true);
BigBrother.cpp
ClientManager::getInstance()->addNick(botNick, minLevel);
to
ClientManager::getInstance()->addNick(botNick, minLevel, true);
ClientManager.cpp
void ClientManager::addNick(const string& aNick, int aLevel, bool op /* = false */) throw() {
extraNicks.push_back(ExtraNickInfo(aNick, aLevel, op));
strtmp.clear();
strtmp += "$Hello ";
strtmp += aNick;
strtmp += '|';
sendToAll(strtmp);
}
to
void ClientManager::addNick(const string& aNick, int aLevel, bool op /* = false */) throw() {
extraNicks.push_back(ExtraNickInfo(aNick, aLevel, op));
if (op) {
addOp(aNick);
}
strtmp.clear();
strtmp += "$Hello ";
strtmp += aNick;
strtmp += '|';
sendToAll(strtmp);
}
then clean then compile
And this is how he showed me to do it....
Change the following
clientmanager.h
DLL void addNick(const string& aNick, int aLevel, bool op = false) throw();
to
DLL void addNick(const string& aNick, int aLevel, bool op) throw();
OpCom.cpp
ClientManager::getInstance()->addNick(botNick, 0)
to
ClientManager::getInstance()->addNick(botNick, 0, true);
OpChat.cpp
ClientManager::getInstance()->addNick(nick, minLevel);
to
ClientManager::getInstance()->addNick(nick, minLevel, true);
SimpleLog.cpp
ClientManager::getInstance()->addNick(d_botnick, d_log_minlevel);
to
ClientManager::getInstance()->addNick(d_botnick, d_log_minlevel, true);
BigBrother.cpp
ClientManager::getInstance()->addNick(botNick, minLevel);
to
ClientManager::getInstance()->addNick(botNick, minLevel, true);
ClientManager.cpp
void ClientManager::addNick(const string& aNick, int aLevel, bool op /* = false */) throw() {
extraNicks.push_back(ExtraNickInfo(aNick, aLevel, op));
strtmp.clear();
strtmp += "$Hello ";
strtmp += aNick;
strtmp += '|';
sendToAll(strtmp);
}
to
void ClientManager::addNick(const string& aNick, int aLevel, bool op /* = false */) throw() {
extraNicks.push_back(ExtraNickInfo(aNick, aLevel, op));
if (op) {
addOp(aNick);
}
strtmp.clear();
strtmp += "$Hello ";
strtmp += aNick;
strtmp += '|';
sendToAll(strtmp);
}
then clean then compile
-
- DC++ Contributor
- Posts: 3212
- Joined: 2003-01-07 21:46
- Location: .pa.us