Commit initial: GNUWorld servicii IRC cu README.md complet in limba romana - Analiza arhitecturala completa a proiectului - Documentatie ierarhie clase, bucla de evenimente, protocol P10 - Identificare probleme memorie si recomandari modernizare
This commit is contained in:
commit
fcb24f6de9
870 files changed
+311128
No files matched your search
@@ -0,0 +1,4 @@
|
||||
.deps .libs
|
||||
Makefile
|
||||
*.lo *.la
|
||||
.arch-ids
|
||||
@@ -0,0 +1,51 @@
|
||||
/**
|
||||
* ABNORMALSTest.cc
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
|
||||
#include "gnuworld_config.h"
|
||||
|
||||
#include "dronescan.h"
|
||||
#include "dronescanTests.h"
|
||||
|
||||
namespace gnuworld {
|
||||
|
||||
namespace ds {
|
||||
|
||||
bool ABNORMALSTest::isNormal( const Channel *theChannel )
|
||||
{
|
||||
Channel::const_userIterator chanItr =
|
||||
theChannel->userList_begin();
|
||||
|
||||
unsigned int abnormals = 0;
|
||||
|
||||
for( ; chanItr != theChannel->userList_end() ; ++chanItr )
|
||||
{
|
||||
iClient *theClient = chanItr->second->getClient();
|
||||
|
||||
if(!bot->isNormal(theClient)) ++abnormals;
|
||||
}
|
||||
|
||||
if((double)abnormals / (double)theChannel->size() > bot->channelMargin)
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
} // bool ABNORMALSTest::isNormal( const Channel* )
|
||||
|
||||
} // namespace ds
|
||||
|
||||
} // namespace gnuworld
|
||||
@@ -0,0 +1,88 @@
|
||||
/**
|
||||
* ACCESSCommand.cc
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*
|
||||
* Return the access level of the current or specified user.
|
||||
*
|
||||
* 2003-06-15 GK@NG Initial writing
|
||||
*/
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#include "Network.h"
|
||||
#include "StringTokenizer.h"
|
||||
|
||||
#include "levels.h"
|
||||
#include "dronescan.h"
|
||||
#include "dronescanCommands.h"
|
||||
#include "sqlUser.h"
|
||||
|
||||
namespace gnuworld {
|
||||
|
||||
namespace ds {
|
||||
|
||||
void ACCESSCommand::Exec( const iClient *theClient, const string& Message, const sqlUser* theUser )
|
||||
{
|
||||
if(theUser->getAccess() < level::access) return ;
|
||||
|
||||
StringTokenizer st(Message);
|
||||
|
||||
/* Usage:
|
||||
* ACCESS
|
||||
* ACCESS <username>
|
||||
*/
|
||||
|
||||
const sqlUser *targetUser = theUser;
|
||||
|
||||
if(st.size() == 2) {
|
||||
targetUser = bot->getSqlUser(st[1]);
|
||||
if(!targetUser) {
|
||||
bot->Reply(theClient, "No such user %s",
|
||||
st[1].c_str()
|
||||
);
|
||||
return ;
|
||||
}
|
||||
}
|
||||
|
||||
time_t lastseen = targetUser->getLastSeen();
|
||||
char lastseen_r[21];
|
||||
struct tm *lastseen_b = gmtime(&lastseen);
|
||||
strftime(lastseen_r, 20, "%F %H:%M:%S", lastseen_b);
|
||||
|
||||
/* Give the client information about the targetUser */
|
||||
bot->Reply(theClient, "Username : %-10s Access: %4u",
|
||||
targetUser->getUserName().c_str(),
|
||||
targetUser->getAccess()
|
||||
);
|
||||
bot->Reply(theClient, "Last Seen: %s",
|
||||
lastseen_r
|
||||
);
|
||||
|
||||
lastseen = targetUser->getLastUpdated();
|
||||
lastseen_b = gmtime(&lastseen);
|
||||
strftime(lastseen_r, 20, "%F %H:%M:%S", lastseen_b);
|
||||
bot->Reply(theClient, "Last Updated: %s (by %s)",
|
||||
lastseen_r,
|
||||
targetUser->getLastUpdatedBy().c_str()
|
||||
);
|
||||
|
||||
return ;
|
||||
} // ACCESSCommand::Exec(iClient*, const string&)
|
||||
|
||||
} // namespace ds
|
||||
|
||||
} // namespace gnuworld
|
||||
@@ -0,0 +1,74 @@
|
||||
/**
|
||||
* ADDEXCEPTIONALCHANNELCommand.cc
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*
|
||||
* Adds an exceptional channel to the exceptional channels list
|
||||
*/
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#include "Network.h"
|
||||
#include "StringTokenizer.h"
|
||||
|
||||
#include "levels.h"
|
||||
#include "dronescan.h"
|
||||
#include "dronescanCommands.h"
|
||||
#include "sqlUser.h"
|
||||
|
||||
namespace gnuworld {
|
||||
|
||||
namespace ds {
|
||||
|
||||
void ADDEXCEPTIONALCHANNELCommand::Exec( const iClient *theClient, const string& Message, const sqlUser* theUser )
|
||||
{
|
||||
if(theUser->getAccess() < level::addExceptionalChannel) return ;
|
||||
|
||||
StringTokenizer st(Message);
|
||||
|
||||
/* Usage:
|
||||
* ADDEXCEPTIONALCHANNEL <channel name>
|
||||
*/
|
||||
if( st.size() != 2 )
|
||||
{
|
||||
Usage(theClient);
|
||||
return;
|
||||
}
|
||||
if( st[1][0] != '#' )
|
||||
{
|
||||
bot->Reply(theClient,"Channel name must start with #");
|
||||
return;
|
||||
}
|
||||
if(bot->isExceptionalChannel(st[1]))
|
||||
{
|
||||
bot->Reply(theClient, "Channel %s is already an exceptional channel",st[1].c_str());
|
||||
return;
|
||||
}
|
||||
if(!bot->addExceptionalChannel(st[1].c_str()))
|
||||
{
|
||||
bot->Reply(theClient, "Failed to add %s to the exceptional channels list",
|
||||
st[1].c_str());
|
||||
} else {
|
||||
bot->Reply(theClient, "Successfully added %s to the exceptional channels list",
|
||||
st[1].c_str());
|
||||
}
|
||||
|
||||
return ;
|
||||
} // ADDEXCEPTIONALCHANNELCommand::Exec(iClient*, const string&)
|
||||
|
||||
} // namespace ds
|
||||
|
||||
} // namespace gnuworld
|
||||
@@ -0,0 +1,104 @@
|
||||
/**
|
||||
* ADDUSERCommand.cc
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*
|
||||
* 2003-08-02 Jeekay Initial writing
|
||||
*/
|
||||
|
||||
#include "StringTokenizer.h"
|
||||
|
||||
#include "levels.h"
|
||||
#include "dronescan.h"
|
||||
#include "dronescanCommands.h"
|
||||
#include "sqlUser.h"
|
||||
|
||||
namespace gnuworld {
|
||||
|
||||
namespace ds {
|
||||
|
||||
void ADDUSERCommand::Exec( const iClient *theClient, const string& Message, const sqlUser* theUser )
|
||||
{
|
||||
if(theUser->getAccess() < level::adduser) return ;
|
||||
|
||||
StringTokenizer st(Message);
|
||||
|
||||
/* Usage:
|
||||
* ADDUSER <username> <level>
|
||||
*/
|
||||
|
||||
if(st.size() != 3) {
|
||||
Usage(theClient);
|
||||
return ;
|
||||
}
|
||||
|
||||
/* Conditions:
|
||||
* i) The user must not already exist
|
||||
* ii) A user cannot add a user with >= their own access
|
||||
*/
|
||||
|
||||
/* Check if the user already exists */
|
||||
string newUser = st[1];
|
||||
|
||||
sqlUser *targetUser = bot->getSqlUser(newUser);
|
||||
if(targetUser) {
|
||||
bot->Reply(theClient, "The user %s has already been added.",
|
||||
targetUser->getUserName().c_str()
|
||||
);
|
||||
return ;
|
||||
}
|
||||
|
||||
/* Check the new level is not >= the user adding them */
|
||||
unsigned int newAccess = atoi(st[2].c_str());
|
||||
if(newAccess <= 0 || newAccess >= theUser->getAccess()) {
|
||||
bot->Reply(theClient, "Please choose a sensible access level.");
|
||||
return ;
|
||||
}
|
||||
|
||||
/* User doesn't exist, access level is sane. */
|
||||
/* NB: targetUser here is empty because of the earlier check */
|
||||
|
||||
targetUser = new sqlUser(bot->getSqlDb());
|
||||
|
||||
targetUser->setUserName(newUser);
|
||||
targetUser->setCreated(::time(0));
|
||||
targetUser->setLastSeen(0);
|
||||
targetUser->setLastUpdatedBy(theClient->getRealNickUserHost());
|
||||
targetUser->setLastUpdated(::time(0));
|
||||
targetUser->setFlags(0);
|
||||
targetUser->setAccess(newAccess);
|
||||
|
||||
if(targetUser->insert()) {
|
||||
bot->Reply(theClient, "User %s successfully added.",
|
||||
newUser.c_str()
|
||||
);
|
||||
} else {
|
||||
bot->Reply(theClient, "An error occured whilst adding %s.",
|
||||
newUser.c_str()
|
||||
);
|
||||
}
|
||||
|
||||
/* Flush the cache */
|
||||
bot->preloadUserCache();
|
||||
|
||||
return ;
|
||||
|
||||
|
||||
} // ADDUSERCommand::Exec(iClient*, const string&, const sqlUser*)
|
||||
|
||||
} // namespace ds
|
||||
|
||||
} // namespace gnuworld
|
||||
@@ -0,0 +1,67 @@
|
||||
/**
|
||||
* ANALYSECommand.cc
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*
|
||||
* Display information about a given channel.
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <regex.h>
|
||||
|
||||
#include "gnuworld_config.h"
|
||||
#include "Network.h"
|
||||
#include "StringTokenizer.h"
|
||||
|
||||
#include "dronescan.h"
|
||||
#include "dronescanCommands.h"
|
||||
#include "levels.h"
|
||||
#include "sqlUser.h"
|
||||
|
||||
namespace gnuworld {
|
||||
|
||||
namespace ds {
|
||||
|
||||
void ANALYSECommand::Exec( const iClient *theClient, const string& Message, const sqlUser* theUser )
|
||||
{
|
||||
if(theUser->getAccess() < level::analyse) return ;
|
||||
|
||||
StringTokenizer st(Message);
|
||||
|
||||
/* ANALYSE <#channel>
|
||||
*/
|
||||
if(st.size() != 2) {
|
||||
Usage(theClient);
|
||||
return ;
|
||||
}
|
||||
|
||||
Channel *theChannel = Network->findChannel(st[1]);
|
||||
|
||||
if(!theChannel) {
|
||||
bot->Reply(theClient, "Unable to find channel: %s",
|
||||
st.assemble(1).c_str()
|
||||
);
|
||||
return ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
return ;
|
||||
} // ANALYSECommand::Exec(iClient*, const string&)
|
||||
|
||||
} // namespace ds
|
||||
|
||||
} // namespace gnuworld
|
||||
@@ -0,0 +1,140 @@
|
||||
/**
|
||||
* CHECKCommand.cc
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*
|
||||
* Display information about a given channel or user.
|
||||
*/
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "gnuworld_config.h"
|
||||
#include "Network.h"
|
||||
#include "StringTokenizer.h"
|
||||
|
||||
#include "dronescan.h"
|
||||
#include "dronescanCommands.h"
|
||||
|
||||
namespace gnuworld {
|
||||
|
||||
namespace ds {
|
||||
|
||||
void CHECKCommand::Exec( const iClient *theClient,
|
||||
const std::string& Message, const sqlUser* )
|
||||
{
|
||||
StringTokenizer st(Message);
|
||||
|
||||
if(st.size() < 2) {
|
||||
Usage(theClient);
|
||||
return ;
|
||||
}
|
||||
|
||||
if(st[1][0] == '#')
|
||||
{
|
||||
/* We are looking for a channel */
|
||||
Channel *theChannel = Network->findChannel(st[1]);
|
||||
|
||||
if(!theChannel) {
|
||||
bot->Reply(theClient, "Unable to find channel %s.",
|
||||
st[1].c_str());
|
||||
return ;
|
||||
}
|
||||
|
||||
bot->Reply(theClient, "Checking channel %s:",
|
||||
theChannel->getName().c_str());
|
||||
|
||||
double totalEntropy = 0;
|
||||
double minEntropy = 0;
|
||||
double maxEntropy = 0;
|
||||
unsigned int totalUsers = 0;
|
||||
|
||||
Channel::const_userIterator chanItr =
|
||||
theChannel->userList_begin();
|
||||
for( ; chanItr != theChannel->userList_end() ; ++chanItr )
|
||||
{
|
||||
++totalUsers;
|
||||
ChannelUser *theCU = chanItr->second;
|
||||
iClient *targetClient = theCU->getClient();
|
||||
|
||||
double userEntropy = bot->calculateEntropy(targetClient->getNickName());
|
||||
totalEntropy += userEntropy;
|
||||
if(userEntropy < minEntropy || minEntropy == 0) minEntropy = userEntropy;
|
||||
if(userEntropy > maxEntropy) maxEntropy = userEntropy;
|
||||
|
||||
bot->Reply(theClient, "[%s] (%s) %0.3lf %s (%s)",
|
||||
bot->isNormal(targetClient) ? "N" : "A",
|
||||
targetClient->getCharYY().c_str(),
|
||||
userEntropy,
|
||||
targetClient->getRealNickUserHost().c_str(),
|
||||
targetClient->getDescription().c_str()
|
||||
);
|
||||
|
||||
#if 0
|
||||
bot->Reply(theClient, " %15s: %0.3lf (%s)",
|
||||
targetClient->getNickName().c_str(),
|
||||
userEntropy,
|
||||
bot->isNormal(targetClient) ? "Normal" : "Abnormal"
|
||||
);
|
||||
#endif
|
||||
}
|
||||
|
||||
assert(totalUsers == theChannel->size());
|
||||
|
||||
double averageEntropy = totalEntropy / totalUsers;
|
||||
|
||||
bot->Reply(theClient, "min/avg/max channel entropy : %0.3lf / %0.3lf / %0.3lf",
|
||||
minEntropy,
|
||||
averageEntropy,
|
||||
maxEntropy
|
||||
);
|
||||
bot->Reply(theClient, "Range above/below/total : %0.3lf / %0.3lf / %0.3lf",
|
||||
maxEntropy - averageEntropy,
|
||||
averageEntropy - minEntropy,
|
||||
maxEntropy - minEntropy
|
||||
);
|
||||
|
||||
bot->checkChannel(theChannel, theClient);
|
||||
|
||||
return ;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* We are looking for a user */
|
||||
iClient *targetClient = Network->findNick(st[1]);
|
||||
|
||||
if(!targetClient) {
|
||||
bot->Reply(theClient, "Unable to find user %s.",
|
||||
st[1].c_str());
|
||||
return ;
|
||||
}
|
||||
|
||||
bot->Reply(theClient, "Checking user %s:",
|
||||
targetClient->getNickName().c_str());
|
||||
|
||||
bot->Reply(theClient, " User entropy: %0.3lf (%s)",
|
||||
bot->calculateEntropy(targetClient->getNickName()),
|
||||
bot->isNormal(targetClient) ? "Normal" : "Abnormal"
|
||||
);
|
||||
|
||||
return ;
|
||||
}
|
||||
|
||||
return ;
|
||||
} // CHECKCommand::Exec(iClient*, const std::string&)
|
||||
|
||||
} // namespace ds
|
||||
|
||||
} // namespace gnuworld
|
||||
@@ -0,0 +1,82 @@
|
||||
/**
|
||||
* COMMONREALTest.cc
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*
|
||||
* Checks to see whether the members of a channel have a common realname.
|
||||
*/
|
||||
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
#include <map>
|
||||
|
||||
#include "gnuworld_config.h"
|
||||
#include "dronescan.h"
|
||||
#include "dronescanTests.h"
|
||||
|
||||
namespace gnuworld {
|
||||
|
||||
namespace ds {
|
||||
|
||||
bool COMMONREALTest::isNormal( const Channel *theChannel )
|
||||
{
|
||||
typedef std::map<std::string, unsigned short> realnameMapType;
|
||||
realnameMapType realnameMap;
|
||||
|
||||
Channel::const_userIterator chanItr = theChannel->userList_begin();
|
||||
|
||||
for( ; chanItr != theChannel->userList_end() ; ++chanItr ) {
|
||||
iClient *theClient = chanItr->second->getClient();
|
||||
|
||||
realnameMap[theClient->getDescription()]++;
|
||||
}
|
||||
|
||||
for( realnameMapType::const_iterator rnItr = realnameMap.begin() ;
|
||||
rnItr != realnameMap.end() ; ++rnItr) {
|
||||
if(rnItr->second >= realCutoff) return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
} // bool COMMONREALTest::isNormal(const Channel*)
|
||||
|
||||
|
||||
const std::string COMMONREALTest::getVariable() const
|
||||
{
|
||||
return "realCutoff";
|
||||
}
|
||||
|
||||
|
||||
bool COMMONREALTest::setVariable( const std::string& var,
|
||||
const std::string& value)
|
||||
{
|
||||
if("REALCUTOFF" != var) return false;
|
||||
|
||||
realCutoff = atoi(value.c_str());
|
||||
|
||||
return true;
|
||||
} // bool COMMONREALTest::setVariable( const std::string&,const std::string& )
|
||||
|
||||
|
||||
const std::string COMMONREALTest::getStatus() const
|
||||
{
|
||||
std::stringstream status;
|
||||
status << "realCutoff: " << realCutoff;
|
||||
return status.str();
|
||||
}
|
||||
|
||||
} // namespace ds
|
||||
|
||||
} // namespace gnuworld
|
||||
@@ -0,0 +1,55 @@
|
||||
2004-05-15 0.0.9.1 Jeekay
|
||||
* Added ability to set a default access level for opers
|
||||
* Bumped version to 0.0.9.1
|
||||
|
||||
2003-10-10 0.0.9 Jeekay
|
||||
* Removed return value from commands
|
||||
* Added automatic cache refresh
|
||||
* Added ability to add fake clients
|
||||
* Bumped version to 0.0.9
|
||||
|
||||
2003-09-04 0.0.8 Jeekay
|
||||
* Made reporting of active channels less spammy. They now only are displayed if
|
||||
there has not been a join inside the dcInterval, rather than once every
|
||||
dcInterval.
|
||||
* Bumped version to 0.0.8
|
||||
|
||||
2003-08-31 0.0.7 Jeekay
|
||||
* Fixed various bits of code to allow it to compile on dodgy compilers.
|
||||
* Bumped version to 0.0.7
|
||||
|
||||
2003-08-13 0.0.6 Jeekay
|
||||
* Added total channel size to join flood notification
|
||||
* Bumped version to 0.0.6
|
||||
|
||||
2003-08-01 0.0.5 Jeekay
|
||||
* Added support for dynamic variables in tests
|
||||
* Added QUOTECommand
|
||||
* Started standardising levels
|
||||
* Added ADDUSER, MODUSER and REMUSER
|
||||
* Bumped version to 0.0.5
|
||||
|
||||
2003-07-07 0.0.4 Jeekay
|
||||
* Added support for DB authenticated users
|
||||
* Added LIST USERS
|
||||
* Added STATUS
|
||||
* Bumped version to 0.0.4
|
||||
|
||||
2003-06-20 0.0.3 Jeekay
|
||||
* Added throttling of join flood to the console.
|
||||
* Added LIST JOINFLOOD command to show channels currently being flooded.
|
||||
* Bumped version to 0.0.3
|
||||
|
||||
2003-06-20 0.0.2 Jeekay
|
||||
* Added throttling of EVT_JOIN spam to console.
|
||||
* Added LIST ACTIVE to show channels that are currently being throttled
|
||||
* Bumped version to 0.0.2
|
||||
|
||||
2003-06-14 0.0.1 Jeekay
|
||||
* Changed channel finding to scoring instead of voting.
|
||||
* Added scoring cutoff.
|
||||
* Added HASALLOPS and COMMONREAL tests.
|
||||
* Moved configuration items into test objects.
|
||||
* Added dynamic reconfiguration via SET.
|
||||
* Made getAccess() allow minimal oper access by default.
|
||||
* Bumped version to 0.0.1
|
||||
@@ -0,0 +1,71 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
#include "Convert.h"
|
||||
|
||||
namespace gnuworld {
|
||||
|
||||
using std::string ;
|
||||
using std::stringstream ;
|
||||
|
||||
string Convert::ConvertSecondsToString(time_t _seconds)
|
||||
{
|
||||
assembleType toAssm;
|
||||
char temp[20];
|
||||
|
||||
time_t seconds = _seconds % 60;
|
||||
_seconds -= seconds;
|
||||
_seconds /= 60;
|
||||
|
||||
snprintf(temp, 20, "%lis", seconds);
|
||||
toAssm.push_front(temp);
|
||||
|
||||
if(_seconds <= 0) {
|
||||
return Assemble(toAssm);
|
||||
}
|
||||
|
||||
time_t minutes = _seconds % 60;
|
||||
_seconds -= minutes;
|
||||
_seconds /= 60;
|
||||
|
||||
snprintf(temp, 20, "%lim", minutes);
|
||||
toAssm.push_front(temp);
|
||||
|
||||
if(_seconds <= 0) {
|
||||
return Assemble(toAssm);
|
||||
}
|
||||
|
||||
time_t hours = _seconds % 24;
|
||||
_seconds -= hours;
|
||||
_seconds /= 24;
|
||||
|
||||
snprintf(temp, 20, "%lih", hours);
|
||||
toAssm.push_front(temp);
|
||||
|
||||
if(_seconds <= 0) {
|
||||
return Assemble(toAssm);
|
||||
}
|
||||
|
||||
time_t days = _seconds;
|
||||
|
||||
snprintf(temp, 20, "%lid", days);
|
||||
toAssm.push_front(temp);
|
||||
|
||||
return Assemble(toAssm);
|
||||
}
|
||||
|
||||
string Convert::Assemble(const assembleType& toAssm)
|
||||
{
|
||||
stringstream Return;
|
||||
|
||||
for(assembleType::const_iterator itr = toAssm.begin() ;
|
||||
itr != toAssm.end() ; ++itr) {
|
||||
Return << *itr;
|
||||
}
|
||||
|
||||
return Return.str();
|
||||
}
|
||||
|
||||
} // namespace gnuworld
|
||||
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
* Convert.h
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
|
||||
#ifndef CONVERT_H
|
||||
#define CONVERT_H
|
||||
|
||||
#include <deque>
|
||||
#include <string>
|
||||
|
||||
#include <ctime>
|
||||
|
||||
namespace gnuworld {
|
||||
|
||||
typedef std::deque<std::string> assembleType;
|
||||
|
||||
class Convert {
|
||||
public:
|
||||
static std::string ConvertSecondsToString(time_t _seconds);
|
||||
|
||||
static std::string Assemble(const assembleType& toAssm);
|
||||
|
||||
protected:
|
||||
/* Don't instantiate a static only class */
|
||||
Convert() { } ;
|
||||
}; // class Convert
|
||||
|
||||
} // namespace gnuworld
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,101 @@
|
||||
/*
|
||||
* FAKECommand.cc
|
||||
*
|
||||
* Allow control of fake clients.
|
||||
*
|
||||
* 2003-07-27 Jeekay Initial writing
|
||||
*/
|
||||
|
||||
#include "StringTokenizer.h"
|
||||
|
||||
#include "dronescan.h"
|
||||
#include "dronescanCommands.h"
|
||||
#include "levels.h"
|
||||
#include "sqlFakeClient.h"
|
||||
#include "sqlUser.h"
|
||||
|
||||
namespace gnuworld {
|
||||
|
||||
namespace ds {
|
||||
|
||||
void FAKECommand::Exec( const iClient *theClient, const string& Message, const sqlUser* theUser )
|
||||
{
|
||||
if(theUser->getAccess() < level::fake) return ;
|
||||
|
||||
StringTokenizer st(Message);
|
||||
|
||||
/* Usage:
|
||||
* FAKE ACTIVATE <number>
|
||||
*/
|
||||
|
||||
if(st.size() < 3) {
|
||||
Usage(theClient);
|
||||
return ;
|
||||
}
|
||||
|
||||
string Command = string_upper(st[1]);
|
||||
|
||||
if("ACTIVATE" == Command) {
|
||||
string yyxxx( bot->getUplink()->getCharYY() + "]]]" );
|
||||
|
||||
dronescan::fcMapType::const_iterator itr =
|
||||
bot->fakeClients.find(atoi(st[2].c_str()));
|
||||
|
||||
if(itr == bot->fakeClients.end()) {
|
||||
bot->Reply(theClient, "No client found for id: %u",
|
||||
atoi(st[2].c_str())
|
||||
);
|
||||
return ;
|
||||
}
|
||||
|
||||
sqlFakeClient *theFake = itr->second;
|
||||
|
||||
/*
|
||||
for(dronescan::fcMapType::const_iterator itr =
|
||||
bot->fakeClients.begin() ; itr != bot->fakeClients.end() ;
|
||||
++itr ) {
|
||||
sqlFakeClient *theFake = itr->second;
|
||||
|
||||
bot->Reply(theClient, "Checking %u",
|
||||
theFake->getId()
|
||||
);
|
||||
|
||||
if(theFake->isActive()) continue;
|
||||
*/
|
||||
bot->Reply(theClient, "Activating %u",
|
||||
theFake->getId()
|
||||
);
|
||||
|
||||
iClient *fakeClient = new iClient(
|
||||
bot->getUplink()->getIntYY(),
|
||||
yyxxx,
|
||||
theFake->getNickName(),
|
||||
theFake->getUserName(),
|
||||
"AKAQEK",
|
||||
theFake->getHostName(),
|
||||
theFake->getHostName(),
|
||||
"+i",
|
||||
string(),
|
||||
0,
|
||||
theFake->getRealName(),
|
||||
::time(0)
|
||||
);
|
||||
|
||||
assert( fakeClient != 0 );
|
||||
|
||||
bot->getUplink()->AttachClient( fakeClient, bot );
|
||||
|
||||
theFake->setFlag(sqlFakeClient::F_ACTIVE);
|
||||
/*
|
||||
}
|
||||
*/
|
||||
|
||||
return ;
|
||||
}
|
||||
|
||||
return ;
|
||||
}
|
||||
|
||||
} // namespace ds
|
||||
|
||||
} // namespace gnuworld
|
||||
@@ -0,0 +1,42 @@
|
||||
/**
|
||||
* HASALLOPTest.cc
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*
|
||||
* Checks to see whether a channel has all ops in it.
|
||||
*/
|
||||
|
||||
#include "gnuworld_config.h"
|
||||
#include "dronescan.h"
|
||||
#include "dronescanTests.h"
|
||||
|
||||
namespace gnuworld {
|
||||
|
||||
namespace ds {
|
||||
|
||||
bool HASALLOPTest::isNormal( const Channel *theChannel )
|
||||
{
|
||||
Channel::const_userIterator chanItr = theChannel->userList_begin();
|
||||
|
||||
for( ; chanItr != theChannel->userList_end() ; ++chanItr )
|
||||
if(!chanItr->second->isModeO()) return true;
|
||||
|
||||
return false;
|
||||
} // bool HASALLOPTest::isNormal(const Channel*)
|
||||
|
||||
} // namespace ds
|
||||
|
||||
} // namespace gnuworld
|
||||
@@ -0,0 +1,42 @@
|
||||
/**
|
||||
* HASOPTest.cc
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*
|
||||
* Checks to see whether a channel has any ops in it.
|
||||
*/
|
||||
|
||||
#include "gnuworld_config.h"
|
||||
#include "dronescan.h"
|
||||
#include "dronescanTests.h"
|
||||
|
||||
namespace gnuworld {
|
||||
|
||||
namespace ds {
|
||||
|
||||
bool HASOPTest::isNormal( const Channel *theChannel )
|
||||
{
|
||||
Channel::const_userIterator chanItr = theChannel->userList_begin();
|
||||
|
||||
for( ; chanItr != theChannel->userList_end() ; ++chanItr )
|
||||
if(chanItr->second->isModeO()) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace ds
|
||||
|
||||
} // namespace gnuworld
|
||||
@@ -0,0 +1,148 @@
|
||||
/*
|
||||
* LISTCommand.cc
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*
|
||||
* Display information about things.
|
||||
*
|
||||
* 2003-06-20 GK@NG Initial writing
|
||||
*/
|
||||
|
||||
#include "Network.h"
|
||||
#include "StringTokenizer.h"
|
||||
|
||||
#include "activeChannel.h"
|
||||
#include "dronescan.h"
|
||||
#include "dronescanCommands.h"
|
||||
#include "sqlFakeClient.h"
|
||||
#include "sqlUser.h"
|
||||
|
||||
namespace gnuworld {
|
||||
|
||||
namespace ds {
|
||||
|
||||
void LISTCommand::Exec( const iClient *theClient, const string& Message , const sqlUser* )
|
||||
{
|
||||
/* Usage: LIST <name> */
|
||||
|
||||
StringTokenizer st(Message);
|
||||
|
||||
if(st.size() < 2) {
|
||||
Usage(theClient);
|
||||
return ;
|
||||
}
|
||||
|
||||
string Name = string_upper(st[1]);
|
||||
|
||||
if("ACTIVE" == Name) {
|
||||
if(bot->droneChannels.empty()) {
|
||||
bot->Reply(theClient, "There are currently no active drone channels.");
|
||||
return ;
|
||||
}
|
||||
|
||||
bot->Reply(theClient, "Active drone channels:");
|
||||
|
||||
for(dronescan::droneChannelsType::const_iterator itr =
|
||||
bot->droneChannels.begin() ; itr != bot->droneChannels.end()
|
||||
; ++itr) {
|
||||
/* Does this channel still exist? */
|
||||
Channel *theChannel = Network->findChannel(itr->first);
|
||||
|
||||
if(theChannel) {
|
||||
bot->Reply(theClient, " [%4u] (%u) %s",
|
||||
theChannel->size(),
|
||||
itr->second->getLastJoin(),
|
||||
theChannel->getName().c_str()
|
||||
);
|
||||
} else {
|
||||
bot->Reply(theClient, " [ 0] (%u) %s",
|
||||
itr->second->getLastJoin(),
|
||||
itr->first.c_str()
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if("FAKECLIENTS" == Name) {
|
||||
if(bot->fakeClients.empty()) {
|
||||
bot->Reply(theClient, "There are currently no fake clients.");
|
||||
return ;
|
||||
}
|
||||
|
||||
bot->Reply(theClient, "Fake clients:");
|
||||
|
||||
for(dronescan::fcMapType::const_iterator itr =
|
||||
bot->fakeClients.begin() ; itr != bot->fakeClients.end() ;
|
||||
++itr ) {
|
||||
/* List the fake clients back to the user */
|
||||
sqlFakeClient *theFake = itr->second;
|
||||
|
||||
bot->Reply(theClient, " (%02u %1s) %s",
|
||||
theFake->getId(),
|
||||
theFake->getFlagsString().c_str(),
|
||||
theFake->getNickUserHost().c_str()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if("JOINFLOOD" == Name) {
|
||||
if(bot->jcChanMap.empty()) {
|
||||
bot->Reply(theClient, "There are currently no channels being join flooded.");
|
||||
return ;
|
||||
}
|
||||
|
||||
bot->Reply(theClient, "Currently joinflooded channels:");
|
||||
|
||||
for(dronescan::jcChanMapType::const_iterator itr =
|
||||
bot->jcChanMap.begin() ; itr != bot->jcChanMap.end()
|
||||
; ++itr) {
|
||||
if(itr->second->getNumOfJoins() >= bot->jcCutoff)
|
||||
bot->Reply(theClient, " %s (%u)",
|
||||
itr->first.c_str(),
|
||||
itr->second
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if("USERS" == Name) {
|
||||
bot->Reply(theClient, "Users:");
|
||||
for(dronescan::userMapType::const_iterator itr = bot->userMap.begin() ;
|
||||
itr != bot->userMap.end() ; ++itr) {
|
||||
bot->Reply(theClient, "Username: %-10s Access: %4u",
|
||||
itr->second->getUserName().c_str(),
|
||||
itr->second->getAccess()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if("EXCEPTIONALCHANNELS" == Name) {
|
||||
if(bot->exceptionalChannels.empty()) {
|
||||
bot->Reply(theClient,"There are currently no exceptional channels");
|
||||
return;
|
||||
}
|
||||
bot->Reply(theClient,"Exceptional channels:");
|
||||
for(dronescan::exceptionalChannelsType::const_iterator itr =
|
||||
bot->exceptionalChannels.begin(); itr != bot->exceptionalChannels.end();++itr) {
|
||||
bot->Reply(theClient,"Channel: %s",(*itr).c_str());
|
||||
}
|
||||
}
|
||||
|
||||
return ;
|
||||
} // LISTCommand::Exec(iClient*, const string&)
|
||||
|
||||
} // namespace ds
|
||||
|
||||
} // namespace gnuworld
|
||||
@@ -0,0 +1,77 @@
|
||||
/**
|
||||
* MAXCHANSTest.cc
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*
|
||||
* Checks whether any member of a channel is in more than maxChans channels.
|
||||
*/
|
||||
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
|
||||
#include "gnuworld_config.h"
|
||||
#include "dronescan.h"
|
||||
#include "dronescanTests.h"
|
||||
|
||||
namespace gnuworld {
|
||||
|
||||
namespace ds {
|
||||
|
||||
bool MAXCHANSTest::isNormal( const Channel *theChannel )
|
||||
{
|
||||
unsigned int normals = 0;
|
||||
|
||||
Channel::const_userIterator chanItr = theChannel->userList_begin();
|
||||
|
||||
for( ; chanItr != theChannel->userList_end() ; ++chanItr )
|
||||
{
|
||||
iClient *theClient = chanItr->second->getClient();
|
||||
if(theClient->channels_size() >= maxChans) ++normals;
|
||||
if(normals >= 3) return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
} // bool MAXCHANSTest::isNormal( const Channel* )
|
||||
|
||||
|
||||
const std::string MAXCHANSTest::getVariable() const
|
||||
{
|
||||
return "maxChans";
|
||||
}
|
||||
|
||||
|
||||
bool MAXCHANSTest::setVariable( const std::string& var,
|
||||
const std::string& value )
|
||||
{
|
||||
if("MAXCHANS" != var) return false;
|
||||
|
||||
maxChans = atoi(value.c_str());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
const std::string MAXCHANSTest::getStatus() const
|
||||
{
|
||||
std::stringstream status;
|
||||
status << "maxChans: " << maxChans;
|
||||
return status.str();
|
||||
}
|
||||
|
||||
} // namespace ds
|
||||
|
||||
} // namespace gnuworld
|
||||
@@ -0,0 +1,99 @@
|
||||
/**
|
||||
* MODUSERCommand.cc
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*
|
||||
* 2003-08-02 Jeekay Initial writing
|
||||
*/
|
||||
|
||||
#include "StringTokenizer.h"
|
||||
|
||||
#include "levels.h"
|
||||
#include "dronescan.h"
|
||||
#include "dronescanCommands.h"
|
||||
#include "sqlUser.h"
|
||||
|
||||
namespace gnuworld {
|
||||
|
||||
namespace ds {
|
||||
|
||||
void MODUSERCommand::Exec( const iClient *theClient, const string& Message, const sqlUser* theUser )
|
||||
{
|
||||
if(theUser->getAccess() < level::moduser) return ;
|
||||
|
||||
StringTokenizer st(Message);
|
||||
|
||||
/* Usage:
|
||||
* MODUSER (ACCESS)
|
||||
*/
|
||||
|
||||
if(st.size() < 2) {
|
||||
Usage(theClient);
|
||||
return ;
|
||||
}
|
||||
|
||||
string Command = string_upper(st[1]);
|
||||
|
||||
if("ACCESS" == Command) {
|
||||
/* Usage:
|
||||
* MODUSER ACCESS <user> <level>
|
||||
*/
|
||||
if(st.size() != 4) {
|
||||
Usage(theClient);
|
||||
return ;
|
||||
}
|
||||
|
||||
/* Conditions:
|
||||
* i) User must exist
|
||||
* ii) New level must be < the modifiers
|
||||
*/
|
||||
|
||||
/* Does the user exist? */
|
||||
|
||||
sqlUser *targetUser = bot->getSqlUser(st[2]);
|
||||
if(!targetUser) {
|
||||
bot->Reply(theClient, "No such user.");
|
||||
return ;
|
||||
}
|
||||
|
||||
/* Is the level less than the modifiers? */
|
||||
unsigned int newLevel = atoi(st[3].c_str());
|
||||
if(newLevel < 1 || newLevel >= theUser->getAccess()) {
|
||||
bot->Reply(theClient, "You cannot grant a user equal or higher access than yourself.");
|
||||
return ;
|
||||
}
|
||||
|
||||
/* Conditions passed. Modify, update. */
|
||||
targetUser->setAccess(newLevel);
|
||||
if(targetUser->commit()) {
|
||||
bot->Reply(theClient, "Successfully changed %s's access to %u.",
|
||||
targetUser->getUserName().c_str(),
|
||||
newLevel
|
||||
);
|
||||
return ;
|
||||
} else {
|
||||
bot->Reply(theClient, "There was a problem changing the access level.");
|
||||
return ;
|
||||
}
|
||||
}
|
||||
|
||||
return ;
|
||||
|
||||
} // MODUSERCommand::Exec(iClient*, const string&, const sqlUser*)
|
||||
|
||||
} // namespace ds
|
||||
|
||||
} // namespace gnuworld
|
||||
@@ -0,0 +1,46 @@
|
||||
|
||||
lib_LTLIBRARIES = libdronescan.la
|
||||
libdronescan_la_LDFLAGS = -module -export-dynamic -L$(top_builddir)/db \
|
||||
-lgnuworldDB
|
||||
libdronescan_la_CXXFLAGS = -I$(top_srcdir)/db \
|
||||
-I${top_srcdir}/libgnuworld \
|
||||
-I${top_srcdir}/include
|
||||
|
||||
libdronescan_la_SOURCES = \
|
||||
dronescan.cc \
|
||||
Convert.cc \
|
||||
sqlFakeClient.cc \
|
||||
sqlUser.cc \
|
||||
ACCESSCommand.cc \
|
||||
ADDEXCEPTIONALCHANNELCommand.cc\
|
||||
REMEXCEPTIONALCHANNELCommand.cc\
|
||||
RELOADCommand.cc\
|
||||
ADDUSERCommand.cc \
|
||||
ANALYSECommand.cc \
|
||||
CHECKCommand.cc \
|
||||
FAKECommand.cc \
|
||||
LISTCommand.cc \
|
||||
MODUSERCommand.cc \
|
||||
QUOTECommand.cc \
|
||||
REMUSERCommand.cc \
|
||||
STATUSCommand.cc \
|
||||
ABNORMALSTest.cc \
|
||||
COMMONREALTest.cc \
|
||||
HASALLOPTest.cc \
|
||||
HASOPTest.cc \
|
||||
MAXCHANSTest.cc \
|
||||
RANGETest.cc \
|
||||
jfChannel.cc
|
||||
|
||||
EXTRA_DIST = activeChannel.h \
|
||||
clientData.h \
|
||||
constants.h \
|
||||
Convert.h \
|
||||
dronescanCommands.h \
|
||||
dronescan.h \
|
||||
dronescanTests.h \
|
||||
levels.h \
|
||||
sqlFakeClient.h \
|
||||
sqlUser.h \
|
||||
ChangeLog \
|
||||
README
|
||||
@@ -0,0 +1,791 @@
|
||||
# Makefile.in generated by automake 1.11.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
|
||||
# Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = mod.dronescan
|
||||
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
|
||||
ChangeLog
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/ac_cxx_namespaces.m4 \
|
||||
$(top_srcdir)/ax_boost_thread.m4 $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/include/defs.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||
am__install_max = 40
|
||||
am__nobase_strip_setup = \
|
||||
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||
am__nobase_strip = \
|
||||
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||
am__nobase_list = $(am__nobase_strip_setup); \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||
if (++n[$$2] == $(am__install_max)) \
|
||||
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||
END { for (dir in files) print dir, files[dir] }'
|
||||
am__base_list = \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||
am__installdirs = "$(DESTDIR)$(libdir)"
|
||||
LTLIBRARIES = $(lib_LTLIBRARIES)
|
||||
libdronescan_la_LIBADD =
|
||||
am_libdronescan_la_OBJECTS = libdronescan_la-dronescan.lo \
|
||||
libdronescan_la-Convert.lo libdronescan_la-sqlFakeClient.lo \
|
||||
libdronescan_la-sqlUser.lo libdronescan_la-ACCESSCommand.lo \
|
||||
libdronescan_la-ADDEXCEPTIONALCHANNELCommand.lo \
|
||||
libdronescan_la-REMEXCEPTIONALCHANNELCommand.lo \
|
||||
libdronescan_la-RELOADCommand.lo \
|
||||
libdronescan_la-ADDUSERCommand.lo \
|
||||
libdronescan_la-ANALYSECommand.lo \
|
||||
libdronescan_la-CHECKCommand.lo libdronescan_la-FAKECommand.lo \
|
||||
libdronescan_la-LISTCommand.lo \
|
||||
libdronescan_la-MODUSERCommand.lo \
|
||||
libdronescan_la-QUOTECommand.lo \
|
||||
libdronescan_la-REMUSERCommand.lo \
|
||||
libdronescan_la-STATUSCommand.lo \
|
||||
libdronescan_la-ABNORMALSTest.lo \
|
||||
libdronescan_la-COMMONREALTest.lo \
|
||||
libdronescan_la-HASALLOPTest.lo libdronescan_la-HASOPTest.lo \
|
||||
libdronescan_la-MAXCHANSTest.lo libdronescan_la-RANGETest.lo \
|
||||
libdronescan_la-jfChannel.lo
|
||||
libdronescan_la_OBJECTS = $(am_libdronescan_la_OBJECTS)
|
||||
libdronescan_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CXXLD) \
|
||||
$(libdronescan_la_CXXFLAGS) $(CXXFLAGS) \
|
||||
$(libdronescan_la_LDFLAGS) $(LDFLAGS) -o $@
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
am__mv = mv -f
|
||||
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
|
||||
LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
--mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
|
||||
CXXLD = $(CXX)
|
||||
CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
--mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
|
||||
$(LDFLAGS) -o $@
|
||||
SOURCES = $(libdronescan_la_SOURCES)
|
||||
DIST_SOURCES = $(libdronescan_la_SOURCES)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BOOST_THREAD_LIB = @BOOST_THREAD_LIB@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FGREP = @FGREP@
|
||||
GREP = @GREP@
|
||||
INCLTDL = @INCLTDL@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBGNUWORLD = @LIBGNUWORLD@
|
||||
LIBLTDL = @LIBLTDL@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIBTOOL_DEPS = @LIBTOOL_DEPS@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTDLDEPS = @LTDLDEPS@
|
||||
LTDLINCL = @LTDLINCL@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
NEW_MODS = @NEW_MODS@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
pgsql_includedir = @pgsql_includedir@
|
||||
pgsql_libdir = @pgsql_libdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
subdirs = @subdirs@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
threadLib = @threadLib@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
lib_LTLIBRARIES = libdronescan.la
|
||||
libdronescan_la_LDFLAGS = -module -export-dynamic -L$(top_builddir)/db \
|
||||
-lgnuworldDB
|
||||
|
||||
libdronescan_la_CXXFLAGS = -I$(top_srcdir)/db \
|
||||
-I${top_srcdir}/libgnuworld \
|
||||
-I${top_srcdir}/include
|
||||
|
||||
libdronescan_la_SOURCES = \
|
||||
dronescan.cc \
|
||||
Convert.cc \
|
||||
sqlFakeClient.cc \
|
||||
sqlUser.cc \
|
||||
ACCESSCommand.cc \
|
||||
ADDEXCEPTIONALCHANNELCommand.cc\
|
||||
REMEXCEPTIONALCHANNELCommand.cc\
|
||||
RELOADCommand.cc\
|
||||
ADDUSERCommand.cc \
|
||||
ANALYSECommand.cc \
|
||||
CHECKCommand.cc \
|
||||
FAKECommand.cc \
|
||||
LISTCommand.cc \
|
||||
MODUSERCommand.cc \
|
||||
QUOTECommand.cc \
|
||||
REMUSERCommand.cc \
|
||||
STATUSCommand.cc \
|
||||
ABNORMALSTest.cc \
|
||||
COMMONREALTest.cc \
|
||||
HASALLOPTest.cc \
|
||||
HASOPTest.cc \
|
||||
MAXCHANSTest.cc \
|
||||
RANGETest.cc \
|
||||
jfChannel.cc
|
||||
|
||||
EXTRA_DIST = activeChannel.h \
|
||||
clientData.h \
|
||||
constants.h \
|
||||
Convert.h \
|
||||
dronescanCommands.h \
|
||||
dronescan.h \
|
||||
dronescanTests.h \
|
||||
levels.h \
|
||||
sqlFakeClient.h \
|
||||
sqlUser.h \
|
||||
ChangeLog \
|
||||
README
|
||||
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .cc .lo .o .obj
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu mod.dronescan/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu mod.dronescan/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
|
||||
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
|
||||
list2=; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
list2="$$list2 $$p"; \
|
||||
else :; fi; \
|
||||
done; \
|
||||
test -z "$$list2" || { \
|
||||
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
|
||||
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
|
||||
}
|
||||
|
||||
uninstall-libLTLIBRARIES:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
|
||||
for p in $$list; do \
|
||||
$(am__strip_dir) \
|
||||
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
|
||||
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
|
||||
done
|
||||
|
||||
clean-libLTLIBRARIES:
|
||||
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
|
||||
test "$$dir" != "$$p" || dir=.; \
|
||||
echo "rm -f \"$${dir}/so_locations\""; \
|
||||
rm -f "$${dir}/so_locations"; \
|
||||
done
|
||||
libdronescan.la: $(libdronescan_la_OBJECTS) $(libdronescan_la_DEPENDENCIES)
|
||||
$(libdronescan_la_LINK) -rpath $(libdir) $(libdronescan_la_OBJECTS) $(libdronescan_la_LIBADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdronescan_la-ABNORMALSTest.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdronescan_la-ACCESSCommand.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdronescan_la-ADDEXCEPTIONALCHANNELCommand.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdronescan_la-ADDUSERCommand.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdronescan_la-ANALYSECommand.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdronescan_la-CHECKCommand.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdronescan_la-COMMONREALTest.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdronescan_la-Convert.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdronescan_la-FAKECommand.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdronescan_la-HASALLOPTest.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdronescan_la-HASOPTest.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdronescan_la-LISTCommand.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdronescan_la-MAXCHANSTest.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdronescan_la-MODUSERCommand.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdronescan_la-QUOTECommand.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdronescan_la-RANGETest.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdronescan_la-RELOADCommand.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdronescan_la-REMEXCEPTIONALCHANNELCommand.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdronescan_la-REMUSERCommand.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdronescan_la-STATUSCommand.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdronescan_la-dronescan.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdronescan_la-jfChannel.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdronescan_la-sqlFakeClient.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdronescan_la-sqlUser.Plo@am__quote@
|
||||
|
||||
.cc.o:
|
||||
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
|
||||
|
||||
.cc.obj:
|
||||
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
|
||||
.cc.lo:
|
||||
@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
|
||||
|
||||
libdronescan_la-dronescan.lo: dronescan.cc
|
||||
@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdronescan_la_CXXFLAGS) $(CXXFLAGS) -MT libdronescan_la-dronescan.lo -MD -MP -MF $(DEPDIR)/libdronescan_la-dronescan.Tpo -c -o libdronescan_la-dronescan.lo `test -f 'dronescan.cc' || echo '$(srcdir)/'`dronescan.cc
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libdronescan_la-dronescan.Tpo $(DEPDIR)/libdronescan_la-dronescan.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='dronescan.cc' object='libdronescan_la-dronescan.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdronescan_la_CXXFLAGS) $(CXXFLAGS) -c -o libdronescan_la-dronescan.lo `test -f 'dronescan.cc' || echo '$(srcdir)/'`dronescan.cc
|
||||
|
||||
libdronescan_la-Convert.lo: Convert.cc
|
||||
@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdronescan_la_CXXFLAGS) $(CXXFLAGS) -MT libdronescan_la-Convert.lo -MD -MP -MF $(DEPDIR)/libdronescan_la-Convert.Tpo -c -o libdronescan_la-Convert.lo `test -f 'Convert.cc' || echo '$(srcdir)/'`Convert.cc
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libdronescan_la-Convert.Tpo $(DEPDIR)/libdronescan_la-Convert.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Convert.cc' object='libdronescan_la-Convert.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdronescan_la_CXXFLAGS) $(CXXFLAGS) -c -o libdronescan_la-Convert.lo `test -f 'Convert.cc' || echo '$(srcdir)/'`Convert.cc
|
||||
|
||||
libdronescan_la-sqlFakeClient.lo: sqlFakeClient.cc
|
||||
@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdronescan_la_CXXFLAGS) $(CXXFLAGS) -MT libdronescan_la-sqlFakeClient.lo -MD -MP -MF $(DEPDIR)/libdronescan_la-sqlFakeClient.Tpo -c -o libdronescan_la-sqlFakeClient.lo `test -f 'sqlFakeClient.cc' || echo '$(srcdir)/'`sqlFakeClient.cc
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libdronescan_la-sqlFakeClient.Tpo $(DEPDIR)/libdronescan_la-sqlFakeClient.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='sqlFakeClient.cc' object='libdronescan_la-sqlFakeClient.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdronescan_la_CXXFLAGS) $(CXXFLAGS) -c -o libdronescan_la-sqlFakeClient.lo `test -f 'sqlFakeClient.cc' || echo '$(srcdir)/'`sqlFakeClient.cc
|
||||
|
||||
libdronescan_la-sqlUser.lo: sqlUser.cc
|
||||
@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdronescan_la_CXXFLAGS) $(CXXFLAGS) -MT libdronescan_la-sqlUser.lo -MD -MP -MF $(DEPDIR)/libdronescan_la-sqlUser.Tpo -c -o libdronescan_la-sqlUser.lo `test -f 'sqlUser.cc' || echo '$(srcdir)/'`sqlUser.cc
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libdronescan_la-sqlUser.Tpo $(DEPDIR)/libdronescan_la-sqlUser.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='sqlUser.cc' object='libdronescan_la-sqlUser.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdronescan_la_CXXFLAGS) $(CXXFLAGS) -c -o libdronescan_la-sqlUser.lo `test -f 'sqlUser.cc' || echo '$(srcdir)/'`sqlUser.cc
|
||||
|
||||
libdronescan_la-ACCESSCommand.lo: ACCESSCommand.cc
|
||||
@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdronescan_la_CXXFLAGS) $(CXXFLAGS) -MT libdronescan_la-ACCESSCommand.lo -MD -MP -MF $(DEPDIR)/libdronescan_la-ACCESSCommand.Tpo -c -o libdronescan_la-ACCESSCommand.lo `test -f 'ACCESSCommand.cc' || echo '$(srcdir)/'`ACCESSCommand.cc
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libdronescan_la-ACCESSCommand.Tpo $(DEPDIR)/libdronescan_la-ACCESSCommand.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ACCESSCommand.cc' object='libdronescan_la-ACCESSCommand.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdronescan_la_CXXFLAGS) $(CXXFLAGS) -c -o libdronescan_la-ACCESSCommand.lo `test -f 'ACCESSCommand.cc' || echo '$(srcdir)/'`ACCESSCommand.cc
|
||||
|
||||
libdronescan_la-ADDEXCEPTIONALCHANNELCommand.lo: ADDEXCEPTIONALCHANNELCommand.cc
|
||||
@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdronescan_la_CXXFLAGS) $(CXXFLAGS) -MT libdronescan_la-ADDEXCEPTIONALCHANNELCommand.lo -MD -MP -MF $(DEPDIR)/libdronescan_la-ADDEXCEPTIONALCHANNELCommand.Tpo -c -o libdronescan_la-ADDEXCEPTIONALCHANNELCommand.lo `test -f 'ADDEXCEPTIONALCHANNELCommand.cc' || echo '$(srcdir)/'`ADDEXCEPTIONALCHANNELCommand.cc
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libdronescan_la-ADDEXCEPTIONALCHANNELCommand.Tpo $(DEPDIR)/libdronescan_la-ADDEXCEPTIONALCHANNELCommand.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ADDEXCEPTIONALCHANNELCommand.cc' object='libdronescan_la-ADDEXCEPTIONALCHANNELCommand.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdronescan_la_CXXFLAGS) $(CXXFLAGS) -c -o libdronescan_la-ADDEXCEPTIONALCHANNELCommand.lo `test -f 'ADDEXCEPTIONALCHANNELCommand.cc' || echo '$(srcdir)/'`ADDEXCEPTIONALCHANNELCommand.cc
|
||||
|
||||
libdronescan_la-REMEXCEPTIONALCHANNELCommand.lo: REMEXCEPTIONALCHANNELCommand.cc
|
||||
@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdronescan_la_CXXFLAGS) $(CXXFLAGS) -MT libdronescan_la-REMEXCEPTIONALCHANNELCommand.lo -MD -MP -MF $(DEPDIR)/libdronescan_la-REMEXCEPTIONALCHANNELCommand.Tpo -c -o libdronescan_la-REMEXCEPTIONALCHANNELCommand.lo `test -f 'REMEXCEPTIONALCHANNELCommand.cc' || echo '$(srcdir)/'`REMEXCEPTIONALCHANNELCommand.cc
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libdronescan_la-REMEXCEPTIONALCHANNELCommand.Tpo $(DEPDIR)/libdronescan_la-REMEXCEPTIONALCHANNELCommand.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='REMEXCEPTIONALCHANNELCommand.cc' object='libdronescan_la-REMEXCEPTIONALCHANNELCommand.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdronescan_la_CXXFLAGS) $(CXXFLAGS) -c -o libdronescan_la-REMEXCEPTIONALCHANNELCommand.lo `test -f 'REMEXCEPTIONALCHANNELCommand.cc' || echo '$(srcdir)/'`REMEXCEPTIONALCHANNELCommand.cc
|
||||
|
||||
libdronescan_la-RELOADCommand.lo: RELOADCommand.cc
|
||||
@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdronescan_la_CXXFLAGS) $(CXXFLAGS) -MT libdronescan_la-RELOADCommand.lo -MD -MP -MF $(DEPDIR)/libdronescan_la-RELOADCommand.Tpo -c -o libdronescan_la-RELOADCommand.lo `test -f 'RELOADCommand.cc' || echo '$(srcdir)/'`RELOADCommand.cc
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libdronescan_la-RELOADCommand.Tpo $(DEPDIR)/libdronescan_la-RELOADCommand.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='RELOADCommand.cc' object='libdronescan_la-RELOADCommand.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdronescan_la_CXXFLAGS) $(CXXFLAGS) -c -o libdronescan_la-RELOADCommand.lo `test -f 'RELOADCommand.cc' || echo '$(srcdir)/'`RELOADCommand.cc
|
||||
|
||||
libdronescan_la-ADDUSERCommand.lo: ADDUSERCommand.cc
|
||||
@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdronescan_la_CXXFLAGS) $(CXXFLAGS) -MT libdronescan_la-ADDUSERCommand.lo -MD -MP -MF $(DEPDIR)/libdronescan_la-ADDUSERCommand.Tpo -c -o libdronescan_la-ADDUSERCommand.lo `test -f 'ADDUSERCommand.cc' || echo '$(srcdir)/'`ADDUSERCommand.cc
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libdronescan_la-ADDUSERCommand.Tpo $(DEPDIR)/libdronescan_la-ADDUSERCommand.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ADDUSERCommand.cc' object='libdronescan_la-ADDUSERCommand.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdronescan_la_CXXFLAGS) $(CXXFLAGS) -c -o libdronescan_la-ADDUSERCommand.lo `test -f 'ADDUSERCommand.cc' || echo '$(srcdir)/'`ADDUSERCommand.cc
|
||||
|
||||
libdronescan_la-ANALYSECommand.lo: ANALYSECommand.cc
|
||||
@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdronescan_la_CXXFLAGS) $(CXXFLAGS) -MT libdronescan_la-ANALYSECommand.lo -MD -MP -MF $(DEPDIR)/libdronescan_la-ANALYSECommand.Tpo -c -o libdronescan_la-ANALYSECommand.lo `test -f 'ANALYSECommand.cc' || echo '$(srcdir)/'`ANALYSECommand.cc
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libdronescan_la-ANALYSECommand.Tpo $(DEPDIR)/libdronescan_la-ANALYSECommand.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ANALYSECommand.cc' object='libdronescan_la-ANALYSECommand.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdronescan_la_CXXFLAGS) $(CXXFLAGS) -c -o libdronescan_la-ANALYSECommand.lo `test -f 'ANALYSECommand.cc' || echo '$(srcdir)/'`ANALYSECommand.cc
|
||||
|
||||
libdronescan_la-CHECKCommand.lo: CHECKCommand.cc
|
||||
@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdronescan_la_CXXFLAGS) $(CXXFLAGS) -MT libdronescan_la-CHECKCommand.lo -MD -MP -MF $(DEPDIR)/libdronescan_la-CHECKCommand.Tpo -c -o libdronescan_la-CHECKCommand.lo `test -f 'CHECKCommand.cc' || echo '$(srcdir)/'`CHECKCommand.cc
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libdronescan_la-CHECKCommand.Tpo $(DEPDIR)/libdronescan_la-CHECKCommand.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='CHECKCommand.cc' object='libdronescan_la-CHECKCommand.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdronescan_la_CXXFLAGS) $(CXXFLAGS) -c -o libdronescan_la-CHECKCommand.lo `test -f 'CHECKCommand.cc' || echo '$(srcdir)/'`CHECKCommand.cc
|
||||
|
||||
libdronescan_la-FAKECommand.lo: FAKECommand.cc
|
||||
@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdronescan_la_CXXFLAGS) $(CXXFLAGS) -MT libdronescan_la-FAKECommand.lo -MD -MP -MF $(DEPDIR)/libdronescan_la-FAKECommand.Tpo -c -o libdronescan_la-FAKECommand.lo `test -f 'FAKECommand.cc' || echo '$(srcdir)/'`FAKECommand.cc
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libdronescan_la-FAKECommand.Tpo $(DEPDIR)/libdronescan_la-FAKECommand.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='FAKECommand.cc' object='libdronescan_la-FAKECommand.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdronescan_la_CXXFLAGS) $(CXXFLAGS) -c -o libdronescan_la-FAKECommand.lo `test -f 'FAKECommand.cc' || echo '$(srcdir)/'`FAKECommand.cc
|
||||
|
||||
libdronescan_la-LISTCommand.lo: LISTCommand.cc
|
||||
@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdronescan_la_CXXFLAGS) $(CXXFLAGS) -MT libdronescan_la-LISTCommand.lo -MD -MP -MF $(DEPDIR)/libdronescan_la-LISTCommand.Tpo -c -o libdronescan_la-LISTCommand.lo `test -f 'LISTCommand.cc' || echo '$(srcdir)/'`LISTCommand.cc
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libdronescan_la-LISTCommand.Tpo $(DEPDIR)/libdronescan_la-LISTCommand.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='LISTCommand.cc' object='libdronescan_la-LISTCommand.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdronescan_la_CXXFLAGS) $(CXXFLAGS) -c -o libdronescan_la-LISTCommand.lo `test -f 'LISTCommand.cc' || echo '$(srcdir)/'`LISTCommand.cc
|
||||
|
||||
libdronescan_la-MODUSERCommand.lo: MODUSERCommand.cc
|
||||
@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdronescan_la_CXXFLAGS) $(CXXFLAGS) -MT libdronescan_la-MODUSERCommand.lo -MD -MP -MF $(DEPDIR)/libdronescan_la-MODUSERCommand.Tpo -c -o libdronescan_la-MODUSERCommand.lo `test -f 'MODUSERCommand.cc' || echo '$(srcdir)/'`MODUSERCommand.cc
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libdronescan_la-MODUSERCommand.Tpo $(DEPDIR)/libdronescan_la-MODUSERCommand.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='MODUSERCommand.cc' object='libdronescan_la-MODUSERCommand.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdronescan_la_CXXFLAGS) $(CXXFLAGS) -c -o libdronescan_la-MODUSERCommand.lo `test -f 'MODUSERCommand.cc' || echo '$(srcdir)/'`MODUSERCommand.cc
|
||||
|
||||
libdronescan_la-QUOTECommand.lo: QUOTECommand.cc
|
||||
@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdronescan_la_CXXFLAGS) $(CXXFLAGS) -MT libdronescan_la-QUOTECommand.lo -MD -MP -MF $(DEPDIR)/libdronescan_la-QUOTECommand.Tpo -c -o libdronescan_la-QUOTECommand.lo `test -f 'QUOTECommand.cc' || echo '$(srcdir)/'`QUOTECommand.cc
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libdronescan_la-QUOTECommand.Tpo $(DEPDIR)/libdronescan_la-QUOTECommand.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='QUOTECommand.cc' object='libdronescan_la-QUOTECommand.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdronescan_la_CXXFLAGS) $(CXXFLAGS) -c -o libdronescan_la-QUOTECommand.lo `test -f 'QUOTECommand.cc' || echo '$(srcdir)/'`QUOTECommand.cc
|
||||
|
||||
libdronescan_la-REMUSERCommand.lo: REMUSERCommand.cc
|
||||
@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdronescan_la_CXXFLAGS) $(CXXFLAGS) -MT libdronescan_la-REMUSERCommand.lo -MD -MP -MF $(DEPDIR)/libdronescan_la-REMUSERCommand.Tpo -c -o libdronescan_la-REMUSERCommand.lo `test -f 'REMUSERCommand.cc' || echo '$(srcdir)/'`REMUSERCommand.cc
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libdronescan_la-REMUSERCommand.Tpo $(DEPDIR)/libdronescan_la-REMUSERCommand.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='REMUSERCommand.cc' object='libdronescan_la-REMUSERCommand.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdronescan_la_CXXFLAGS) $(CXXFLAGS) -c -o libdronescan_la-REMUSERCommand.lo `test -f 'REMUSERCommand.cc' || echo '$(srcdir)/'`REMUSERCommand.cc
|
||||
|
||||
libdronescan_la-STATUSCommand.lo: STATUSCommand.cc
|
||||
@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdronescan_la_CXXFLAGS) $(CXXFLAGS) -MT libdronescan_la-STATUSCommand.lo -MD -MP -MF $(DEPDIR)/libdronescan_la-STATUSCommand.Tpo -c -o libdronescan_la-STATUSCommand.lo `test -f 'STATUSCommand.cc' || echo '$(srcdir)/'`STATUSCommand.cc
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libdronescan_la-STATUSCommand.Tpo $(DEPDIR)/libdronescan_la-STATUSCommand.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='STATUSCommand.cc' object='libdronescan_la-STATUSCommand.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdronescan_la_CXXFLAGS) $(CXXFLAGS) -c -o libdronescan_la-STATUSCommand.lo `test -f 'STATUSCommand.cc' || echo '$(srcdir)/'`STATUSCommand.cc
|
||||
|
||||
libdronescan_la-ABNORMALSTest.lo: ABNORMALSTest.cc
|
||||
@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdronescan_la_CXXFLAGS) $(CXXFLAGS) -MT libdronescan_la-ABNORMALSTest.lo -MD -MP -MF $(DEPDIR)/libdronescan_la-ABNORMALSTest.Tpo -c -o libdronescan_la-ABNORMALSTest.lo `test -f 'ABNORMALSTest.cc' || echo '$(srcdir)/'`ABNORMALSTest.cc
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libdronescan_la-ABNORMALSTest.Tpo $(DEPDIR)/libdronescan_la-ABNORMALSTest.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ABNORMALSTest.cc' object='libdronescan_la-ABNORMALSTest.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdronescan_la_CXXFLAGS) $(CXXFLAGS) -c -o libdronescan_la-ABNORMALSTest.lo `test -f 'ABNORMALSTest.cc' || echo '$(srcdir)/'`ABNORMALSTest.cc
|
||||
|
||||
libdronescan_la-COMMONREALTest.lo: COMMONREALTest.cc
|
||||
@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdronescan_la_CXXFLAGS) $(CXXFLAGS) -MT libdronescan_la-COMMONREALTest.lo -MD -MP -MF $(DEPDIR)/libdronescan_la-COMMONREALTest.Tpo -c -o libdronescan_la-COMMONREALTest.lo `test -f 'COMMONREALTest.cc' || echo '$(srcdir)/'`COMMONREALTest.cc
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libdronescan_la-COMMONREALTest.Tpo $(DEPDIR)/libdronescan_la-COMMONREALTest.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='COMMONREALTest.cc' object='libdronescan_la-COMMONREALTest.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdronescan_la_CXXFLAGS) $(CXXFLAGS) -c -o libdronescan_la-COMMONREALTest.lo `test -f 'COMMONREALTest.cc' || echo '$(srcdir)/'`COMMONREALTest.cc
|
||||
|
||||
libdronescan_la-HASALLOPTest.lo: HASALLOPTest.cc
|
||||
@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdronescan_la_CXXFLAGS) $(CXXFLAGS) -MT libdronescan_la-HASALLOPTest.lo -MD -MP -MF $(DEPDIR)/libdronescan_la-HASALLOPTest.Tpo -c -o libdronescan_la-HASALLOPTest.lo `test -f 'HASALLOPTest.cc' || echo '$(srcdir)/'`HASALLOPTest.cc
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libdronescan_la-HASALLOPTest.Tpo $(DEPDIR)/libdronescan_la-HASALLOPTest.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='HASALLOPTest.cc' object='libdronescan_la-HASALLOPTest.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdronescan_la_CXXFLAGS) $(CXXFLAGS) -c -o libdronescan_la-HASALLOPTest.lo `test -f 'HASALLOPTest.cc' || echo '$(srcdir)/'`HASALLOPTest.cc
|
||||
|
||||
libdronescan_la-HASOPTest.lo: HASOPTest.cc
|
||||
@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdronescan_la_CXXFLAGS) $(CXXFLAGS) -MT libdronescan_la-HASOPTest.lo -MD -MP -MF $(DEPDIR)/libdronescan_la-HASOPTest.Tpo -c -o libdronescan_la-HASOPTest.lo `test -f 'HASOPTest.cc' || echo '$(srcdir)/'`HASOPTest.cc
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libdronescan_la-HASOPTest.Tpo $(DEPDIR)/libdronescan_la-HASOPTest.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='HASOPTest.cc' object='libdronescan_la-HASOPTest.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdronescan_la_CXXFLAGS) $(CXXFLAGS) -c -o libdronescan_la-HASOPTest.lo `test -f 'HASOPTest.cc' || echo '$(srcdir)/'`HASOPTest.cc
|
||||
|
||||
libdronescan_la-MAXCHANSTest.lo: MAXCHANSTest.cc
|
||||
@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdronescan_la_CXXFLAGS) $(CXXFLAGS) -MT libdronescan_la-MAXCHANSTest.lo -MD -MP -MF $(DEPDIR)/libdronescan_la-MAXCHANSTest.Tpo -c -o libdronescan_la-MAXCHANSTest.lo `test -f 'MAXCHANSTest.cc' || echo '$(srcdir)/'`MAXCHANSTest.cc
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libdronescan_la-MAXCHANSTest.Tpo $(DEPDIR)/libdronescan_la-MAXCHANSTest.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='MAXCHANSTest.cc' object='libdronescan_la-MAXCHANSTest.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdronescan_la_CXXFLAGS) $(CXXFLAGS) -c -o libdronescan_la-MAXCHANSTest.lo `test -f 'MAXCHANSTest.cc' || echo '$(srcdir)/'`MAXCHANSTest.cc
|
||||
|
||||
libdronescan_la-RANGETest.lo: RANGETest.cc
|
||||
@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdronescan_la_CXXFLAGS) $(CXXFLAGS) -MT libdronescan_la-RANGETest.lo -MD -MP -MF $(DEPDIR)/libdronescan_la-RANGETest.Tpo -c -o libdronescan_la-RANGETest.lo `test -f 'RANGETest.cc' || echo '$(srcdir)/'`RANGETest.cc
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libdronescan_la-RANGETest.Tpo $(DEPDIR)/libdronescan_la-RANGETest.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='RANGETest.cc' object='libdronescan_la-RANGETest.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdronescan_la_CXXFLAGS) $(CXXFLAGS) -c -o libdronescan_la-RANGETest.lo `test -f 'RANGETest.cc' || echo '$(srcdir)/'`RANGETest.cc
|
||||
|
||||
libdronescan_la-jfChannel.lo: jfChannel.cc
|
||||
@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdronescan_la_CXXFLAGS) $(CXXFLAGS) -MT libdronescan_la-jfChannel.lo -MD -MP -MF $(DEPDIR)/libdronescan_la-jfChannel.Tpo -c -o libdronescan_la-jfChannel.lo `test -f 'jfChannel.cc' || echo '$(srcdir)/'`jfChannel.cc
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libdronescan_la-jfChannel.Tpo $(DEPDIR)/libdronescan_la-jfChannel.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='jfChannel.cc' object='libdronescan_la-jfChannel.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdronescan_la_CXXFLAGS) $(CXXFLAGS) -c -o libdronescan_la-jfChannel.lo `test -f 'jfChannel.cc' || echo '$(srcdir)/'`jfChannel.cc
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(LTLIBRARIES)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(libdir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
|
||||
mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am: install-libLTLIBRARIES
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-libLTLIBRARIES
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-libLTLIBRARIES clean-libtool ctags distclean \
|
||||
distclean-compile distclean-generic distclean-libtool \
|
||||
distclean-tags distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-html \
|
||||
install-html-am install-info install-info-am \
|
||||
install-libLTLIBRARIES install-man install-pdf install-pdf-am \
|
||||
install-ps install-ps-am install-strip installcheck \
|
||||
installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
tags uninstall uninstall-am uninstall-libLTLIBRARIES
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* QUOTECommand.cc
|
||||
*
|
||||
* Write a user given string directly to the network.
|
||||
*
|
||||
* 2003-07-27 Jeekay Initial writing
|
||||
*/
|
||||
|
||||
#include "StringTokenizer.h"
|
||||
|
||||
#include "dronescan.h"
|
||||
#include "dronescanCommands.h"
|
||||
#include "levels.h"
|
||||
#include "sqlUser.h"
|
||||
|
||||
namespace gnuworld {
|
||||
|
||||
namespace ds {
|
||||
|
||||
void QUOTECommand::Exec( const iClient *theClient, const string& Message, const sqlUser* theUser )
|
||||
{
|
||||
if(theUser->getAccess() < level::quote) return ;
|
||||
|
||||
StringTokenizer st(Message);
|
||||
|
||||
if(st.size() < 2) {
|
||||
Usage(theClient);
|
||||
return ;
|
||||
}
|
||||
|
||||
bot->log(INFO, "%s (%s) is quoting: %s",
|
||||
theClient->getNickName().c_str(),
|
||||
theClient->getAccount().c_str(),
|
||||
st.assemble(1).c_str()
|
||||
);
|
||||
|
||||
bot->Write(st.assemble(1));
|
||||
|
||||
return ;
|
||||
}
|
||||
|
||||
} // namespace ds
|
||||
|
||||
} // namespace gnuworld
|
||||
@@ -0,0 +1,87 @@
|
||||
/**
|
||||
* RANGETest.cc
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*
|
||||
* Checks the range of the entropy of a given channel.
|
||||
*/
|
||||
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
|
||||
#include "gnuworld_config.h"
|
||||
#include "dronescan.h"
|
||||
#include "dronescanTests.h"
|
||||
|
||||
namespace gnuworld {
|
||||
|
||||
namespace ds {
|
||||
|
||||
bool RANGETest::isNormal( const Channel *theChannel )
|
||||
{
|
||||
double maxEntropy, minEntropy;
|
||||
maxEntropy = minEntropy = 0;
|
||||
|
||||
bool hasOp = false;
|
||||
|
||||
Channel::const_userIterator chanItr = theChannel->userList_begin();
|
||||
|
||||
for( ; chanItr != theChannel->userList_end() ; ++chanItr )
|
||||
{
|
||||
iClient *targetClient = chanItr->second->getClient();
|
||||
|
||||
double userEntropy = bot->calculateEntropy(targetClient);
|
||||
|
||||
if(userEntropy < minEntropy || minEntropy == 0) minEntropy = userEntropy;
|
||||
if(userEntropy > maxEntropy) maxEntropy = userEntropy;
|
||||
|
||||
if(chanItr->second->isModeO()) hasOp = true;
|
||||
}
|
||||
|
||||
if((maxEntropy - minEntropy) > channelRange)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool RANGETest::setVariable( const std::string& var,
|
||||
const std::string& value )
|
||||
{
|
||||
if("CHANNELRANGE" != var) return false;
|
||||
|
||||
channelRange = atoi(value.c_str());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
const std::string RANGETest::getVariable() const
|
||||
{
|
||||
return "channelRange";
|
||||
}
|
||||
|
||||
|
||||
const std::string RANGETest::getStatus() const
|
||||
{
|
||||
std::stringstream status;
|
||||
status << "channelRange: " << channelRange;
|
||||
return status.str();
|
||||
}
|
||||
|
||||
} // namespace ds
|
||||
|
||||
} // namespace gnuworld
|
||||
@@ -0,0 +1,3 @@
|
||||
|
||||
See ../doc/README.dronescan for how to configure the dronescan database.
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
/**
|
||||
* RELOADCommand.cc
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*
|
||||
* Reloads the bot
|
||||
*/
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#include "Network.h"
|
||||
#include "StringTokenizer.h"
|
||||
|
||||
#include "levels.h"
|
||||
#include "dronescan.h"
|
||||
#include "dronescanCommands.h"
|
||||
#include "sqlUser.h"
|
||||
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
|
||||
#include "iClient.h"
|
||||
|
||||
/*#include "Command.h"
|
||||
#include "Channel.h"*/
|
||||
#include "ELog.h"
|
||||
|
||||
namespace gnuworld
|
||||
{
|
||||
|
||||
namespace ds {
|
||||
|
||||
void RELOADCommand::Exec( const iClient *theClient, const string& Message, const sqlUser* theUser )
|
||||
{
|
||||
//elog << "RELOAD> theClient: "
|
||||
// << *theClient
|
||||
// << ", args: "
|
||||
// << args
|
||||
// << std::endl ;
|
||||
elog << "DS.RELOADCommand> Reloading..."
|
||||
<< std::endl ;
|
||||
|
||||
bot->Reply( theClient, "Reloading..." ) ;
|
||||
bot->getUplink()->UnloadClient( bot, "I need more to do" ) ;
|
||||
bot->getUplink()->LoadClient( "libdronescan.la",
|
||||
bot->getConfigFileName() ) ;
|
||||
|
||||
}
|
||||
|
||||
} // namespace ds
|
||||
|
||||
} // namespace gnuworld
|
||||
@@ -0,0 +1,74 @@
|
||||
/**
|
||||
* ADDEXCEPTIONALCHANNELCommand.cc
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*
|
||||
* Removes an exceptional channel from the exceptional channels list
|
||||
*/
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#include "Network.h"
|
||||
#include "StringTokenizer.h"
|
||||
|
||||
#include "levels.h"
|
||||
#include "dronescan.h"
|
||||
#include "dronescanCommands.h"
|
||||
#include "sqlUser.h"
|
||||
|
||||
namespace gnuworld {
|
||||
|
||||
namespace ds {
|
||||
|
||||
void REMEXCEPTIONALCHANNELCommand::Exec( const iClient *theClient, const string& Message, const sqlUser* theUser )
|
||||
{
|
||||
if(theUser->getAccess() < level::remExceptionalChannel) return ;
|
||||
|
||||
StringTokenizer st(Message);
|
||||
|
||||
/* Usage:
|
||||
* REMEXCEPTIONALCHANNEL <channel name>
|
||||
*/
|
||||
if( st.size() != 2 )
|
||||
{
|
||||
Usage(theClient);
|
||||
return;
|
||||
}
|
||||
if( st[1][0] != '#' )
|
||||
{
|
||||
bot->Reply(theClient, "Channel name must start with #");
|
||||
return;
|
||||
}
|
||||
if(!bot->isExceptionalChannel(st[1]))
|
||||
{
|
||||
bot->Reply(theClient, "Channel %s isn't an exceptionalChannel",st[1].c_str());
|
||||
return;
|
||||
}
|
||||
if(!bot->remExceptionalChannel(st[1]))
|
||||
{
|
||||
bot->Reply(theClient, "Failed to remove %s from the exceptional channels list",
|
||||
st[1].c_str());
|
||||
} else {
|
||||
bot->Reply(theClient, "Successfully removed %s from the exceptional channels list",
|
||||
st[1].c_str());
|
||||
}
|
||||
|
||||
return ;
|
||||
} // REMEXCEPTIONALCHANNELCommand::Exec(iClient*, const string&)
|
||||
|
||||
} // namespace ds
|
||||
|
||||
} // namespace gnuworld
|
||||
@@ -0,0 +1,90 @@
|
||||
/**
|
||||
* REMUSERCommand.cc
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*
|
||||
* 2003-08-02 Jeekay Initial writing
|
||||
*/
|
||||
|
||||
#include "StringTokenizer.h"
|
||||
|
||||
#include "levels.h"
|
||||
#include "dronescan.h"
|
||||
#include "dronescanCommands.h"
|
||||
#include "sqlUser.h"
|
||||
|
||||
namespace gnuworld {
|
||||
|
||||
namespace ds {
|
||||
|
||||
void REMUSERCommand::Exec( const iClient *theClient, const string& Message, const sqlUser* theUser )
|
||||
{
|
||||
if(theUser->getAccess() < level::remuser) return ;
|
||||
|
||||
StringTokenizer st(Message);
|
||||
|
||||
/* Usage:
|
||||
* REMUSER <username>
|
||||
*/
|
||||
|
||||
if(st.size() != 2) {
|
||||
Usage(theClient);
|
||||
return ;
|
||||
}
|
||||
|
||||
/* Conditions:
|
||||
* i) The target user must exist
|
||||
* ii) The removee's access must be < the removers access
|
||||
*/
|
||||
|
||||
/* Does the user exist? */
|
||||
sqlUser *targetUser = bot->getSqlUser(st[1]);
|
||||
if(!targetUser) {
|
||||
bot->Reply(theClient, "The user %s does not exist.",
|
||||
st[1].c_str()
|
||||
);
|
||||
return ;
|
||||
}
|
||||
|
||||
/* Is the removees access lower than the removers? */
|
||||
if(targetUser->getAccess() >= theUser->getAccess()) {
|
||||
bot->Reply(theClient, "You cannot remove someone with higher or equal access.");
|
||||
return ;
|
||||
}
|
||||
|
||||
/* Conditions satisfied.
|
||||
* i) Remove user from the database
|
||||
* ii) Flush cache
|
||||
*/
|
||||
|
||||
/* Remove the user from the database */
|
||||
if(targetUser->remove()) {
|
||||
bot->Reply(theClient, "User %s successfully removed.",
|
||||
targetUser->getUserName().c_str());
|
||||
} else {
|
||||
bot->Reply(theClient, "There was a problem removing the user.");
|
||||
}
|
||||
|
||||
/* Flush the cache */
|
||||
bot->preloadUserCache();
|
||||
|
||||
return ;
|
||||
|
||||
} // REMUSERCommand::Exec(iClient*, const string&, const sqlUser*)
|
||||
|
||||
} // namespace ds
|
||||
|
||||
} // namespace gnuworld
|
||||
@@ -0,0 +1,78 @@
|
||||
/**
|
||||
* STATUSCommand.cc
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*
|
||||
* 2003-07-07 GK@NG Initial writing
|
||||
*/
|
||||
|
||||
#include "Convert.h"
|
||||
#include "StringTokenizer.h"
|
||||
|
||||
#include "levels.h"
|
||||
#include "dronescan.h"
|
||||
#include "dronescanCommands.h"
|
||||
#include "dronescanTests.h"
|
||||
#include "sqlUser.h"
|
||||
|
||||
namespace gnuworld {
|
||||
|
||||
namespace ds {
|
||||
|
||||
void STATUSCommand::Exec( const iClient *theClient, const string& Message, const sqlUser* theUser )
|
||||
{
|
||||
if(theUser->getAccess() < level::status) return ;
|
||||
|
||||
StringTokenizer st(Message);
|
||||
|
||||
/* Usage:
|
||||
* STATUS
|
||||
*/
|
||||
|
||||
if(st.size() != 1) {
|
||||
Usage(theClient);
|
||||
return ;
|
||||
}
|
||||
|
||||
time_t uptime = ::time(0) - bot->getUplink()->getStartTime();
|
||||
bot->Reply(theClient, "Uptime: %u (%s)",
|
||||
uptime,
|
||||
Convert::ConvertSecondsToString(uptime).c_str()
|
||||
);
|
||||
|
||||
bot->Reply(theClient, "Tests:");
|
||||
dronescan::testMapType::const_iterator itr = bot->testMap.begin();
|
||||
for( ; itr != bot->testMap.end() ; ++itr) {
|
||||
bot->Reply(theClient, " %-10s: %s",
|
||||
itr->first.c_str(),
|
||||
itr->second->getStatus().c_str()
|
||||
);
|
||||
}
|
||||
|
||||
bot->Reply(theClient, "GLINEQUEUE : %d", bot->GetGlineQueueSize());
|
||||
|
||||
|
||||
bot->Reply(theClient, "Current State: %s",
|
||||
bot->getCurrentState()== BURST ? "BURSTING" : "RUNNING");
|
||||
|
||||
return ;
|
||||
|
||||
|
||||
} // STATUSCommand::Exec(iClient*, const string&)
|
||||
|
||||
} // namespace ds
|
||||
|
||||
} // namespace gnuworld
|
||||
@@ -0,0 +1,80 @@
|
||||
/**
|
||||
* activeChannel.h
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
|
||||
#ifndef ACTIVECHANNEL_H
|
||||
#define ACTIVECHANNEL_H
|
||||
|
||||
#include <string>
|
||||
#include <ctime>
|
||||
|
||||
namespace gnuworld {
|
||||
|
||||
namespace ds {
|
||||
|
||||
class activeChannel {
|
||||
public:
|
||||
/**
|
||||
* Constructor to set up initial state.
|
||||
*
|
||||
* @param _name the name of the active channel
|
||||
* @param _lastjoin the time of the last join to this channel
|
||||
*/
|
||||
inline activeChannel( const std::string& _name, const time_t& _lastjoin, const time_t& _lastnick=0 ) :
|
||||
name(_name),
|
||||
lastjoin(_lastjoin),
|
||||
lastnick(_lastnick)
|
||||
{ }
|
||||
|
||||
/** Empty destructor as we allocate no memory. */
|
||||
inline ~activeChannel() { } ;
|
||||
|
||||
/************************
|
||||
** A C C E S S O R S **
|
||||
************************/
|
||||
|
||||
inline const std::string& getName() const
|
||||
{ return name; }
|
||||
|
||||
inline const time_t& getLastJoin() const
|
||||
{ return lastjoin; }
|
||||
|
||||
inline const time_t& getLastNick() const
|
||||
{ return lastnick; }
|
||||
|
||||
/*********************
|
||||
** M U T A T O R S **
|
||||
*********************/
|
||||
|
||||
inline void setLastJoin( const time_t& _lastjoin )
|
||||
{ lastjoin = _lastjoin; }
|
||||
|
||||
inline void setLastNick( const time_t& _lastnick )
|
||||
{ lastjoin = _lastnick; }
|
||||
protected:
|
||||
std::string name;
|
||||
time_t lastjoin;
|
||||
time_t lastnick;
|
||||
|
||||
}; // class activeChannel
|
||||
|
||||
} // namespace ds
|
||||
|
||||
} // namespace gnuworld
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,108 @@
|
||||
/**
|
||||
* clientData.h
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
|
||||
#ifndef CLIENTDATA_H
|
||||
#define CLIENTDATA_H
|
||||
|
||||
namespace gnuworld {
|
||||
|
||||
namespace ds {
|
||||
|
||||
/** These are the possible states of a client. */
|
||||
enum CLIENT_STATE {
|
||||
UNKNOWN,
|
||||
NORMAL,
|
||||
ABNORMAL
|
||||
};
|
||||
|
||||
/**
|
||||
* This class is a data container for the state of a given iClient.
|
||||
* It provides easy access to caches results of checking.
|
||||
*/
|
||||
class clientData {
|
||||
public:
|
||||
/** Constructor sets initial state to UNKNOWN. */
|
||||
inline clientData()
|
||||
{ currentState = UNKNOWN; entropy = 0; }
|
||||
|
||||
/**
|
||||
* Accessor for currentState.
|
||||
* @return the current state of this client.
|
||||
*/
|
||||
inline CLIENT_STATE getState() const
|
||||
{ return currentState; }
|
||||
|
||||
/**
|
||||
* Mutator for currentState.
|
||||
* @param _currentState the new state to be set.
|
||||
* @return the new state.
|
||||
*/
|
||||
inline CLIENT_STATE setState(CLIENT_STATE _currentState)
|
||||
{ return currentState = _currentState; }
|
||||
|
||||
/**
|
||||
* Accessor for the entropy value.
|
||||
* @return the current entropy value
|
||||
*/
|
||||
inline double getEntropy() const
|
||||
{ return entropy; }
|
||||
|
||||
/**
|
||||
* Mutator for the entropy value.
|
||||
* @param _entropy the new entropy value to be set.
|
||||
* @return the new entropy value.
|
||||
*/
|
||||
inline double setEntropy(double _entropy)
|
||||
{ return entropy = _entropy; }
|
||||
|
||||
|
||||
/**
|
||||
* Convenience function to test for state UNKNOWN.
|
||||
* @return true if currentState == UNKNOWN else false.
|
||||
*/
|
||||
inline bool isUnknown() const
|
||||
{ return (currentState == UNKNOWN); }
|
||||
|
||||
/**
|
||||
* Convenience function to test for state NORMAL.
|
||||
* @return true if currentState == NORMAL else false.
|
||||
*/
|
||||
inline bool isNormal() const
|
||||
{ return (currentState == NORMAL); }
|
||||
|
||||
/**
|
||||
* Convenience function to test for state ABNORMAL.
|
||||
* @return true if currentState == ABNORMAL else false.
|
||||
*/
|
||||
inline bool isAbnormal() const
|
||||
{ return (currentState == ABNORMAL); }
|
||||
|
||||
protected:
|
||||
/** The current state. */
|
||||
CLIENT_STATE currentState;
|
||||
|
||||
/** The current entropy value. */
|
||||
double entropy;
|
||||
}; // class clientData
|
||||
|
||||
} // namespace ds
|
||||
|
||||
} // namespace gnuworld
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,46 @@
|
||||
/**
|
||||
* constants.h
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*
|
||||
* Contains things that are used more than once across
|
||||
* the module but which need to remain uniform.
|
||||
*/
|
||||
|
||||
#ifndef CONSTANTS_H
|
||||
#define CONSTANTS_H
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace gnuworld {
|
||||
|
||||
namespace ds {
|
||||
|
||||
namespace sql {
|
||||
|
||||
const std::string fakeclients = "SELECT fc.id, fc.nickname, "
|
||||
"fc.username, fc.hostname, fc.realname, u.user_name, "
|
||||
"fc.created_by, fc.created_on, fc.last_updated, fc.flags "
|
||||
"FROM fakeclients AS fc JOIN users AS u ON "
|
||||
"fc.created_by=u.id";
|
||||
|
||||
} // namespace sql
|
||||
|
||||
} // namespace ds
|
||||
|
||||
} // namespace gnuworld
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,372 @@
|
||||
/**
|
||||
* dronescan.h
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
|
||||
#ifndef DRONESCAN_H
|
||||
#define DRONESCAN_H "$Id: dronescan.h,v 1.38 2009/05/28 10:37:31 hidden1 Exp $"
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
#include "client.h"
|
||||
|
||||
#include "clientData.h"
|
||||
#include "jfChannel.h"
|
||||
#include "dbHandle.h"
|
||||
#include "glineData.h"
|
||||
|
||||
#ifdef ENABLE_LOG4CPLUS
|
||||
#include <log4cplus/loglevel.h>
|
||||
#include <log4cplus/configurator.h>
|
||||
#include <iomanip>
|
||||
|
||||
#define JF_GLINED "gnuworld.ds.jf.glined"
|
||||
#define JF_CSERVICE "gnuworld.ds.jf.cservice"
|
||||
|
||||
#endif
|
||||
#define RecentlyGlinedIpsSize 150
|
||||
|
||||
|
||||
namespace gnuworld {
|
||||
|
||||
class EConfig;
|
||||
class Timer;
|
||||
|
||||
namespace ds {
|
||||
|
||||
class activeChannel;
|
||||
class Command;
|
||||
class sqlFakeClient;
|
||||
class sqlUser;
|
||||
class Test;
|
||||
|
||||
enum DS_STATE {
|
||||
BURST,
|
||||
RUN
|
||||
};
|
||||
|
||||
enum LOG_TYPE {
|
||||
DBG,
|
||||
INFO,
|
||||
WARN,
|
||||
ERR
|
||||
};
|
||||
|
||||
struct JCFLOODCLIENTS {
|
||||
std::list<std::string> log;
|
||||
std::list<std::string> chans;
|
||||
std::list<std::string> nicks;
|
||||
int count;
|
||||
int ctime;
|
||||
};
|
||||
|
||||
|
||||
class dronescan : public xClient {
|
||||
public:
|
||||
/** Constructor receives a configuration file name. */
|
||||
dronescan( const std::string& ) ;
|
||||
|
||||
/** Destructor to clean up after ourselves. */
|
||||
inline virtual ~dronescan() ;
|
||||
|
||||
/***********************************************************
|
||||
** O V E R R I D E N X C L I E N T F U N C T I O N S **
|
||||
***********************************************************/
|
||||
|
||||
/** This method is called when we have attached to the xServer. */
|
||||
virtual void OnAttach() ;
|
||||
|
||||
/** This method is called after server connection. */
|
||||
virtual void BurstChannels() ;
|
||||
|
||||
/** This is called when we receive a CTCP */
|
||||
virtual void OnCTCP( iClient*, const std::string&,
|
||||
const std::string&, bool ) ;
|
||||
|
||||
/** Receive network events. */
|
||||
virtual void OnEvent( const eventType&, void*, void*, void*, void* ) ;
|
||||
|
||||
/** Receive channel events. */
|
||||
virtual void OnChannelEvent( const channelEventType&, Channel*,
|
||||
void*, void*, void*, void* ) ;
|
||||
|
||||
/** Receive private messages. */
|
||||
virtual void OnPrivateMessage( iClient*, const std::string&,
|
||||
bool ) ;
|
||||
|
||||
/** When we are being detached by the xServer */
|
||||
virtual void OnDetach() ;
|
||||
|
||||
/** Receive our own timed events. */
|
||||
virtual void OnTimer( const xServer::timerID& , void* ) ;
|
||||
|
||||
/*****************************************
|
||||
** D R O N E S C A N T Y P E D E F S **
|
||||
*****************************************/
|
||||
|
||||
typedef unsigned short int testEnabledType;
|
||||
|
||||
typedef std::map< std::string , sqlUser* , noCaseCompare >
|
||||
userMapType;
|
||||
typedef std::map< unsigned int , sqlFakeClient* > fcMapType;
|
||||
typedef std::map< std::string , unsigned int > clientsIPMapType;
|
||||
typedef struct JCFLOODCLIENTS jcFloodClients;
|
||||
typedef std::map< std::string , jcFloodClients* > clientsIPFloodMapType;
|
||||
typedef std::list< std::string > IPJQueueType;
|
||||
typedef std::list< glineData* > glineQueueType;
|
||||
typedef std::list< std::pair< std::string, int > > recentlyGlinedIpsType;
|
||||
|
||||
/*******************************************
|
||||
** D R O N E S C A N F U N C T I O N S **
|
||||
*******************************************/
|
||||
|
||||
/** Process the join / part floods */
|
||||
void processJoinPartChannels();
|
||||
|
||||
/** Process the gline queue */
|
||||
void processGlineQueue();
|
||||
|
||||
/** Report a SQL error to the appropriate places. */
|
||||
void doSqlError(const std::string&, const std::string&);
|
||||
|
||||
/** Change the current state. */
|
||||
void changeState(DS_STATE) ;
|
||||
|
||||
/** Update the state according to the current network state */
|
||||
void updateState();
|
||||
|
||||
/** handles a channel join */
|
||||
void handleChannelJoin( Channel*, iClient* );
|
||||
|
||||
/** handles a channel part */
|
||||
void handleChannelPart( Channel*, iClient* );
|
||||
|
||||
/** This function handles new clients as they connect. */
|
||||
void handleNewClient( iClient* ) ;
|
||||
|
||||
/** This function handles nick changes. */
|
||||
void handleNickChange( iClient* ) ;
|
||||
|
||||
/** Calculate global entropy and store it. */
|
||||
void calculateEntropy() ;
|
||||
|
||||
/** Set states on global nicks. */
|
||||
void setNickStates() ;
|
||||
|
||||
/** Convenience function to reset states and check channels. */
|
||||
inline void resetAndCheck()
|
||||
{ setConsoleTopic(); setNickStates(); checkChannels(); }
|
||||
|
||||
/**
|
||||
* Check global channels for drones. This is a convenience wrapper
|
||||
* for isAbnormal( Channel* ).
|
||||
*/
|
||||
void checkChannels() ;
|
||||
bool checkChannel( const Channel* , const iClient* = 0 ) ;
|
||||
|
||||
/** Calculate the entropy of a given string. */
|
||||
double calculateEntropy( const std::string& ) ;
|
||||
|
||||
/** Return the entropy of a given client. */
|
||||
double calculateEntropy( const iClient* ) ;
|
||||
|
||||
/** Check if a channel is normal. */
|
||||
/** Check if an iClient's nick is normal. */
|
||||
bool isNormal( const iClient* ) ;
|
||||
|
||||
/** Set a clientData's state depending on the iClient. */
|
||||
CLIENT_STATE setClientState( iClient* );
|
||||
|
||||
/** Log a message. */
|
||||
void log(LOG_TYPE, const char*, ...) ;
|
||||
|
||||
#ifdef ENABLE_LOG4CPLUS
|
||||
void log(char*,const char*, ...);
|
||||
#endif
|
||||
|
||||
/** Set the topic of the console channel. */
|
||||
void setConsoleTopic() ;
|
||||
|
||||
/** Reply to a given iClient. */
|
||||
void Reply(const iClient*, const char*, ...) ;
|
||||
|
||||
/** Return a users access */
|
||||
sqlUser *getSqlUser( const std::string& ) ;
|
||||
|
||||
/* Preloaders */
|
||||
bool updateDue(std::string);
|
||||
void preloadFakeClientCache();
|
||||
void preloadUserCache();
|
||||
bool preloadExceptionalChannels();
|
||||
|
||||
/* Allow commands access to the database pointer */
|
||||
inline dbHandle *getSqlDb()
|
||||
{ return SQLDb; }
|
||||
|
||||
inline const DS_STATE getCurrentState()
|
||||
{ return currentState; }
|
||||
|
||||
inline int GetGlineQueueSize()
|
||||
{ return glineQueue.size(); }
|
||||
|
||||
/** Internal variables */
|
||||
userMapType userMap;
|
||||
fcMapType fakeClients;
|
||||
clientsIPMapType clientsIPMap;
|
||||
clientsIPFloodMapType clientsIPFloodMap;
|
||||
int lastBurstTime;
|
||||
|
||||
/** Typedef of currently seen drone channels */
|
||||
typedef std::map< std::string , activeChannel* > droneChannelsType;
|
||||
droneChannelsType droneChannels;
|
||||
|
||||
/** Typedef of channels which are not checked for join/part floods */
|
||||
typedef std::list< std::string > exceptionalChannelsType;
|
||||
exceptionalChannelsType exceptionalChannels;
|
||||
|
||||
/** The gline queue */
|
||||
glineQueueType glineQueue;
|
||||
IPJQueueType IPJQueue;
|
||||
recentlyGlinedIpsType recentlyGlinedIps;
|
||||
|
||||
bool isExceptionalChannel(const std::string&);
|
||||
|
||||
bool addExceptionalChannel(const std::string&);
|
||||
|
||||
bool remExceptionalChannel(const std::string&);
|
||||
|
||||
/** Join counter config options */
|
||||
unsigned int jcInterval;
|
||||
unsigned int jcCutoff;
|
||||
unsigned int jcMinJoinToGline;
|
||||
unsigned int jcMinJoinToGlineJOnly;
|
||||
unsigned int jcMinJoinsPerIPToGline;
|
||||
unsigned int jcJoinsPerIPTime;
|
||||
unsigned int jcMinJFSizeToGline;
|
||||
unsigned int jcMinJFJOnlySizeToGline;
|
||||
bool jcGlineEnable;
|
||||
bool jcGlineEnableConf;
|
||||
std::string jcGlineReason;
|
||||
unsigned int jcGlineLength;
|
||||
unsigned int pcCutoff;
|
||||
unsigned int ncInterval;
|
||||
unsigned int ncCutoff;
|
||||
typedef std::map< std::string , jfChannel* , noCaseCompare >
|
||||
jcChanMapType;
|
||||
typedef jcChanMapType::const_iterator jcChanMapIterator;
|
||||
jcChanMapType jcChanMap;
|
||||
typedef std::map< std::string , unsigned int , noCaseCompare >
|
||||
ncChanMapType;
|
||||
ncChanMapType ncChanMap;
|
||||
|
||||
/** Gline queue config options */
|
||||
unsigned int gbCount;
|
||||
unsigned int gbInterval;
|
||||
|
||||
/* Test control */
|
||||
/** Test map type. */
|
||||
typedef std::map< std::string, Test* > testMapType;
|
||||
typedef testMapType::value_type testPairType;
|
||||
bool RegisterTest(Test*);
|
||||
bool UnRegisterTest(const std::string&);
|
||||
|
||||
/** Tests map */
|
||||
testMapType testMap;
|
||||
|
||||
/** Set a variable in one of the tests. */
|
||||
Test *setTestVariable(const std::string&, const std::string&);
|
||||
|
||||
/* Configuration variables used by tests. */
|
||||
|
||||
/** Global options */
|
||||
unsigned int voteCutoff;
|
||||
|
||||
/** Abnormals options */
|
||||
double channelMargin;
|
||||
|
||||
protected:
|
||||
|
||||
void outputNames(const std::string&,std::stringstream&,bool,bool);
|
||||
/** Configuration file. */
|
||||
EConfig *dronescanConfig;
|
||||
|
||||
/** Our database instance */
|
||||
dbHandle *SQLDb;
|
||||
|
||||
/** Configuration variables. */
|
||||
std::string consoleChannel;
|
||||
std::string consoleChannelModes;
|
||||
|
||||
/** State variable. */
|
||||
DS_STATE currentState;
|
||||
|
||||
/** Character occurance frequencies. */
|
||||
typedef std::map< char , double > charMapType;
|
||||
charMapType charMap;
|
||||
|
||||
/** Average nickname entropy. */
|
||||
double averageEntropy;
|
||||
unsigned int totalNicks;
|
||||
|
||||
/** Margins. */
|
||||
double nickMargin;
|
||||
unsigned int channelCutoff;
|
||||
|
||||
/** How often to show drone channels on join test */
|
||||
unsigned int dcInterval;
|
||||
xServer::timerID tidClearActiveList;
|
||||
|
||||
/** What level to log to the console. */
|
||||
int consoleLevel;
|
||||
|
||||
/** Stats. */
|
||||
int customDataCounter;
|
||||
|
||||
/** Internally used timer. */
|
||||
Timer *theTimer;
|
||||
|
||||
/** Timers for GNUWorld triggered events. */
|
||||
xServer::timerID tidClearJoinCounter;
|
||||
xServer::timerID tidClearNickCounter;
|
||||
xServer::timerID tidRefreshCaches;
|
||||
xServer::timerID tidGlineQueue;
|
||||
|
||||
/** Command map type. */
|
||||
typedef std::map< std::string , Command* , noCaseCompare >
|
||||
commandMapType;
|
||||
typedef commandMapType::value_type commandPairType;
|
||||
commandMapType commandMap;
|
||||
bool RegisterCommand(Command*);
|
||||
|
||||
/** Time of the last cache. */
|
||||
std::map < std::string , time_t > lastUpdated;
|
||||
|
||||
/** How often to refresh caches. */
|
||||
unsigned int rcInterval;
|
||||
|
||||
/** Fake sqlUser record for opered clients without accounts. */
|
||||
sqlUser *fakeOperUser;
|
||||
|
||||
}; // class dronescan
|
||||
|
||||
|
||||
} // namespace ds
|
||||
|
||||
} // namespace gnuworld
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,102 @@
|
||||
/**
|
||||
* dronescanCommands.h
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
|
||||
#ifndef DRONESCANCOMMANDS_H
|
||||
#define DRONESCANCOMMANDS_H
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace gnuworld {
|
||||
|
||||
namespace ds {
|
||||
|
||||
class dronescan;
|
||||
class sqlUser;
|
||||
|
||||
class Command {
|
||||
public:
|
||||
Command( dronescan* _bot, const std::string& _commandName,
|
||||
const std::string& _help ) :
|
||||
bot(_bot), server(0), commandName(_commandName), help(_help)
|
||||
{ }
|
||||
|
||||
virtual ~Command() { }
|
||||
|
||||
virtual void Exec(const iClient*, const std::string&,
|
||||
const sqlUser*) = 0;
|
||||
|
||||
void setServer(xServer *_server)
|
||||
{ server = _server; }
|
||||
|
||||
virtual inline std::string getInfo() const
|
||||
{ return commandName + ' ' + help; }
|
||||
|
||||
virtual void Usage(const iClient*);
|
||||
|
||||
inline const std::string& getName() const
|
||||
{ return commandName; }
|
||||
|
||||
inline const std::string& getHelp() const
|
||||
{ return help; }
|
||||
|
||||
protected:
|
||||
dronescan *bot;
|
||||
xServer *server;
|
||||
std::string commandName;
|
||||
std::string help;
|
||||
|
||||
}; // class Command
|
||||
|
||||
/* Mmmmm we like big convoluted defines! */
|
||||
#define DECLARE_COMMAND(commandName) \
|
||||
class commandName##Command : public Command \
|
||||
{ \
|
||||
public: \
|
||||
commandName##Command(dronescan* _bot, \
|
||||
const std::string& _commandName, \
|
||||
const std::string& _help) : \
|
||||
Command(_bot, _commandName, _help) {} \
|
||||
virtual ~commandName##Command() {} \
|
||||
virtual void Exec(const iClient*, const std::string&, const sqlUser*); \
|
||||
};
|
||||
|
||||
/* Admin commands */
|
||||
DECLARE_COMMAND( ACCESS )
|
||||
DECLARE_COMMAND( CHECK )
|
||||
DECLARE_COMMAND( FAKE )
|
||||
DECLARE_COMMAND( LIST )
|
||||
DECLARE_COMMAND( STATUS )
|
||||
|
||||
/* Maintainence commands */
|
||||
DECLARE_COMMAND( ADDUSER )
|
||||
DECLARE_COMMAND( MODUSER )
|
||||
DECLARE_COMMAND( REMUSER )
|
||||
DECLARE_COMMAND( ADDEXCEPTIONALCHANNEL )
|
||||
DECLARE_COMMAND( REMEXCEPTIONALCHANNEL )
|
||||
DECLARE_COMMAND( RELOAD )
|
||||
|
||||
/* Coder commands */
|
||||
DECLARE_COMMAND( ANALYSE )
|
||||
DECLARE_COMMAND( QUOTE )
|
||||
|
||||
} // namespace ds
|
||||
|
||||
} // namespace gnuworld
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,107 @@
|
||||
/**
|
||||
* dronescanTests.h
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
|
||||
#ifndef DRONESCANTESTS_H
|
||||
#define DRONESCANTESTS_H
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace gnuworld {
|
||||
|
||||
namespace ds {
|
||||
|
||||
class dronescan;
|
||||
|
||||
class Test {
|
||||
public:
|
||||
Test( dronescan *_bot, const std::string& _testName,
|
||||
const std::string& _description,
|
||||
const unsigned short _weight ) :
|
||||
bot(_bot), testName(_testName), description(_description), weight(_weight)
|
||||
{ } ;
|
||||
|
||||
virtual ~Test() { } ;
|
||||
|
||||
virtual bool isNormal( const Channel* ) = 0;
|
||||
|
||||
virtual inline bool setVariable( const std::string&,
|
||||
const std::string& )
|
||||
{ return false; }
|
||||
|
||||
virtual inline const std::string& getName() const
|
||||
{ return testName; }
|
||||
virtual inline const std::string& getDescription() const
|
||||
{ return description; }
|
||||
virtual inline unsigned short getWeight() const
|
||||
{ return weight; }
|
||||
|
||||
virtual const std::string getVariable() const
|
||||
{ return std::string(); }
|
||||
|
||||
virtual inline const std::string getStatus() const
|
||||
{ return std::string(); }
|
||||
|
||||
protected:
|
||||
dronescan *bot;
|
||||
std::string testName;
|
||||
std::string description;
|
||||
unsigned short weight;
|
||||
}; // class Test
|
||||
|
||||
/* Big define time */
|
||||
#define DECLARE_TEST(testName) \
|
||||
class testName##Test : public Test { \
|
||||
public: \
|
||||
testName##Test(dronescan *_bot, const std::string& _testName, \
|
||||
const std::string& _description, const unsigned short _weight) : \
|
||||
Test(_bot, _testName, _description, _weight) { } ; \
|
||||
virtual ~testName##Test() { } ; \
|
||||
virtual bool isNormal( const Channel* ) ;
|
||||
|
||||
#define DECLARE_TEST_FULL(testName) DECLARE_TEST(testName) };
|
||||
|
||||
#define DECLARE_TEST_SET(testName) DECLARE_TEST(testName) \
|
||||
virtual bool setVariable( const std::string&, const std::string& ); \
|
||||
virtual const std::string getVariable() const; \
|
||||
virtual const std::string getStatus() const; \
|
||||
protected:
|
||||
|
||||
DECLARE_TEST_FULL( ABNORMALS )
|
||||
|
||||
DECLARE_TEST_SET( COMMONREAL )
|
||||
unsigned short realCutoff;
|
||||
};
|
||||
|
||||
DECLARE_TEST_FULL( HASALLOP )
|
||||
|
||||
DECLARE_TEST_FULL( HASOP )
|
||||
|
||||
DECLARE_TEST_SET( MAXCHANS )
|
||||
unsigned short maxChans;
|
||||
};
|
||||
|
||||
DECLARE_TEST_SET( RANGE )
|
||||
double channelRange;
|
||||
};
|
||||
|
||||
} // namespace ds
|
||||
|
||||
} // namespace gnuworld
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,63 @@
|
||||
/**
|
||||
* glineData.h
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
|
||||
#ifndef GLINEDATA_H
|
||||
#define GLINEDATA_H
|
||||
|
||||
namespace gnuworld {
|
||||
|
||||
namespace ds {
|
||||
|
||||
|
||||
/**
|
||||
* This class is a data container for glines which are in the gline queue
|
||||
*/
|
||||
class glineData {
|
||||
public:
|
||||
/** Constructor sets initial state to UNKNOWN. */
|
||||
inline glineData(std::string _host, std::string _reason, time_t _expires)
|
||||
{ host = _host; reason = _reason; expires = _expires;}
|
||||
|
||||
inline const std::string getHost() const
|
||||
{ return host; }
|
||||
|
||||
inline const std::string getReason() const
|
||||
{ return reason; }
|
||||
|
||||
inline const time_t getExpires() const
|
||||
{ return expires; }
|
||||
|
||||
|
||||
protected:
|
||||
/** The gline host */
|
||||
std::string host;
|
||||
|
||||
/** The gline reason */
|
||||
std::string reason;
|
||||
|
||||
/** The gline expiry */
|
||||
time_t expires;
|
||||
|
||||
}; // class glineData
|
||||
|
||||
} // namespace ds
|
||||
|
||||
} // namespace gnuworld
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,69 @@
|
||||
/**
|
||||
* jfChannel.cc
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
|
||||
#include "jfChannel.h"
|
||||
#include "ip.h"
|
||||
|
||||
namespace gnuworld {
|
||||
|
||||
namespace ds {
|
||||
|
||||
|
||||
void jfChannel::addJoin(iClient* theClient)
|
||||
{
|
||||
std::string clientIp = xIP(theClient->getIP()).GetNumericIP();
|
||||
jfClientData& jfClient = joinPartMap[clientIp];
|
||||
jfClient.numOfJoins++;
|
||||
std::list<std::string>::iterator begin = jfClient.numerics.begin();
|
||||
std::list<std::string>::iterator end = jfClient.numerics.end();
|
||||
|
||||
if(theClient->isOper())
|
||||
{
|
||||
jfClient.seenOper = true;
|
||||
}
|
||||
if(theClient->getMode(iClient::MODE_REGISTERED))
|
||||
{
|
||||
jfClient.seenLoggedInUser = true;
|
||||
jfClient.userNames.push_back(std::pair<std::string,std::string>(theClient->getCharYYXXX(),
|
||||
theClient->getAccount()));
|
||||
}
|
||||
|
||||
bool found = false;
|
||||
for(std::list<std::string>::iterator it=begin;it!=end && !found;++it) {
|
||||
if(*it == theClient->getCharYYXXX()) {
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
|
||||
if(!found) {
|
||||
jfClient.numerics.push_back(theClient->getCharYYXXX());
|
||||
}
|
||||
}
|
||||
|
||||
void jfChannel::addPart(iClient* theClient)
|
||||
{
|
||||
joinPartMap[xIP(theClient->getIP()).GetNumericIP()].numOfParts++;
|
||||
}
|
||||
|
||||
|
||||
|
||||
} // namespace ds
|
||||
|
||||
} // namespace gnuworld
|
||||
|
||||
@@ -0,0 +1,122 @@
|
||||
/**
|
||||
* jfChannel.h
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
|
||||
#ifndef JFCHANNEL_H
|
||||
#define JFCHANNEL_H
|
||||
|
||||
#include <string>
|
||||
#include <ctime>
|
||||
#include <map>
|
||||
#include "jfClientData.h"
|
||||
#include "iClient.h"
|
||||
|
||||
namespace gnuworld {
|
||||
|
||||
namespace ds {
|
||||
|
||||
class jfChannel {
|
||||
public:
|
||||
|
||||
typedef std::map<std::string,jfClientData> joinPartMapType;
|
||||
typedef joinPartMapType::const_iterator joinPartMapIterator;
|
||||
|
||||
/**
|
||||
* Constructor to set up initial state.
|
||||
*
|
||||
* @param _name the name of the active channel
|
||||
* @param _lastjoin the time of the last join to this channel
|
||||
*/
|
||||
inline jfChannel( const std::string& _name ) :
|
||||
name(_name)
|
||||
{ numOfJoins = 0;
|
||||
numOfParts = 0; } ;
|
||||
|
||||
/** Empty destructor as we allocate no memory. */
|
||||
inline ~jfChannel() { } ;
|
||||
|
||||
/************************
|
||||
** A C C E S S O R S **
|
||||
************************/
|
||||
|
||||
inline const std::string& getName() const
|
||||
{ return name; }
|
||||
|
||||
inline const bool getJoinFlooded() const
|
||||
{ return joinFlooded; }
|
||||
|
||||
inline const unsigned int getNumOfJoins() const
|
||||
{ return numOfJoins; }
|
||||
|
||||
inline const unsigned int getNumOfParts() const
|
||||
{ return numOfParts; }
|
||||
|
||||
inline const joinPartMapIterator joinPartBegin() const
|
||||
{ return joinPartMap.begin(); }
|
||||
|
||||
inline const joinPartMapIterator joinPartEnd() const
|
||||
{ return joinPartMap.end(); }
|
||||
|
||||
/*********************
|
||||
** M U T A T O R S **
|
||||
*********************/
|
||||
|
||||
inline unsigned int advanceChannelJoin()
|
||||
{ return ++numOfJoins; }
|
||||
|
||||
inline void resetJoinCount()
|
||||
{ numOfJoins = 0; }
|
||||
|
||||
inline unsigned int advanceChannelParts()
|
||||
{ return ++numOfParts; }
|
||||
|
||||
inline void resetPartCount()
|
||||
{ numOfParts = 0; }
|
||||
|
||||
inline void setJoinFlooded( bool _joinFlooded )
|
||||
{ joinFlooded = _joinFlooded; }
|
||||
|
||||
inline void setPartFlooded( bool _partFlooded )
|
||||
{ partFlooded = _partFlooded; }
|
||||
|
||||
inline void setLastJoinFlood( time_t _lastJoinFlood)
|
||||
{ lastJoinFlood = _lastJoinFlood; }
|
||||
|
||||
inline const time_t getLastJoinFlood() const
|
||||
{ return lastJoinFlood; }
|
||||
|
||||
void addJoin(iClient*);
|
||||
|
||||
void addPart(iClient*);
|
||||
|
||||
protected:
|
||||
std::string name;
|
||||
unsigned int numOfJoins;
|
||||
unsigned int numOfParts;
|
||||
bool joinFlooded;
|
||||
bool partFlooded;
|
||||
joinPartMapType joinPartMap;
|
||||
time_t lastJoinFlood;
|
||||
|
||||
}; // class jfChannel
|
||||
|
||||
} // namespace ds
|
||||
|
||||
} // namespace gnuworld
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,49 @@
|
||||
/**
|
||||
* jfClientData.h
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
|
||||
#ifndef JFCLIENTDATA_H
|
||||
#define JFCLIENTDATA_H
|
||||
|
||||
#include <string>
|
||||
#include <ctime>
|
||||
#include <list>
|
||||
|
||||
namespace gnuworld {
|
||||
|
||||
namespace ds {
|
||||
|
||||
class jfClientData {
|
||||
public:
|
||||
|
||||
jfClientData() :
|
||||
numOfJoins(0),numOfParts(0),seenOper(false),seenLoggedInUser(false) {}
|
||||
unsigned int numOfJoins;
|
||||
unsigned int numOfParts;
|
||||
bool seenOper;
|
||||
bool seenLoggedInUser;
|
||||
std::list<std::string> numerics;
|
||||
std::list<std::pair<std::string,std::string> > userNames;
|
||||
|
||||
}; // class jfClientData
|
||||
|
||||
} // namespace ds
|
||||
|
||||
} // namespace gnuworld
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,59 @@
|
||||
/**
|
||||
* levels.h
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
|
||||
#ifndef LEVELS_H
|
||||
#define LEVELS_H
|
||||
|
||||
namespace gnuworld {
|
||||
|
||||
namespace ds {
|
||||
|
||||
namespace level {
|
||||
|
||||
/* Try to keep anything non-authed opers need below 200 */
|
||||
|
||||
/* Standard level is 300 */
|
||||
|
||||
const unsigned short access = 300;
|
||||
const unsigned short check = 300;
|
||||
const unsigned short fake = 300;
|
||||
const unsigned short list = 300;
|
||||
const unsigned short status = 300;
|
||||
|
||||
/* Higher admin commands */
|
||||
|
||||
const unsigned short adduser = 750;
|
||||
const unsigned short moduser = 750;
|
||||
const unsigned short remuser = 750;
|
||||
const unsigned short addExceptionalChannel = 750;
|
||||
const unsigned short remExceptionalChannel = 750;
|
||||
const unsigned short reload = 750;
|
||||
|
||||
/* Commands at 1000 should really be debug commands only */
|
||||
|
||||
const unsigned short analyse = 1000;
|
||||
const unsigned short quote = 1000;
|
||||
|
||||
} // namespace level
|
||||
|
||||
} // namespace ds
|
||||
|
||||
} // namespace gnuworld
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,123 @@
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
#include <iostream>
|
||||
|
||||
#include "dbHandle.h"
|
||||
|
||||
#include "ELog.h"
|
||||
|
||||
#include "constants.h"
|
||||
#include "sqlFakeClient.h"
|
||||
#include "misc.h"
|
||||
|
||||
namespace gnuworld {
|
||||
|
||||
namespace ds {
|
||||
|
||||
using std::string ;
|
||||
using std::endl;
|
||||
using std::stringstream;
|
||||
|
||||
const sqlFakeClient::flagType sqlFakeClient::F_ACTIVE = 0x0001 ;
|
||||
|
||||
sqlFakeClient::sqlFakeClient(dbHandle *_SQLDb) :
|
||||
id(0),
|
||||
nickname(),
|
||||
username(),
|
||||
hostname(),
|
||||
realname(),
|
||||
createdBy_i(0),
|
||||
createdBy_s(),
|
||||
createdOn(::time(0)),
|
||||
lastUpdated(::time(0)),
|
||||
flags(0),
|
||||
SQLDb(_SQLDb)
|
||||
{
|
||||
}
|
||||
|
||||
sqlFakeClient::~sqlFakeClient()
|
||||
{
|
||||
}
|
||||
|
||||
string sqlFakeClient::getFlagsString() const
|
||||
{
|
||||
/* If this grows, alter the field size in LISTCommand.cc */
|
||||
|
||||
stringstream theFlags;
|
||||
if(flags & F_ACTIVE) theFlags << "A";
|
||||
|
||||
return theFlags.str();
|
||||
}
|
||||
|
||||
void sqlFakeClient::setAllMembers(int row)
|
||||
{
|
||||
id = atoi(SQLDb->GetValue(row, 0));
|
||||
nickname = SQLDb->GetValue(row, 1);
|
||||
username = SQLDb->GetValue(row, 2);
|
||||
hostname = SQLDb->GetValue(row, 3);
|
||||
realname = SQLDb->GetValue(row, 4);
|
||||
createdBy_s = SQLDb->GetValue(row, 5);
|
||||
createdBy_i = atoi(SQLDb->GetValue(row, 6));
|
||||
createdOn = atoi(SQLDb->GetValue(row, 7));
|
||||
lastUpdated = atoi(SQLDb->GetValue(row, 8));
|
||||
flags = atoi(SQLDb->GetValue(row, 9));
|
||||
}
|
||||
|
||||
bool sqlFakeClient::insert()
|
||||
{
|
||||
/* First insert a fake record */
|
||||
stringstream fakeInsert;
|
||||
fakeInsert << "INSERT INTO fakeclients VALUES ("
|
||||
<< "DEFAULT,"
|
||||
<< "'" << nickname << "', "
|
||||
<< "'" << username << "', "
|
||||
<< "'" << hostname << "', "
|
||||
<< "'" << realname << "', "
|
||||
<< createdBy_i << ", "
|
||||
<< "now()::abstime::int4, "
|
||||
<< "now()::abstime::int4, 0"
|
||||
<< ")"
|
||||
;
|
||||
|
||||
if(!SQLDb->Exec(fakeInsert)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Fake record now exists. Select the row and let setAllMembers do its thing.
|
||||
* This is so we pull back the new ID from the database. */
|
||||
|
||||
stringstream selectFake;
|
||||
selectFake << sql::fakeclients;
|
||||
|
||||
if( !SQLDb->Exec(selectFake, true ) )
|
||||
//if( status != PGRES_TUPLES_OK )
|
||||
return false;
|
||||
|
||||
setAllMembers(0);
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
string sqlFakeClient::getNickUserHost() const
|
||||
{
|
||||
stringstream theNickUserHost;
|
||||
theNickUserHost << "("
|
||||
<< id
|
||||
<< ") "
|
||||
<< nickname
|
||||
<< "!"
|
||||
<< username
|
||||
<< "@"
|
||||
<< hostname
|
||||
<< " ["
|
||||
<< realname
|
||||
<< "]"
|
||||
;
|
||||
|
||||
return theNickUserHost.str();
|
||||
}
|
||||
|
||||
} // namespace ds
|
||||
|
||||
} // namespace gnuworld
|
||||
@@ -0,0 +1,128 @@
|
||||
/**
|
||||
* sqlFakeClient.h
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
|
||||
#ifndef SQLFAKECLIENT_H
|
||||
#define SQLFAKECLIENT_H "$Id: sqlFakeClient.h,v 1.4 2007/08/28 16:10:14 dan_karrels Exp $"
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <ctime>
|
||||
|
||||
#include "dbHandle.h"
|
||||
|
||||
namespace gnuworld {
|
||||
|
||||
namespace ds {
|
||||
|
||||
using std::string ;
|
||||
|
||||
class sqlFakeClient {
|
||||
public:
|
||||
sqlFakeClient(dbHandle*);
|
||||
virtual ~sqlFakeClient();
|
||||
|
||||
typedef unsigned int flagType;
|
||||
static const flagType F_ACTIVE;
|
||||
|
||||
/* Accessors */
|
||||
inline unsigned int getId() const
|
||||
{ return id; }
|
||||
|
||||
inline string getNickName() const
|
||||
{ return nickname; }
|
||||
|
||||
inline string getUserName() const
|
||||
{ return username; }
|
||||
|
||||
inline string getHostName() const
|
||||
{ return hostname; }
|
||||
|
||||
inline string getRealName() const
|
||||
{ return realname; }
|
||||
|
||||
inline string getCreatedBy() const
|
||||
{ return createdBy_s; }
|
||||
|
||||
inline time_t getCreatedOn() const
|
||||
{ return createdOn; }
|
||||
|
||||
inline time_t getLastUpdated() const
|
||||
{ return lastUpdated; }
|
||||
|
||||
inline bool getFlag(flagType _flag) const
|
||||
{ return (flags & _flag); }
|
||||
|
||||
/* Mutators */
|
||||
inline void setNickName(const string& _nickname)
|
||||
{ nickname = _nickname; }
|
||||
|
||||
inline void setUserName(const string& _username)
|
||||
{ username = _username; }
|
||||
|
||||
inline void setHostName(const string& _hostname)
|
||||
{ hostname = _hostname; }
|
||||
|
||||
inline void setRealName(const string& _realname)
|
||||
{ realname = _realname; }
|
||||
|
||||
inline void setCreatedBy(int _createdby)
|
||||
{ createdBy_i = _createdby; }
|
||||
|
||||
inline void setFlag(flagType _flag)
|
||||
{ flags |= _flag; }
|
||||
|
||||
inline void removeFlag(flagType _flag)
|
||||
{ flags &= !_flag; }
|
||||
|
||||
/* Convenience functions for flags */
|
||||
string getFlagsString() const;
|
||||
|
||||
inline bool isActive() const
|
||||
{ return (flags & F_ACTIVE); }
|
||||
|
||||
/* Core */
|
||||
void setAllMembers(int);
|
||||
bool commit();
|
||||
bool insert();
|
||||
bool remove();
|
||||
|
||||
/* Misc helper functions */
|
||||
string getNickUserHost() const;
|
||||
|
||||
protected:
|
||||
unsigned int id;
|
||||
string nickname;
|
||||
string username;
|
||||
string hostname;
|
||||
string realname;
|
||||
unsigned int createdBy_i;
|
||||
string createdBy_s;
|
||||
time_t createdOn;
|
||||
time_t lastUpdated;
|
||||
|
||||
unsigned int flags;
|
||||
|
||||
dbHandle *SQLDb;
|
||||
}; // class sqlFakeClient
|
||||
|
||||
} // namespace ds
|
||||
|
||||
} // namespace gnuworld
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,133 @@
|
||||
#include <sstream>
|
||||
|
||||
#include "dbHandle.h"
|
||||
|
||||
#include "ELog.h"
|
||||
|
||||
#include "sqlUser.h"
|
||||
#include "misc.h"
|
||||
|
||||
namespace gnuworld {
|
||||
|
||||
namespace ds {
|
||||
|
||||
using std::endl ;
|
||||
using std::stringstream ;
|
||||
|
||||
const sqlUser::flagType sqlUser::F_SUSPENDED = 0x0001 ;
|
||||
|
||||
sqlUser::sqlUser(dbHandle *_SQLDb) :
|
||||
user_name(),
|
||||
last_seen(0),
|
||||
last_updated_by(),
|
||||
last_updated(0),
|
||||
flags(0),
|
||||
SQLDb(_SQLDb)
|
||||
{
|
||||
}
|
||||
|
||||
sqlUser::~sqlUser()
|
||||
{
|
||||
}
|
||||
|
||||
void sqlUser::setAllMembers(int row)
|
||||
{
|
||||
user_name = SQLDb->GetValue(row, 0);
|
||||
last_seen = atoi(SQLDb->GetValue(row, 1));
|
||||
last_updated_by = SQLDb->GetValue(row, 2);
|
||||
last_updated = atoi(SQLDb->GetValue(row, 3));
|
||||
flags = atoi(SQLDb->GetValue(row, 4));
|
||||
access = atoi(SQLDb->GetValue(row, 5));
|
||||
created = atoi(SQLDb->GetValue(row, 6));
|
||||
}
|
||||
|
||||
bool sqlUser::commit()
|
||||
{
|
||||
|
||||
/* Special case if we have no SQLDb
|
||||
* ie if we are a fake user
|
||||
*/
|
||||
if( !SQLDb ) { return true; }
|
||||
|
||||
stringstream queryString;
|
||||
queryString << "UPDATE users SET "
|
||||
<< "last_seen = " << last_seen << ", "
|
||||
<< "last_updated_by = '" << last_updated_by << "', "
|
||||
<< "last_updated = " << last_updated << ", "
|
||||
<< "flags = " << flags << ", "
|
||||
<< "access = " << access
|
||||
<< " WHERE "
|
||||
<< "user_name = '" << user_name << "'"
|
||||
;
|
||||
|
||||
#ifdef LOG_SQL
|
||||
elog << "sqlUser::commit> "
|
||||
<< queryString
|
||||
<< endl;
|
||||
#endif
|
||||
|
||||
if( !SQLDb->Exec(queryString ) )
|
||||
//if(PGRES_COMMAND_OK != status)
|
||||
{
|
||||
elog << "sqlUser::commit> " << SQLDb->ErrorMessage();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool sqlUser::insert()
|
||||
{
|
||||
stringstream insertString;
|
||||
insertString << "INSERT INTO users "
|
||||
<< "(user_name, created, last_seen, last_updated, last_updated_by, flags, access) "
|
||||
<< "VALUES "
|
||||
<< "("
|
||||
<< "'" << user_name << "', "
|
||||
<< created << ", "
|
||||
<< last_seen << ", "
|
||||
<< last_updated << ", "
|
||||
<< "'" << last_updated_by << "', "
|
||||
<< flags << ", "
|
||||
<< access
|
||||
<< ")"
|
||||
;
|
||||
|
||||
#ifdef LOG_SQL
|
||||
elog << "sqlUser::insert> "
|
||||
<< insertString
|
||||
<< endl;
|
||||
#endif
|
||||
|
||||
if( !SQLDb->Exec(insertString ) )
|
||||
//if(PGRES_COMMAND_OK != status)
|
||||
{
|
||||
elog << "sqlUser::insert> " << SQLDb->ErrorMessage();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
} // sqlUser::insert()
|
||||
|
||||
|
||||
bool sqlUser::remove()
|
||||
{
|
||||
stringstream deleteString;
|
||||
deleteString << "DELETE FROM users "
|
||||
<< "WHERE user_name = '" << user_name << "'"
|
||||
;
|
||||
|
||||
if( !SQLDb->Exec(deleteString ) )
|
||||
//if(PGRES_COMMAND_OK != status)
|
||||
{
|
||||
elog << "sqlUser::delete> " << SQLDb->ErrorMessage();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace ds
|
||||
|
||||
} // namespace gnuworld
|
||||
@@ -0,0 +1,111 @@
|
||||
/**
|
||||
* sqlUser.h
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
|
||||
#ifndef SQLUSER_H
|
||||
#define SQLUSER_H "$Id: sqlUser.h,v 1.4 2007/08/28 16:10:14 dan_karrels Exp $"
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "dbHandle.h"
|
||||
|
||||
namespace gnuworld {
|
||||
|
||||
namespace ds {
|
||||
|
||||
using std::string;
|
||||
|
||||
class sqlUser {
|
||||
public:
|
||||
sqlUser(dbHandle*);
|
||||
virtual ~sqlUser();
|
||||
|
||||
typedef unsigned int flagType;
|
||||
static const flagType F_SUSPENDED;
|
||||
|
||||
/* Accessors */
|
||||
|
||||
inline const string& getUserName() const
|
||||
{ return user_name; }
|
||||
|
||||
inline const int getCreated() const
|
||||
{ return created; }
|
||||
|
||||
inline const unsigned int getLastSeen() const
|
||||
{ return last_seen; }
|
||||
|
||||
inline const string& getLastUpdatedBy() const
|
||||
{ return last_updated_by; }
|
||||
|
||||
inline const unsigned int getLastUpdated() const
|
||||
{ return last_updated; }
|
||||
|
||||
inline const unsigned int getAccess() const
|
||||
{ return access; }
|
||||
|
||||
/* Mutators */
|
||||
|
||||
inline void setUserName(const string& _user_name)
|
||||
{ user_name = _user_name; }
|
||||
|
||||
inline void setCreated(const unsigned int _created)
|
||||
{ created = _created; }
|
||||
|
||||
inline void setLastSeen(const unsigned int _last_seen)
|
||||
{ last_seen = _last_seen; }
|
||||
|
||||
inline void setLastUpdatedBy(const string& _last_updated_by)
|
||||
{ last_updated_by = _last_updated_by; }
|
||||
|
||||
inline void setLastUpdated(const unsigned int _last_updated)
|
||||
{ last_updated = _last_updated; }
|
||||
|
||||
inline void setAccess(const unsigned int _access)
|
||||
{ access = _access; }
|
||||
|
||||
inline void setFlags(const flagType _flags)
|
||||
{ flags = _flags; }
|
||||
|
||||
/* Convenience functions for flags */
|
||||
inline const bool isSuspended() const
|
||||
{ return (flags & F_SUSPENDED); }
|
||||
|
||||
|
||||
/* Methods to alter our SQL status */
|
||||
void setAllMembers(int);
|
||||
bool commit();
|
||||
bool insert();
|
||||
bool remove();
|
||||
|
||||
protected:
|
||||
string user_name;
|
||||
unsigned int created;
|
||||
unsigned int last_seen;
|
||||
string last_updated_by;
|
||||
unsigned int last_updated;
|
||||
unsigned int flags;
|
||||
unsigned int access;
|
||||
|
||||
dbHandle* SQLDb;
|
||||
}; // class sqlUser
|
||||
|
||||
} // namespace ds
|
||||
|
||||
} // namespace gnuworld
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user