Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function error(reason, blacklist?)
- --[[ error messages
- 1 - Generic Internal Error
- 2 - Incorrect Computer ID (how idk)
- 3 - Incorrect IP Address (how idk)
- 4 - Incorrect Password
- 404 - I Don't Know What Happened
- ]]
- if reason == 1 then
- errorReason = "Generic Internal Error"
- rednet.broadcast(errorReason, serverIp)
- print(errorReason)
- elseif reason == 2 then
- if blacklist? == true then
- print("wat")
- errorReason = "Incorrect Computer ID. The client ".. clientIP .." with ID ".. clientID .." has been blacklisted"
- rednet.broadcast(errorReason, serverIp)
- print(errorReason)
- else
- errorReason = "Incorrect Computer ID."
- rednet.broadcast(errorReason, serverIp")
- print(errorReason)
- end
- elseif reason == 3 then
- if blacklist? == true then
- print("wat")
- errorReason = "Incorrect Computer IP Address. The client ".. clientIP .." with ID ".. clientID .." has been blacklisted"
- rednet.broadcast(errorReason, serverIp)
- print(errorReason)
- else
- errorReason = "Incorrect Computer IP."
- rednet.broadcast(errorReason, serverIp")
- print(errorReason)
- end
- elseif reason == 4 then
- if blacklist? == true then
- print("wat")
- errorReason = "Incorrect Password. The client ".. clientIP .." with ID ".. clientID .." has been blacklisted"
- rednet.broadcast(errorReason, serverIp)
- print(errorReason)
- else
- errorReason = "Incorrect Password."
- rednet.broadcast(errorReason, serverIp")
- print(errorReason)
- end
- else
- errorReason = "I just don't know what happened."
- rednet.broadcast(errorReason, serverIp")
- print(errorReason)
- end
- end
- end
- end
- end
- end
- --why does it need 4 extra ends...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement