save christmas
This commit is contained in:
parent
1f74e4e3d2
commit
d7b47df5c4
|
@ -2,4 +2,10 @@ FROM xena/lua:5.3
|
||||||
WORKDIR /ketracel
|
WORKDIR /ketracel
|
||||||
COPY . .
|
COPY . .
|
||||||
ENV PATH $PATH:/root/.luarocks/bin
|
ENV PATH $PATH:/root/.luarocks/bin
|
||||||
RUN ./scripts/build_docker.sh
|
RUN apk --no-cache add ngircd \
|
||||||
|
&& luarocks-5.3 install --local moonscript \
|
||||||
|
&& luarocks-5.3 install --local busted \
|
||||||
|
&& luarocks-5.3 install --local --only-deps ./ketracel*.rockspec \
|
||||||
|
&& ./scripts/test.sh \
|
||||||
|
&& ./scripts/build_docker.sh \
|
||||||
|
&& apk del ngircd
|
||||||
|
|
|
@ -2,4 +2,4 @@
|
||||||
|
|
||||||
export LUA_PATH='/root/.luarocks/share/lua/5.3/?.lua;/root/.luarocks/share/lua/5.3/?/init.lua'
|
export LUA_PATH='/root/.luarocks/share/lua/5.3/?.lua;/root/.luarocks/share/lua/5.3/?/init.lua'
|
||||||
export LUA_CPATH='/root/.luarocks/lib/lua/5.3/?.so'
|
export LUA_CPATH='/root/.luarocks/lib/lua/5.3/?.so'
|
||||||
lua5.3 -l ketracel
|
lua5.3 -l ketracel.main
|
||||||
|
|
|
@ -17,15 +17,17 @@ dependencies = {
|
||||||
"irc-engine",
|
"irc-engine",
|
||||||
"luasocket",
|
"luasocket",
|
||||||
"ln",
|
"ln",
|
||||||
|
"uuid",
|
||||||
}
|
}
|
||||||
build = {
|
build = {
|
||||||
type = "builtin",
|
type = "builtin",
|
||||||
modules = {
|
modules = {
|
||||||
["ketracel.bot.commands"] = "src/ketracel/bot/commands.lua",
|
["ketracel.bots.commands"] = "src/ketracel/bots/commands.lua",
|
||||||
["ketracel.bot.ketracel"] = "src/ketracel/bot/ketracel.lua",
|
["ketracel.bots.ketracel"] = "src/ketracel/bots/ketracel.lua",
|
||||||
["ketracel.main"] = "src/ketracel/main.lua",
|
["ketracel.main"] = "src/ketracel/main.lua",
|
||||||
["ketracel.server"] = "src/ketracel/server.lua",
|
["ketracel.server"] = "src/ketracel/server.lua",
|
||||||
["irce.modules.ngircd"] = "src/irce/modules/ngircd/init.lua",
|
["irce.modules.ngircd"] = "src/irce/modules/ngircd/init.lua",
|
||||||
|
["irce.modules.ngircd.channel"] = "src/irce/modules/ngircd/channel.lua",
|
||||||
["irce.modules.ngircd.modes"] = "src/irce/modules/ngircd/modes.lua",
|
["irce.modules.ngircd.modes"] = "src/irce/modules/ngircd/modes.lua",
|
||||||
["irce.modules.oper"] = "src/irce/modules/oper.lua",
|
["irce.modules.oper"] = "src/irce/modules/oper.lua",
|
||||||
},
|
},
|
||||||
|
|
|
@ -2,4 +2,4 @@
|
||||||
|
|
||||||
tup
|
tup
|
||||||
cd src
|
cd src
|
||||||
godotenv -f ../.env lua5.3 -l set_paths ketracel.lua
|
godotenv -f ../.env lua5.3 -l set_paths ./ketracel/main.lua
|
||||||
|
|
|
@ -48,6 +48,16 @@ modeconv = require "irce.modules.ngircd.modes"
|
||||||
:nick, :user, :host, modes: string.sub(modes, 2), :real, metadata: {}
|
:nick, :user, :host, modes: string.sub(modes, 2), :real, metadata: {}
|
||||||
string.format ":%s NICK %s 1 %s %s 1 %s :%s", state.sname, nick, user, host, modes, real
|
string.format ":%s NICK %s 1 %s %s 1 %s :%s", state.sname, nick, user, host, modes, real
|
||||||
|
|
||||||
|
["CHANINFO"]: (state, channame) =>
|
||||||
|
if state.channels[channame] == nil
|
||||||
|
state.channels[channame] =
|
||||||
|
name: channame
|
||||||
|
mode: "tn"
|
||||||
|
topic: ""
|
||||||
|
members: {}
|
||||||
|
|
||||||
|
string.format ":%s CHANINFO %s +tn", state.sname, channame
|
||||||
|
|
||||||
["NJOIN"]: (state, channame, who, prefix) =>
|
["NJOIN"]: (state, channame, who, prefix) =>
|
||||||
if state.channels[channame] == nil
|
if state.channels[channame] == nil
|
||||||
state.channels[channame] =
|
state.channels[channame] =
|
||||||
|
@ -191,7 +201,7 @@ modeconv = require "irce.modules.ngircd.modes"
|
||||||
pfxarr = {}
|
pfxarr = {}
|
||||||
|
|
||||||
for i = 1, #prefix
|
for i = 1, #prefix
|
||||||
pfxarr[i] = modes.convert string.sub prefix, i, i
|
pfxarr[i] = modeconv.convert string.sub prefix, i, i
|
||||||
|
|
||||||
state.channels[chan].members[nick] = pfxarr
|
state.channels[chan].members[nick] = pfxarr
|
||||||
|
|
||||||
|
|
|
@ -16,8 +16,7 @@ class Ketracel
|
||||||
@router = router
|
@router = router
|
||||||
|
|
||||||
burst: =>
|
burst: =>
|
||||||
@irc\NICK "Ketracel", "white", "the.dominion", "+io", "Ketracel White"
|
@irc\NICK @name, "white", "the.dominion", "+io", "Ketracel White"
|
||||||
@irc\NJOIN "#ketracel", "Ketracel", "&@"
|
|
||||||
|
|
||||||
njoin: (chan) =>
|
njoin: (chan) =>
|
||||||
@irc\NJOIN chan, "Ketracel"
|
@irc\NJOIN chan, "Ketracel"
|
||||||
|
|
Loading…
Reference in New Issue