Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --DLC = Dark_Lord_Chat
- --DLA = Dark_Lord_Announcer
- restrictedPlayers = {
- osmarks = true,
- Keanu73 = true,
- }
- restricted = false
- ignoreRestricted = true
- rednet.open("top")
- function returnBanned(player)
- return restrictedPlayers[player] or false
- end
- function mainLoop()
- while true do
- _, info = rednet.receive("DLC")
- if info ~= nil then
- text = info[2]
- usr = info[1]
- if ignoreRestricted == true and usr == "osmarks" then
- restricted = true
- else
- restricted = false
- end
- chat_string = string.sub(text, 1, (-string.len(text)) + 1)
- command = string.sub(text, 3)
- if gollark == false and chat_string == "+ " then
- if command == "support" then
- rednet.broadcast("support is on the way.", "DLA")
- elseif command == "help" then
- rednet.broadcast("help is on the way.", "DLA")
- elseif command == "ignoreGollark" then
- ignoreGollarkArgs = string.sub(chat_string, (string.len(chat_string)-7))
- if ignoreGollarkArgs == "off" then
- ignoreGollark = false
- elseif
- ignoreGollarkArgs == "on" then
- ignoreGollark = true
- end
- end
- elseif gollark == true and ignoreGollark == false and chat_string == "+ " then
- if command == "support" then
- rednet.broadcast("support is on the way.", "DLA")
- elseif command == "help" then
- rednet.broadcast("help is on the way.", "DLA")
- elseif command == "ignoreGollark" then
- ignoreGollarkArgs = string.sub(chat_string, (string.len(chat_string)-7))
- if ignoreGollarkArgs == "disable" then
- ignoreGollark = false
- rednet.broadcast("Ignore gollark is now Disabled","DLA")
- elseif ignoreGollarkArgs == "enable" then
- ignoreGollark = true
- rednet.broadcast("Ignore gollark is now Enabled","DLA")
- end
- end
- elseif gollark == true and ignoreGollark == true and chat_string == "+ " then
- rednet.broadcast("The Dark Lord will not allow me to process your request gollark", "DLA")
- end
- end
- end
- end
- parallel.waitForAll(mainLoop)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement