Release/Request Bot - Page 4
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

Release/Request Bot

Started by jiten, 19 May, 2005, 15:29:07

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

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?

jiten

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

yoonohoo

#77
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!;)

It might be simple for you but rocket science for me...

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. thanks again,

GILLIS?

jiten

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

jiten

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.
--/----------------------------------------------------------------------------
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

GILLIS

#81
ok thanks

Star

#82
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

jiten

    --/----------------------------------------------------
    -- 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.
[/list]

Star

#84
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?:
Settings = {
	RCmenu = "",				-- Default or -- RCmenu = "Hub-Menu//BotMenu"
	RCsMenu = "",				-- Default or -- RCsMenu = "customname"
}

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

jiten

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

Star

When dose the cleaner check the releases? Is it 24h after the script start/restart?

jiten

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

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

jiten

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

jiten

    --/----------------------------------------------------
    -- 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.
[/list]

Star


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

jiten

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

Star

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...

jiten

#95
QuoteOriginally posted by Star
So I guess it not working =)
Change your OnTimer function to this:
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

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?

jiten

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

jiten

    --/----------------------------------------------------
    -- Release or Request bot v1.5d by jiten (7/04/2005)
    -- For PtokaX 0.3.3.0 build 17.02 or Higher
    --/----------------------------------------------------
    Changelog:

    -- Fixed: Cleaner
    -- Added: Timer switch
    -- Minor fixes
    --/----------------------------------------------------

    Grab it
HERE.
[/list]

Star

#99
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

SMF spam blocked by CleanTalk