Advertisement
1lann

Firewolf Chat Demo server_api

Aug 10th, 2014
319
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.32 KB | None | 0 0
  1. local chatLog = {}
  2. for i = 1, 17 do
  3.     table.insert(chatLog, "")
  4. end
  5.  
  6. server.handleRequest("chat", function(page, vars)
  7.     if page:match("^[^%?]+") == "chat" then
  8.         if vars and vars.message then
  9.             table.insert(chatLog, vars.message)
  10.             table.remove(chatLog, 1)
  11.         end
  12.         return textutils.serialize(chatLog)
  13.     end
  14. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement