release bot
 

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 bot

Started by FrAcTi0n, 18 November, 2004, 09:51:24

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

FrAcTi0n

helo i need to add to this script some functions...
1 - if i add new release and that release already exist, i need to not add duplicate release
2 - commnad for show only releases of current month

code:
-------------------------------------------------------------------------------------
--Made by nErBoS

--Version 0.3



Bot = "---=RLS=---"


reltxt = "releases.txt" -- Will be created in the Script folder

prefix = "+" -- Commands Prefix



function Main()

   frmHub:RegBot(Bot)

end



function DataArrival(user, data)

   if (strsub(data,1,1)=="<") or (strsub(data,1,5+strlen(Bot))=="$To: "..Bot) then

   data=strsub(data,1,strlen(data)-1)

   s,e,cmd = strfind(data,"%b<>%s+(%S+)")

      if (cmd==prefix.."add") then --## Adds a Release to the list

         if (strlen(user.sName) > 20) then

            user:SendData(Bot, "Your nick is too long, you can't post the release.")

         else

            AddRelease(user, data)

         end

         return 1

      elseif (cmd==prefix.."all") then --## Show all releases

         ShowRelease(user, data, "all")

         return 1

      elseif (cmd==prefix.."new") then  --## Show the last 30 releases

         ShowRelease(user, data, "last")

         return 1

      elseif (cmd==prefix.."del") then --## Erase a release

         if (user.bOperator) then

            DelRelease(user, data)

         else

            user:SendData(Bot, "You don?t have permission to use this command.")

         end

         return 1

      elseif (cmd==prefix.."find") then --## Search for a Release

         local s,e,findrel = strfind(data,"%b<>%s+%S+%s+(%S+)")

    if (findrel == nil or findrel == "") then

            user:SendData(Bot, "Syntax Error, "..prefix.."find , you must write a name.")

    else        

            ShowRelease(user, data, "find", findrel)

    end

    return 1

      end

   end

end



function AddRelease(user, data)

local s,e,type,rel,desc = strfind(data,"%b<>%s+%S+%s+(%S+)%s+(%S+)%s+(.*)")

local tmp = ""
   if (rel == nil or rel == "" or desc == nil or desc == "") then

      user:SendData(Bot, "Syntax Error, "..prefix.."add .")

      user:SendData(Bot, "Types Avaibale:\r\n\r\n\r\n\t- DnB - DnB, Jungle, RaggaJungle\r\n\t- Break - Breakbeatss\r\n\t- Users - Junglist users production and mixes .) \r\n\t- fav - f###in good shit \r\n\t- 0 - other \r\n\r\n")

   elseif (strlen(rel) > 90) then

      user:SendData(Bot, "The Release Name can't have more then 90 characters.")

   elseif (strlen(desc) > 20) then

      user:SendData(Bot, "The Description can't have more then 20 characters.")  

   else

      if (readfrom(reltxt) == nil) then

         writeto(reltxt)

         write("\r\n"..rel.."$"..desc.."$"..user.sName.."$"..GetTime().."$"..strlower(type).."|")

         writeto()

      else

         readfrom(reltxt)

         while 1 do

         local line = read()

            if (line == "") then

               tmp = tmp.."\r\n"..rel.."$"..desc.."$"..user.sName.."$"..GetTime().."$"..strlower(type).."|"
            elseif(line == nil) then

               break

            else

               tmp = tmp.."\r\n"..line

            end

         end

         readfrom()

         writeto(reltxt)

         write(tmp)

         writeto()

      end

      SendToAll(Bot, "A New Release has been added by "..user.sName.."... Write "..prefix.."all to see all Releases.")

      user:SendData(Bot, "Your Release has been added, thank you.")

   end

end



function ShowRelease(user, data, type, string)

local tline = 0

local tmp = ""
local dnb = ""

local breaks = ""

local fav = ""

local users = ""

local other = ""

   if (type == "last") then

      tmp = tmp.."\r\n\r\nThe Last 30 Releases: \r\n\r\n"

      tmp = tmp.." Date\t\tPosted by\t\t\tDescription\t\tRelease Name\r\n"

   elseif (type == "all") then

      tmp = tmp.."\r\n\r\nAll Releases: \r\n\r\n"

      tmp = tmp.." Date\t\tPosted by\t\t\tDescription\t\tRelease Name\r\n"

   elseif (type == "find") then

      local s,e,findrel = strfind(data,"%b<>%s+%S+%s+(%S+)")

      tmp = tmp.."\r\n\r\nSearch Result: \r\n\r\n"

      tmp = tmp.." Date\t\tPosted by\t\t\tDescription\t\tRelease Name\r\n"

   end

      readfrom(reltxt)

      while 1 do

      local line = read()

         if (type == "last") then

            if (tline == 30) then

               break

            end

         end

         if (line == nil) then

            break

         else

         local s,e,rel,desc,who,time,tp = strfind(line, "(.*)%$(.*)%$(.*)%$(.*)%$(.*)%|")

     if (type == "last" or type == "all") then

            if (rel ~= nil) then

      if (tp == "dnb") then

         dnb = dnb.." "..time.."\t"..who..Coluns(who)..desc..Coluns(desc)..rel.."\r\n"
      elseif (tp == "breaks") then

         breaks = breaks.." "..time.."\t"..who..Coluns(who)..desc..Coluns(desc)..rel.."\r\n"
      elseif (tp == "fav") then

         fav = fav.." "..time.."\t"..who..Coluns(who)..desc..Coluns(desc)..rel.."\r\n"
      elseif (tp == "users") then

         users = users.." "..time.."\t"..who..Coluns(who)..desc..Coluns(desc)..rel.."\r\n"
      else

         other = other.." "..time.."\t"..who..Coluns(who)..desc..Coluns(desc)..rel.."\r\n"
      end

      tline = tline + 1

            end

     elseif (type == "find") then

            if (rel ~= nil and rel == string) then

      if (tp == "dnb") then

         dnb = dnb.." "..time.."\t"..who..Coluns(who)..desc..Coluns(desc)..rel.."\r\n"
      elseif (tp == "breaks") then
      
         breaks = breaks.." "..time.."\t"..who..Coluns(who)..desc..Coluns(desc)..rel.."\r\n"
      elseif (tp == "fav") then

         fav = fav.." "..time.."\t"..who..Coluns(who)..desc..Coluns(desc)..rel.."\r\n"
      elseif (tp == "users") then

         users = users.." "..time.."\t"..who..Coluns(who)..desc..Coluns(desc)..rel.."\r\n"
      else

         other = other.." "..time.."\t"..who..Coluns(who)..desc..Coluns(desc)..rel.."\r\n"
      end

            end

          end

    end

      end

      readfrom()

if (dnb ~= "") then

   tmp = tmp.."\r\n ==- DnB releasez\r\n -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\r\n"

   tmp = tmp..dnb

end

if (breaks ~= "") then

   tmp = tmp.."\r\n -Breaks\r\n -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\r\n"

   tmp = tmp..breaks

end

if (fav ~= "") then

   tmp = tmp.."\r\r\n -F###ing good shit \r\n-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\r\n"

   tmp = tmp..fav

end

if (users ~= "") then

   tmp = tmp.."\r\r\n - Junglist Users Production and mixes\r\n  -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\r\n"

   tmp = tmp..users

end

if (other ~= "") then

   tmp = tmp.."\r\r\n Other Styles:\r\n -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\r\n"


   tmp = tmp..other


   tmp = tmp.."\r\n ----------------------------------------------------------------------------------------------------------junglist.no-ip.com----------------------------------------------------------------------------------------------------------------------------\r\n"
end

   user:SendPM(Bot, tmp)

end



function DelRelease(user, data)

local s,e,release = strfind(data,"%b<>%s+%S+%s+(%S+)")

local time = 0

local tmp = ""
   if (release == nil or release == "") then

      user:SendData(Bot, "Syntax Error, "..prefix.."del , you must write a name.")

   else

      readfrom(reltxt)

      while 1 do

      local line = read()

         if (line == nil) then

            break

         else

         local s,e,rel = strfind(line, "(.*)%$.*%$.*%$.*%$.*%|")

            user:SendData(Bot, rel)

            if (rel == nil or rel == "") then

               tmp = tmp..line.."\r\n"    
            elseif (strlower(rel) == strlower(release)) then

               time = 1

            else

               tmp = tmp..line.."\r\n"                
            end

         end

      end

      readfrom()    

      writeto(reltxt)

      write(tmp)

      writeto()

   end

   if (time == 1) then

      user:SendData(Bot, "The Release has been erased.")

   else

      user:SendData(Bot, "The Release was not found.")

   end

end



function GetTime()

   d = date("%d")

   mm = date("%m")

   y = date("%y")

   Date = d.."/"..mm.."/"..y

   return Date

end



function Coluns(string)

local tmp = ""
      if (strlen(string) < 8) then

         tmp = "\t\t\t"
      elseif (strlen(string) < 16) then

         tmp = "\t\t"
      else

         tmp = "\t"
      end

return tmp

end

-------------------------------------------------------------------------------------
thx

nErBoS

#1
Hi,

This isn't the last version of this Script. Check out the "Release-Bot" topic in the "Finished Scripts" section.

Best regards, nErBoS
--## nErBoS Spot ##--

FrAcTi0n

i found a new script from u in there but didnot find that it is categorised... like this...

All Releases:

 Date      Posted by         Description      Release Name

 ==- DnB releasez
 -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 23/11/04   [OP]FrAcTi0N      single         Diverse_Products-Xample_and_Sol-DVP002-2005-sour
 12/11/04   [OP]FrAcTi0N      single         evol_intent-various_artists-ei006-2004-sour

 -Breaks
 -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 18/11/04   [OP]FrAcTi0N      mix         Rain_and_Soul-Live_in_LA-2004-B2R
 18/11/04   [OP]FrAcTi0N      single         Sbassship-Block_Universe-Vinyl-2004-OBC


 -F###ing good shit
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 16/11/04   [OP]FrAcTi0N      mix         Panacea_-_Knitefever_Mix
 15/11/04   [OP]FrAcTi0N-AtWork   mix         Rawthang_-_Petre-April03
 14/11/04   [OP]FrAcTi0N      mix         paulb_nuborn11
 13/11/04   [OP]FrAcTi0N-AtWork   mix         DJ_G-I-S_@_Future_Breakz_Radio_[2004-10-29]
 12/11/04   [OP]FrAcTi0N      album         Black_Sun_Empire_-_Driving_Insane-Retail_2cd-2004-BOSS


 - Junglist Users Production and mixes
  -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 15/11/04   [OP]FrAcTi0N      album         FrAcTiON_-_NonHuman_Project
 15/11/04   [OP]FrAcTi0N      mix         fra_-_fikikrki_3-codename_KAREL_(05.11.2004}.ogg


 Other Styles:
 -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 18/11/04   [OP]FrAcTi0N      single         VA-Fake_Records_Presents-Dirt_Off_Ya_Hiphop-VLS-2004-B2R
 18/11/04   [OP]FrAcTi0N      single         Suisse_Modular-Fly_Me_To_The_Lunar-EP-2004-MPX

 ----------------------------------------------------------------------------------------------------------junglist.no-ip.com----------------------------------------------------------------------------------------------------------------------------


is there a scipt that cane make thiz and have that commans that i talked about earlier?

nErBoS

Hi,

I am making a Update on the Release Bot i will add that.

Best regards, nErBoS
--## nErBoS Spot ##--

FrAcTi0n


SMF spam blocked by CleanTalk