git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9986
e03df62e-2008-0410-955e-
edbf42e46eb7
irc::stringjoiner::stringjoiner(const std::string &seperator, const std::vector<std::string> &sequence, int begin, int end)
{
irc::stringjoiner::stringjoiner(const std::string &seperator, const std::vector<std::string> &sequence, int begin, int end)
{
+ if (end < begin)
+ throw "stringjoiner logic error, this causes problems.";
+
for (int v = begin; v < end; v++)
joined.append(sequence[v]).append(seperator);
joined.append(sequence[end]);
for (int v = begin; v < end; v++)
joined.append(sequence[v]).append(seperator);
joined.append(sequence[end]);
irc::stringjoiner::stringjoiner(const std::string &seperator, const std::deque<std::string> &sequence, int begin, int end)
{
irc::stringjoiner::stringjoiner(const std::string &seperator, const std::deque<std::string> &sequence, int begin, int end)
{
+ if (end < begin)
+ throw "stringjoiner logic error, this causes problems.";
+
for (int v = begin; v < end; v++)
joined.append(sequence[v]).append(seperator);
joined.append(sequence[end]);
for (int v = begin; v < end; v++)
joined.append(sequence[v]).append(seperator);
joined.append(sequence[end]);
irc::stringjoiner::stringjoiner(const std::string &seperator, const char* const* sequence, int begin, int end)
{
irc::stringjoiner::stringjoiner(const std::string &seperator, const char* const* sequence, int begin, int end)
{
+ if (end < begin)
+ throw "stringjoiner logic error, this causes problems.";
+
for (int v = begin; v < end; v++)
joined.append(sequence[v]).append(seperator);
joined.append(sequence[end]);
for (int v = begin; v < end; v++)
joined.append(sequence[v]).append(seperator);
joined.append(sequence[end]);
{
Command* thiscommand = ServerInstance->Parser->GetHandler(command);
if ((thiscommand) && (thiscommand->flags_needed == 'o'))
{
Command* thiscommand = ServerInstance->Parser->GetHandler(command);
if ((thiscommand) && (thiscommand->flags_needed == 'o'))
- ServerInstance->Logs->Log("m_operlog",DEFAULT,"OPERLOG: [%s!%s@%s] %s %s",user->nick.c_str(), user->ident.c_str(), user->host.c_str(), command.c_str(), irc::stringjoiner(" ", parameters, 0, parameters.size() - 1).GetJoined().c_str());
+ ServerInstance->Logs->Log("m_operlog",DEFAULT,"OPERLOG: [%s!%s@%s] %s %s",user->nick.c_str(), user->ident.c_str(), user->host.c_str(), command.c_str(), parameters.empty() ? "" : irc::stringjoiner(" ", parameters, 0, parameters.size() - 1).GetJoined().c_str());
/* Now attempt to generate a hash */
user->WriteServ("NOTICE %s :%s hashed password for %s is %s",user->nick.c_str(), algo, stuff, HashSumRequest(Sender, x->second, stuff).Send() );
}
/* Now attempt to generate a hash */
user->WriteServ("NOTICE %s :%s hashed password for %s is %s",user->nick.c_str(), algo, stuff, HashSumRequest(Sender, x->second, stuff).Send() );
}
+ else if (names.empty())
+ {
+ /* same idea as bug #569 */
+ user->WriteServ("NOTICE %s :No hash provider modules are loaded", user->nick.c_str());
+ }
else
{
/* I dont do flying, bob. */
else
{
/* I dont do flying, bob. */