2014-04-26 09:18:56 +00:00
package System
2014-10-19 17:19:11 +00:00
import (
"github.com/SommerEngineering/Ocean/ICCC"
2014-11-07 09:46:33 +00:00
"github.com/SommerEngineering/Ocean/ICCC/SystemMessages"
2014-10-19 17:19:11 +00:00
"github.com/SommerEngineering/Ocean/Log"
LM "github.com/SommerEngineering/Ocean/Log/Meta"
)
2014-04-26 09:18:56 +00:00
2015-06-17 15:44:52 +00:00
// The receiver function for the ICCC message, that a server is up and running.
2014-04-26 09:18:56 +00:00
func icccSystemStart ( data map [ string ] [ ] string ) {
2015-06-17 15:44:52 +00:00
// Converts the HTTP form data into an object:
2014-11-07 09:46:33 +00:00
_ , _ , obj := ICCC . Data2Message ( & SystemMessages . ICCCStartUpMessage { } , data )
2015-06-17 15:44:52 +00:00
// Cast the object to the right type:
2014-11-07 09:46:33 +00:00
messageData := obj . ( * SystemMessages . ICCCStartUpMessage )
2015-06-17 15:44:52 +00:00
// Provide a log entry:
2014-11-07 09:46:33 +00:00
Log . LogShort ( senderName , LM . CategorySYSTEM , LM . LevelINFO , LM . MessageNameSTARTUP , ` ICCC message: The server is now up and ready. ` , messageData . PublicIPAddressAndPort , messageData . AdminIPAddressAndPort )
2014-04-26 09:18:56 +00:00
}