ghc: remove cabal; erc: add carp checker
This commit is contained in:
13
erc
13
erc
@@ -45,17 +45,20 @@ meta_commands["carp"] = function()
|
||||
result = handle:read("*a")
|
||||
handle:close()
|
||||
|
||||
if result.len == 0 then return end
|
||||
if result == "" then
|
||||
message("Checks passed!")
|
||||
return
|
||||
end
|
||||
if starts(result, "Invalid path") then
|
||||
message("File not yet saved to disk!")
|
||||
return
|
||||
end
|
||||
|
||||
split = result:gmatch(":")
|
||||
f, l, c, msg = string.match(result, "([^:]+):(%d+):(%d+) (.-)[\r\n].*")
|
||||
|
||||
if split[0] == file then
|
||||
move(tonumber(split[1]), tonumber(split[2]))
|
||||
message(table.concat(table.unpack(split, 3), ":"))
|
||||
if f == file then
|
||||
move(tonumber(l)-1, tonumber(c))
|
||||
message(msg)
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user