feat(protbot): add headless MHF protocol bot as cmd/protbot

Copy MHBridge into the Erupe module as cmd/protbot/ so it can be
built, tested, and maintained alongside the server. The bot
implements the full sign → entrance → channel login flow and
supports lobby entry, chat, session setup, and quest enumeration.

The conn/ package keeps its own Blowfish crypto primitives to avoid
importing erupe-ce/config (which requires a config file at init).
This commit is contained in:
Houmgaor
2026-02-20 02:49:23 +01:00
parent 754b5a3bff
commit 0e84377e21
19 changed files with 2106 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
package scenario
import (
"fmt"
"erupe-ce/cmd/protbot/protocol"
)
// Logout sends MSG_SYS_LOGOUT and closes the channel connection.
func Logout(ch *protocol.ChannelConn) error {
fmt.Println("[logout] Sending MSG_SYS_LOGOUT...")
if err := ch.SendPacket(protocol.BuildLogoutPacket()); err != nil {
ch.Close()
return fmt.Errorf("logout send: %w", err)
}
return ch.Close()
}