script

package
v0.0.0-...-dd27f12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 29, 2015 License: Zlib Imports: 12 Imported by: 0

Documentation

Overview

Package script is for the resuable lua scripting engine that Tetra uses.

Index

Constants

View Source
const (
	INV_COMMAND = 0x0001
	INV_NAMHOOK = 0x0002
	INV_PROHOOK = 0x0004
)

The different kinds of invocations that can be called upon.

Variables

This section is empty.

Functions

This section is empty.

Types

type Invocation

type Invocation struct {
	Kind     int
	Args     []interface{}
	Reply    chan string
	Function *luar.LuaObject
	Line     *r1459.RawLine
}

Struct Invocation represents an event from Go->Lua.

type Script

type Script struct {
	Name    string
	L       *lua.State
	Log     *log.Logger
	Service string
	Uuid    string
	Kind    string
}

Struct Script implements a Lua scripting interface to Tetra.

func NewScript

func NewScript(name string) (script *Script, err error)

LoadScript finds and loads the appropriate script by a given short name (tetra/die).

func (*Script) Unload

func (s *Script) Unload(name string) error

Unload a script and delete its commands and handlers

Directories

Path Synopsis
Package charybdis contains wrapped functions taken directly from the charybdis source tree.
Package charybdis contains wrapped functions taken directly from the charybdis source tree.
Package crypto is for cryptographic or similar kinds of functions.
Package crypto is for cryptographic or similar kinds of functions.
Package strings contains Tetra's string manipulation functions that are exposed to lua scripts.
Package strings contains Tetra's string manipulation functions that are exposed to lua scripts.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL