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

RESULT< bool > CCore::RemoveHostAllow ( const char *  Mask,
bool  UpdateConfig = true 
)

RemoveHostAllow

Removes an item from the host allow list.

Parameters:
Mask the mask
UpdateConfig whether to update the config files

Definition at line 2071 of file Core.cpp.

References CVector< Type >::GetLength(), m_HostAllows, CVector< Type >::Remove(), and UpdateHosts().

Referenced by CClientConnection::ProcessBncCommand().

                                                                       {
      for (int i = m_HostAllows.GetLength() - 1; i >= 0; i--) {
            if (strcasecmp(m_HostAllows[i], Mask) == 0) {
                  free(m_HostAllows[i]);
                  m_HostAllows.Remove(i);

                  if (UpdateConfig) {
                        UpdateHosts();
                  }

                  RETURN(bool, true);
            }
      }

      THROW(bool, Generic_Unknown, "Host was not found.");
}


Generated by  Doxygen 1.6.0   Back to index