Add basic lua scripting capabilities (#4341)
The scripting capabilities is locked behind a cmake flag, and is not enabled by default. Co-authored-by: nerix <nerixdev@outlook.de> Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
Vendored
+22
@@ -0,0 +1,22 @@
|
||||
/** @noSelfInFile */
|
||||
|
||||
declare module c2 {
|
||||
enum LogLevel {
|
||||
Debug,
|
||||
Info,
|
||||
Warning,
|
||||
Critical,
|
||||
}
|
||||
class CommandContext {
|
||||
words: String[];
|
||||
channel_name: String;
|
||||
}
|
||||
|
||||
function log(level: LogLevel, ...data: any[]): void;
|
||||
function register_command(
|
||||
name: String,
|
||||
handler: (ctx: CommandContext) => void
|
||||
): boolean;
|
||||
function send_msg(channel: String, text: String): boolean;
|
||||
function system_msg(channel: String, text: String): boolean;
|
||||
}
|
||||
Reference in New Issue
Block a user