Implement secure team builder with PIN verification system
🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
3098be7f36
commit
9cf2231a03
6 changed files with 476 additions and 16 deletions
|
|
@ -10,7 +10,7 @@ sys.path.append(os.path.dirname(os.path.abspath(__file__)))
|
|||
|
||||
from src.database import Database
|
||||
from src.game_engine import GameEngine
|
||||
from modules import CoreCommands, Exploration, BattleSystem, PetManagement, Achievements, Admin, Inventory, GymBattles
|
||||
from modules import CoreCommands, Exploration, BattleSystem, PetManagement, Achievements, Admin, Inventory, GymBattles, TeamBuilder
|
||||
from webserver import PetBotWebServer
|
||||
|
||||
class PetBotDebug:
|
||||
|
|
@ -71,7 +71,8 @@ class PetBotDebug:
|
|||
Achievements,
|
||||
Admin,
|
||||
Inventory,
|
||||
GymBattles
|
||||
GymBattles,
|
||||
TeamBuilder
|
||||
]
|
||||
|
||||
self.modules = {}
|
||||
|
|
@ -263,12 +264,25 @@ class PetBotDebug:
|
|||
self.send(f"PRIVMSG {target} :{message}")
|
||||
time.sleep(0.5)
|
||||
|
||||
async def send_team_builder_pin(self, nickname, pin_code):
|
||||
"""Send team builder PIN via private message"""
|
||||
if hasattr(self.modules.get('TeamBuilder'), 'send_team_builder_pin'):
|
||||
await self.modules['TeamBuilder'].send_team_builder_pin(nickname, pin_code)
|
||||
else:
|
||||
# Fallback direct PM
|
||||
message = f"🔐 Team Builder PIN: {pin_code} (expires in 10 minutes)"
|
||||
self.send_message(nickname, message)
|
||||
|
||||
def run_async_command(self, coro):
|
||||
return self.loop.run_until_complete(coro)
|
||||
|
||||
if __name__ == "__main__":
|
||||
print("🐾 Starting Pet Bot for IRC (Debug Mode)...")
|
||||
bot = PetBotDebug()
|
||||
|
||||
# Make bot instance globally accessible for webserver
|
||||
import sys
|
||||
sys.modules[__name__].bot_instance = bot
|
||||
try:
|
||||
bot.connect()
|
||||
except KeyboardInterrupt:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue