2024-02-29 08:51:00 +00:00
|
|
|
local NAME = "hello"
|
|
|
|
local VERSION = "v0.5"
|
|
|
|
local AUTHOR = "Aaron Blakely"
|
|
|
|
local DESCRIPTION = "A simple hello world script for xbot"
|
2024-02-27 08:37:29 +00:00
|
|
|
|
2024-02-29 08:51:00 +00:00
|
|
|
function test(nick, host, chan, text)
|
|
|
|
-- check if text contains "hello"
|
2024-02-27 08:37:29 +00:00
|
|
|
|
2024-02-29 08:51:00 +00:00
|
|
|
|
|
|
|
if string.find(text, "hello") then
|
|
|
|
privmsg(chan, "Hello, " .. nick .. " from test.lua!!!")
|
|
|
|
end
|
2024-02-27 08:37:29 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
function load()
|
|
|
|
-- register_script(NAME, VERSION, AUTHOR, DESCRIPTION)
|
|
|
|
|
2024-02-29 08:51:00 +00:00
|
|
|
add_handler(PRIVMSG_CHAN, test)
|
2024-02-27 08:37:29 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
function unload()
|
2024-02-29 08:51:00 +00:00
|
|
|
-- unregister_script(NAME)
|
|
|
|
|
|
|
|
del_handler(PRIVMSG_CHAN, test)
|
2024-02-27 08:37:29 +00:00
|
|
|
end
|