}
catch (...)
{
- ServerInstance->Logs->Log("USERS", LOG_DEFAULT,"*** WTF *** Duplicated UUID! -- Crack smoking monkeys have been unleashed.");
+ ServerInstance->Logs->Log("USERS", LOG_DEFAULT, "*** WTF *** Duplicated UUID! -- Crack smoking monkeys have been unleashed.");
ServerInstance->SNO->WriteToSnoMask('a', "WARNING *** Duplicate UUID allocated!");
return;
}
}
catch (CoreException& modexcept)
{
- ServerInstance->Logs->Log("SOCKET", LOG_DEBUG,"%s threw an exception: %s", modexcept.GetSource(), modexcept.GetReason());
+ ServerInstance->Logs->Log("SOCKET", LOG_DEBUG, "%s threw an exception: %s", modexcept.GetSource(), modexcept.GetReason());
}
}
- ServerInstance->Logs->Log("USERS", LOG_DEBUG,"New user fd: %d", socket);
+ ServerInstance->Logs->Log("USERS", LOG_DEBUG, "New user fd: %d", socket);
this->unregistered_count++;
if (!ServerInstance->SE->AddFd(eh, FD_WANT_FAST_READ | FD_WANT_EDGE_WRITE))
{
- ServerInstance->Logs->Log("USERS", LOG_DEBUG,"Internal error on new connection");
+ ServerInstance->Logs->Log("USERS", LOG_DEBUG, "Internal error on new connection");
this->QuitUser(New, "Internal error handling connection");
}
void UserManager::ServerNoticeAll(const char* text, ...)
{
- if (!text)
- return;
-
- char textbuffer[MAXBUF];
- va_list argsPtr;
- va_start (argsPtr, text);
- vsnprintf(textbuffer, MAXBUF, text, argsPtr);
- va_end(argsPtr);
-
- const std::string message = "NOTICE $" + ServerInstance->Config->ServerName + " :" + textbuffer;
-
- for (LocalUserList::const_iterator i = local_users.begin(); i != local_users.end(); i++)
- {
- User* t = *i;
- t->WriteServ(message);
- }
-}
-
-void UserManager::ServerPrivmsgAll(const char* text, ...)
-{
- if (!text)
- return;
-
- char textbuffer[MAXBUF];
- va_list argsPtr;
- va_start (argsPtr, text);
- vsnprintf(textbuffer, MAXBUF, text, argsPtr);
- va_end(argsPtr);
-
- const std::string message = "PRIVMSG $" + ServerInstance->Config->ServerName + " :" + textbuffer;
+ std::string message;
+ VAFORMAT(message, text, text);
+ message = "NOTICE $" + ServerInstance->Config->ServerName + " :" + message;
for (LocalUserList::const_iterator i = local_users.begin(); i != local_users.end(); i++)
{
}
}
-
/* return how many users have a given mode e.g. 'a' */
int UserManager::ModeCount(const char mode)
{