function url_grabber(body, muc, nick, message) local url = body:match("http://.%S+") print("Looking for URL") print(url) if url then print ("found") local http = require("socket.http") http.TIMEOUT = 5 --r, c, h = http.request({method = "HEAD", url = url}) --clen = tonumber(h["content-length"]) --if clen and clen > 0 and clen < 1024 * 1024 then b, c, h = http.request(url) local subjectish = b:match("