-------/------------------------------------------------------------------------------------------------------------------------- -- Release or Request bot v1.0 by jiten (5/19/2005) -- For PtokaX 0.3.3.0 build 17.02 or Higher -------/------------------------------------------------------------------------------------------------------------------------- Settings = { sBot = frmHub:GetHubBotName(),-- Default Bot Name or -- sBot = "custombot" sFolder = "Releases",-- Folder where the Release/Request database is stored regBot = 1,-- 1 = Register Bot Name automatically, 0 = erm... Release = 1,-- 1 = Act as Release Bot, 0 = Act as Request Bot autoClean = 1,-- 1 = Auto clean Releases/Requests older than iClean, 0 = not iClean = 1,-- Maximum time for releases to be stored (in days) iMax = 30,-- Maximum releases/requests to be shown fRelease = "Release.tbl",-- File where the Releases are stored AllowedProfile = { [2] = 0, [3] = 0, [-1] = 0, },-- Other Profiles allowed to use bot commands (apart from OPs) -- 1 = yes; 0 = no tPrefixes = {}, } Releases = {} -------/------------------------------------------------------------------------------------------------------------------------- Main = function() if regBot == 1 then frmHub:RegBot(Settings.sBot) end if not loadfile(Settings.sFolder.."/"..Settings.fRelease) then os.execute("mkdir "..Settings.sFolder) end if loadfile(Settings.sFolder.."/"..Settings.fRelease) then dofile(Settings.sFolder.."/"..Settings.fRelease) end for a,b in pairs(frmHub:GetPrefixes()) do Settings.tPrefixes[b] = 1 end if Settings.Release == 1 then Mode = "Release" else Mode = "Request" end SetTimer(1000*60*60*12) StartTimer() end
ChatArrival = function(sUser,sData) local sData = string.sub(sData,1,-2) local s,e,sPrefix,cmd = string.find(sData,"%b<>%s*(%S)(%S+)") if sPrefix and Settings.tPrefixes[sPrefix] then local tCmds = { ["add"] =function(user,data) local s,e,rel,desc = string.find(data,"%b<>%s+%S+%s+(%S+)%s+(%S+)") if rel == nil or desc == nil then user:SendData(Settings.sBot,"*** Error: Type !add <"..Mode.."> ") elseif (string.len(rel) > 26) then user:SendData(Settings.sBot,"*** Error: The "..Mode.." Name can't have more than 26 characters.") elseif (string.len(desc) > 41) then user:SendData(Settings.sBot,"*** Error: The Description can't have more than 41 characters.") else table.insert( Releases, { user.sName, rel, desc, os.date(),} ) SaveToFile(Settings.sFolder.."/"..Settings.fRelease,Releases,"Releases") SendToAll(Settings.sBot, user.sName.." added a new "..Mode..": "..rel..". For more details type: !show") end end, ["del"] =function(user,data) local s,e,i = string.find(data,"%b<>%s+%S+%s+(%S+)") if i then if Releases[tonumber(i)] then table.remove(Releases,i) SaveToFile(Settings.sFolder.."/"..Settings.fRelease,Releases,"Releases") user:SendData(Settings.sBot,Mode.." "..i..". was deleted succesfully!") else user:SendData(Settings.sBot,"*** Error: There is no "..Mode.." "..i..".") end else user:SendData(Settings.sBot,"*** Error: Type !add <"..Mode.."> ") end end, ["show"] =function(user,data) local s,e,begin,stop = string.find(data,"%b<>%s+%S+%s+(.+)%-(.*)") if begin == nil or stop == nil then msg = ShowReleases(table.getn(Releases), table.getn(Releases) - Settings.iMax + 1, -1, 1, false, false,"\t\t\t\t\t\t\t\tLast "..Settings.iMax.." "..Mode.."s\r\n") user:SendPM(Settings.sBot,msg) else msg = ShowReleases(begin, stop, 1, 1, false, false, "\t\t\t\t\t\t\tShowing "..begin.."-"..stop.." of "..table.getn(Releases).." "..Mode.."s\r\n") user:SendPM(Settings.sBot,msg) end end, ["find"] =function(user,data) local s,e,cat,str = string.find(data,"%b<>%s+%S+%s+(%S+)%s+(%S+)") if cat and str then user:SendPM(Settings.sBot,ShowReleases(1, table.getn(Releases), 1, 2, cat, str, "\t\t\t\t\t\t\tSearch Results of: "..cat.." "..str.."\r\n")) else user:SendData(Settings.sBot,"*** Error: Type !find \r\n\t\t Category can be: date, poster, release or description") end end, ["clear"] = function(user,data) Releases = nil Releases = {} SaveToFile(Settings.sFolder.."/"..Settings.fRelease,Releases,"Releases") user:SendData(Settings.sBot,"All "..Mode.."s have been deleted successfully") end, } if tCmds[cmd] then if Settings.AllowedProfile[sUser.iProfile] == 1 or sUser.bOperator then return tCmds[cmd](sUser,sData), 1 else return sUser:SendData(Settings.sBot,"*** Error: You are not authorized to use this command."), 1 end end end end
ToArrival = ChatArrival
OnTimer = function() if (Settings.autoClean == 1) then -- RegCleaner based local juliannow = jdate(tonumber(os.date("%d")), tonumber(os.date("%m")), tonumber(os.date("%Y"))) local oldest, chkd, clnd, x = Settings.iClean, 0, 0, os.clock() for i = 1, table.getn(Releases) do chkd = chkd + 1 local s, e, month, day, year = string.find(Releases[i][4], "(%d+)%/(%d+)%/(%d+)"); local julian = jdate( tonumber(day), tonumber(month), tonumber("20"..year) ) if ((juliannow - julian) > oldest) then clnd = clnd + 1 Releases[i] = nil SaveToFile(Settings.sFolder.."/"..Settings.fRelease,Releases,"Releases") end; end if clnd ~= 0 then SendToAll(Settings.sBot,chkd.." "..Mode.."s were processed; "..clnd.." were deleted ( "..string.format("%0.2f",((clnd*100)/chkd)).."% ) in: "..string.format("%0.4f", os.clock()-x ).." seconds.") end end end
ShowReleases = function(a,z,x,mode,sCat,str,eMsg) local msg, border = "\r\n",string.rep("-", 250) msg = msg.."\t"..border.."\r\n"..eMsg.."\t"..string.rep("-- --",50).."\r\n\t\tNr.\tDate - Time\t\tPoster\t\t\t"..Mode.." - Description\r\n" msg = msg.."\t"..string.rep("-- --",50).."\r\n" for i = a, z, x do if Releases[i] then if tonumber(string.len(Releases[i][1])) < 8 then sTmp = "\t\t\t" elseif tonumber(string.len(Releases[i][1])) < 16 then sTmp = "\t\t" else sTmp = "\t" end if mode == 1 then msg = msg.."\t\t"..i..".\t"..Releases[i][4].."\t\t"..Releases[i][1]..sTmp..Releases[i][2].." - "..Releases[i][3].."\r\n" else if sCat == string.lower("poster") then where = Releases[i][1] elseif sCat == string.lower("release") or string.lower("request") then where = Releases[i][2] elseif sCat == string.lower("description") then where = Releases[i][3] elseif sCat == string.lower("date") then where = Releases[i][4] end if string.find(where,str) then msg = msg.."\t\t"..i..".\t"..Releases[i][4].."\t\t"..Releases[i][1]..sTmp..Releases[i][2].." - "..Releases[i][3].."\r\n" end end end end msg = msg.."\t"..border.."\r\n" return msg end
jdate = function(d, m, y) local a, b, c = 0, 0, 0 if m <= 2 then y = y - 1; m = m + 12; end if (y*10000 + m*100 + d) >= 15821015 then a = math.floor(y/100); b = 2 - a + math.floor(a/4) end if y <= 0 then c = 0.75 end return math.floor(365.25*y - c) + math.floor(30.6001*(m+1) + d + 1720994 + b) end
Serialize = function(tTable,sTableName,hFile,sTab) sTab = sTab or ""; hFile:write(sTab..sTableName.." = {\n"); for key,value in tTable do if (type(value) ~= "function") then local sKey = (type(key) == "string") and string.format("[%q]",key) or string.format("[%d]",key); if(type(value) == "table") then Serialize(value,sKey,hFile,sTab.."\t"); else local sValue = (type(value) == "string") and string.format("%q",value) or tostring(value); hFile:write(sTab.."\t"..sKey.." = "..sValue); end hFile:write(",\n"); end end hFile:write(sTab.."}"); end
SaveToFile = function(file,table,tablename) local hFile = io.open(file,"w+") Serialize(table,tablename,hFile); hFile:close() end ---------------------------------------------------------------------------------------------------------------------------------
Title:
Post by: Star on 19 May, 2005, 15:32:21
Nice. Tnx jiten
//Star
Title:
Post by: jiten on 19 May, 2005, 20:39:00
QuoteOriginally posted by Star Nice. Tnx jiten
//Star
You're welcome. Btw, every request and comment is welcome. Just need more free time to fill them all ;)
QuoteDid u forget to add the Prefixes for the commands?
Nope, I'm using the ones you chose in PtokaX - Options tab.
QuoteError msg (can't add more then 100 characters) I only added 40 characters. =)
It will be optimized.
QuoteCan u add Description in a separate column?
The releases and descriptions' size are variable and when using the show command they may not appear with the correct tabbing. But, I'll think about it.
QuoteAdd a Link column (and settings if request the link or not in the !add command) Change the !clear command to !delall (!clear not work if use RC) i can change it but maybe others can't. And now one last thing users/reg cant use !show etc... But if i set users/reg = 1, then they can use !del to. So separate profile handeling. Add a command to set self cleaner function on/off (OP only)
Sure.
QuoteTurn the list to 1,2,3... etc. (Now it's ...3,2,1)
This is because the releases/request are shown from the most recent to the oldest.
QuoteThe del function: add so i can write !del aswell. (Not only !del )
Well, can't do it. The way it is now it's the most simple and efficient one :D
QuoteAdd a +reqdone function so users can use it, and a notice in main shows. e.g. got
Can you explain this better?
Best regards
Title:
Post by: Star on 19 May, 2005, 23:37:37
Quote
QuoteDid u forget to add the Prefixes for the commands?
Nope, I'm using the ones you chose in PtokaX - Options tab.
Well. I cant get it to work without edit the line and set some prefixes. EDIT: I restart the hub. And now it works. Tnx
Quote
QuoteCan u add Description in a separate column?
The releases and descriptions' size are variable and when using the show command they may not appear with the correct tabbing. But, I'll think about it.
Can u use the column-stuff that nErBoS wrote? It's not perfect. But OK.
Quote
QuoteThe del function: add so i can write !del aswell. (Not only !del )
Well, can't do it. The way it is now it's the most simple and efficient one :D
It's good if u want to delete one release. But if u want to delete more then one release it's not so good. Then u have to type !show between every time u delete a release. Cause the number of the release is change when u delete one.
Quote
QuoteAdd a +reqdone function so users can use it, and a notice in main shows. e.g. got
Can you explain this better?
Sure. It's almost the same as the !del command. The different is that non op can use this command to. And with this command the script write " got " in main, for all in the hub. And then delete the request from the list.
//Tnx Star
Title:
Post by: Star on 20 May, 2005, 09:53:15
And some other things.
- Add the commands to the settings. cmd1 = "add" cmd2 = "relhelp", .... local tCmds = { [Settings.cmd1] And here to user:SendData(Settings.sBot,"*** Error: Type "..sPrefix..Settings.cmd1.." <"..Mode.."> " )
- And only one search word needed , and it search in both description and release/request. (Now it's !find )
- *** Error: The Description can't have more than 41 characters. 41!! huh :) The numbers in the list look nice but take space. So, get rid of the numbers and make som space here :)
- And for the autocleaner function, add a msg to main when it cleans: The "..Mode.." cleaner delete x "..Mode.." from the list. hey where more then "..iClean.." days old. And a on/off function in Settings for that.
QuoteOriginally posted by Star - Add the commands to the settings. cmd1 = "add" cmd2 = "relhelp", .... local tCmds = { [Settings.cmd1] And here to user:SendData(Settings.sBot,"*** Error: Type "..sPrefix..Settings.cmd1.." <"..Mode.."> " ) And for the autocleaner function, add a msg to main when it cleans: The "..Mode.." cleaner delete x "..Mode.." from the list. hey where more then "..iClean.." days old.
It's in my todo list ;)
Quote- And only one search word needed , and it search in both description and release/request. (Now it's !find )
Do you mean searching without the "category"?
QuoteThe numbers in the list look nice but take space. So, get rid of the numbers and make som space here :) And a on/off function in Settings for that.
Fixed.
Best regards
Title:
Post by: Star on 20 May, 2005, 11:12:32
QuoteOriginally posted by jiten Do you mean searching without the "category"?
Yes. Like this: *** Error: Type !find String can be: date, poster, release, description or link
And about the date. Can u put something in settings to so I can change the order of the yyyy mm dd (We have other standards here)
-------/------------------------------------------------------------------------------------------------------------------------- -- Release or Request bot v1.1 by jiten (5/20/2005) -- For PtokaX 0.3.3.0 build 17.02 or Higher -------/------------------------------------------------------------------------------------------------------------------------- Settings = { sBot = frmHub:GetHubBotName(),-- Default Bot Name or -- sBot = "custombot" iVer = "1.1",-- Script Version sFolder = "Releases",-- Folder where the Release/Request database is stored regBot = 1,-- 1 = Register Bot Name automatically, 0 = erm... Release = 0,-- 1 = Act as Release Bot, 0 = Act as Request Bot autoClean = 1,-- 1 = Auto clean Releases/Requests older than iClean, 0 = not iClean = 7,-- Maximum time for releases to be stored (in days) iMax = 30,-- Maximum releases/requests to be shown fRelease = "Release.tbl",-- File where the Releases are stored RelSize = 18,-- Release's size DescSize = 20,-- Description's size pCleaner = 1,-- 1 = Sends cleaner actions to all; 0 = doesn't -- Commands ----------------------------------------------------------------------------- addCmd = "add", delCmd = "del", showCmd = "show", findCmd = "find", delAllCmd = "delall", helpCmd = "relhelp", clnCmd = "cleaner", rDoneCmd = "reqdone", ----------------------------------------------------------------------------------------- tPrefixes = {}, } Releases = {} -------/------------------------------------------------------------------------------------------------------------------------- Main = function() if regBot == 1 then frmHub:RegBot(Settings.sBot) end if not loadfile(Settings.sFolder.."/"..Settings.fRelease) then os.execute("mkdir "..Settings.sFolder) end if loadfile(Settings.sFolder.."/"..Settings.fRelease) then dofile(Settings.sFolder.."/"..Settings.fRelease) end for a,b in pairs(frmHub:GetPrefixes()) do Settings.tPrefixes[b] = 1 end if Settings.Release == 1 then Mode = "Release" else Mode = "Request" end SetTimer(1000*60*60*12) StartTimer() end
ChatArrival = function(sUser,sData) local sData = string.sub(sData,1,-2) local s,e,sPrefix,cmd = string.find(sData,"%b<>%s*(%S)(%S+)") if sPrefix and Settings.tPrefixes[sPrefix] then local tmp = "\r\n\t"..string.rep("-", 220) local sOpHelpOutput = tmp.."\r\n\t\t\t\t\t\tRelease/Request v."..Settings.iVer.." bot by jiten\t\t\t("..Mode.." Mode)\r\n\t"..string.rep("-",220).."\r\n\tOperator Commands:".."\r\n\r\n" local sHelpOutput = tmp.."\r\n\tNormal Commands:".."\r\n\r\n" local tCmds = { [Settings.addCmd] = {function(user,data) local s,e,rel,desc = string.find(data,"%b<>%s+%S+%s+(%S+)%s+(%S+)") local s,e,link = string.find(data,"%b<>%s+%S+%s+%S+%s+%S+%s+(%S+)") if (rel == nil or desc == nil) then user:SendData(Settings.sBot,"*** Error: Type "..sPrefix..Settings.addCmd.." <"..Mode.."> (link is optional)") else if (string.len(rel) > Settings.RelSize) then user:SendData(Settings.sBot,"*** Error: The "..Mode.." Name can't have more than "..Settings.RelSize.." characters.") elseif (string.len(desc) > Settings.DescSize) then user:SendData(Settings.sBot,"*** Error: The Description can't have more than "..Settings.DescSize.." characters.") else if link == nil then link = "(empty)" end table.insert( Releases, { user.sName, rel, desc, os.date(), link, } ) SaveToFile(Settings.sFolder.."/"..Settings.fRelease,Releases,"Releases") SendToAll(Settings.sBot, user.sName.." added a new "..Mode..": "..rel..". For more details type: "..sPrefix..Settings.showCmd) end end end, 1, "\tAdds a "..Mode..". Example: "..sPrefix..Settings.addCmd.." Blade3 Movie [URL]http://www.blade.com[/URL] (link is optional)", }, [Settings.delCmd] = {function(user,data) local s,e,begin,stop = string.find(data,"%b<>%s+%S+%s+(.+)%-(.*)") if not (begin == nil and stop == nil) then ShowReleases(begin, stop, 1, 3, false,"") SaveToFile(Settings.sFolder.."/"..Settings.fRelease,Releases,"Releases") else local s,e,i = string.find(data,"%b<>%s+%S+%s+(%S+)") if i then if Releases[tonumber(i)] then table.remove(Releases,i) SaveToFile(Settings.sFolder.."/"..Settings.fRelease,Releases,"Releases") user:SendData(Settings.sBot,Mode.." "..i..". was deleted succesfully!") else user:SendData(Settings.sBot,"*** Error: There is no "..Mode.." "..i..".") end else user:SendData(Settings.sBot,"*** Error: Type "..sPrefix..Settings.delCmd.." <"..Mode.." number>") end end end, 0, "\tDeletes single or multiple "..Mode.."s. Example: "..sPrefix..Settings.delCmd.." 15; "..sPrefix..Settings.delCmd.." 1-2", }, [Settings.showCmd] = { function(user,data) local s,e,begin,stop = string.find(data,"%b<>%s+%S+%s+(.+)%-(.*)") if begin == nil or stop == nil then msg = ShowReleases(table.getn(Releases), table.getn(Releases) - Settings.iMax + 1, -1, 1, false, "\t\t\t\t\t\t\t\tLast "..Settings.iMax.." "..Mode.."s\r\n") user:SendPM(Settings.sBot,msg) else msg = ShowReleases(begin, stop, 1, 1, false, "\t\t\t\t\t\t\tShowing "..begin.."-"..stop.." of "..table.getn(Releases).." "..Mode.."s\r\n") user:SendPM(Settings.sBot,msg) end end, 1, "\tShows all/group of "..Mode.."s. Example: "..sPrefix..Settings.showCmd.."; "..sPrefix..Settings.showCmd.." 10-15" }, [Settings.findCmd] = { function(user,data) local s,e,str = string.find(data,"%b<>%s+%S+%s+(%S+)") if str then user:SendPM(Settings.sBot,ShowReleases(1, table.getn(Releases), 1, 2, str, "\t\t\t\t\t\t\tSearch Results of: "..str.."\r\n")) else user:SendData(Settings.sBot,"*** Error: Type "..sPrefix..Settings.findCmd.." \r\n\t\t Category can be: date, poster, release or description") end end, 1, "\tFind a "..Mode.." by any category (date, poster, release, description, link). Example: "..sPrefix..Settings.findCmd.." jiten", }, [Settings.delAllCmd] = { function(user,data) Releases = nil Releases = {} SaveToFile(Settings.sFolder.."/"..Settings.fRelease,Releases,"Releases") user:SendData(Settings.sBot,"All "..Mode.."s have been deleted successfully") end, 0, "\tDeletes all "..Mode.."s", }, [Settings.helpCmd] = { function(user) if user.bOperator then user:SendData(Settings.sBot, sOpHelpOutput..sHelpOutput.."\t"..string.rep("-",220)); else user:SendData(Settings.sBot, sHelpOutput.."\t"..string.rep("-",220)); end end, 1, "\tDisplays this help message.", }, [Settings.clnCmd] = { function(user,data,mode) local s,e,stat = string.find(data,"%b<>%s+%S+%s+(%S+)") if stat == "on" then StartTimer() user:SendData(Settings.sBot,"The "..Mode.."s automatic cleaner has been enabled.") elseif stat == "off" then StopTimer() user:SendData(Settings.sBot,"The "..Mode.."s automatic cleaner has been disabled.") else user:SendData(Settings.sBot,"*** Error: Type "..sPrefix..Settings.clnCmd.." ") end end, 0, "\tSet "..Mode.."s automatic cleaner status. Example: "..sPrefix..Settings.clnCmd.." off; "..sPrefix..Settings.clnCmd.." on", }, [Settings.rDoneCmd] = { function(user,data) local s,e,i = string.find(data,"%b<>%s+%S+%s+(%S+)") if Mode == "Request" then if i then if Releases[tonumber(i)] then if Releases[tonumber(i)][1] == user.sName then table.remove(Releases,i) SaveToFile(Settings.sFolder.."/"..Settings.fRelease,Releases,"Releases") SendToAll(Settings.sBot,user.sName.." got the "..Mode.." "..i.."!") else user:SendData(Settings.sBot,"*** Error: You can't complete "..Mode.." "..i..". as you aren't its poster.") end else user:SendData(Settings.sBot,"*** Error: There is no "..Mode.." "..i..".") end else user:SendData(Settings.sBot,"*** Error: Type "..sPrefix..Settings.delCmd.." <"..Mode.."> ") end else user:SendData(Settings.sBot,"*** Error: This command is only available in Request Mode.") end end, 1, "\tCompletes a previous Request (only available in Request Mode). Example: "..sPrefix..Settings.rDoneCmd.." 15", }, } for sCmd, tCmd in tCmds do if(tCmd[2] == 1) then sHelpOutput = sHelpOutput.."\t"..sPrefix..sCmd.."\t "..tCmd[3].."\r\n"; else sOpHelpOutput = sOpHelpOutput.."\t"..sPrefix..sCmd.."\t "..tCmd[3].."\r\n"; end end if tCmds[cmd] then if tCmds[cmd][2] == 1 or sUser.bOperator then return tCmds[cmd][1](sUser,sData), 1 else return sUser:SendData(Settings.sBot,"*** Error: You are not authorized to use this command."), 1 end end end end
ToArrival = ChatArrival
OnTimer = function() if (Settings.autoClean == 1) then -- RegCleaner based local juliannow = jdate(tonumber(os.date("%d")), tonumber(os.date("%m")), tonumber(os.date("%Y"))) local oldest, chkd, clnd, x = Settings.iClean, 0, 0, os.clock() for i = 1, table.getn(Releases) do chkd = chkd + 1 local s, e, month, day, year = string.find(Releases[i][4], "(%d+)%/(%d+)%/(%d+)"); local julian = jdate( tonumber(day), tonumber(month), tonumber("20"..year) ) if ((juliannow - julian) > oldest) then clnd = clnd + 1 Releases[i] = nil SaveToFile(Settings.sFolder.."/"..Settings.fRelease,Releases,"Releases") end; end if clnd ~= 0 and Settings.pCleaner == 1 then SendToAll(Settings.sBot,chkd.." "..Mode.."s were processed. "..clnd.." "..Mode.."s were deleted as they were more than "..Settings.iClean.." days old. ( "..string.format("%0.2f",((clnd*100)/chkd)).."% ) in: "..string.format("%0.4f", os.clock()-x ).." seconds.") end end end
ShowReleases = function(a,z,x,mode,str,eMsg) local msg, border = "\r\n",string.rep("-", 250) msg = msg.."\t"..border.."\r\n"..eMsg.."\t"..string.rep("-- --",50).."\r\n\t Nr.\tDate - Time\t\tPoster\t\t"..Mode.."\t\tDescription\tLink\r\n" msg = msg.."\t"..string.rep("-- --",50).."\r\n" for i = a, z, x do if Releases[i] then DoTabs = function(cat) local sTmp = "" if tonumber(string.len(cat)) < 9 then sTmp = "\t\t" elseif tonumber(string.len(cat)) < 16 then sTmp = "\t" else sTmp = "\t" end return sTmp end if mode == 1 then msg = msg.."\t "..i..".\t"..Releases[i][4].."\t\t"..Releases[i][1]..DoTabs(Releases[i][1])..Releases[i][2]..DoTabs(Releases[i][2])..Releases[i][3]..DoTabs(Releases[i][3])..Releases[i][5].."\r\n" elseif mode == 2 then where = Releases[i][1]..Releases[i][2]..Releases[i][3]..Releases[i][4]..Releases[i][5] if string.find(where,str) then msg = msg.."\t "..i..".\t"..Releases[i][4].."\t\t"..Releases[i][1]..DoTabs(Releases[i][1])..Releases[i][2].."\t\t"..Releases[i][3]..DoTabs(Releases[i][3])..Releases[i][5].."\r\n" end elseif mode == 3 then Releases[i] = nil end end end msg = msg.."\t"..border.."\r\n" return msg end
jdate = function(d, m, y) local a, b, c = 0, 0, 0 if m <= 2 then y = y - 1; m = m + 12; end if (y*10000 + m*100 + d) >= 15821015 then a = math.floor(y/100); b = 2 - a + math.floor(a/4) end if y <= 0 then c = 0.75 end return math.floor(365.25*y - c) + math.floor(30.6001*(m+1) + d + 1720994 + b) end
Serialize = function(tTable,sTableName,hFile,sTab) sTab = sTab or ""; hFile:write(sTab..sTableName.." = {\n"); for key,value in tTable do if (type(value) ~= "function") then local sKey = (type(key) == "string") and string.format("[%q]",key) or string.format("[%d]",key); if(type(value) == "table") then Serialize(value,sKey,hFile,sTab.."\t"); else local sValue = (type(value) == "string") and string.format("%q",value) or tostring(value); hFile:write(sTab.."\t"..sKey.." = "..sValue); end hFile:write(",\n"); end end hFile:write(sTab.."}"); end
SaveToFile = function(file,table,tablename) local hFile = io.open(file,"w+") Serialize(table,tablename,hFile); hFile:close() end ---------------------------------------------------------------------------------------------------------------------------------
Title:
Post by: Dessamator on 20 May, 2005, 14:47:16
hmm well done m8, :)
Title:
Post by: Pingelmonster on 20 May, 2005, 14:49:33
Syntax ...reaublad\PtokaX 0.3.3.0 16.09\scripts\releasebot.lua:59: attempt to call method `GetPrefixes' (a nil value)
The latest scriptversion (1.1) gave me this error...
My bot is a releasebot: Release = 1, -- 1 = Act as Release Bot, 0 = Act as Request Bot
Title:
Post by: jiten on 20 May, 2005, 15:00:21
QuoteOriginally posted by Pingelmonster Syntax ...reaublad\PtokaX 0.3.3.0 16.09\scripts\releasebot.lua:59: attempt to call method `GetPrefixes' (a nil value)
The latest scriptversion (1.1) gave me this error...
My bot is a releasebot: Release = 1, -- 1 = Act as Release Bot, 0 = Act as Request Bot
From what I can see, you are using PtokaX 16.09 and this one is:
-- For PtokaX 0.3.3.0 build 17.02 or Higher Cheers
Title:
Post by: Pingelmonster on 20 May, 2005, 15:04:08
Oh my god....I am very stupid:P...not reading at all...thnqs:P
Title:
Post by: Star on 20 May, 2005, 16:04:00
Nice.. Thanks jiten :)
Title:
Post by: Dinok on 21 May, 2005, 05:53:33
Syntax ...\PtokaX\scripts\releasebot.lua:12: function arguments expected near `='
I use PtokaX 0.3.3.0 build 17.08 , scriptversion 1.1
Title:
Post by: jiten on 21 May, 2005, 10:27:24
QuoteOriginally posted by Dinok Syntax ...\PtokaX\scripts\releasebot.lua:12: function arguments expected near `='
I use PtokaX 0.3.3.0 build 17.08 , scriptversion 1.1
Probably you didn't copy well the script. The code to copy is the one between the horizontal lines (excluding them).
Cheers
Title:
Post by: Dinok on 21 May, 2005, 12:04:37
All have earned. I, fool, did not think that one line can so much signify. :O
Title:
Post by: Star on 21 May, 2005, 13:34:56
I have been thinking and testing the scripts functions And I have came to this results and requests. Hope u can help me with it.
- !Find results don't match the !Show results. The columns are different. - !Find command don't work so well. It's capitalsensitive. - Cleaner function, change it so it says "Cleaner status: ON" in the help window. Or in the Release Show windows - And for the appearance, you can look in my other post. :) - Get rid of the numbers! They only take space - Add a command to set the link optional or not. e.g. !linkrequire - Turn the list to 1,2,3... etc. (Now it's ...3,2,1) - Add so: if Request mode use /Request, and if Release mode use /Release, or different files, so I can have 1rel and 1req script started at the same time. - I can add several request/releases with the same namn. The bot should say that the release/request already exist. - Change the name "Link" to "Info Link"
- *** Error: You can't complete Request 12. as you aren't its poster. U got me wrong here m8. User1 request a release, and if user2 get the release he can use !reqdone. As it is now, only the poster can use that command.
- Wouldn't be nice if the script could handle deleating and filling reqs from the release name istead of the IDs? Have used ID databases before and well me and others have to many times deleated the wrong IDs (specially if more then one is editing it at the same time)
Keep up the good work m8. //Star
Title:
Post by: jiten on 21 May, 2005, 14:32:21
QuoteOriginally posted by Star !Find results don't match the !Show results. The columns are different.
Can you explain this better?
Quote!Find command don't work so well. It's capitalsensitive.
Will be fixed ;)
QuoteCleaner function, change it so it says "Cleaner status: ON" in the help window. Or in the Release Show windows. I can add several request/releases with the same namn. The bot should say that the release/request already exist. Change the name "Link" to "Info Link".
It's on my todo list.
QuoteWouldn't be nice if the script could handle deleating and filling reqs from the release name istead of the IDs? And for the appearance, you can look in my other post. :) Get rid of the numbers! They only take space
Will think about these and (maybe) add them. Btw, the numbers are needed because the deleting still goes by ID.
QuoteAdd a command to set the link optional or not. e.g. !linkrequire
I'm thinking about making some changes to the settings (with time).
QuoteTurn the list to 1,2,3... etc. (Now it's ...3,2,1)
As I explained you earlier, the releases are listed from the most recent to the oldest, so, the recent ones logically will have a bigger ID than the others.
QuoteAdd so: if Request mode use /Request, and if Release mode use /Release, or different files, so I can have 1rel and 1req script started at the same time.
Do you mean when the bot is in Release Mode it saves to a file, and when it's on the other one, saves to another? Or being able do use both Modes at the same time and two different files?
QuoteUser1 request a release, and if user2 get the release he can use !reqdone. As it is now, only the poster can use that command.
If you want it this way, any user will be able to "delete" the requests/releases, as, the reqdone does the same as the delete command. It's not that safe if I remove that condition.
Best regards,
jiten
Title:
Post by: Star on 21 May, 2005, 17:30:39
QuoteOriginally posted by jiten Can you explain this better?
Sure. If u add some releases to the list. Then type !show and then type !find it don't look the same with the tabbing.
QuoteWill be fixed ;) It's on my todo list.
Thank U very much! :)
QuoteWill think about these and (maybe) add them.
I'm hoping u do :)
QuoteBtw, the numbers are needed because the deleting still goes by ID.
Well, if u change so the "deleting", "show" and "find" goes on the release name insted of a IDnumber u won't need it anymore. And as I wrote earlier, ID deleting only cause problems.
Thats ONE of the resons we want the deleting to go on NAME instead of ID. So we can get rid of the numers.
QuoteAs I explained you earlier, the releases are listed from the most recent to the oldest, so, the recent ones logically will have a bigger ID than the others.
U get me wrong here(I think). The releases should be listed from the most oldest to the recent.
They should of course remain ther own ID number. (If u gone keep the numbers) ;)
QuoteDo you mean when the bot is in Release Mode it saves to a file, and when it's on the other one, saves to another? Or being able do use both Modes at the same time and two different files?
I mean: add so it use different folders in respective modes So "REL_bot_v1.1.lua" use /RELEASE <--Release Mode "REQ_bot_v1.1.lua" use /REQUEST <--Request Mode
QuoteIf you want it this way, any user will be able to "delete" the requests/releases, as, the reqdone does the same as the delete command. It's not that safe if I remove that condition.
That's the hole ide with the +reqdone command. It's useless to request a release if u can get it yourself. And they cant delete a release when the script is in release mode as this command is disabled in release mode anyway.
In my case I trust my users to not delete requests they dont have. But if that's the problem maybe u can add a on/off function in settings for that to.
-------/------------------------------------------------------------------------------------------------------------------------- -- Release or Request bot v1.2 by jiten (5/21/2005) -- For PtokaX 0.3.3.0 build 17.02 or Higher -------/------------------------------------------------------------------------------------------------------------------------- Main Commands:
[*]!showShows all/group of Requests. Example: !show; !show 10-15 [*]!reqdoneFills up a previous Request (only available in Request Mode). Example: !reqdone [*]!findFind a Request by any category (date, poster, release, description, link). Example: !find jiten [*]!addAdds a Request. Example: !add Blade3 Movie [URL]http://www.blade.com[/URL] (Link can be required or not) [*]!delallDeletes all Requests [*]!delDeletes single or multiple Requests. Example: !del ; !del 1-2 [*]!setupConfigure this bot. Commands: !setup
Some features:
[*]Ability to switch from Release to Request mode (vice-versa) [*]Releases/Requests older than x Days are automatically deleted (optional) [*]Two separate databases: one for the Requests and the other for the Releases Grab it HERE (http://mznetwork.mozdesigners.com/i/forum_files/Release.Request.v12.rar).
Title:
Post by: Star on 22 May, 2005, 11:17:08
First of all.. Thank u for taking the numbers off the list and added NAME handeling! Now it's start's to get realy nice m8.
Here's some small things:
- *** Error: Type !setup Should't it say: *** Error: !setup - From !relhelp: !setup Configure this bot. Commands: !setup <---Change "mode" to "release"
- *** Erorr: There's already a Release named Test. <--- Erorr :) - *** Error: Type !find <--- Is the category steel there, or did I miss something? - Can you add "!showall" command? (Or "!show all" ) - If u use one config.tbl, then I can't run two versions at the same time (two lua files at the same time). Make one config file for each mode? - Get rid of the config.tbl status in the !show results. (Sorry m8 ;) (But keep it in !relhelp) - If the mode is set to Request. I get Syntax error of I type "!find". Release.Request.v12.lua:97: bad argument #1 to `getn' (table expected, got nil) - Tiny thing: change the ( to [ in this: (Mode / Cleaner / Link): (on / on / off) and (Release Mode). It look better. - This don't seem to work: if loadfile(Settings.rFolder.."/"..Settings.fRequest) then dofile(Settings.rFolder.."/"..Settings.fRequest) end Or I have just get it wrong :)
- I get a little confused in !show results. The "Release"="Type" right? and the "Description" = "Release_Name" right? I would say that it should be the other way around. And this the other way around to : RelSize = 20, DescSize = 50
And now for the big thing. - I'm begging u to use the tabbig stuff Nerbos wrote. It works good! Or write your own :) - Can u make the list a little more wide? I?s a little hard to get all the things to fit. Well, alot wider I would say. The releases are, in almost every case wider then that. I have made a suggestion in a previous post. What do u think about that?
EDIT: - Could u change so Description comes before Releases in the list? - If u type !find there's one tabbing more in the "Poster" column. - Can u set all Examples, in the !relHelp menu, in one column. It Looks good
v1.2 was real good. Thanks m8 //Star
Title:
Post by: jiten on 22 May, 2005, 13:44:59
QuoteOriginally posted by Star Thank u for taking the numbers off the list and added NAME handeling!
I'm glad you like it ;)
Quote*** Erorr: There's already a Release named Test.
Typos will be fixed and other things I forgot to remove. That's the problem of fast editing. :D
QuoteCan you add "!showall" command? Get rid of the config.tbl status in the !show results. TypeSize = 20, DescSize = 50 I'm begging u to use the tabbig stuff Nerbos wrote. Can u make the list a little more wide? Could u change so Description comes before Releases in the list? If u type !find there's one tabbing more in the "Poster" column. Tiny thing: change the ( to [ in this: (Mode / Cleaner / Link): (on / on / off) and (Release Mode). It look better. Can u set all Examples, in the !relHelp menu, in one column. I get a little confused in !show results.
It's on my todo list.
Quoteargument #1 to `getn' (table expected, got nil) - This don't seem to work: if loadfile(Settings.rFolder.."/"..Settings.fRequest) then dofile(Settings.rFolder.."/"..Settings.fRequest) end
This error happened because you were using the commands without having any request saved (so there was no file). Bug fixed anyway ;)
QuoteMake one config file for each mode?
After releasing the v1.3, I'll show you a way to run request and release at the same time (with 2 .lua files). Currently, I won't change it so that only one .lua handles both at the same time.
Cheers
Title:
Post by: Star on 22 May, 2005, 15:06:14
QuoteOriginally posted by jiten After releasing the v1.3, I'll show you a way to run request and release at the same time (with 2 .lua files). Currently, I won't change it so that only one .lua handles both at the same time.
Thats was what I meant (Running 2 .lua files). Maybe could be fix with two config files in /Request respective /Release folder. Example: If mode Request > /Request/Config.tbl If mode Release > /Release/Config.tbl Or split the code in the Config.tbl file somehow.
- Could u add a setting to change the date order? Settings> DateOrder = "yy/mm/dd" This is because we have different order standars here. U have mm/dd/yy. We have yy/mm/dd or yyyy/mm/dd - And could u add 20 before the date year? Ex: 2005/05/22
And then I have a id?. - Could u add in settings: Settings > RelCommand = "rel" ReqCommand = "req" If the script is in REL mode it add "rel" before the commands like this: !reladd, !relshow, !reldel... If the script is in REQ mode it add "req" before the commands like this: !reqadd, !reqshow, !reqdel... What du u think about this? I hope u understand what I write. Becous some times I don't understand it my self :)
EDIT: Forget the last thing. I think I have the energy to change the commands on my own. :)
Thanks //Star
Title:
Post by: jiten on 23 May, 2005, 14:26:36
QuoteOriginally posted by Star Thats was what I meant (Running 2 .lua files). Maybe could be fix with two config files in /Request respective /Release folder.
It'll be something like that, but, will be apart from the release.
QuoteCould u add a setting to change the date order?
I don't think it's necessary. I'd have to change all the cleaning code and other parts of the scripts to be compatible with that.
QuoteCould u add in settings: Settings > RelCommand = "rel" ReqCommand = "req"
Nice to know that you'll manage to do it :D
Best regards
Title:
Post by: Star on 23 May, 2005, 19:26:03
Cant get the bot to register.
Change this? if regBot == 1 then frmHub:RegBot(Settings.sBot) end to if Settings.regBot == 1 then frmHub:RegBot(Settings.sBot) end
/Star
Title:
Post by: jiten on 23 May, 2005, 20:11:41
QuoteOriginally posted by Star Cant get the bot to register.
Change this? if regBot == 1 then frmHub:RegBot(Settings.sBot) end to if Settings.regBot == 1 then frmHub:RegBot(Settings.sBot) end
-------/------------------------------------------------------------------------------------------------------------------------- -- Release or Request bot v1.3 by jiten (5/23/2005) -- For PtokaX 0.3.3.0 build 17.02 or Higher -------/------------------------------------------------------------------------------------------------------------------------- Main Commands:
[*]!showShows last x or all Releases!show; !show all [*]!reqdoneFills up a Request (Request Mode only)!reqdone [*]!findFind a Release by any string.!find jiten [*]!addAdds a Release!add Movie Blade3 [URL]http://www.blade.com[/URL] (link is optional) [*]!delallDeletes all Releases!delall [*]!delDeletes single Releases!del [*]!setupConfigure this bot.!setup
Some features:
[*]Inbuild RightClick [*]Ability to switch from Release to Request mode (vice-versa) [*]Releases/Requests older than x Days are automatically deleted (optional) [*]Two separate databases: one for the Requests and the other for the Releases [*]And others... Grab it HERE (http://mznetwork.mozdesigners.com/i/forum_files/Release.Request.v13.rar).
Cheers
Title:
Post by: Star on 23 May, 2005, 23:54:33
The link don't seems to work
Title:
Post by: 6Marilyn6Manson6 on 24 May, 2005, 00:31:28
QuoteOriginally posted by Star The link don't seems to work
yes don't work ^^
Title:
Post by: jiten on 24 May, 2005, 08:42:38
The site is going through some updates, but, it's up now.
Best regards
Title:
Post by: 6Marilyn6Manson6 on 24 May, 2005, 10:44:26
QuoteOriginally posted by jiten The site is going through some updates, but, it's up now.
Best regards
now is ok :)
Title:
Post by: Star on 24 May, 2005, 16:56:50
Nice one jiten. Good list to. Like the date and time in the list :)
Have some small suggestion: - Can u use the "CheckSize function" between the user name and the release to. Long usernames moves the release
- Change so I can run two script at the same time (2 .lua files) (And not useing the same Config.tbl file)?
- Change the place in the list to: Type then Release. (Now its the other way)
- Set Settings > RelSize = 100, as standard, releases are other more then 50 chars. long.
- Link stuff not working When link=ON it should be requested from the user to type a link to add a release/reques. So if ON u must type a link else Error msg! If link=OFF it should be optional from user to add a link or not.
- Change this back: "mm/dd/yy - hh:mm:ss" to: "Date - Time". Looks better. ;) - Maybe u could delete the first tab, to the left of the list, and make some blankstep. Then expand the "Release" with one tab. - Place the link under the other stuff Example look: (Past this in Notepad with MS Sans Serif, 8, normal
NewUserConnected = function(sUser) if Settings.SendTo[sUser.iProfile] == 1 and Settings.SendRC == 1 then if sUser.bUserCommand then if sUser.bOperator then sUser:SendData("$UserCommand 1 3 "..Settings.sMenu.."\\Setup\\Cleaner$<%[mynick]> !"..Settings.Mode.." cleaner %[line:on/off]||") sUser:SendData("$UserCommand 1 3 "..Settings.sMenu.."\\Setup\\Link$<%[mynick]> !"..Settings.Mode.." link %[line:on/off]||") sUser:SendData("$UserCommand 1 3 "..Settings.sMenu.."\\Setup\\Release$<%[mynick]> !"..Settings.Mode.." release %[line:on/off]||") sUser:SendData("$UserCommand 1 3 "..Settings.sMenu.."\\Delete all$<%[mynick]> !"..Settings.delAllCmd.."||") sUser:SendData("$UserCommand 1 3 "..Settings.sMenu.."\\Delete single$<%[mynick]> !"..Settings.delCmd.." %[line:Release Name]||") sUser:SendData("$UserCommand 0 3|") end sUser:SendData("$UserCommand 1 3 "..Settings.sMenu.."\\Show last "..Settings.iMax.."$<%[mynick]> !"..Settings.showCmd.."||") sUser:SendData("$UserCommand 1 3 "..Settings.sMenu.."\\Show all<%[mynick]> !"..Settings.showCmd.." all||") sUser:SendData("$UserCommand 1 3 "..Settings.sMenu.."\\Fill up request$<%[mynick]> !"..Settings.rDoneCmd.." %[line:Request Name]||") sUser:SendData("$UserCommand 1 3 "..Settings.sMenu.."\\Help$<%[mynick]> !"..Settings.helpCmd.."||") sUser:SendData("$UserCommand 1 3 "..Settings.sMenu.."\\Find$<%[mynick]> !"..Settings.findCmd.." %[line:String]||") sUser:SendData("$UserCommand 1 3 "..Settings.sMenu.."\\Add$<%[mynick]> !"..Settings.addCmd.." %[line:Type] %[line:Release] %[line:Link]||") end end end
Title:
Post by: jiten on 24 May, 2005, 21:12:34
QuoteOriginally posted by Star Can u use the "CheckSize function" between the user name and the release to. Long usernames moves the release Change the place in the list to: Type then Release. (Now its the other way) Set Settings > RelSize = 100, as standard, releases are other more then 50 chars. long. Link stuff not working Change this back: "mm/dd/yy - hh:mm:ss" to: "Date - Time". Maybe u could delete the first tab Place the link under the other stuff Optimized Rightclick
It's on my todo list ;) Btw, that Type and Category switch was a huge bug. Don't know how I didn't notice it.
QuoteChange so I can run two script at the same time (2 .lua files) (And not useing the same Config.tbl file)
It'll be easy. I will explain you how to do it when I get a stable and bugless version :D
Cheers
Title:
Post by: Star on 25 May, 2005, 15:57:38
QuoteOriginally posted by jiten It's on my todo list ;) It'll be easy. I will explain you how to do it when I get a stable and bugless version :D
Nice!
btw. I can test the new version for u, if u want, before u release it. If u don't have the time.
Thanks //Star
Title:
Post by: jiten on 25 May, 2005, 17:16:33
I'll be releasing the new version tonight. It's mainly a bugfix version.
-------/------------------------------------------------------------------------------------------------------------------------- -- Release or Request bot v1.4 by jiten - Bug Fixing version (5/25/2005) -- For PtokaX 0.3.3.0 build 17.02 or Higher -------/------------------------------------------------------------------------------------------------------------------------- Main Commands:
[*]!showShows last x or all Releases!show; !show all [*]!reqdoneFills up a Request (Request Mode only)!reqdone [*]!findFind a Release by any string.!find jiten [*]!addAdds a Release!add Movie Blade3 [URL]http://www.blade.com[/URL] (link is optional) [*]!delallDeletes all Releases!delall [*]!delDeletes single Releases!del [*]!setupConfigure this bot.!setup
Some features:
[*]Inbuild optimized RightClick [*]Ability to switch from Release to Request mode (vice-versa) [*]Releases/Requests older than x Days are automatically deleted (optional) [*]Two separate databases: one for the Requests and the other for the Releases [*]And others... Grab it HERE (http://mznetwork.mozdesigners.com/i/forum_files/Release.Request.v14.rar).
Cheers
Title:
Post by: Star on 25 May, 2005, 22:38:13
First of all. It look real nice! U do a great job! :)
Why don't u add the config in separate folder as standard?
When link is set to off it dont add the link to the list. It should be optional u know.
And for the ..Config.Mode.. in the RightClick folder. Real nice! I thought about that, but I used only ..Mode.. and never got it to work.
Besides this two things I cant find any more errors or other things that don't work. hmm. maybe change !relhelp to !rhelp?
Thanks //Star
EDIT: hmm.. find one more thing. - Change the standard of the commands. so they dont conflikt with other scripts as standard. - Reorder the relhelp a litle bit. And use DoTabs/CheckSize function there aswell. useful when u change the commands to a litle longer. Ex: !newsfind - !reqdone chould not be shown in help, when script is in Release mode. And if it posseble, not in the RightClick to. Example look:
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [Mode/Cleaner/Link]: [on/on/off]Release/Request Bot v.1.3 by jiten[Release Mode] ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Normal Commands:Description:Example:
!rshow Shows last 30 or all Releases!rshow; !rshow all !radd Adds a Release!radd DVD Blade3 [URL]www.blade.com[/URL] (link is optional) !rfind Find a Release by any string.!rfind jiten !reqdone Fills up a Request!reqdone Blade3 !rhelpDisplays this help message.!rhelp
!rdel Deletes single Releases!rdel Blade3 !rdelallDeletes all Releases!rdelall !rsetup Configure this bot.!rsetup link on ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------And for the link in the Example: When link=off, !radd DVD Blade3 //www.blade.com (link is optional) When link=on, !radd DVD Blade3 //www.blade.com
Title:
Post by: jiten on 26 May, 2005, 11:34:14
QuoteOriginally posted by Star Why don't u add the config in separate folder as standard?
Don't think it's necessary for now. Maybe later, who knows ;)
QuoteWhen link is set to off it dont add the link to the list. It should be optional u know.
Change the standard of the commands. so they dont conflikt with other scripts as standard. Reorder the relhelp a litle bit. And use DoTabs/CheckSize function there aswell. useful when u change the commands to a litle longer. Ex: !newsfind !reqdone chould not be shown in help, when script is in Release mode. And if it posseble, not in the RightClick to. And for the link in the Example: From what I can see, these are mainly appearance based requests and so, not that urgent. But, I'll keep them in mind for the next version.
Cheers
Title:
Post by: Star on 26 May, 2005, 14:46:31
QuoteOriginally posted by jiten
QuoteOriginally posted by Star Why don't u add the config in separate folder as standard?
Don't think it's necessary for now. Maybe later, who knows ;)
Well. I think this is more relevant then the other stuff. Personally I don't mind so much cause I can change it om my own. But there ar others who can't. (I think) :p
QuoteI'll check this.
Nice! ;)
Quote
QuoteChange the standard of the commands. so they dont conflikt with other scripts as standard. Reorder the relhelp a litle bit. And use DoTabs/CheckSize function there aswell. useful when u change the commands to a litle longer. Ex: !newsfind !reqdone chould not be shown in help, when script is in Release mode. And if it posseble, not in the RightClick to. And for the link in the Example:
From what I can see, these are mainly appearance based requests and so, not that urgent. But, I'll keep them in mind for the next version.
Well. I agree that some of them are. But some of them are not. As for the standard of the command. Personally I don't mind. Because I don't have any commands conflikt. And I don't use the standard commands anyway. It whas just a thougt that it could be conflicting in some cases for other users because they are very simple and global. But as u sad. they are not urgent and not so importent. Just thoughts.
Have a nice day! :) //Star
Title: register bot
Post by: xvk on 26 May, 2005, 19:28:48
hi carried out your instructions still not showing in hub i have just upgraded to 0.3.3.0.b17.08 and robo copv10.01e think is a setting somewhere do i need to close down hub altogether or just restart scripts.
Title:
Post by: jiten on 26 May, 2005, 19:34:54
QuoteOriginally posted by xvk hi carried out your instructions still not showing in hub i have just upgraded to 0.3.3.0.b17.08 and robo copv10.01e think is a setting somewhere do i need to close down hub altogether or just restart scripts.
After changing the sBot and regBot value like I explained, indeed, you need to restart your scripts and after that the Bot will appear in the userlist.
Cheers
Title:
Post by: yoonohoo on 27 May, 2005, 11:59:39
Is it possible to clear the case sensitive. Meaning if a user adds a song to mp3 and the search/find is MP3 all songs entered in mp3 and MP3 will show.
Or even create pre-defined categories!
Thanks
Title:
Post by: jiten on 27 May, 2005, 12:34:12
QuoteOriginally posted by yoonohoo Is it possible to clear the case sensitive. Meaning if a user adds a song to mp3 and the search/find is MP3 all songs entered in mp3 and MP3 will show.
Or even create pre-defined categories!
Thanks
Yes, it's possible. I'll include an option to allow or not case-sensitive searches. Well, for the pre-defined categories, got to think about it, as I'd have to rewrite significant parts of the script.
Cheers
Title:
Post by: yoonohoo on 27 May, 2005, 12:48:29
Many thanks for your swift reply.
QuoteI'll include an option to allow or not case-sensitive searches.
Will you post it here?
There's another script which has pre-defined categories...I thing! Actually is all-in-one script.
Title:
Post by: jiten on 27 May, 2005, 13:58:48
QuoteOriginally posted by yoonohoo Many thanks for your swift reply.
QuoteI'll include an option to allow or not case-sensitive searches.
Will you post it here?
Yes, I will post it here.
QuoteThere's another script which has pre-defined categories...I thing! Actually is all-in-one script.
Indeed. There are lots and different release scripts. Btw, are you talking about FreshStuff?
-------/------------------------------------------------------------------------------------------------------------------------- -- Release or Request bot v1.4a by jiten (5/27/2005) -- For PtokaX 0.3.3.0 build 17.02 or Higher -------/------------------------------------------------------------------------------------------------------------------------- Some features:
[*]Inbuild optimized RightClick [*]Ability to switch from Release to Request mode (vice-versa) [*]Releases/Requests older than x Days are automatically deleted (optional) [*]Two separate databases: one for the Requests and the other for the Releases [*]And others...
Changelog: [*]Added: Case-Sensitive Setting option [*]Added: Optional Prefix for normal commands [*]Changed: Working with two separate config.tbl's [*]Changed: Help menu layout and some minor optimizationsGrab it HERE (http://mznetwork.mozdesigners.com/i/forum_files/Release.Request.v1.4a.rar).
Best regards
Title:
Post by: Star on 27 May, 2005, 23:13:21
Yees. Thanks alot jiten. Real Nice!
Title:
Post by: yoonohoo on 28 May, 2005, 01:46:52
No it was Guarding.
Many thanks jiten ;)
Title:
Post by: Star on 28 May, 2005, 09:56:16
Find something here.
- If the I run two bots at the same time. And the Request bot don't have a config.tbl, the REQuest rightclick shows upp in "RELease Bot" righclick.
- Link don't work. change local link = string.find(data,"%b<>%s+%S+%s+%S+%s+%S+%s+(%S+)") to local s,e,link = string.find(data,"%b<>%s+%S+%s+%S+%s+%S+%s+(%S+)")
- If I change the Prefix in config.tbl, the script stop to work.and if I change it in the lua file, it require that no config.tbl exist if the prefix wold change. So my sugjestion is to put it in the Settings in the lua file.
Title:
Post by: jiten on 28 May, 2005, 11:49:50
QuoteOriginally posted by Star If the I run two bots at the same time. And the Request bot don't have a config.tbl, the REQuest rightclick shows upp in "RELease Bot" righclick.
Well, those are the risks of using them at the same time. Maybe if you do a separate rightclick for one of them, this problem will be gone.
QuoteLink don't work.
Going to fix it ;)
QuoteIf I change the Prefix in config.tbl, the script stop to work.and if I change it in the lua file, it require that no config.tbl exist if the prefix wold change. So my sugjestion is to put it in the Settings in the lua file.
It's not that simple. But, why are you trying to change it in the config.tbl? In the next version I'll put an option to choose the prefix you want, if the prefix options is on.
-------/------------------------------------------------------------------------------------------------------------------------- -- Release or Request bot v1.4b by jiten (5/29/2005) -- For PtokaX 0.3.3.0 build 17.02 or Higher -------/------------------------------------------------------------------------------------------------------------------------- Some features:
[*]Inbuild optimized RightClick [*]Ability to switch from Release to Request mode (vice-versa) [*]Releases/Requests older than x Days are automatically deleted (optional) [*]Two separate databases: one for the Requests and the other for the Releases [*]And others...
Changelog:
[*]Fixed: Link bug [*]Changed: Prefix handling [*]and some minor changes Grab it HERE (http://mznetwork.mozdesigners.com/i/forum_files/Release.Request.v14b.rar).
Best regards
Title:
Post by: Star on 30 May, 2005, 13:26:52
Thanks jiten. Nice job! I found a couple of thing here:
- mPrefix is not set to the !setup command as standard. Setup command don't work as it should then. (If 2 scripts running at the same time)
- reqDone don't work if u set release script loads before request script in PtokaX. So maybe set mPrefix to this command to?
- Request script don't work if the config.tbl don't exist. And it not being created on script start.
- When longer commands are in the help menu, the DoTabs don't work as it should. Or is it just bad luck?
- Could u switch the place of the type an release in the +add command? Like this: +add
Thanks //StarChild
Title:
Post by: yoonohoo on 30 May, 2005, 15:51:40
Jiten: Can it show the link in the same line? At the moment the link is below the correspondent release.
Also when using Strongdc to add items and use this client to show them your own releases are misaligned while other clients releases are ok. Same releases viewed on other clients are fine including Strongdc entries. Just a bit of info...
Thanks
Title:
Post by: jiten on 30 May, 2005, 16:23:12
QuoteOriginally posted by Star mPrefix is not set to the !setup command as standard. Setup command don't work as it should then. (If 2 scripts running at the same time) Request script don't work if the config.tbl don't exist. And it not being created on script start. reqDone don't work if u set release script loads before request script in PtokaX. So maybe set mPrefix to this command to?
For now, you can add "mPrefix.." to the Settings.Mode part so that the setup command differs and on hub start, change the mode to request, so that both can be used. Well, as I explained you earlier, running this script twice or more at the same time isn't and won't be bug free :( It was created with a switch purpose and to make it able to support more than one mode will require an almost complete rewrite. Later, when I get more time, I'll rewrite it to support both and more modes without having to run more than one script, like in your case (something like pre-defined categories). Hope you understand my point.
QuoteWhen longer commands are in the help menu, the DoTabs don't work as it should. Or is it just bad luck?
Guess it's bad luck ;)
QuoteCould u switch the place of the type an release in the +add command? Like this: +add
Some special reason?
Cheers m8
Title:
Post by: jiten on 30 May, 2005, 16:29:28
QuoteOriginally posted by yoonohoo Jiten: Can it show the link in the same line? At the moment the link is below the correspondent release.
Also when using Strongdc to add items and use this client to show them your own releases are misaligned while other clients releases are ok. Same releases viewed on other clients are fine including Strongdc entries. Just a bit of info...
Thanks
Well, I could make it that way but, we would have two problems:
1. Less freedom as Releases' size would be smaller; 2. Problems with correct tabbing.
What do you guys think about this?
Title:
Post by: Star on 30 May, 2005, 20:14:58
QuoteOriginally posted by jiten For now, you can add "mPrefix.." to the Settings.Mode part so that the setup command differs and on hub start, change the mode to request, so that both can be used.
No the setup command dosn't use mPrefix as standard. :)
QuoteWell, as I explained you earlier, running this script twice or more at the same time isn't and won't be bug free :(
Then u chould change the "NOTE:" text in the script so it says the right thing. ;) And please. don't rewrite it again :) Now it's almost bugfree!
QuoteLater, when I get more time, I'll rewrite it to support both and more modes without having to run more than one script, like in your case (something like pre-defined categories). Hope you understand my point.
Well. i want to run two scripts and not one script with two versions. And in my case, I never mention pre-defined categories.
QuoteSome special reason?
No. Just that I am use to add it in that order from other release scripts i have used.
And for the link in the same line that the other stuff. I have already test it and it don't look good. The link don't fit and it in almost all cases it's not in the right place anyway. So i vote for no! :p
Thanks jiten. //StarChild
Title:
Post by: jiten on 31 May, 2005, 09:28:44
QuoteOriginally posted by Star No the setup command dosn't use mPrefix as standard. :)
Can you explain me this part? Guess I didn't understand it well.
QuoteThen u chould change the "NOTE:" text in the script so it says the right thing. ;) And please. don't rewrite it again :) Now it's almost bugfree!
Surely, I'll add that note to the script. Btw, with a rewrite a meant another thing :D Going to start another project, similar to this one, but that also supports categories.
QuoteWell. i want to run two scripts and not one script with two versions.
I'll see what I can do to make both work at the same time. If I do, it'll be something like a special release.
QuoteNo. Just that I am use to add it in that order from other release scripts i have used.
It's really easy. Replace this in the add command:
local s,e,rel,cat = string.find(data,"%b<>%s+%S+%s+(%S+)%s+(%S+)")
Best regards
Title:
Post by: Star on 31 May, 2005, 09:54:09
QuoteOriginally posted by jiten Can you explain me this part? Guess I didn't understand it well.
The setup command don't use the mPrefix as standard! The problem whith this is that, when u running two .lua files at the same time. The command can only be used to the script who loads first in PtokaX Script list. This could easy be fix by adding the mPrifix to the !setup command in the script. And the same thing for the !reqDone command. Hope u understand me now. :)
//StarChild
Title:
Post by: jiten on 31 May, 2005, 10:10:48
QuoteOriginally posted by Star The setup command don't use the mPrefix as standard!
Indeed. Got it now. But, that would only be available in that "special" version.
QuoteAnd the same thing for the !reqDone command.
There's no need for the prefix on it, because, as you remember, it is a command for Request mode only :D
Cheers
Title:
Post by: Star on 31 May, 2005, 11:21:31
QuoteOriginally posted by jiten Indeed. Got it now. But, that would only be available in that "special" version.
What special version? And why? :)
QuoteThere's no need for the prefix on it, because, as you remember, it is a command for Request mode only :D
Yes there is. It's the same thing as whit the setup command. If I load the release script first. the !reqDone give this: *** Error: This command is only available in Request Mode. Thats why I want it to be change as default.
I think, if u change this two commands and the note. This will be the final version. Then the script can be used whit two .lua files at the same time.
Tnx //StarChild
Title:
Post by: jiten on 01 June, 2005, 16:14:09
So, if I only add the prefix to those two commands and the Note will it be ok for running both versions at the same time?
Title:
Post by: Star on 01 June, 2005, 21:56:10
Yes i think so. =) Don't u?... I'll test it... bbl
EDIT: No it don't work. And I can't understand why :( EDIT2: This is because the script don't know if it is in release mode or in request mode if both config exist when running 2 lua. Put the Release or Request option in the Settings in lua insted and it whould solv this problem. ReleaseBot = 0/1, like it was in v1.0 and v1.1
Title:
Post by: jiten on 02 June, 2005, 20:29:37
QuoteOriginally posted by Star Yes i think so. =) Don't u?... I'll test it... bbl
EDIT: No it don't work. And I can't understand why :( EDIT2: This is because the script don't know if it is in release mode or in request mode if both config exist when running 2 lua. Put the Release or Request option in the Settings in lua insted and it whould solv this problem. ReleaseBot = 0/1, like it was in v1.0 and v1.1
Probably I'm going back to that mode ;)
Cheers
Title:
Post by: Star on 03 June, 2005, 19:22:30
So. Is there any new version on it's way? :)
Title:
Post by: jiten on 03 June, 2005, 19:45:37
QuoteOriginally posted by Star So. Is there any new version on it's way? :)
-------/------------------------------------------------------------------------------------------------------------------------- -- Release or Request bot v1.5 by jiten (6/03/2005) -- For PtokaX 0.3.3.0 build 17.02 or Higher -------/------------------------------------------------------------------------------------------------------------------------- Some features:
[*]Inbuild optimized RightClick [*]Ability to switch from Release to Request mode (vice-versa) [*]Releases/Requests older than x Days are automatically deleted (optional) [*]Two separate databases: one for the Requests and the other for the Releases [*]And others...
Changelog:
[*]Changed: Release and Request Mode handling [*]Changed: Prefix handling for Setup and Reqdone [*]Small fixesGrab it HERE (http://mznetwork.mozdesigners.com/i/forum_files/Release.Request.v15.rar).
Best regards
Title:
Post by: Star on 03 June, 2005, 22:21:05
Nice jiten. Seems to work perfect now. Nice job! Tank u. :)
Thanks //Star
EDIT: Found this litle thing :( *** Error: Type +reldel no numbers left.
And when I type +reqdone it says: *** Error: Type +del
And when I type +relsetup it says: *** Error: Type +relsetup Delete "release"
Setup>Release is steal in the rightclick menu.
Title:
Post by: jiten on 04 June, 2005, 17:36:56
QuoteOriginally posted by Star Nice jiten. Seems to work perfect now. Nice job! Tank u. :)
Thanks //Star
EDIT: Found this litle thing :( *** Error: Type +reldel no numbers left.
And when I type +reqdone it says: *** Error: Type +del
And when I type +relsetup it says: *** Error: Type +relsetup Delete "release"
Setup>Release is steal in the rightclick menu.
Going to fix those small typos. Where was my head at? :D
-------/------------------------------------------------------------------------------------------------------------------------- -- Release or Request bot v1.5a by jiten (6/4/2005) -- For PtokaX 0.3.3.0 build 17.02 or Higher -------/------------------------------------------------------------------------------------------------------------------------- Changelog:
[*]Fixed some typos (thx Star) [*]Removed extra endpipes in RightClick (thx madman) -------/------------------------------------------------------------------------------------------------------------------------- Grab it HERE (http://mznetwork.mozdesigners.com/i/forum_files/Release.Request.v15a.rar).
Cheers
Title:
Post by: 6Marilyn6Manson6 on 04 June, 2005, 18:34:36
-------/------------------------------------------------------------------------------------------------------------------------- -- Release or Request bot v1.5a by jiten (6/4/2005) -- For PtokaX 0.3.3.0 build 17.02 or Higher -------/------------------------------------------------------------------------------------------------------------------------- Changelog:
[*]Fixed some typos (thx Star) [*]Removed extra endpipes in RightClick (thx madman) -------/------------------------------------------------------------------------------------------------------------------------- Grab it HERE (http://mznetwork.mozdesigners.com/i/forum_files/Release.Request.v15a.rar).
Cheers
site not work ^^
Title:
Post by: Dessamator on 04 June, 2005, 18:44:17
well at least for me it works, :)
Title:
Post by: jiten on 04 June, 2005, 18:46:04
That's strange, it's working perfectly with me too.
Title:
Post by: 6Marilyn6Manson6 on 04 June, 2005, 18:47:22
Now work ^^
Title:
Post by: Star on 04 June, 2005, 19:35:07
Thanks Jiten
Title:
Post by: jiten on 04 June, 2005, 22:58:55
QuoteOriginally posted by Star Thanks Jiten
You're welcome m8. Lets see if this is the final one ;)
PS: Have a look at "Entry Bot". You may like it.
Title:
Post by: GILLIS on 05 June, 2005, 03:51:26
this is the best release/request script so far. but i have one problem, when i add releases to my hub its usually in huge amounts, usually around 45 releases,
RELEASE#1 RELEASE#2 RELEASE#3 RELEASE#4 RELEASE#5 RELEASE#6 RELEASE#7 RELEASE#8 and so on.
now i tryed to make the chars longer because at first i got an 20 char max. so i changed it to 999 to be sure. and when i posted them, its all messed up. is this possible to fix?
GILLIS?
Title:
Post by: jiten on 05 June, 2005, 11:56:26
QuoteOriginally posted by GILLIS this is the best release/request script so far. but i have one problem, when i add releases to my hub its usually in huge amounts, usually around 45 releases,
RELEASE#1 RELEASE#2 RELEASE#3 RELEASE#4 RELEASE#5 RELEASE#6 RELEASE#7 RELEASE#8 and so on.
now i tryed to make the chars longer because at first i got an 20 char max. so i changed it to 999 to be sure. and when i posted them, its all messed up. is this possible to fix?
GILLIS?
Thanks for the compliments, GILLIS. From what I can see you're talking about the Type category. I set it to about 20 (chars) so you could put there the "Category" and in the next one its detailed description (about 90 chars). Btw, do you want to add at once 45 releases (about 900 chars)? Maybe it's better to put them in parts because it would distort all the showing appearance. Hope that I didn't misunderstood your question.
Best regards
Title:
Post by: yoonohoo on 05 June, 2005, 14:26:35
From script
Quote-- Then, open the other one and set it to Request Mode. And voila...
Which other script...did I miss something? On v1.4b you could change from rel 2 req with rc but now cmd's gone! How can I change it beside editing the script config itself?
Thanks
-------------------------------------- Don't worry just found your other fantastic script "Entry bot" Great :D Keep up the good scripting!;)
Title:
Post by: GILLIS on 05 June, 2005, 15:17:34
yes i did want to add all 45 releases at once. but as of now, your right the apperance of the release list is horrible. releases go everywhere when i add them all at once. is there a solution? i would love to keep using this script but if i cant add 45 releases at one time, its usless to me. thanks again,
GILLIS?
Title:
Post by: jiten on 05 June, 2005, 18:55:46
QuoteOriginally posted by yoonohoo Which other script...did I miss something?
That would be the same script with another filename, but, loaded to act as a Request bot.
QuoteOn v1.4b you could change from rel 2 req with rc but now cmd's gone! How can I change it beside editing the script config itself?
I removed that option because it would create conflicts if someone wanted to use the same script twice (Release and Request Mode). And yes, there's no other way to change it apart from editing the script. Sorry. Btw, thanks for your compliments ;)
QuoteOriginally posted by GILLIS yes i did want to add all 45 releases at once. but as of now, your right the apperance of the release list is horrible. releases go everywhere when i add them all at once. is there a solution? i would love to keep using this script but if i cant add 45 releases at one time, its usless to me.
Well, you surely can add 45 releases at the same time by changing the RelSize to 900 and disabling also the Link option so that it doesn't interfere. But, I don't recommend it because the appearance would be horrible. The other option you have is to add shorter (about 90 chars) once as that would not misplace the show menu.
Best regards,
jiten
Title:
Post by: jiten on 05 June, 2005, 19:12:53
Well, this one is what I would call the Version II of the Release/Request bot, as, it supports pre-defined categories. Have a look at it HERE (http://board.univ-angers.fr/thread.php?threadid=4669&boardid=26&styleid=1&sid=6c739735f12548a3c5480fd416afd1a7).
--/---------------------------------------------------------------------------- Entry Bot v1.0a (6/3/2005) For PtokaX 0.3.3.0 build 17.02 or Higher
/ Some Features: Supports pre-defined categories; Commands to add, delete, show, find entries and much more; Entries older than x Days are automatically deleted (optional) Ability to send pre-defined category's content to main when desired Includes an optimized RighClick; --/---------------------------------------------------------------------------- Cheers
Title:
Post by: GILLIS on 05 June, 2005, 19:40:51
ok thanks
Title:
Post by: Star on 15 June, 2005, 11:04:06
The Cleaner funktion don't seems to work. And if it is something wrong with that. Maybe u could change so the clener days is shown in the help. Like this. [Mode/Link/Cleaner]: [off/off/on:7days] Or like this: Operator Commands Cleaner: 7days
Thanks //StarChild
EDIT: And the | is steal in sUser:SendData("$UserCommand 0 3 |") EDIT2: The commands works in PM to other users to. Is it posseble to get it to work only in main and in PM to the bot?
Thanks
Title:
Post by: jiten on 16 June, 2005, 10:15:31
--/---------------------------------------------------- -- Release or Request bot v1.5b by jiten (6/16/2005) -- For PtokaX 0.3.3.0 build 17.02 or Higher --/---------------------------------------------------- Changelog:
-- Fixed: Extra endpipe (thx Star) -- Fixed: Commands now work in Main and PM to bot -- Fixed: Cleaner function -- Added: Cleaning Days to help command --/----------------------------------------------------
Grab it
HERE (http://mznetwork.co.mz/i/forum_files/Release.Request.v1.5b.rar). [/list]
Title:
Post by: Star on 17 June, 2005, 23:19:00
Thanks m8. I will test it later on. :)
EDIT: -U forgot a $ in RighClick>Show all -And in the rightclick, make the menu like this?:
NewUserConnected = function(sUser) if Settings.RCmenu == "" then menu = Settings.Mode.." Bot" else menu = Settings.RCmenu end if Settings.RCsMenu == "" then sMenu = "Setup" else sMenu = Settings.RCsMenu end if Config.Link == "off" then Optional = " (optional)" else Optional = "" end sUser:SendData("$UserCommand 1 3 "..menu.."\\"..sMenu"\\ sUser:SendData("$UserCommand 1 3 "..menu.."\\Add$<%[mynick]> !"..mPrefix..Settings.addCmd.." %[line:Type] %[line:Release] %[line:Link"..Optional.."]|") end-And if posseble a way to change the order of the date in Settings > DateOrder=YYMMDD
Thanks //Star
Title:
Post by: jiten on 20 June, 2005, 15:54:06
QuoteOriginally posted by Star U forgot a $ in RighClick>Show all
Fixed :]
QuoteAnd in the rightclick, make the menu like this? And if posseble a way to change the order of the date in Settings > DateOrder=YYMMDD
Currently, I don't have much time and as this is something extra (not a real bug), it won't be possible. Sorry for that. Maybe later, who knows...
Cheers
Title:
Post by: Star on 22 June, 2005, 19:50:01
When dose the cleaner check the releases? Is it 24h after the script start/restart?
Title:
Post by: jiten on 22 June, 2005, 21:18:55
QuoteOriginally posted by Star When dose the cleaner check the releases? Is it 24h after the script start/restart?
It checks every 12 hours, but, I'll add an option to make it custom in the next version.
Cheers
Title:
Post by: Star on 23 June, 2005, 06:11:11
Ok. Thanks jiten.
"43 Releases were processed. 42 Releases were deleted as they were more than 1 days old. ( 97.67% ) in: 0.0460 seconds." When this comes, it cleans. but when I type the command to show the 1 release that is left. It don't shows. But the number 43 is in the Releses.tbl
Thanks //Star
Title:
Post by: jiten on 23 June, 2005, 09:33:03
QuoteOriginally posted by Star Ok. Thanks jiten.
"43 Releases were processed. 42 Releases were deleted as they were more than 1 days old. ( 97.67% ) in: 0.0460 seconds." When this comes, it cleans. but when I type the command to show the 1 release that is left. It don't shows. But the number 43 is in the Releses.tbl
Thanks //Star
Thanks for the report. There's a little thing there I forgot to change. Fixed anyway :]
Cheers
Title:
Post by: jiten on 27 June, 2005, 11:10:05
--/---------------------------------------------------- -- Release or Request bot v1.5c by jiten (6/27/2005) -- For PtokaX 0.3.3.0 build 17.02 or Higher --/---------------------------------------------------- Changelog:
-- Fixed: Cleaner (changed to ipairs) -- Fixed: $ in Rightclick -- Added: Custom cleaner check --/----------------------------------------------------
Grab it
HERE (http://mznetwork.co.mz/i/forum_files/Release.Request.v1.5c.rar). [/list]
Title:
Post by: Star on 27 June, 2005, 15:53:44
Thanks jiten!
Title:
Post by: Star on 28 June, 2005, 19:54:08
hehe.. i set the cDelay to 0.01 to test it, and this appear:
[19:51:05] <-[VB].News> 18 Releases were processed. 18 Releases were deleted as they were more than 7 days old. ( 100.00% ) in: 0.0150 seconds. [19:51:41] <-[VB].News> 9 Releases were processed. 9 Releases were deleted as they were more than 7 days old. ( 100.00% ) in: 0.0000 seconds. [19:52:17] <-[VB].News> 4 Releases were processed. 4 Releases were deleted as they were more than 7 days old. ( 100.00% ) in: 0.0000 seconds. [19:52:53] <-[VB].News> 2 Releases were processed. 2 Releases were deleted as they were more than 7 days old. ( 100.00% ) in: 0.0000 seconds. [19:53:29] <-[VB].News> 1 Releases were processed. 1 Releases were deleted as they were more than 7 days old. ( 100.00% ) in: 0.0000 seconds. [19:54:05] <-[VB].News> 1 Releases were processed. 1 Releases were deleted as they were more than 7 days old. ( 100.00% ) in: 0.0000 seconds.So I guess it not working =)
Thanks //Star
Title:
Post by: jiten on 28 June, 2005, 20:03:09
QuoteOriginally posted by Star hehe.. i set the cDelay to 0.01 to test it, and this appear:
[19:51:05] <-[VB].News> 18 Releases were processed. 18 Releases were deleted as they were more than 7 days old. ( 100.00% ) in: 0.0150 seconds. [19:51:41] <-[VB].News> 9 Releases were processed. 9 Releases were deleted as they were more than 7 days old. ( 100.00% ) in: 0.0000 seconds. [19:52:17] <-[VB].News> 4 Releases were processed. 4 Releases were deleted as they were more than 7 days old. ( 100.00% ) in: 0.0000 seconds. [19:52:53] <-[VB].News> 2 Releases were processed. 2 Releases were deleted as they were more than 7 days old. ( 100.00% ) in: 0.0000 seconds. [19:53:29] <-[VB].News> 1 Releases were processed. 1 Releases were deleted as they were more than 7 days old. ( 100.00% ) in: 0.0000 seconds. [19:54:05] <-[VB].News> 1 Releases were processed. 1 Releases were deleted as they were more than 7 days old. ( 100.00% ) in: 0.0000 seconds.So I guess it not working =)
Thanks //Star
Going to have a close look at it. Thanks for the report.
Cheers
Title:
Post by: Star on 03 July, 2005, 13:05:16
I was thinking on the timer... Is't the Timer starts even of the timer is set to off when the scrit starts or restats. I cant find any on or off check in the Main function...
Title:
Post by: jiten on 04 July, 2005, 09:38:28
QuoteOriginally posted by Star So I guess it not working =)
OnTimer = function() if Settings.Mode == "Release" then Table = Release elseif Settings.Mode == "Request" then Table = Request end if (Config.Cleaner == "on") then -- RegCleaner based local juliannow = jdate(tonumber(os.date("%d")), tonumber(os.date("%m")), tonumber(os.date("%Y"))) local oldest, chkd, clnd, x = Settings.iClean, 0, 0, os.clock() for i = table.getn(Table), 1, -1 do chkd = chkd + 1; local _,_,month, day, year = string.find(Table[i][4], "(%d+)%/(%d+)%/(%d+)"); local julian = jdate( tonumber(day), tonumber(month), tonumber("20"..year) ) if ((juliannow - julian) > tonumber(oldest)) then clnd = clnd + 1 table.remove(Table,i) sCheck() end; end if clnd ~= 0 and Settings.pCleaner == 1 then SendToAll(Settings.sBot,chkd.." "..Settings.Mode.."s were processed. "..clnd.." "..Settings.Mode.."s were deleted as they were more than "..Settings.iClean.." days old. ( "..string.format("%0.2f",((clnd*100)/chkd)).."% ) in: "..string.format("%0.4f", os.clock()-x ).." seconds.") end end end
QuoteI was thinking on the timer... Is't the Timer starts even of the timer is set to off when the scrit starts or restats. I cant find any on or off check in the Main function...
Well, the timer is always started up, but, it depends on the Config.Cleaner status. You can change it by command.
Cheers
Title:
Post by: Star on 04 July, 2005, 17:11:03
Thanks jiten. Now the Cleaner works.
QuoteOriginally posted by jiten Well, the timer is always started up, but, it depends on the Config.Cleaner status. You can change it by command.
Yes I know.. but isn't it take unnecessary memory if the timer goes on even if it isn't in use?
Title:
Post by: jiten on 04 July, 2005, 18:17:55
QuoteOriginally posted by Star Thanks jiten. Now the Cleaner works.
QuoteOriginally posted by jiten Well, the timer is always started up, but, it depends on the Config.Cleaner status. You can change it by command.
Yes I know.. but isn't it take unnecessary memory if the timer goes on even if it isn't in use?
I will add a switch for the timer in the next version ;)
Cheers
Title:
Post by: jiten on 04 July, 2005, 21:04:14
--/---------------------------------------------------- -- Release or Request bot v1.5d by jiten (7/04/2005) -- For PtokaX 0.3.3.0 build 17.02 or Higher --/---------------------------------------------------- Changelog:
HERE (http://mznetwork.co.mz/i/forum_files/Release.Request.v1.5d.rar). [/list]
Title:
Post by: Star on 04 July, 2005, 21:28:57
Thank you jiten!
Edit: I think this is a bad way to do it: SetTimer(Settings.cDelay*60*60*1000) if Settings.sTimer == 1 then StartTimer() sCheck(1) end As if the cleaner is set to on.. it doesn't clean anyway... maybe this is bether?: SetTimer(Settings.cDelay*60*60*1000) if Config.Cleaner == "on" then StartTimer() sCheck(1) end
Thanks //Star
Title:
Post by: gOOfus on 06 July, 2005, 19:09:59
Hello, Great bot! For those if us who do add releases that exceed 90 chars. Would it be possible to add the description to a second line? Ex.;
06/21/05 18:49:35 GrandpaTom music Charlie Spivak Orchestra, 2 sessions for World Records transcriptions on March 21 and April 24, 1946 06/25/05 18:49:35 pappycalling music Crumb (soundtrack) - - Buddy Greco: Live at Mr. Kelly?s - - Audiobooks (various) - - Fats Waller: 1935 Transcriptions - - Joe Daniels - - Pete Kelly?s Blues (TV & Movie soundtracks) - - (in Vinyl): Homer & Jethro at the Convention - - Homer & Jethro at the Country Club - - Homer & Jethro Live At Vanderbilt U. - - V/A: Screwballs in Swingtime 1934-55 - - Bobby Troup! (Capitol T484) - -
Title:
Post by: Dessamator on 06 July, 2005, 19:40:37
QuoteOriginally posted by Star Thank you jiten!
Edit: I think this is a bad way to do it: SetTimer(Settings.cDelay*60*60*1000) if Settings.sTimer == 1 then StartTimer() sCheck(1) end As if the cleaner is set to on.. it doesn't clean anyway... maybe this is bether?: SetTimer(Settings.cDelay*60*60*1000) if Config.Cleaner == "on" then StartTimer() sCheck(1) end
Thanks //Star
thats exactly the same thing, just different terminologies
Title:
Post by: Star on 06 July, 2005, 21:13:21
QuoteOriginally posted by Dessamator thats exactly the same thing, just different terminologies
Both yes and no... Didn't u read it all?`
//Star
Title:
Post by: jiten on 07 July, 2005, 14:16:37
QuoteOriginally posted by Star
QuoteOriginally posted by Dessamator thats exactly the same thing, just different terminologies
Both yes and no... Didn't u read it all?`
//Star
Indeed Star. The one you showed is the best way of doing it :D
Best regards
Title:
Post by: Star on 01 September, 2005, 08:44:45
Hi there jiten.
Have a proposition for the Request list. A splited list. The upper half that displays the requests and a lower part that displays finished requests? Like this:
-------------------------------------------------------- Requests: -------------------------------------------------------- Request 1 Request 2 and so on...
-------------------------------------------------------- Finished Request -------------------------------------------------------- Reqdone 1 Reqdone 2 and so n... --------------------------------------------------------
How's that sounds?
// Thanks Star.
Title: Re: Release/Request Bot
Post by: jiten on 01 March, 2006, 18:03:26
Release or Request bot v.2a by jiten (1/18/2006) For PtokaX 0.3.3.0 build 17.02 or Higher
Changelog:
Added: Separator
Added: Requests and Filled Requests
Changed: Code structure and other stuff
Grab it
HERE (http://www.mznetwork.co.mz/scripts/Release.Request.v2a.rar).[/list]
Title: Re: Release/Request Bot
Post by: BrotherBear on 15 March, 2006, 18:12:23
Hi jiten!
I just love this script, specially the Show command, it's damn nice :)
I have somee whishes in this script and it is this:
Could you fix so you could have Categories when you Rightclick Release Bot/Add ?
And that you could add and delete Categories from Rightclick and/or in an file (categories.tbl)
It would also be nice if you could fix so you can change positions of the menus.
I'll see what I can do about your requests :)
By the way, this script wasn't meant to support categories. Give EntryBot a try for that.
Cheers
Thanks jiten :)
I know, I tried EntryBot, but I like this Script better for my suite, in EntryBot it was to much that you would know before you could Post an Release/Request, example: You must first go and check what Categories there are and Sub Categories, then you know where to Post it, or am I thinking wrong about this?
I will try it once more :)
Cheers
Title: Re: Release/Request Bot
Post by: jiten on 16 March, 2006, 16:57:33
Quote from: BrotherBear on 16 March, 2006, 12:23:35 I know, I tried EntryBot, but I like this Script better for my suite, in EntryBot it was to much that you would know before you could Post an Release/Request, example: You must first go and check what Categories there are and Sub Categories, then you know where to Post it, or am I thinking wrong about this?
You're right about that. Guess I'll return to normal categories in the next EntryBot release, so there won't be much trouble when adding and stuff.
Regards
Title: Re: Release/Request Bot
Post by: MetalPrincess on 02 July, 2006, 22:09:44
Hi jiten. I was wondering if there could be some stuff added for my hub? What I need the script to do is keep an ongoing master list of what users add that does not get cleaned. It would always be there. I also need an incoming list, a replace command and an add command that adds the shows to the master list that does not get cleaned. I've posted my member user menu below to give you an idea of what the different stuff does or at least should do.
<<Menu>>
====================================================================================== ? !list = This will show you the up to date master hub list of all the bootlegs here ? !req = Request a show to be shared. ? !rel = Any new releases that will be coming out in the hub. Put your new releases you will be releasing soon here. ? !incoming = List your shows that you have incoming. ? !reqdone = Let hubbers know that your request is done and to remove it. ? !replace = Let other hubbers know what sows you want replaced because they are mp3 or vcd sourced. ? !addlist = This will add your show to the master list.
Would it be possible to make this script incorporate these things?
Thanks MP
Title: Re: Release/Request Bot
Post by: jiten on 03 July, 2006, 20:55:15
Quote from: MetalPrincess on 02 July, 2006, 22:09:44 Hi jiten. I was wondering if there could be some stuff added for my hub? What I need the script to do is keep an ongoing master list of what users add that does not get cleaned. It would always be there. I also need an incoming list, a replace command and an add command that adds the shows to the master list that does not get cleaned. I've posted my member user menu below to give you an idea of what the different stuff does or at least should do.
Would it be possible to make this script incorporate these things?
Can you give me more details about your request? Some examples would be helpful to understand what you really want.
If that doesn't help, drop me a PM with your MSN or hub address so that we can sort this out.
Best regards
Title: Re: Release/Request Bot
Post by: MetalPrincess on 04 July, 2006, 13:50:40
OK I looked at what version I was using and I believe I had posted in the wrong place. I'm using version 0.3.5.0 With Lua 5.1.1, but I did notice there was a thread for a Request/Release bot in that area. Anyways I run a lossless bootleg hub and I want to have the ability for members to input their own bootleg shows into a master list that would be within the hub, I would like them to be able to list the list and find what shows they are looking for, request shows from other hub members, Let other hub members know when they are done with their requests, input any new releases they have coming out either from something they taped or filmed or just something they are getting in trade from another place, input thier incoming shows, Add to any of these lists shows that fit into those areas, and list any shows in which they are looking for a replacement for whether it was mp3 sourced or something was wrong with it in some way. I have the menu already made up and it works in the hub (just did a simple text file with the commands for them to read and then choose commands in main chat). But a script writer I am not :( The Release Request Bot that you had looked very much close to what I was looking for. I would also like it to auto clean the new releases like every 15-30 days. But the master list I dion't want it to clean because it would be a running list of waht the hub offers for trade with others. And of course it would be added to by the traders in the hub. I hope this helps you with what I was looking for.
MP
Title: Re: Release/Request Bot
Post by: jiten on 06 July, 2006, 11:55:40
Correct me if I'm wrong:
Basically, you want a merged Release and Request bot, where categories can be cleaned automatically or not [this can be customizable], right?
Title: Re: Release/Request Bot
Post by: MetalPrincess on 08 July, 2006, 12:07:57
yes, but I need the individual areas for members to add shows to the lists as well. If this is too huge I understand. :(
MP
Title: Re: Release/Request Bot
Post by: jiten on 08 July, 2006, 13:56:51