PtokaX forum

Archive => Archived 5.1 boards => Finished Scripts => Topic started by: jiten on 26 March, 2006, 12:55:40

Title: Release/Request Bot
Post by: jiten on 26 March, 2006, 12:55:40





HERE (http://www.mznetwork.co.mz/scripts/RR3a.rar).[/list]
Title: Re: Release/Request Bot
Post by: Psycho_Chihuahua on 26 March, 2006, 13:52:17
and as of now also here --> HERE (http://ptxscriptdb.psycho-chihuahua.net/download.php?view.214).[/list]
Title: Re: Release/Request Bot
Post by: zinden on 26 March, 2006, 14:01:53
!showcat  dont work
Title: Re: Release/Request Bot
Post by: jiten on 26 March, 2006, 14:11:11
Quote from: zinden on 26 March, 2006, 14:01:53
!showcat? dont work

Indeed. It depends on the Mode and Prefix you've chosen.

The default prefix for Request is "req" and for Release Mode is "rel".

So, the commands would be !prefixcommand. Example: !relshowcat; !reqshowcat; and so on.
Title: Re: Release/Request Bot
Post by: zinden on 26 March, 2006, 14:13:20
ahh ok.....then its possible to run 2 scripts on this?
one for release and one for requests?
or will that be any probs?

Edit: when creating catagories, you can fill in days....is that days for the exist of cataogry or exists of the releases in that catagory?
how to disable it?
Title: Re: Release/Request Bot
Post by: jiten on 26 March, 2006, 14:49:01
Quote from: zinden on 26 March, 2006, 14:13:20
ahh ok.....then its possible to run 2 scripts on this?
one for release and one for requests?
or will that be any probs?
Yes, it's possible and there won't be any problem. It's meant to be compatible :)

Quote from: zinden on 26 March, 2006, 14:13:20
Edit: when creating catagories, you can fill in days....is that days for the exist of cataogry or exists of the releases in that catagory?
how to disable it?
The day value is directly related to the cleaner. When the releases are "x" days old, they will be deleted.
If you want to disable the cleaner, set:

bTimer = false,

or

Type: !<prefix>setup cleaner off (where <prefix> is the Mode's one)

Title: Re: Release/Request Bot
Post by: BrotherBear on 26 March, 2006, 17:01:31
Quote from: jiten on 26 March, 2006, 14:11:11
Quote from: zinden on 26 March, 2006, 14:01:53
!showcat? dont work

Indeed. It depends on the Mode and Prefix you've chosen.

The default prefix for Request is "req" and for Release Mode is "rel".

So, the commands would be !prefixcommand. Example: !relshowcat; !reqshowcat; and so on.

Hi jiten!

WHen I use Showcat command via RC this appears in Main:

!showcat

and nothing happens, but when I type !reqshowcat it shows up,

Tried to change in the Req script

showCatCmd = "showcat",? ? to? ?showCatCmd = "reqshowcat",

But it does not work either.


Regards,

BroherBear
Title: Re: Release/Request Bot
Post by: BrotherBear on 26 March, 2006, 17:36:50
I did a work around to get it to work:

      tRC = "Show\\Categories$<%[mynick]> !"..Settings.showCatCmd

      tRC = "Show\\Categories$<%[mynick]> !req"..Settings.showCatCmd

Added req before !
Title: Re: Release/Request Bot
Post by: BrotherBear on 26 March, 2006, 17:39:39
What do I have to change in the Script to get it as an Request Bot then?

I have set this:

   sMode = "Request",

Is it anything else to change to get it to work in Rightclick with !showcat to !reqshowcat?
Title: Re: Release/Request Bot
Post by: jiten on 26 March, 2006, 18:31:04
Quote from: BrotherBear on 26 March, 2006, 17:39:39
What do I have to change in the Script to get it as an Request Bot then?

I have set this:

   sMode = "Request",

Is it anything else to change to get it to work in Rightclick with !showcat to !reqshowcat?

That's my fault. I forgot to add tPrefix to Settings.showCatCmd' tRC and sExample. It should be like this:


sExample = "\t!"..tPrefix..Settings.showCatCmd,
tRC = "Show\\Categories$<%[mynick]> !"..tPrefix..Settings.showCatCmd

Title: Re: Release/Request Bot
Post by: BrotherBear on 26 March, 2006, 18:40:19
Quote from: jiten on 26 March, 2006, 18:31:04
Quote from: BrotherBear on 26 March, 2006, 17:39:39
What do I have to change in the Script to get it as an Request Bot then?

I have set this:

   sMode = "Request",

Is it anything else to change to get it to work in Rightclick with !showcat to !reqshowcat?

That's my fault. I forgot to add tPrefix to Settings.showCatCmd' tRC and sExample. It should be like this:


sExample = "\t!"..tPrefix..Settings.showCatCmd,
tRC = "Show\\Categories$<%[mynick]> !"..tPrefix..Settings.showCatCmd



Ok, I'm glad that it is fixed now, Thanks jiten :)
Title: Release/Request Bot v.3a
Post by: jiten on 27 March, 2006, 19:26:15
First post updated with some fixes/additions.
Title: Re: Release/Request Bot
Post by: BrotherBear on 27 March, 2006, 20:32:42
Is this true!!!!

You are the man of Universe jiten :)

Yeeeeehaaaaa, I'm so happy, happy, happy :)
Title: Re: Release/Request Bot
Post by: BrotherBear on 27 March, 2006, 20:46:31
One little change and I am happier then above :D

When I have created Categories and users can add Rel/req I would like to get rid off:

Release Bot/Add/RELEASE/DVDr

A RELEASE I already know that it is :)

Thank you VERY MUCH for this wonderful Script :)
Title: Re: Release/Request Bot
Post by: jiten on 27 March, 2006, 21:08:24
Quote from: BrotherBear on 27 March, 2006, 20:46:31
One little change and I am happier then above :D

When I have created Categories and users can add Rel/req I would like to get rid off:

Release Bot/Add/RELEASE/DVDr

A RELEASE I already know that it is :)

Thank you VERY MUCH for this wonderful Script :)

As I explained, you just need to edit/rename each Commands' tRC according to your needs. That should do it.
By the way, you're quite welcome, mate :)

Regards
Title: Re: Release/Request Bot
Post by: BrotherBear on 27 March, 2006, 21:30:02
Thanks jiten :)

Now I am Totaly satisfied :)
Title: Re: Release/Request Bot
Post by: BrotherBear on 29 March, 2006, 22:48:26
Now I have used Release/Request Bot in my hub for a time and I just love it :)

Try it out folks :)
Title: Re: Release/Request Bot
Post by: YouAlreadyKnow on 30 May, 2006, 02:47:54
iv bin useing this script for some time now and love it but a few of my users just now told me they cant add rel/req
and i made a test account to see if it was true and it is...what do i need to chang in the script so all my users can add rel/req ?

thanks for any help

YAK
Title: Re: Release/Request Bot
Post by: jiten on 30 May, 2006, 11:09:42
Quote from: YouAlreadyKnow on 30 May, 2006, 02:47:54
what do i need to chang in the script so all my users can add rel/req ?

Search for [Settings.addCmd] that can be found under tCmds and you'll see a table like this:


tLevels = {
[0] = 1,
[1] = 1,
[4] = 1,
[5] = 1,
},


These are the profiles allowed to use the addCmd. Therefore, to allow normal users (I suppose, unregistered), just add [-1] = 1, to it.
Title: Re: Release/Request Bot
Post by: CrazyGuy on 30 May, 2006, 12:12:43
Gonna play with this 1 too Jiten  8)

Be afraid..... be very afraid  ;D hehe
Title: Re: Release/Request Bot
Post by: jiten on 31 May, 2006, 06:50:48
Quote from: CrazyGuy on 30 May, 2006, 12:12:43
Gonna play with this 1 too Jiten? 8)

Be afraid..... be very afraid? ;D hehe

Surely, mate. By the way, any progress? :P
Title: Re: Release/Request Bot
Post by: CrazyGuy on 31 May, 2006, 12:02:23
To be honest, I haven't been able to cause any troubles with this 1 yet  :P
On the other hand, not sure if the script fits my needs, but it's something similair like that anyways.
I'll go over that with ya some day soon and maybe you can make it for me then  ???

Title: Re: Release/Request Bot
Post by: GrinSlaW on 27 June, 2006, 18:20:44
hello jiten :)

how do i get rid of the vote system ? or at least the commands in rightclick and the help menu :)

cheers
Title: Re: Release/Request Bot
Post by: jiten on 28 June, 2006, 18:55:15
Quote from: GrinSlaW on 27 June, 2006, 18:20:44
how do i get rid of the vote system ? or at least the commands in rightclick and the help menu :)

Well, the easiest way is to comment the functions related to the Vote system in the tCmds table.
Title: Re: Release/Request Bot
Post by: GrinSlaW on 28 June, 2006, 20:06:18
oki will try that, tnx :)

cheers
Title: Re: Release/Request Bot
Post by: jiten on 28 June, 2006, 20:56:54
Quote from: GrinSlaW on 28 June, 2006, 20:06:18
oki will try that, tnx :)

If something comes up, just let me know.

Best regards
Title: Re: Release/Request Bot
Post by: GrinSlaW on 29 June, 2006, 03:55:04
umn should i comment the whole command function or just some line ?

here i have comment just one line.

tCmds = {
--[Settings.clrVotesCmd] = {
tFunc = function(user,data)
-- Empty votes
tFunctions.Releaser(5); tVote = nil; tVote = {}
tFunctions:save(tTable); tFunctions:save(tVote,"tVote",Settings.fVote)
user:SendData(Settings.sBot,"*** All votes have been successfully cleared.")
end,
tLevels = {
[0] = 1,
[1] = 1,
[4] = 1,
[5] = 1,
},
sDesc = "Clear all Votes",
sExample = "\t!"..tPrefix..Settings.clrVotesCmd,
tRC = "Vote\\Clear$<%[mynick]> !"..tPrefix..Settings.clrVotesCmd },


Title: Re: Release/Request Bot
Post by: Dessamator on 29 June, 2006, 09:06:06
The whole function.
Title: Re: Release/Request Bot
Post by: GrinSlaW on 30 June, 2006, 04:21:33
nicely done mutor :) that gave me a clear picture how to do it.  tnx alot :D

cheers
Title: Re: Release/Request Bot
Post by: Dessamator on 30 June, 2006, 10:19:09
Another way of doing it, could have been changing the tLevels and only allowing the highest profile and the "Right Clicks" wouldnt be sent to the others.
Title: Re: Release/Request Bot
Post by: GrinSlaW on 30 June, 2006, 10:55:39
Quote from: Dessamator on 30 June, 2006, 10:19:09
Another way of doing it, could have been changing the tLevels and only allowing the highest profile and the "Right Clicks" wouldnt be sent to the others.


hehehe yeah thats true didn't think of that :P will se how i do it many tnx for help :)

cheers
Title: Re: Release/Request Bot
Post by: electronic_Psycho on 26 July, 2006, 01:32:27
hi Jiten..

i try this script & is Grate  ;D

i want ask if possibol to make something like that in main chat..

"    :::T:h:e:: 5  ::L:a:s:t::R:e:l:e:a:s:e:s::..!..::

   1 - [25/07/06] PsyChedelic added by *******  ::  Peacedata_-_X-Television-(Bootleg)-2005-PsyCZ
   2 - [25/07/06] PsyChedelic added by *******  ::  Encephalopaticys_-_Psychotermic_Meditation-2006-MYCEL
   3 - [25/07/06] PsyChedelic added by *******  ::  Floattank_-_Touch_The_Void-2006-MYCEL
   4 - [25/07/06] PsyChedelic added by *******  ::  Glookanary_Express_-_Glookanary_Express-(Promo_CDS)-2005-PsR
   5 - [25/07/06] Ambient added by *******  ::  VA-Cryosphere-CDR-2006-SEVER
"
when u enter to the hub.. u will c the last 5 rls ??  ::)
[like in fresh stuff] ;)

if this can be its be grate!!! 
tnx...  8)
Title: Re: Release/Request Bot
Post by: Markitos on 26 July, 2006, 10:01:43
Read the 1st post carefully electronic_Psycho...
Title: Re: Release/Request Bot
Post by: electronic_Psycho on 26 July, 2006, 13:27:08
hi Markitos  :)

i read it all.. but i dont get the point,,,

u can be mor specific man ?  [sorry my english not so good]

tnx
Title: Re: Release/Request Bot
Post by: jiten on 26 July, 2006, 16:28:50
Quote from: electronic_Psycho on 26 July, 2006, 01:32:27
i want ask if possibol to make something like that in main chat..
when u enter to the hub.. u will c the last 5 rls ??? ::)
[like in fresh stuff] ;)

Yes, it's possible.

All you need to do, is set:

bSendOnConnect = true,

And change these values according to your needs [5, probably]:


-- Max shown releases/requests
iMax = 30,
-- Max shown Filled Requests
fMax = 30,
Title: Re: Release/Request Bot
Post by: electronic_Psycho on 26 July, 2006, 17:27:38
 tnx u man :D

i do it but,,when i type rls its show only 5 .. & in pm :-[

tnx on help man.. :)

i mean first ' that i want the bot sand the last 5 rls in main ,,

   :::T:h:e:: 5  ::L:a:s:t::R:e:l:e:a:s:e:s::..!..::

   1 - [25/07/06] PsyChedelic added by *******  ::  Peacedata_-_X-Television-(Bootleg)-2005-PsyCZ
   2 - [25/07/06] PsyChedelic added by *******  ::  Encephalopaticys_-_Psychotermic_Meditation-2006-MYCEL
   3 - [25/07/06] PsyChedelic added by *******  ::  Floattank_-_Touch_The_Void-2006-MYCEL
   4 - [25/07/06] PsyChedelic added by *******  ::  Glookanary_Express_-_Glookanary_Express-(Promo_CDS)-2005-PsR
   5 - [25/07/06] Ambient added by *******  ::  VA-Cryosphere-CDR-2006-SEVER

something like that .. only 5 last without category or something..

i hope that u understend me..  :)

if this can be ?
tnx allot

Title: Re: Release/Request Bot
Post by: jiten on 26 July, 2006, 17:46:34
Quote from: electronic_Psycho on 26 July, 2006, 17:27:38
tnx u man :D

i do it but,,when i type rls its show only 5 .. & in pm :-[

tnx on help man.. :)

Here's a quick [not tested] workaround that only shows the last 5 releases on connect:

Change your 'NewUserConnected' and 'tFunctions.ShowX' functions to this:

tFunctions.ShowX = function(Table, iMax)
local msg, iMax = "", (iMax or Settings.iMax)
for Cat,a in pairs(Table) do
for v = table.getn(Table[Cat]) - iMax + 1, table.getn(Table[Cat]), 1 do
if Table[Cat][v] then
local tmp = Table[Cat][v]
local fLink = function()
local lnk = ""
if tmp.sLink ~= "" then lnk = "\r\n"..string.rep("\t",11).."[ "..tmp.sLink.." ]" end
return lnk
end
msg = msg.."? ? ?"..v..".\t"..tmp.iVote.."\t"..tmp.iTime.."\t\t"..tmp.sPoster..
tFunctions.DoTabs(tFunctions.CheckSize(tmp.sPoster))..Cat..tFunctions.DoTabs(tFunctions.CheckSize(Cat))..tmp.sRel..fLink().."\r\n"
end
end
end
return msg
end

NewUserConnected = function(user)
-- Send Releases/Requests on Connect
if Settings.bSendOnConnect then
user:SendPM(Settings.sBot,tFunctions.Structure(string.rep("\t",9).."Last 5 "..Settings.sMode.."s per Category "..
string.rep("\t",6).."["..os.date().."]\r\n",tFunctions.ShowX(tTable, 5),tTable))
end
-- Sending RightClick
if Settings.bSendRC then
if user.bUserCommand then
-- Build user-specific temp RC table
local tRC = {}; tFunctions.GetRC(user,tRC); table.sort(tRC);
-- Send RC alphabetically sorted
for i in ipairs(tRC) do
user:SendData("$UserCommand 1 3 "..Settings.sMode.." Bot\\"..tRC[i].."&#124;")
end;
collectgarbage(); io.flush();
end
end
-- Offline tFilled Report
if tOffline[user.sName] then user:SendPM(Settings.sBot,tOffline[user.sName]); tOffline[user.sName] = nil end
end


To get an output like the one you asked for, the script will need to be modded 'some'.
As additional information, tFunctions.ShowX, tFunctions.TopContent, tFunctions.Releaser and tFunctions.Structure would need to be 'treated'.
Title: Re: Release/Request Bot
Post by: TrIp-iN-SuN on 17 August, 2006, 17:13:41
   ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
   [Cleaner / Link]: [off / off]         Release/Request v.3a by jiten            [Request Mode]
   ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
   Commands:      Description:         Example:

   !reqdelall         Deletes all Requests      !reqdelall
   !reqsetup         Configure this bot.         !reqsetup <link/cleaner> <on/off>
   !reqtopposter      Top Request Voting         !reqtopvoter
   !reqclrvote      Clear all Votes         !reqclrvote
   !reqaddcat      Add category & time         !reqaddcat "Movies" 15
   !reqdel         Deletes Requests         !reqdel "Category" ID/Empty
   !reqdone         Fills up a Request         !reqdone "Category" <ID>
   !reqshow         Last 30/all Requests      !reqshow; !reqshow all; !reqshow <category>
   !reqvote         Vote for a certain Request      !reqvote "Movies" 1
   !reqhelp         Displays this help.         !reqhelp
   !reqfind         Find a Request         !reqfind "jiten"
   !reqtopvoter      Top Request Voting         !reqtopvoter
   !reqadd         Adds a Request         !reqadd "Movie" "Blade3" http://www.blade.com
   !reqshowcat      Shows categories         !reqshowcat
   !reqdelcat         Deletes a category         !reqdelcat "Movies"
   ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

how i make command with out perfix req? same one can help me i don;t found where i can close this
Title: Re: Release/Request Bot
Post by: jiten on 17 August, 2006, 19:42:17
Quote from: TrIp-iN-SuN on 17 August, 2006, 17:13:41
how i make command with out perfix req? same one can help me i don;t found where i can close this

Check your settings again and look for this:

-- false: Normal commands; true: Commands with Prefix (default)
bPrefix = false,
Title: Re: Release/Request Bot
Post by: TrIp-iN-SuN on 17 August, 2006, 23:38:20
tnx bro it's work
Title: Re: Release/Request Bot
Post by: TrIp-iN-SuN on 18 August, 2006, 14:44:03
how i closed Request i want only use release becose that Request make me problams to add catgory and more thing for release
Title: Re: Release/Request Bot
Post by: TrIp-iN-SuN on 18 August, 2006, 14:45:50
and how i changed right clicker name in that script i can't find this too?
Title: Re: Release/Request Bot
Post by: Psycho_Chihuahua on 18 August, 2006, 15:26:55
Check Line 701 of the script

Code (lua) Select
user:SendData("$UserCommand 1 3 "..Settings.sMode.." Bot\\"..tRC[i].."|")

for instance you can change that to whatever you will

for example

Code (lua) Select
user:SendData("$UserCommand 1 3 YourBotname\\"..tRC[i].."|")
Title: Re: Release/Request Bot
Post by: TrIp-iN-SuN on 18 August, 2006, 15:54:19
tnx it's work
Title: Re: Release/Request Bot
Post by: TrIp-iN-SuN on 18 August, 2006, 15:59:33
same one can help me
   - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -
           Requests? Category List:
   - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -
          ? Ambient (365 days)
          ? Psychedelic (365 days)

i add to category and when i try to add release it's type me all time
i doing command !add psychedelic test
it's type me
????? Syntax Error: Type !add <category> <type>
Title: Re: Release/Request Bot
Post by: jiten on 18 August, 2006, 20:02:20
Quote from: TrIp-iN-SuN on 18 August, 2006, 14:44:03
how i closed Request i want only use release becose that Request make me problams to add catgory and more thing for release

I'm not sure of what you mean with this, but, here's my guess.

If you don't want the Request mode, just delete this from the tSetup table, and then restart your scripts:

-- Request Bot Setup
request = {
-- Prefix for its commands
sPrefix = "req",
-- Folder where the DBs will be stored
sFolder = "Requests",
-- Files related to the Mode (First one is the Main DB)
fDB = { Settings.fRequest, Settings.fReqDone, Settings.fOffline, Settings.fConfig, Settings.fVote },
},


Quote from: TrIp-iN-SuN on 18 August, 2006, 15:59:33
i add to category and when i try to add release it's type me all time
i doing command !add psychedelic test
it's type me
?•?•? Syntax Error: Type !add <category> <type>

If you have the separator enabled, it must be used for both category and type.

Default example: !add "category" "type"
Title: Re: Release/Request Bot
Post by: TrIp-iN-SuN on 20 August, 2006, 14:53:05
same one can help me
   - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -
           Requests? Category List:
   - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -
          ? Ambient (365 days)
          ? Psychedelic (365 days)

i add to category and when i try to add release it's type me all time
i doing command !add psychedelic test
it's type me
????? Syntax Error: Type !add <category> <type>

this is not work when i type this command in main chat onlt in right clicker
Title: Re: Release/Request Bot
Post by: jiten on 20 August, 2006, 16:49:57
Quote from: TrIp-iN-SuN on 20 August, 2006, 14:53:05
same one can help me

Don't be afraid to read the replies to your posts carefully.

I've already posted the solution to your problem:

Quote from: jiten on 18 August, 2006, 20:02:20
If you have the separator enabled, it must be used for both category and type.

Thus, you should use: !add "psychedelic" "test"
Title: Re: Release/Request Bot
Post by: TrIp-iN-SuN on 21 August, 2006, 00:13:38
tell me and how i doning this with out this tag ----------> ""
Title: Re: Release/Request Bot
Post by: jiten on 21 August, 2006, 11:55:26
Quote from: TrIp-iN-SuN on 21 August, 2006, 00:13:38
tell me and how i doning this with out this tag ----------> ""

Did you check your settings before posting? It's everything there:

-- Separator for Release/Request and Type. Default one is "
sSep = "\"",


If you don't want the ", set:

sSep = "",
Title: Re: Release/Request Bot
Post by: Rob Slob on 29 August, 2006, 12:31:44
What do i need to change to make !reqhelp and !reqshowcat show in PM than main?
Title: Re: Release/Request Bot
Post by: jiten on 30 August, 2006, 12:52:29
Quote from: Rob Slob on 29 August, 2006, 12:31:44
What do i need to change to make !reqhelp and !reqshowcat show in PM than main?

For each of those commands [under tCmds table], replace user:SendData with user:SendPM
Title: Re: Release/Request Bot
Post by: Rob Slob on 30 August, 2006, 21:55:42
Thank you :)
Title: Re: Release/Request Bot
Post by: JueLz on 31 August, 2006, 06:41:08
Nice script I love release bots
Title: Re: Release/Request Bot
Post by: tekclon on 06 September, 2006, 21:43:45
hi mate !!

how can I add the "Add"- command to the VIP-profile in the rightclick-menue?

thanx for help
Title: Re: Release/Request Bot
Post by: electronic_Psycho on 07 September, 2006, 09:33:38
thanks you very much jiten..
i go try do it :D
goood morning & good day
tnx.. :)
Title: Re: Release/Request Bot
Post by: jiten on 08 September, 2006, 21:45:18
Quote from: tekclon on 06 September, 2006, 21:43:45
hi mate !!

how can I add the "Add"- command to the VIP-profile in the rightclick-menue?

thanx for help

Evening mate.

If that's so, you must give permission for those commands to the VIP profile.

For example, if you want the VIPs to add stuff, then:


[Settings.addCmd] = {
tFunc = function(user,data)
local s,e,cat,rel = string.find(data,"^%S+%s+"..Settings.sSep.."(.+)"..Settings.sSep.."%s+"..Settings.sSep.."(.+)"..Settings.sSep)
local s,e,link = string.find(data,"^%S+%s+%S+%s+%S+%s+(.+)")
link = link or ""
if (tConfig.Link == "off") or (tConfig.Link == "on" and link and link ~= "") then
-- Typed category
if cat then
-- Lower it
local Cat = string.lower(cat)
-- DB contains it
if tTable[Cat] then
if (string.len(rel) > Settings.iRelSize) then
user:SendData(Settings.sBot,"*** Error: The "..Settings.sMode.."s can't have more than "..Settings.iRelSize.." characters.")
else
local Exists = nil
-- For each pair in the category
for i,v in ipairs(tTable[Cat]) do
-- Check if rel doesn?t exist
if tTable[Cat] and string.lower(v.sRel) == string.lower(rel) then Exists = 1 end
end
if Exists then
user:SendData(Settings.sBot,"*** Error: There's already a "..Settings.sMode.." named: \""..rel.."\".")
else
table.insert( tTable[Cat], { sRel = rel, sPoster = user.sName, sLink = link, iTime = os.date(), iVote = 0, } ); tFunctions:save(tTable);
SendToAll(Settings.sBot,"*** "..user.sName.." added a new "..Settings.sMode..": "..rel..". For more details type: !"..tPrefix..Settings.showCmd)
end
end

else
user:SendData(Settings.sBot,"*** Error: There is no Category: \""..cat.."\" in "..Settings.sMode.."s!")
end
else
user:SendData(Settings.sBot,"*** Syntax Error: Type !"..tPrefix..Settings.addCmd.." <category> <type>")
end
else
user:SendData(Settings.sBot,"*** Error: Type !"..tPrefix..Settings.addCmd.." "..Settings.sSep..
"Type"..Settings.sSep.." "..Settings.sSep..Settings.sMode..Settings.sSep.." <link> (Link is required)")
end
end,
tLevels = {
[0] = 1,
[1] = 1,
[2] = 1,
[4] = 1,
[5] = 1,
},
sDesc = "\tAdds a "..Settings.sMode,
sExample = "\t!"..tPrefix..Settings.addCmd.." "..Settings.sSep.."Movie"..Settings.sSep.." "..Settings.sSep.."Blade3"..Settings.sSep.." http://www.blade.com",
tRC = "Add\\"..Settings.sMode.."\\{}$<%[mynick]> !"..tPrefix..Settings.addCmd.." "..Settings.sSep.."{}"..Settings.sSep.." "..Settings.sSep.."%[line:Release]"..Settings.sSep.." %[line:Link]",
bExtend = true,
},


As you can see, under the tLevels table, I've added the VIP profile [2] = 1,. Thus, they will be able to use the command and receive its right click commands.
Title: Re: Release/Request Bot
Post by: RedTiger on 03 January, 2007, 01:34:31
Is there any easy way to set a max user request, i mean if you set it to 2 then the users
only could post 2 requests, and if someone finds it or if its deleted then they could post
requests again.

So i want a function that checks agains the db file and se how many requests that use
have in the db file, and if it is less that 2 then he could go on request else show error
message.

Thanks.
Title: Re: Release/Request Bot
Post by: BrotherBear on 06 January, 2007, 01:13:51
Hi Jiten!

I can't run the !relshow all command, nothing happens :(

I can run the !relshow command.

We have about 1200 Releases of example DVDr Category, is this the
problem? To many?

Thanks in advance :)
Title: Re: Release/Request Bot
Post by: BrotherBear on 06 January, 2007, 16:30:37
I Have tested it more now.

The ID nr 301 is gone and the next is 302.

If I rename ID 302 to 301 then I can see the 301 first DVDr Releases
and if I rename 303 to 302 I can see the 302 first DVDr Releases

I've tried to rename the last ID 1227 to 301 too but it don't work :(

Pleeeaaassse help me!
Title: Re: Release/Request Bot
Post by: mgforce on 11 February, 2007, 09:38:23
Quote from: RedTiger on 03 January, 2007, 01:34:31
Is there any easy way to set a max user request, i mean if you set it to 2 then the users
only could post 2 requests, and if someone finds it or if its deleted then they could post
requests again.

So i want a function that checks agains the db file and se how many requests that use
have in the db file, and if it is less that 2 then he could go on request else show error
message.

Thanks.
ya... this is a great idea.. but I guess its difficult to implement as for this the script has to check the requests already done by a user from some log file which doesnot seem easy to me...

also it seems that jiten has been busy in real life as not been online for over 2 months or so and so very less chances of getting his reply
Title: Re: Release/Request Bot
Post by: Vipertje on 01 June, 2007, 01:45:40
I receive a error using rightclick menu -> Request Bot -> Fill -> Up requests -> Catagory and the wat I request for

I get response :   *** Error: Type !reqdone "Category" <ID>

What am I doing wrong?
And a other fault when I change the setting Request to Other (thats the setting for both (request & release))

[01:26] Syntax C:\HUBSOFT\[NL]MainCore\scripts\RR3a.lua:153: attempt to index field '?' (a nil value)

What do I wrong? Except being a NooB in scripting!! :P
Title: Re: Release/Request Bot
Post by: BrotherBear on 04 July, 2007, 01:59:26
Quote from: Vipertje on 01 June, 2007, 01:45:40
I receive a error using rightclick menu -> Request Bot -> Fill -> Up requests -> Catagory and the wat I request for

I get response :   *** Error: Type !reqdone "Category" <ID>

What am I doing wrong?

Hi Vipertje

I think that you are typing the Releasename instead of the ID number.

Regards,

BrotherBear
Title: Re: Release/Request Bot
Post by: dontwalkpast on 10 December, 2007, 07:58:49
The download links are broken. Can someone please post a link again?
Title: Re: Release/Request Bot
Post by: CrazyGuy on 10 December, 2007, 11:21:03
Quote from: dontwalkpast on 10 December, 2007, 07:58:49
The download links are broken. Can someone please post a link again?

The download link in post #1 works fine
The link in post #2, by Psycho_Chihuahua doesn't
Use the link in the first post  ;)
Title: Re: Release/Request Bot
Post by: dontwalkpast on 10 December, 2007, 19:21:08
The link in original post isn't working for me, but I found the file elsewhere. Here it is a new <a href=http://rapidshare.com/files/75653731/RR3a.lua>link</a>.
Title: Re: Release/Request Bot
Post by: dontwalkpast on 10 December, 2007, 19:47:14
Can someone help me with 2 things please?

   1. Remove the "link" feature completely.
   2. Do not kick a user for typing in the Request Bot pm window.

I have tried myself, but failed.  :(

--[[

Release/Request Bot v3a - LUA 5.0.2/5.1 by jiten (3/27/2006)

Thanks to Star for the ideas and bug discovery gift

Features:

- Switch from Release to Request or other custom Mode; *new*
- Each mode supports pre-defined categories; *new*
- Automatic cleaner for each category (optional); *new*
- Separate dbs/folders for each Mode;
- Custom separator for entries;
- Send latest posts on Connect (optional);
- Custom prefix for each Mode;
- RighClick sent in alphabetical order
  Place a number behind the command to customize sending order (Delete --> 1. Category);
- And much more...

NOTE: For those who want to run a Release and Request or Other custom Mode at the same time,
start the first script and set it to Release Mode.
Then, open the other one and set it to Request or Other Mode. And voila...
Remember to verify if the commands are different from each other.

Changelog:

- Changed: Major rewrite to the Code;
- Removed: Lots of unnecessary code;
- Added: Comments to the code;
- Changed: Command parsing and table structure;
- Removed: Levels table;
- Changed: RightClick is sent in alphabetical order;
- Changed: Cleaner;
- Changed: Other mods.
- Changed: Bot supports custom Modes besides Release and Request (NEW);
- Added: Add, Show and Del Categories; Top Voter, Top Poster and Clear Votes commands;
- Added: Cleaner for each Category;
- Changed: RightClick is sent in alphabetical order;
- Changed: Other mods;
- Fixed: Missing prefix in showcat?s RC and Example;
- Added: Timed Category content to main in a custom interval;
- Added: Existing Categories for each command in RightClick - requested by BrotherBear (3/27/2006)

]]--

Settings = {
-- Default Hub BotName or "custombot"
sBot = "Request Bot",
-- true = Register Bot automatically, false = don't
bReg = true,
-- Release = Act as Release bot; Request = Act as Request Bot; Other = Act as Other Bot
sMode = "Request",
-- Script Version
iVer = "3a",
-- Separator for Release/Request and Type. Default one is "
sSep = "\"",
-- true = Start Timer automatically; false = don't
bTimer = true,
-- 1 = Send iMax Requests/Releases on connect; 0 = Don't
bSendOnConnect = true,
-- Max shown releases/requests
iMax = 10,
-- Max shown Filled Requests
fMax = 10,
-- Max shown Votes
vMax = 10,
-- Max shown Posters
pMax = 10,
-- Databases' filename
fVote = "tVote.tbl",
fConfig = "tConfig.tbl",
fRequest = "tRequest.tbl",
fRelease = "tRelease.tbl",
fReqDone = "tFilled.tbl",
fOffline = "tOffline.tbl",
-- Category?s Size
iCatSize = 20,
-- Release's size
iRelSize = 90,
-- Cleaner Checking Delay (in hours)
iCleanDelay = 12,
-- true = Sends cleaner actions to all; false = doesn't
bCleanReport = true,
-- true: Case-sensitive search; false: not case-sensitive
bSensitive = false,
-- true = Send RighClick; false = Don't
bSendRC = true,
-- true = Enable Timed Category content to Main, false = disable
bTimedCat = false,
-- Message shown below each Timed Category in Main
sTimedMsg = "your message",
-- ["time in 24h format"] = "Category" (not case sensitive)
Times = {
["12:00"] = "test",
},
-- false: Normal commands; true: Commands with Prefix (default)
bPrefix = true,
-- Commands
addCmd = "add", delCmd = "del", showCmd = "show", findCmd = "find",
delAllCmd = "delall", voteCmd = "vote", TopVotesCmd = "topvoter",
clrVotesCmd = "clrvote",  TopPosterCmd = "topposter", helpCmd = "help", rDoneCmd = "done",
SetupCmd = "setup", addCatCmd = "addcat", delCatCmd = "delcat", showCatCmd = "showcat",
}

tConfig = {}; tFilled = {}; tOffline = {}; tVote = {}; tabTimers = {n=0}; TmrFreq = 60*1000;

-- ATTENTION: Don't change this
tPrefix = "";

-- Setup your Prefixes and Folders here
tSetup = {

--[[

From now on, you can create your own Mode. Just follow this example:

-- This should be the same string used in Settings.sMode. It MUST be in lower-case here.
other = {

-- Prefix for its commands
sPrefix = "other",

-- Folder where the DBs will be stored
sFolder = "Others",

-- Files related to the Mode (First one is the Main DB)
fDB = { Settings.fRelease, Settings.fConfig, Settings.fVote },
},

]]--

-- Release Bot Setup
release = {
-- Prefix for its commands
sPrefix = "rel",
-- Folder where the DBs will be stored
sFolder = "Releases",
-- Files related to the Mode (First one is the Main DB)
fDB = { Settings.fRelease, Settings.fConfig, Settings.fVote },
},
-- Request Bot Setup
request = {
-- Prefix for its commands
sPrefix = "req",
-- Folder where the DBs will be stored
sFolder = "Requests",
-- Files related to the Mode (First one is the Main DB)
fDB = { Settings.fRequest, Settings.fReqDone, Settings.fOffline, Settings.fConfig, Settings.fVote },
},
}

-- Prefix setup
if Settings.bPrefix then tPrefix = tSetup[string.lower(Settings.sMode)].sPrefix end

Main = function()
-- Register sBot
if Settings.bReg then frmHub:RegBot(Settings.sBot) end
-- Register Timers
tFunctions.RegTimer(tFunctions.Cleaner, Settings.iCleanDelay*60*60*1000);
tFunctions.RegTimer(tFunctions.TimedCat, 60*1000);
-- Set and Start
SetTimer(TmrFreq); if Settings.bTimer then StartTimer() end;
-- Create tTable and load its contents
if tSetup[string.lower(Settings.sMode)] then tTable = {}; tFunctions:load() end
-- Define cleaner and link status
tConfig.Cleaner = tConfig.Cleaner or "on"; tConfig.Link = tConfig.Link or "off"
end

ChatArrival = function(user,data)
-- Parse Main Chat commands
local data = string.sub(data,1,-2)
local s,e,msg = string.find(data,"^%b<>%s+[%!%+](.*)")
if msg then return tFunctions.ParseCommands(user,msg) end
end

ToArrival = function(user,data)
-- Parse PM commands
local data = string.sub(data,1,-2)
local s,e,to,msg = string.find(data, "^%$To:%s+(%S+)%s+From:%s+%S+%s-%$%b<>%s+[%!%+](.*)")
if to == Settings.sBot and msg then return tFunctions.ParseCommands(user, msg) end
end

tCmds = {
[Settings.clrVotesCmd] = {
tFunc = function(user,data)
-- Empty votes
tFunctions.Releaser(5); tVote = nil; tVote = {}
tFunctions:save(tTable); tFunctions:save(tVote,"tVote",Settings.fVote)
user:SendData(Settings.sBot,"*** All votes have been successfully cleared.")
end,
tLevels = {
[0] = 1,
[1] = 1,
[4] = 1,
[5] = 1,
},
sDesc = "Clear all Votes",
sExample = "\t!"..tPrefix..Settings.clrVotesCmd,
tRC = "Vote\\Clear$<%[mynick]> !"..tPrefix..Settings.clrVotesCmd },
[Settings.voteCmd] = {
tFunc = function(user,data)
local s,e,cat,i = string.find(data,"^%S+%s+"..Settings.sSep.."(.+)"..Settings.sSep.."%s+(%d+)")
-- Typed cat and ID
if cat and i then
-- Lower cat
local Cat = string.lower(cat)
-- DB contains Cat
if tTable[Cat] then
-- Cat contains ID
if tTable[Cat][tonumber(i)] then
-- Add Cat to Votes
tVote[Cat] = tVote[Cat] or {}
-- Check if IP has voted
if tVote[Cat][user.sIP] then
user:SendData(Settings.sBot,"*** Error: You have already voted.")
else
-- Add and save vote to Cat
tVote[Cat][user.sIP] = 1
tTable[Cat][tonumber(i)]["iVote"] = tTable[Cat][tonumber(i)]["iVote"] + 1; tFunctions:save(tTable); tFunctions:save(tVote,"tVote",Settings.fVote)
user:SendData(Settings.sBot,"*** You have successfully voted on \""..tTable[Cat][tonumber(i)].sRel.."\" [Category: "..cat.."].")
SendPmToOps(Settings.sBot,"*** "..user.sName.." voted on \""..tTable[Cat][tonumber(i)].sRel.."\" [Category: "..cat.."].")
end
else
user:SendData(Settings.sBot,"*** Error: There is no ID: "..i.." in "..cat)
end
else
user:SendData(Settings.sBot,"*** Error: There is no Category \""..cat.."\"!")
end
else
user:SendData(Settings.sBot,"*** Syntax Error: Type !"..tPrefix..Settings.voteCmd.." <category> <ID>")
end
end,
tLevels = {
[0] = 1,
[1] = 1,
[4] = 1,
[5] = 1,
},
sDesc = "\tVote for a certain "..Settings.sMode,
sExample = "!"..tPrefix..Settings.voteCmd.." "..Settings.sSep.."Movies"..Settings.sSep.." 1",
tRC = "Vote\\"..Settings.sMode.."\\{}$<%[mynick]> !"..tPrefix..Settings.voteCmd.." "..Settings.sSep.."{}"..Settings.sSep.." %[line:ID]",
bExtend = true,
},
[Settings.TopVotesCmd] = {
tFunc = function(user)
local Voting = {}
-- Sort Votes
tFunctions.TopSorting(2,Voting,6,Voting)
user:SendPM(Settings.sBot,tFunctions.Structure(string.rep("\t",9).."Top "..Settings.vMax.." Votes"..
string.rep("\t",8).."["..os.date().."]\r\n     "..string.rep("-- --",65)..
"\r\n     Nr.\tVotes\tDate - Time\t\tPoster\t\t\tCategory\t\t\t"..Settings.sMode.."\r\n",tFunctions.TopContent(1,Settings.vMax,1,1,Voting),Voting))
end,
tLevels = {
[-1] = 1,
[0] = 1,
[1] = 1,
[2] = 1,
[4] = 1,
[5] = 1,
},
sDesc = "Top "..Settings.sMode.." Voting",
sExample = "\t!"..tPrefix..Settings.TopVotesCmd,
tRC = "Top\\Voters$<%[mynick]> !"..tPrefix..Settings.TopVotesCmd
},
[Settings.TopPosterCmd] = {
tFunc = function(user)
local TopPoster,tCopy = {},{}
-- Sort Top Posters
tFunctions.TopSorting(1,TopPoster,2,tCopy)
user:SendPM(Settings.sBot,tFunctions.Structure(string.rep("\t",8).."Top "..Settings.pMax..
" Posters - Total "..Settings.sMode.."s: "..tFunctions.Releaser(7)..string.rep("\t",7).."["..os.date()..
"]\r\n     "..string.rep("-- --",65).."\r\n     Nr.\tUser\t\t\tPosts\r\n",tFunctions.TopContent(1,Settings.pMax,1,2,tCopy),tCopy))
end,
tLevels = {
[-1] = 1,
[0] = 1,
[1] = 1,
[2] = 1,
[3] = 1,
[4] = 1,
[5] = 1,
},
sDesc = "Top "..Settings.sMode.." Posting",
sExample = "\t!"..tPrefix..Settings.TopPosterCmd,
tRC = "Top\\Posters$<%[mynick]> !"..tPrefix..Settings.TopPosterCmd
},
[Settings.addCatCmd] = {
tFunc = function(user,data)
local s,e,cat,date = string.find(data,"^%S+%s+"..Settings.sSep.."(.+)"..Settings.sSep.."%s+(%d+)")
-- Category and date found
if cat and date then
-- Lower category
local Cat = string.lower(cat)
-- DB contains it
if tTable[Cat] then
user:SendData(Settings.sBot,"*** Error: There is already a Category: \""..cat.."\"")
else
-- Check category?s size
if (string.len(cat) > Settings.iCatSize) then
user:SendData(Settings.sBot,"*** Error: The Category can't have more than "..Settings.iCatSize.." characters.")
else
-- Create and save category
tTable[Cat] = {}; tTable[Cat].iClean = tonumber(date); tFunctions:save(tTable)
user:SendData(Settings.sBot,"*** \""..cat.."\" was successfully added to "..Settings.sMode.."s? categories.")
end
end
else
user:SendData(Settings.sBot,"*** Syntax Error: Type !"..tPrefix..Settings.addCatCmd.." "..Settings.sSep.."category"..Settings.sSep.." <maximum time in days>")
end
end,
tLevels = {
[0] = 1,
[1] = 1,
[4] = 1,
[5] = 1,
},
sDesc = "Add category & time",
sExample = "\t!"..tPrefix..Settings.addCatCmd.." "..Settings.sSep.."Movies"..Settings.sSep.." 15",
tRC = "Add\\Category$<%[mynick]> !"..tPrefix..Settings.addCatCmd.." "..Settings.sSep.."%[line:Category]"..Settings.sSep.." %[line:LifeTime in Days]"
},
[Settings.delCatCmd] = {
tFunc = function(user,data)
local s,e,cat = string.find(data,"^%S+%s+"..Settings.sSep.."(.+)"..Settings.sSep)
-- Typed category
if cat then
-- Lower it
local Cat = string.lower(cat)
-- DB contains it
if tTable[Cat] then
-- Delete and save DB
tTable[Cat] = nil; tFunctions:save(tTable)
user:SendData(Settings.sBot,"*** \""..cat.."\" was sucessfully deleted from "..Settings.sMode.."s? categories.")
else
user:SendData(Settings.sBot,"*** Error: There is no Category: "..cat.." in "..Settings.sMode..".")
end
else
user:SendData(Settings.sBot,"*** Syntax Error: Type !"..tPrefix..Settings.delCatCmd.." <category>")
end
end,
tLevels = {
[0] = 1,
[1] = 1,
[4] = 1,
[5] = 1,
},
sDesc = "\tDeletes a category",
sExample = "\t!"..tPrefix..Settings.delCatCmd.." "..Settings.sSep.."Movies"..Settings.sSep.."",
tRC = "Delete\\Category\\{}$<%[mynick]> !"..tPrefix..Settings.delCatCmd.." "..Settings.sSep.."{}"..Settings.sSep,
bExtend = true,
},
[Settings.showCatCmd] = {
tFunc = function(user)
-- tTable table isn`t empty
if next(tTable) then
local msg = "\r\n\r\n".."\t"..string.rep("- -",20).."\r\n\t        "..Settings.sMode.."s? Category List:\r\n\t"..
string.rep("- -",20).."\r\n"
-- For each pair in it
for Cat,i in pairs(tTable) do
msg = msg.."\t       ? "..string.upper(string.sub(Cat,1,1))..string.sub(Cat,2,string.len(Cat)).."\r\n"
end
user:SendPM(Settings.sBot,msg)
else
user:SendData(Settings.sBot,"*** Error: There are no "..Settings.sMode.." categories!");
end
end,
tLevels = {
[0] = 1,
[1] = 1,
[3] = 1,
[4] = 1,
[5] = 1,
},
sDesc = "Shows categories",
sExample = "\t!"..tPrefix..Settings.showCatCmd,
tRC = "Show\\Categories$<%[mynick]> !"..tPrefix..Settings.showCatCmd
},
[Settings.addCmd] = {
tFunc = function(user,data)
local s,e,cat,rel = string.find(data,"^%S+%s+"..Settings.sSep.."(.+)"..Settings.sSep.."%s+"..Settings.sSep.."(.+)"..Settings.sSep)
local s,e,link = string.find(data,"^%S+%s+%S+%s+%S+%s+(.+)")
link = link or ""
if (tConfig.Link == "off") or (tConfig.Link == "on" and link and link ~= "") then
-- Typed category
if cat then
-- Lower it
local Cat = string.lower(cat)
-- DB contains it
if tTable[Cat] then
if (string.len(rel) > Settings.iRelSize) then
user:SendData(Settings.sBot,"*** Error: The "..Settings.sMode.."s can't have more than "..Settings.iRelSize.." characters.")
else
local Exists = nil
-- For each pair in the category
for i,v in ipairs(tTable[Cat]) do
-- Check if rel doesn?t exist
if tTable[Cat] and string.lower(v.sRel) == string.lower(rel) then Exists = 1 end
end
if Exists then
user:SendData(Settings.sBot,"*** Error: There's already a "..Settings.sMode.." named: \""..rel.."\".")
else
table.insert( tTable[Cat], { sRel = rel, sPoster = user.sName, sLink = link, iTime = os.date(), iVote = 0, } ); tFunctions:save(tTable);
SendToAll(Settings.sBot,"*** "..user.sName.." added a new "..Settings.sMode..": "..rel..". For more details type: !"..tPrefix..Settings.showCmd)
end
end

else
user:SendData(Settings.sBot,"*** Error: There is no Category: \""..cat.."\" in "..Settings.sMode.."s!")
end
else
user:SendData(Settings.sBot,"*** Syntax Error: Type !"..tPrefix..Settings.addCmd.." <category> <type>")
end
else
user:SendData(Settings.sBot,"*** Error: Type !"..tPrefix..Settings.addCmd.." "..Settings.sSep..
"Type"..Settings.sSep.." "..Settings.sSep..Settings.sMode..Settings.sSep.." <link> (Link is required)")
end
end,
tLevels = {
[0] = 1,
[1] = 1,
[3] = 1,
[4] = 1,
[5] = 1,
},
sDesc = "\tAdds a "..Settings.sMode,
sExample = "\t!"..tPrefix..Settings.addCmd.." "..Settings.sSep.."Movie"..Settings.sSep.." "..Settings.sSep.."Blade3"..Settings.sSep.." http://www.blade.com",
tRC = "Add\\"..Settings.sMode.."\\{}$<%[mynick]> !"..tPrefix..Settings.addCmd.." "..Settings.sSep.."{}"..Settings.sSep.." "..Settings.sSep.."%[line:Release]"..Settings.sSep.." %[line:Link]",
bExtend = true,
},
[Settings.delCmd] = {
tFunc = function(user,data)
local s,e,cat,rel = string.find(data,"^%S+%s+"..Settings.sSep.."(.+)"..Settings.sSep.."%s*(.+)")
-- Typed cat and rel
if cat and rel then
-- Lower cat
local Cat = string.lower(cat)
-- Rel is a number
if tonumber(rel) then
rel = tonumber(rel) local Deleted = nil
-- Category contains rel - delete it
if tTable[Cat] and tTable[Cat][rel] then table.remove(tTable[Cat],rel) Deleted = 1 end
if Deleted then
user:SendData(Settings.sBot,"*** ID: "..rel.." was successfully deleted."); tFunctions:save(tTable)
else
user:SendData(Settings.sBot,"*** Error: There is no ID: "..rel..".")
end
-- DB contains Cat
elseif tTable[Cat] then
local Deleted = nil
-- Delete each pair in Cat
for i in ipairs(tTable[Cat]) do
tTable[Cat][i] = nil; Deleted = 1
end
if Deleted then
user:SendData(Settings.sBot,"Category: \""..cat.."\" was succesfully cleaned up."); tFunctions:save(tTable)
else
user:SendData(Settings.sBot,"*** Error: There is no Category: \""..cat.."\"")
end
else
user:SendData(Settings.sBot,"*** Error: There is no ID/Category: \""..cat.."\"")
end
else
user:SendData(Settings.sBot,"*** Syntax Error: Type !"..tPrefix..Settings.delCmd.." "..Settings.sSep.."%[line:{}]"..Settings.sSep.." <ID> / Empty>")
end
end,
tLevels = {
[0] = 1,
[1] = 1,
[4] = 1,
[5] = 1,
},
sDesc = "\tDeletes "..Settings.sMode.."s",
sExample = "\t!"..tPrefix..Settings.delCmd.." "..Settings.sSep.."Category"..Settings.sSep.." ID/Empty",
tRC = "Delete\\"..Settings.sMode.."\\{}$<%[mynick]> !"..tPrefix..Settings.delCmd.." "..Settings.sSep.."{}"..Settings.sSep.." %[line:ID/Empty]",
bExtend = true,
},
[Settings.showCmd] = {
tFunc = function(user,data)
local s,e,cat = string.find(data,"^%S+%s+(%S+)")
-- Shows all
if cat then
if cat == "all" then
-- Data sent according to Selected mode and if tFilled isn't empty
if string.lower(Settings.sMode) == "request" and next(tFilled) then
user:SendPM(Settings.sBot,tFunctions.Structure(string.rep("\t",9).."Showing all "..Settings.sMode.."s ["..
tFunctions.Releaser(7).."]"..string.rep("\t",7).."["..os.date()..
"]\r\n", tFunctions.Releaser(1),tTable)..tFunctions.Structure(string.rep("\t",9)..
"Showing all Filled Requests"..string.rep("\t",6).."["..
os.date().."]\r\n",tFunctions.ShowX(tFilled),tFilled))
else
user:SendPM(Settings.sBot,tFunctions.Structure(string.rep("\t",9).."Showing all "..Settings.sMode.."s ["..
tFunctions.Releaser(7).."]"..string.rep("\t",7).."["..os.date()..
"]\r\n", tFunctions.Releaser(1),tTable))
end
-- Show category entries
elseif tTable[string.lower(cat)] then
user:SendPM(Settings.sBot,tFunctions.Structure(string.rep("\t",8).."Showing all "..Settings.sMode.."s from \""..cat.."\" "..
string.rep("\t",7).."["..os.date().."]\r\n",tFunctions.Releaser(4,cat),tTable))
end
else
-- Data sent according to Selected mode and if tFilled isn't empty
if string.lower(Settings.sMode) == "request" and next(tFilled) then
user:SendPM(Settings.sBot,tFunctions.Structure(string.rep("\t",9).."Last "..Settings.iMax.." "..Settings.sMode.."s "..
string.rep("\t",8).."["..os.date().."]\r\n",tFunctions.ShowX(tTable),tTable)..tFunctions.Structure(string.rep("\t",9)..
"Last "..Settings.fMax.." Filled Requests"..string.rep("\t",7).."["..os.date().."]\r\n",tFunctions.ShowX(tFilled),tFilled))
else
user:SendPM(Settings.sBot,tFunctions.Structure(string.rep("\t",8).."Last "..Settings.iMax.." "..Settings.sMode.."s per Category "..
string.rep("\t",7).."["..os.date().."]\r\n",tFunctions.ShowX(tTable),tTable))
end
end
end,
tLevels = {
[-1] = 1,
[0] = 1,
[1] = 1,
[2] = 1,
[3] = 1,
[4] = 1,
[5] = 1,
},
sDesc = "\tLast "..Settings.iMax.."/all "..Settings.sMode.."s",
sExample = "!"..tPrefix..Settings.showCmd.."; !"..tPrefix..Settings.showCmd.." all; !"..tPrefix..Settings.showCmd.." <category>",
tRC = "Show\\Last "..Settings.iMax.."/All$<%[mynick]> !"..tPrefix..Settings.showCmd.." %[line:Empty/All/Category]",
},
[Settings.findCmd] = {
tFunc = function(user,data)
local s,e,str = string.find(data,"^%S+%s+"..Settings.sSep.."(.+)"..Settings.sSep)
if str then
user:SendPM(Settings.sBot,tFunctions.Structure(string.rep("\t",9).."Search Results of: \""..str.."\""..string.rep("\t",7)..
"["..os.date().."]\r\n",tFunctions.Releaser(2,str),tTable))
else
user:SendData(Settings.sBot,"*** Error: Type !"..tPrefix..Settings.findCmd.." "..Settings.sSep.."string"..Settings.sSep)
end
end,
tLevels = {
[-1] = 1,
[0] = 1,
[1] = 1,
[2] = 1,
[3] = 1,
[4] = 1,
[5] = 1,
},
sDesc = "\tFind a "..Settings.sMode,
sExample = "\t!"..tPrefix..Settings.findCmd.." "..Settings.sSep.."jiten"..Settings.sSep,
tRC = "Find\\"..Settings.sMode.."$<%[mynick]> !"..tPrefix..Settings.findCmd.." "..Settings.sSep.."%[line:String]"..Settings.sSep
},
[Settings.delAllCmd] = {
tFunc = function(user)
-- Delete all table contents
tFunctions.Releaser(6)
user:SendData(Settings.sBot,"All "..Settings.sMode.."s have been deleted successfully!"); tFunctions:save(tTable)
end,
tLevels = {
[0] = 1,
[1] = 1,
[4] = 1,
[5] = 1,
},
sDesc = "\tDeletes all "..Settings.sMode.."s",
sExample = "!"..tPrefix..Settings.delAllCmd,
tRC = "Delete\\All$<%[mynick]> !"..tPrefix..Settings.delAllCmd
},
[Settings.helpCmd] = {
tFunc = function(user)
local sMsg, sRC = "\r\n\t"..string.rep("-", 220).."\r\n\t[Cleaner / Link]: ["..tConfig.Cleaner.." / "..
tConfig.Link.."]\t\t\tRelease/Request v."..Settings.iVer.." by jiten\t\t\t\t["..Settings.sMode.." Mode]\r\n\t"..
string.rep("-",220).."\r\n\tCommands:\t\tDescription:\t\t\tExample:".."\r\n\r\n", ""
-- For each pair in tCmds
for i,v in pairs(tCmds) do
-- If user is allowed to use i command
if v.tLevels[user.iProfile] then
local sHelp = "\t!"..tPrefix..i.."\t\t"..v.sDesc.."\t\t"..v.sExample.."\r\n"
if string.lower(Settings.sMode) == "request" then
sMsg = sMsg..sHelp
elseif i ~= Settings.rDoneCmd then
sMsg = sMsg..sHelp
end
end
end
user:SendPM(Settings.sBot, sMsg.."\t"..string.rep("-",220));
end,
tLevels = {
[-1] = 1,
[0] = 1,
[1] = 1,
[2] = 1,
[3] = 1,
[4] = 1,
[5] = 1,
},
sDesc = "\tDisplays this help.",
sExample = "\t!"..tPrefix..Settings.helpCmd,
tRC = "Help$<%[mynick]> !"..tPrefix..Settings.helpCmd
},
[Settings.rDoneCmd] = {
tFunc = function(user,data)
local s,e,cat,rel = string.find(data,"^%S+%s+"..Settings.sSep.."(.+)"..Settings.sSep.."%s+(%d+)")
if string.lower(Settings.sMode) == "request" then
if cat and rel then
-- Lower it
local Cat, sTmp = string.lower(cat), ""
rel = tonumber(rel); local Deleted = nil
-- Category contains rel - delete it
if tTable[Cat] and tTable[Cat][rel] then
local tmp = tTable[Cat][rel]
tFilled[Cat] = tFilled[Cat] or {}; Exists = 1
table.insert(tFilled[Cat], { sPoster = user.sName, sRel = tmp.sRel, iVote = tmp.iVote, iTime = os.date(), sLink = tmp.sLink } )
end
if Exists then
-- Send/Store tFilled Report
local tmp = tTable[Cat][rel]
local msg, nick = "*** Your request \""..tmp.sRel.."\" has been filled by "..user.sName..".", GetItemByName(tmp.sPoster);
if nick then nick:SendPM(Settings.sBot,msg) else tOffline[tmp.sPoster] = msg end; table.remove(tTable[Cat],rel);
SendToAll(Settings.sBot,"*** "..user.sName.." filled up Request \""..tmp.sRel.."\" [ "..cat.." ]!")
tFunctions:save(tTable); tFunctions:save(tFilled,"tFilled",Settings.fReqDone); tFunctions:save(tOffline,"tOffline",Settings.fOffline);
else
user:SendData(Settings.sBot,"*** Error: There is no ID: "..rel..".")
end
else
user:SendData(Settings.sBot,"*** Error: Type !"..tPrefix..Settings.rDoneCmd.." "..Settings.sSep.."Category"..Settings.sSep.." <ID>")
end
else
user:SendData(Settings.sBot,"*** Error: This command is only available in Request Mode!")
end
end,
tLevels = {
[-1] = 1,
[0] = 1,
[1] = 1,
[2] = 1,
[3] = 1,
[4] = 1,
[5] = 1,
},
sDesc = "\tFills up a Request",
sExample = "\t!"..tPrefix..Settings.rDoneCmd.." "..Settings.sSep.."Category"..Settings.sSep.." <ID>",
tRC = "Fill\\Up Request\\{}$<%[mynick]> !"..tPrefix..Settings.rDoneCmd.." "..Settings.sSep.."{}"..Settings.sSep.." %[line:ID]",
bExtend = true,
},
[Settings.SetupCmd] = {
tFunc = function(user,data)
local s,e,set,value = string.find(data,"^%S+%s+(%S+)%s+(%S+)")
if set and value then
local tTable = {
["cleaner"] = {
["on"] = { tFunc = function() tConfig.Cleaner = "on"; StartTimer() end, sMode = "enabled" },
["off"] = { tFunc = function() tConfig.Cleaner = "off"; StopTimer() end, sMode = "disabled" },
sMsg = "*** The Automatic "..Settings.sMode.." cleaner has been set to "
},
["link"] = {
["on"] = { tFunc = function() tConfig.Link = "on" end, sMode = "not optional" },
["off"] = { tFunc = function() tConfig.Link = "off" end, sMode = "optional" },
sMsg = "*** The Link has been set to "
}
}
if tTable[string.lower(set)][string.lower(value)] then
local tmp = tTable[string.lower(set)]; tmp[string.lower(value)].tFunc(); tFunctions:save(tConfig,"tConfig",Settings.fConfig)
user:SendData(Settings.sBot,tmp.sMsg..tmp[string.lower(value)].sMode.."!")
else
user:SendData(Settings.sBot,"*** Error: Type !"..tPrefix..Settings.SetupCmd.." <link/cleaner> <on/off>")
end
else
user:SendData(Settings.sBot,"*** Error: Type !"..tPrefix..Settings.SetupCmd.." <link/cleaner> <on/off>")
end
end,
tLevels = {
[0] = 1,
[1] = 1,
[4] = 1,
[5] = 1,
},
sDesc = "\tConfigure this bot.",
sExample = "\t!"..tPrefix..Settings.SetupCmd.." <link/cleaner> <on/off>",
tRC = "Setup\\Cleaner/Link$<%[mynick]> !"..tPrefix..Settings.SetupCmd.." %[line:cleaner/link] %[line:on/off]"
},
}

OnTimer = function()
-- For each ipair in table
for i in ipairs(tabTimers) do
tabTimers[i].count = tabTimers[i].count + 1
if tabTimers[i].count > tabTimers[i].trig then
tabTimers[i].count=1
tabTimers[i]:func()
end
end
end

NewUserConnected = function(user)
-- Send Releases/Requests on Connect
if Settings.bSendOnConnect then
user:SendPM(Settings.sBot,tFunctions.Structure(string.rep("\t",9).."Last "..Settings.iMax.." "..Settings.sMode.."s per Category "..
string.rep("\t",6).."["..os.date().."]\r\n",tFunctions.ShowX(tTable),tTable))
end
-- Sending RightClick
if Settings.bSendRC then
if user.bUserCommand then
-- Build user-specific temp RC table
local tRC = {}; tFunctions.GetRC(user,tRC); table.sort(tRC);
-- Send RC alphabetically sorted
for i in ipairs(tRC) do
user:SendData("$UserCommand 1 3 "..Settings.sMode.." Bot\\"..tRC[i].."&#124;")
end;
collectgarbage(); io.flush();
end
end
-- Offline tFilled Report
if tOffline[user.sName] then user:SendPM(Settings.sBot,tOffline[user.sName]); tOffline[user.sName] = nil end
end

OpConnected = NewUserConnected

tFunctions = {}

-- MultiTimer Regger
tFunctions.RegTimer = function(f, Interval)
local tmpTrig = Interval / TmrFreq
assert(Interval >= TmrFreq , "RegTimer(): Please Adjust TmrFreq")
local Timer = {n=0}
Timer.func=f
Timer.trig=tmpTrig
Timer.count=1
table.insert(tabTimers, Timer)
end

-- Timed Category
tFunctions.TimedCat = function()
if Settings.bTimedCat and Settings.Times[os.date("%H:%M")] then
local TimedMain = function(Category)
local msg = "\r\n\r\n\t".." Category: "..Category.."\r\n\t"..string.rep("__",55).."\r\n\r\n\t? "
-- For each pair in tTable
for Cat,a in pairs(tTable) do
for i,v in ipairs(a) do
-- Cat equals Category
if string.lower(Cat) == string.lower(Category) then
local sCopy = v.sRel
while string.len(sCopy) > 120 do
msg = msg..string.sub(sCopy,1,120).."\r\n\t"
sCopy  = string.sub(sCopy,121,string.len(sCopy))
end
msg = msg..sCopy.."\r\n\t? "
end
end
end
msg = string.sub(msg,1,string.len(msg)-2)
msg = msg.."\r\n\t"..Settings.sTimedMsg.."\r\n\t"..string.rep("__",55).."\r\n"
return msg
end
SendToAll(TimedMain(Settings.Times[os.date("%H:%M")]))
end
collectgarbage(); io.flush();
end

-- Category content cleaner
tFunctions.Cleaner = function()
if (tConfig.Cleaner == "on") then -- RegCleaner based
-- Actual juliandate
local juliannow = tFunctions.jdate(tonumber(os.date("%d")), tonumber(os.date("%m")), tonumber(os.date("%Y")))
local chkd, clnd, x = 0, 0, os.clock()
-- For each pair in tTable
for Cat,a in pairs(tTable) do
-- Inverse loop
for i = table.getn(tTable[Cat]), 1, -1 do
chkd = chkd + 1
-- Parse month, day and year
local s, e, month, day, year = string.find(tTable[Cat][i].iTime, "(%d+)%/(%d+)%/(%d+)");
-- Respective juliandate
local julian = tFunctions.jdate( tonumber(day), tonumber(month), tonumber("20"..year) )
-- Clean if higher than Cat?s expiry date
if ((julian - juliannow) > tonumber(tTable[Cat].iClean)) then
clnd = clnd + 1
table.remove(tTable[Cat],i);
end;
end
end
-- Sending Stats
if clnd ~= 0 and Settings.bCleanReport then
SendToAll(Settings.sBot,"*** "..chkd.." "..Settings.sMode.."(s) were processed. "..clnd.." "..Settings.sMode..
"s were deleted ( "..string.format("%0.2f",(clnd*100/chkd)).."% ) in: "..string.format("%0.4f", os.clock()-x )
.." seconds."); tFunctions:save(tTable)
end
end
end

-- Get user-specific RightClick
tFunctions.GetRC = function(user,tTempTable)
for i,v in pairs(tCmds) do
if tCmds[i].tLevels[user.iProfile] then
local fExtend = function()
if v.bExtend then
for Cat,a in pairs(tTable) do
local sRC = string.gsub(v.tRC,"{}",Cat)
table.insert(tTempTable,sRC)
end
else
table.insert(tTempTable,v.tRC)
end
end
if string.lower(Settings.sMode) ~= "request" then
if i ~= Settings.rDoneCmd then fExtend() end
else
fExtend()
end
end
end
end

tFunctions.ShowX = function(Table)
local msg = ""
for Cat,a in pairs(Table) do
for v = table.getn(Table[Cat]) - Settings.iMax + 1, table.getn(Table[Cat]), 1 do
if Table[Cat][v] then
local tmp = Table[Cat][v]
local fLink = function()
local lnk = ""
if tmp.sLink ~= "" then lnk = "\r\n"..string.rep("\t",11).."[ "..tmp.sLink.." ]" end
return lnk
end
msg = msg.."     "..v..".\t"..tmp.iVote.."\t"..tmp.iTime.."\t\t"..tmp.sPoster..
tFunctions.DoTabs(tFunctions.CheckSize(tmp.sPoster))..Cat..tFunctions.DoTabs(tFunctions.CheckSize(Cat))..tmp.sRel..fLink().."\r\n"
end
end
end
return msg
end

-- TopVotes and TopPosters
tFunctions.TopContent = function(Start, End, Order, Mode, Table)
local msg = ""
for i = Start, End, Order do
if Table[i] then
local tMode = {
-- Show TopVotes
[1] = function()
msg = msg.."     "..Table[i].iID..".\t"..Table[i].iVote.."\t"..Table[i].iTime.."\t\t"..
Table[i].sPoster..tFunctions.DoTabs(tFunctions.CheckSize(Table[i].sPoster))..Table[i].sCat..tFunctions.DoTabs(tFunctions.CheckSize(Table[i].sCat))..
Table[i].sRel..tFunctions.DoTabs(tFunctions.CheckSize(Table[i].sRel)).."\r\n"
end,
-- Show TopPosters
[2] = function()
msg = msg.."     "..i..".\t"..Table[i][1]..tFunctions.DoTabs(tFunctions.CheckSize(Table[i][1]))..
Table[i][2].." ("..string.format("%0.3f",Table[i][3]*100).."%)\r\n"
end, }
if tMode[Mode] then tMode[Mode]() end
end
end
return msg
end

-- Top Sorting
tFunctions.TopSorting = function(Mode,Table,Value,Table1)
-- For each pair in tTable
for Cat,a in pairs(tTable) do
-- For each ipair in a
for i,v in ipairs(a) do
if Mode == 1 then
-- Create TopPoster table
if Table[v.sPoster] then Table[v.sPoster] = Table[v.sPoster] + 1 else Table[v.sPoster] = 1 end
elseif Mode == 2 then
-- If voted
if v.iVote > 0 then
-- Insert to TopVoter table
table.insert(Table,{ iID = i, sPoster = v.sPoster, sCat = Cat, sRel = v.sRel, iTime = v.iTime, iVote = v.iVote })
end
end
end
end
if Mode == 1 then
-- Insert TopPoster data to Table1
for x, y in pairs(Table) do table.insert(Table1, {x, tonumber(y), y/tonumber(tFunctions.Releaser(7))}) end
end
-- Sort Table1
table.sort(Table1,function(a,b) return (a[Value] > b[Value]) end)
end

tFunctions.ParseCommands = function(user,data)
local s,e,cmd = string.find(data,"^"..tPrefix.."(%S+)")
-- If cmd and tCmds contains it
if cmd and tCmds[string.lower(cmd)] then
-- Lower it
cmd = string.lower(cmd)
-- If user is allowed to use
if tCmds[cmd].tLevels[user.iProfile] then
return tCmds[cmd].tFunc(user,data), 1
else
return user:SendData(Settings.sBot,"*** Error: You are not allowed to use this command."), 1
end
end
end

-- RR core function
tFunctions.Releaser = function(Mode,String)
local msg = ""
for Cat,a in pairs(tTable) do
for i,v in ipairs(a) do
local fLink = function()
local tmp = ""
if v.sLink ~= "" then tmp = "\r\n"..string.rep("\t",11).."[ "..v.sLink.." ]" end
return tmp
end
local sLine = "     "..i..".\t"..v.iVote.."\t"..v.iTime.."\t\t"..v.sPoster..tFunctions.DoTabs(tFunctions.CheckSize(v.sPoster))..Cat..
tFunctions.DoTabs(tFunctions.CheckSize(Cat))..v.sRel..fLink().."\r\n"
local tMode = {
-- Show all entries
[1] = function ()
msg = msg..sLine
end,
-- Find entries
[2] = function()
local tmp, where = v.sRel..v.sPoster..v.sLink..v.iTime..Cat
if Settings.bSensitive then
where = tmp
else
where = string.lower(tmp) String = string.lower(String)
end
if string.find(where,String) then msg = msg..sLine end
end,
-- Show entries by category
[4] = function()
if string.lower(Cat) == string.lower(String) then msg = msg..sLine end
end,
-- Clear Votes
[5] = function()
if v.iVote > 0 then v.iVote = 0 end
end,
-- Delete all category content
[6] = function()
tTable[Cat][i] = nil;
tFilled = nil tFilled = {};
tOffline = nil tOffline = {}
end,
-- table.getn
[7] = function()
if not tonumber(msg) then msg = 0 end
if tTable[Cat][tonumber(i)] then msg = msg + 1 end
end, }
if tMode[Mode] then tMode[Mode]() end
end
end
return msg
end

tFunctions.Structure = function(Header, Content, Table)
local msg, border = "\r\n".."     ",string.rep("-", 325)
if Table == tTable or Table == tFilled then
msg = msg..border.."\r\n"..Header.."     "..string.rep("-- --",65).."\r\n     "..
"Nr.\tVotes\tDate - Time\t\tPoster\t\t\tCategory\t\t\t"..Settings.sMode.."\r\n"
else
msg = msg..border..Header
end
msg = msg.."     "..string.rep("-- --",65).."\r\n"..Content.."     "..border.."\r\n"
return msg
end

-- Julian data function
tFunctions.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

-- nErBoS Release bot based
tFunctions.DoTabs = function(size)
local sTmp = ""
if (size < 8) then sTmp = "\t\t\t" elseif (size < 16) then sTmp = "\t\t" else sTmp = "\t" end return sTmp
end

-- nErBoS Release bot based
tFunctions.CheckSize = function(String)
local realSize,aux,remove = string.len(String),1,0
local sChar = { "-", " ", "i", "l", "r", "t", "I", "y", "o", }
while aux < realSize + 1 do
for i=1, table.getn(sChar) do if (string.sub(String,aux,aux) == sChar[i]) then remove = remove + 0.5 end end
aux = aux + 1
end return realSize - remove
end

-- File handling functions
tFunctions.load = function(self)
local tmp = tSetup[string.lower(Settings.sMode)]
if tmp then
for i in ipairs(tmp.fDB) do
if loadfile(tmp.sFolder.."/"..tmp.fDB[i]) then
dofile(tmp.sFolder.."/"..tmp.fDB[i])
else
os.execute("mkdir "..tmp.sFolder); io.output(tmp.sFolder.."/"..tmp.fDB[i])
end
end
end
end

tFunctions.save = function(self,table,tablename,file)
local tmp = tSetup[string.lower(Settings.sMode)]
if tmp then
file = file or tmp.fDB[1]; tablename = tablename or "tTable"
local hFile = io.open(tmp.sFolder.."/"..file,"w+")
tFunctions.Serialize(table,tablename,hFile); hFile:close()
end
end

tFunctions.Serialize = function(tTbl,sTableName,hFile,sTab)
sTab = sTab or "";
hFile:write(sTab..sTableName.." = {\n");
for key,value in pairs(tTbl) 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
tFunctions.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

A big thank you to anyone who can help!  :)
Title: Re: Release/Request Bot
Post by: uffetjur on 20 January, 2008, 21:38:06
Hello scripters been away for some years but back now.

Have a little problem with this script, running a hub using poor old robo...
But moderator is unkeyed an should not have access to settings part of this excellent script, have a little question bout how to do this change

thanks in advance
Title: Re: Release/Request Bot
Post by: speedX on 21 January, 2008, 09:49:11
Under each command structure, you'll find a tLevels table where u can allow or restrict the profiles from using the command. 1 = allow ; 0 = don't allow

for eg: In Settings.clrVotesCmd , we have the following table

tLevels = {
[0] = 1,
[1] = 1,
[4] = 1,
[5] = 1,

If you want to restrict moderators from using this command, then change it to this:

tLevels = {
[0] = 1,
[1] = 1,
[4] = 0,
[5] = 1,
Title: Re: Release/Request Bot
Post by: uffetjur on 21 January, 2008, 19:10:13
tLevels isn't implemented in the [Settings.addCatCmd]
so its not possible to restrict moderators from adding new categories
Title: Re: Release/Request Bot
Post by: miago on 30 January, 2008, 08:58:42
Hi there.

Was wondering if its possible to make the Showfunction work as the Addfunction with the predefined cat (and also with manually added cat) ?

Ex.

Release bot ---> Show ---> Release ---> all
                                                         apps
                                                         audiobooks
                                                         

and so on

Regards
(really really love this script  :-* )
                                                         

Edit: Forgot one thing. Is it possible to make a choice in scriptsettings, that when you want to show All releases you only get the 30 last added releases regardless of category, instead of all 30 per category?

Thanx in advance  :)