Opened 4 years ago

Closed 3 years ago

#11 closed enhancement (fixed)

Event hooks

Reported by: Alloc Owned by: alloc
Priority: minor Component: Scripts
Keywords: Cc:

Description

Add support for event hooks. E.g. monitor output in output_log.txt and if there's a new line about a new player check if there are scripts in a hook folder called e.g. "player_connect" and if so call it with params (instance name, player name).

Could be used for stuff like greeting joined players or whatever.

Attachments (1)

startstop.patch (1014 bytes) - added by behemoth 3 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 4 years ago by alloc

  • Owner set to alloc
  • Resolution set to fixed
  • Status changed from new to closed

In 20:

Version 5. Fixes #9, #11

comment:2 Changed 4 years ago by Alloc

Currently existing hooks:

  • playerConnect <instance> <player id> <entity id> <steamid> <nickname>
  • playerDisconnect <instance> <player id> <entity id> <steamid> <nickname>
  • serverPreStart <instance>
  • serverPostStart <instance>
  • serverPreStop <instance>
  • serverPostStop <instance>

Changed 3 years ago by behemoth

comment:3 Changed 3 years ago by behemoth

  • Component set to Scripts

There are a few Mistakes in start.sh and stop.sh
Look at startstop.patch

comment:4 Changed 3 years ago by behemoth

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:5 Changed 3 years ago by Alloc

Oh, yeah, thanks for the report and also submitting a patch :)
(Fixed, going to be in the next release)

Last edited 3 years ago by Alloc (previous) (diff)

comment:6 Changed 3 years ago by Alloc

  • Resolution set to fixed
  • Status changed from reopened to closed
Note: See TracTickets for help on using tickets.