diff --git a/c4mate b/c4mate index 7a84755..7c746f7 100755 --- a/c4mate +++ b/c4mate @@ -136,8 +136,7 @@ sed -n ' T fail b :fail - q 1 -']=], self.CURL_FLAGS, self.HOST, url_encode(self.USER), datefile)) + q 1 ']=], self.CURL_FLAGS, self.HOST, url_encode(self.USER), datefile)) while true do local entry = {} @@ -242,8 +241,7 @@ sed -n --sandbox ' T fail b :fail - q 1 -']=], self.CURL_FLAGS, self.HOST)) + q 1 ']=], self.CURL_FLAGS, self.HOST)) while true do local item = {} @@ -311,10 +309,11 @@ Add or subtract credits: c4mate Give credits: c4mate -g []]=]) - return + os.exit(0) +end --- Parse -u flag. -elseif arg[1] == "-u" then +-- Parse -u flag (which may be given multiple times). +while arg[1] == "-u" do table.remove(arg, 1) USER = arg[1] table.remove(arg, 1)