Opened 11 years ago

Closed 10 years ago

#11 closed enhancement (fixed)

Event hooks

Reported by: Christian Illy 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 10 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 by alloc, 11 years ago

Owner: set to alloc
Resolution: fixed
Status: newclosed

In 20:

Version 5. Fixes #9, #11

comment:2 by Christian Illy, 11 years ago

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>

by behemoth, 10 years ago

Attachment: startstop.patch added

comment:3 by behemoth, 10 years ago

Component: Scripts

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

comment:4 by behemoth, 10 years ago

Resolution: fixed
Status: closedreopened

comment:5 by Christian Illy, 10 years ago

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

Last edited 10 years ago by Christian Illy (previous) (diff)

comment:6 by Christian Illy, 10 years ago

Resolution: fixed
Status: reopenedclosed
Note: See TracTickets for help on using tickets.