Opened 10 years ago

Closed 10 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 10 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 10 years ago by alloc

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

In 20:

Error: Processor CommitTicketReference failed
Unsupported version control system "svn": No module named svn

comment:2 Changed 10 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 10 years ago by behemoth

comment:3 Changed 10 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 10 years ago by behemoth

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:5 Changed 10 years ago by Alloc

Oh, yeah, thanks for the report and also submitting a patch :)

Version 0, edited 10 years ago by Alloc (next)

comment:6 Changed 10 years ago by Alloc

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