src/modules/ipc.cpp
/**
   * Map received message hook to the ones
   * configured from the user config and
   * execute its command
   */
Map received message hook to the ones
configured from the user config and
execute its command
Map received message hook to the ones configured from the user config and execute its command
void ipc_module::on_message(const string& message) {
    for (size_t i = 0; i < m_hooks.size(); i++) {
      const auto& hook = m_hooks[i];
      if (hook->payload == message) {
        m_log.info("%s: Found matching hook (%s)", name(), hook->payload);
        m_current_hook = i;
        this->exec_hook();
        break;
      }
    }
  }
void ipc_module :: on_message ( const string & message ) { for ( size_t i = 0 ; i < m_hooks . size ( ) ; i ++ ) { const auto & hook = m_hooks [ i ] ; if ( hook -> payload == message ) { m_log . info ( " " , name ( ) , hook -> payload ) ; m_current_hook = i ; this -> exec_hook ( ) ; break ; } } }
Map received message hook to the ones
 configured from the user config and
 execute its command
Map received message hook to the ones configured from the user config and execute its command