SHOW:
|
|
- or go back to the newest paste.
1 | - | if fs.exists("password") then |
1 | + | --DLC = Dark_Lord_Chat |
2 | - | f = fs.open("password", "r") |
2 | + | --DLA = Dark_Lord_Announcer |
3 | - | password = f.readAll() |
3 | + | |
4 | - | else |
4 | + | restrictedPlayers = { |
5 | - | error("Please create a file named 'password' and put your password in it.", 0) |
5 | + | osmarks = true, |
6 | Keanu73 = true, | |
7 | } | |
8 | - | energyEnabled = true |
8 | + | |
9 | restricted = false | |
10 | - | local version = 0.6 |
10 | + | ignoreRestricted = true |
11 | - | local send = 121 |
11 | + | |
12 | - | local receive = 119 |
12 | + | rednet.open("top") |
13 | ||
14 | - | os.pullEvent = os.pullEventRaw |
14 | + | function returnBanned(player) |
15 | return restrictedPlayers[player] or false | |
16 | - | bannedPlayers = { |
16 | + | |
17 | - | osmarks = true, |
17 | + | |
18 | - | Keanu73 = true, |
18 | + | |
19 | while true do | |
20 | _, info = rednet.receive("DLC") | |
21 | - | cmd = {} |
21 | + | |
22 | - | modem = peripheral.find("modem") |
22 | + | |
23 | - | modem.open(receive) |
23 | + | |
24 | - | file = fs.open("chatlog", fs.exists("chatlog") and "a" or "w") |
24 | + | |
25 | ||
26 | - | function say(text) |
26 | + | if ignoreRestricted == true and usr == "osmarks" then |
27 | - | modem.transmit(send, receive, text) |
27 | + | restricted = true |
28 | else | |
29 | restricted = false | |
30 | - | function pass() |
30 | + | |
31 | - | local event, p1 = os.pullEvent("key") |
31 | + | |
32 | - | if p1 == 25 then |
32 | + | |
33 | - | sleep(0.1) |
33 | + | command = string.sub(text, 3) |
34 | - | print("Please Enter Password:") |
34 | + | |
35 | - | input = read("*") |
35 | + | if gollark == false and chat_string == "+ " then |
36 | - | if password == input then |
36 | + | if command == "support" then |
37 | - | error("Correct Password", 0) |
37 | + | rednet.broadcast("support is on the way.", "DLA") |
38 | - | else |
38 | + | elseif command == "help" then |
39 | - | os.reboot() |
39 | + | rednet.broadcast("help is on the way.", "DLA") |
40 | elseif command == "ignoreGollark" then | |
41 | ignoreGollarkArgs = string.sub(chat_string, (string.len(chat_string)-7)) | |
42 | if ignoreGollarkArgs == "off" then | |
43 | ignoreGollark = false | |
44 | - | cmds = { "help", "update", "games", "changelog", "download", "energy" } |
44 | + | elseif |
45 | ignoreGollarkArgs == "on" then | |
46 | - | cmdFunc = { |
46 | + | ignoreGollark = true |
47 | - | help = function() |
47 | + | |
48 | - | say("Here is all of our commands currently:") |
48 | + | |
49 | - | say("+ update - Updates all of our systems to the latest pastebin") |
49 | + | elseif gollark == true and ignoreGollark == false and chat_string == "+ " then |
50 | - | say("+ games - Shows a list of all the current games on the DLA network and how to install them") |
50 | + | if command == "support" then |
51 | - | say("+ changelog - shows the changelog and current version of DLA") |
51 | + | rednet.broadcast("support is on the way.", "DLA") |
52 | - | say("+ download - downloads the programs you want") |
52 | + | elseif command == "help" then |
53 | - | say("+ energy - If enabled, tells you the current level of energy in your energy cells") |
53 | + | rednet.broadcast("help is on the way.", "DLA") |
54 | - | end, |
54 | + | elseif command == "ignoreGollark" then |
55 | ignoreGollarkArgs = string.sub(chat_string, (string.len(chat_string)-7)) | |
56 | - | update = function() |
56 | + | if ignoreGollarkArgs == "disable" then |
57 | - | say("updated") |
57 | + | ignoreGollark = false |
58 | - | say("update") |
58 | + | rednet.broadcast("Ignore gollark is now Disabled","DLA") |
59 | - | os.reboot() |
59 | + | elseif ignoreGollarkArgs == "enable" then |
60 | - | end, |
60 | + | ignoreGollark = true |
61 | rednet.broadcast("Ignore gollark is now Enabled","DLA") | |
62 | - | games = function() |
62 | + | |
63 | - | say("Here is our current list of games:") |
63 | + | |
64 | - | say("") |
64 | + | elseif gollark == true and ignoreGollark == true and chat_string == "+ " then |
65 | - | say("Minesweeper by GopherAtl") |
65 | + | rednet.broadcast("The Dark Lord will not allow me to process your request gollark", "DLA") |
66 | - | say("Stacker by KingofGamesYami") |
66 | + | |
67 | - | say("BBTetris by BombBloke") |
67 | + | |
68 | - | say("CCOthello by KingofGamesYami") |
68 | + | |
69 | - | say("KnightsTour by RoD") |
69 | + | |
70 | - | say("SnakeMaze by nitrogenfingers") |
70 | + | |
71 | - | say("MiniatureCraft by Detective_Smith") |
71 | + | parallel.waitForAll(mainLoop) |