Logo Search packages:      
Sourcecode: sbnc version File versions  Download package

void CCore::Log ( const char *  Format,
  ... 
)

Log

Logs something in the bouncer's main log.

Parameters:
Format a format string
... additional parameters which are used by the format string

Definition at line 929 of file Core.cpp.

References CVector< Type >::Get(), CUser::GetClientConnectionMultiplexer(), CVector< Type >::GetLength(), CUser::GetSystemNotices(), m_AdminUsers, m_Log, CClientConnection::Privmsg(), and CLog::WriteLine().

Referenced by AddAdditionalListener(), CUser::AddClientConnection(), CUser::Attach(), CCore(), CreateUser(), Fatal(), LoadModule(), CIRCConnection::ParseLineArgV(), CClientConnection::ProcessBncCommand(), CUser::Reconnect(), RemoveAdditionalListener(), CUser::RemoveClientConnection(), RemoveUser(), CClientConnection::SetPeerName(), Shutdown(), StartMainLoop(), UnloadModule(), and CClientConnection::ValidateUser().

                                       {
      char *Out;
      int Ret;
      va_list marker;

      va_start(marker, Format);
      Ret = vasprintf(&Out, Format, marker);
      va_end(marker);

      CHECK_ALLOC_RESULT(Out, vasprintf) {
            return;
      } CHECK_ALLOC_RESULT_END;

      m_Log->WriteLine(NULL, "%s", Out);

      for (unsigned int i = 0; i < m_AdminUsers.GetLength(); i++) {
            CUser *User = m_AdminUsers.Get(i);

            if (User->GetSystemNotices() && User->GetClientConnectionMultiplexer() != NULL) {
                  User->GetClientConnectionMultiplexer()->Privmsg(Out);
            }
      }

      free(Out);
}


Generated by  Doxygen 1.6.0   Back to index