PtokaX forum

Development Section => Your Developing Problems => Topic started by: LiqUiD~TrolL on 22 December, 2004, 18:20:16

Title: releases script
Post by: LiqUiD~TrolL on 22 December, 2004, 18:20:16
hello everyone
i have a small request for everyone who wants to help

well i have a releases script in my hub
and i m trying many months to fix it a little

does anyone wanna help me out???
plz don t tell about full scripts i want to fix mine
it s great script,it just needs to coifigure a little
Title:
Post by: kepp on 22 December, 2004, 20:32:05
Wrong thread?
Title:
Post by: enema on 23 December, 2004, 06:47:03
Maybe right one!
 All you have to do is post your non-working script here and give a question like - How-to  (and certain question follows here...)

I think we all wanna help each other out, thats why we're here!
Title:
Post by: LiqUiD~TrolL on 07 January, 2005, 16:16:16
hi my firends wel here is my script




BotName = "-AdmiN~BoT-"
timedate = date("%d/%m/%y")
file = "releases.txt"

SendOnConnect = nil  ----send new releases on connect(1=on , nil=off)
MaxNew = 25    ----max releases on the newrleases command
Count = 0
Count2 = 0
AllStuff = {}
NewestStuff = {}


display1 = "Release"
display2 = "Style"
display3 = "Date"



function NewUserConnected(curUser)
if SendOnConnect then
   local release = ""
   readfrom(file)
        for i=1, Count2 do
        release = release.."   "..NewestStuff.."\r\n"
        end
   curUser:SendData(BotName,"(private)>\t\t\tNEWS !!!\r\n\r\n\t\t\t\tNewest  "..MaxNew.."  "..display1.."s posted by users: ".."\r\n\r\n\t   "..display3.."\t\t     "..display2.."\t       "..display1.."\r\n\t   \t\t    \t\t           \t\t       \r\n"..release)
   readfrom()
end
end


OpConnected = NewUserConnected


function Main()
   OpenStuff()
file = "releases.txt"

end


function DataArrival(user, data)
   if (strsub(data, 1, 1) == "<" ) then
      data=strsub(data,1,strlen(data)-1)
         _,_,cmd=strfind(data, "%b<>%s+(%S+)")

      if (cmd=="+rls") then
         ReadRelease(user, data, cmd)
      end
      if (cmd=="+rlsall") then
         ReadReleaseAll(user, data, cmd)
      end
      if (cmd=="+addrls") then
         WriteRelease(user, data, cmd)
      end
            if (cmd=="+delrls") then
         DeleteRelease(user, data, cmd)
      end

   end


end

function WriteRelease(user, data, cmd)
   s,e,cmd,desc,release = strfind( data, "%b<>%s+(%S+)%s+(%S+)%s+(.+)" )
   if desc == nil then
   desc = "Psychedelic"
   s,e,release = strfind( data, "%b<>%s+%S+%s+(.+)" )
   end
   if desc == "P"
      then desc = "Psychedelic"
      elseif desc == "p"
         then desc = "Psychedelic"
         elseif desc == "C"
            then desc = "Chill"
            elseif desc == "c"
               then desc = "Chill"
               elseif desc == "A"
                  then desc = "Ambient"
                  elseif desc == "a"
                     then desc = "Ambient"
      
   end
   
   if release == nil then
      user:SendData(BotName,"(private)  ________<>________")
      user:SendData(BotName,"(private)> NO "..display1.." Was Write !!!!!!")
      user:SendData(BotName,"(private)> Write Like This :\t +addrls "..display2.." "..display1)
   else
      if (user.bOperator) then
      News("  "..timedate.."\t   "..desc.."\t          "..release)
      SendToAll(BotName, "A New "..display1.."  Is Added By  <"..user.sName..">. Type +rls/+rlsall to see the "..display1.."s.")
   
      else
      user:SendData("-----------------------------------------------------------------------------------")
      user:SendData(BotName,"(private))  ________<>________")
      user:SendData(BotName,"(private)> You Not Operator You Can't Write "..display1.."'s")
      user:SendData("-----------------------------------------------------------------------------------")
      end
   end
end
function ReadRelease(user, data, cmd)
   local release = ""
   readfrom(file)
        for i=1, Count2 do
        release = release.."   "..NewestStuff.."\r\n"
        end
   user:SendData(BotName,"(private)  ________<>________")
   user:SendData(BotName,"(private)>\r\n\r\n\t\t\t\tNewest  "..MaxNew.."  "..display1.."s posted by users: ".."\r\n\r\n\t   "..display3.."\t\t           "..display2.."\t           "..display1.."\r\n\t   \t\t    \t\t           \t\t       \r\n"..release)



   readfrom()
end

function ReadReleaseAll(user, data, cmd)
   local release = ""
   readfrom(file)
   while 1 do
   local line = read()
   if (line == nil) then
   break
   else
   release = release.."   "..line.."\r\n"
   end
   end
   user:SendData(BotName,"(private))  ________<>________")
   user:SendData(BotName,"(private)>\r\n\r\n\t\t\t\tAll "..display1.."s posted by users: ".."\r\n\r\n\t   "..display3.."\t\t     "..display2.."\t               "..display1.."\r\n\t   \t\t    \t\t       \t\t       \r\n"..release)
   user:SendData(BotName,"(private)>  This Is All The Releases  :  [ "..Count.." ]  Total ")
   readfrom()
end

function News(what)
   appendto(file)
      write(what.."\n")
   writeto()
OpenStuff()

end

function OpenStuff()
   AllStuff = nil
   NewestStuff = nil
   AllStuff = {}
   NewestStuff = {}
   Count = 0
   Count2 = 0
   readfrom(file)
   while 1 do
      local line = read()
      if ( line == nil ) then
         break
      else
         Count = Count +1
         AllStuff[Count]=line
      end
   end
   readfrom()
   if Count > MaxNew then
      local temp = Count - MaxNew + 1
      for i=temp, Count do
         Count2 = Count2 + 1
         NewestStuff[Count2]=AllStuff
      end
   else
      for i=1, Count do
         Count2 = Count2 + 1
         NewestStuff[Count2]=AllStuff
      end
   end
end




i need few things to coifigure out

to start from them, i need to send the releases txt in private, but is this possible cause i don t want the bot on the userslist_( i want him invisible)


and is there any way for the script to read the release TXt and don t allow to users  add a release 2 times
cause many problems are all the time show up with double release addings
Title:
Post by: imby on 07 January, 2005, 17:29:51
With regards to your first question, a bot must have a name in the nicklist if it is to be able to send a PM to all users in the hub. Therefore, what one could do, is change:

BotName = "-AdmiN~BoT-"
and use your main bot name instead. i.e.

BotName = "your_main_bot_name_here"
Just a suggestion.
Title:
Post by: plop on 07 January, 2005, 19:57:32
QuoteOriginally posted by LiqUiD~TrolL
hi my firends wel here is my script

i need few things to coifigure out

to start from them, i need to send the releases txt in private, but is this possible cause i don t want the bot on the userslist_( i want him invisible)


and is there any way for the script to read the release TXt and don t allow to users  add a release 2 times
cause many problems are all the time show up with double release addings
how about giving credit 2 the ppl who deserve it ??
i can clearly see that this is a badly modded version of my freshstuff 3.x series.

plop
Title: hi plop
Post by: LiqUiD~TrolL on 08 January, 2005, 15:45:07
hello for one more time  , what do you mean by saying

give 2 credit???

and -->>  i can clearly see that this is a badly modded version of my freshstuff 3.x series



is this script yours???

have you fixed a releases bot???

a link plz???
Title:
Post by: LiqUiD~TrolL on 08 January, 2005, 15:51:46
ohhh nice i saw your releases scripts my friend

=)

wel i m between few versions now heheheh

well i ll tell you what i need to tell me whitch version to download

i need max 2 lists of releases if there is only 1 list no prob to me

i need the script don t add a releases if it is already there in the TXT FILE

and i need a   -->   +delete release command

do you have something like this i need???
Title:
Post by: plop on 10 January, 2005, 00:26:37
QuoteOriginally posted by LiqUiD~TrolL
ohhh nice i saw your releases scripts my friend

=)

wel i m between few versions now heheheh

well i ll tell you what i need to tell me whitch version to download

i need max 2 lists of releases if there is only 1 list no prob to me

i need the script don t add a releases if it is already there in the TXT FILE

and i need a   -->   +delete release command

do you have something like this i need???
all except the double checking is in both serie 3 and 4.

plop
Title: hiiiii
Post by: LiqUiD~TrolL on 10 January, 2005, 15:18:54
plop i finaly find out witch version i want


=)

plop i own you a big THANKS cause you saved me many times
already 3 sripts of yours are in my hub =)

tnx for the help m8
Title:
Post by: [NL]Pur on 10 January, 2005, 23:59:43
Maybe right one!
All you have to do is post your non-working script here and give a question like - How-to (and certain question follows here...)
 


WRONG!  

moved to :
Your Developing Problems
If you have a problem withDEVELOPING a script ... go here
Title:
Post by: plop on 11 January, 2005, 17:19:33
QuoteOriginally posted by LiqUiD~TrolL
plop i finaly find out witch version i want


=)

plop i own you a big THANKS cause you saved me many times
already 3 sripts of yours are in my hub =)

tnx for the help m8
yw, but pls when you mod a script leave the credits in it.
this small thing is all we scripters ask from you ppl.
for us it's a good feeling 2 come into a hub and see your own stuff @ work.
btw which 3 scripts are you running and how many in total do you run??

plop
Title:
Post by: LiqUiD~TrolL on 05 February, 2005, 11:47:19
heya my friend plop

well now i m useing 3 of your scripts

1 a text script

2 the antiflood script

3 the txt script


they r working fine
specialty the releaes script saved me from the last one in memory usage,it s great jobg well done my m8 and keep going goo work with these baby's


;-)
Title: plooooooooop
Post by: LiqUiD~TrolL on 16 February, 2005, 03:07:34
heya ,hi again,



plop i need you help again_!!!!

man i m useing your script  -- FreshStuff v.3.2

well what i need now is to tell me what to change cause i want VIPs to be able add releases
now only operators can


and by the way this command not working ,why?

-- This command reloads the txt file. syntax : +reloadalbums
-- (this command is needed if you manualy edit the text file)
cmd5 = "+reloadalbums"

and here is the full script :



-- FreshStuff v.3.2
-- original idea/script by chilla
-- completely rewriten by plop
-- if you were running 3.0 then you gotta delete the old file
-- it's incompatible with this version

-- Name the commands to what U like
-- This command adds stuff, syntax : +addalbum TYPE/CATAGORY THESTUFF2ADD
cmd1 = "+addrls"

-- This command shows the stuff, syntax : +albums with options new/game/warez/music/movie
cmd2 = "+rlsall"

-- This command deletes an entry, syntax : +delalbum THESTUFF2DELETE
cmd3 = "+delrls"

-- This command shows the latest stuff, syntax : +newalbums
cmd4 = "+rls"

-- This command reloads the txt file. syntax : +reloadalbums
-- (this command is needed if you manualy edit the text file)
cmd5 = "+reloadalbums"

-- Show latest stuff on entry 1=yes, 0=no
ShowOnEntry = 0

-- Max stuff shown on newalbums/entry
MaxNew = 40

-- The file storing the stuff
file = "releases.txt"

-- Name of the bot
Bot = "-NemO-"

-- you can add catagory's yourself ["trigger_name"]="catagory_name"
Types = {["psychedelic"] = "Psychedelic", ["ambient"]="Ambient", ["electronic"]="Electronic", ["psytrance"]="Psytrance", ["goa"]="Goa", ["chill"]="Chill", ["psytrance"]="Psytrance", ["house"]="House", ["proggresive"]="Proggresive", ["trance"]="Trance", ["psymovie"]="Psymovie"}


--------------------- don't change anything below here
AllStuff = {}
NewestStuff = {}

function Main()
   frmHub:RegBot(Bot)
   ReloadRel()
end

function NewUserConnected(user)
   if ShowOnEntry == 1 then
      user:SendPM(Bot, MsgNew.."|")
   end
end

function OpConnected(user)
   if ShowOnEntry == 1 then
      user:SendPM(Bot, MsgNew.."|")
   end
end

function DataArrival(user,data)
   if (strsub(data, 1, 1) == "<") then
      data = strsub(data,1,strlen(data)-1)
      s,e,cmd,type,tune = strfind(data, "%b<>%s+(%S+)%s*(%S*)%s*(.*)")
      if cmd == cmd2 then
         if type == "" then
            user:SendPM(Bot, MsgAll.."|")
         elseif type == "new" then
            user:SendPM(Bot, MsgNew.."|")
         elseif Types[type] then
            ShowRelType(type)
            user:SendPM(Bot, MsgType.."|")
         end
         return 1
      elseif cmd == cmd4 then
         user:SendPM(Bot, MsgNew.."|")
         return 1
      elseif user.bOperator then
         if cmd == cmd3 then
            if type ~= "" then
               DelRel(user, type)
            else
               user:SendData(Bot, "yea right, like i know what i got 2 delete when you don't tell me!|")
            end
            return 1
         elseif cmd == cmd1 then
            if tune ~= "" and Types[type] then
               AddRel(user, tune, type)
            elseif Types[type] == nil then
               user:SendData(Bot, "I need to know the catagory to add it to!|")
            else
               user:SendData(Bot, "yea right, like i know what you got 2 add when you don't tell me!|")
            end
            return 1
         elseif cmd == cmd5 then
            Reload()
            user:SendData(Bot, "Albums reloaded!|")
            return 1
         end
      end
   end
end

function OpenRel()
   AllStuff = nil
   NewestStuff = nil
   AllStuff = {}
   NewestStuff = {}
   Count = 0
   Count2 = 0
   readfrom(file)
   while 1 do
      local line = read()
      if ( line == nil ) then
         break
      else
         Count = Count +1
         AllStuff[Count]=line
      end
   end
   readfrom()
   if Count > MaxNew then
      local temp = Count - MaxNew + 1
      for i=temp, Count do
         Count2 = Count2 + 1
         NewestStuff[Count2]=AllStuff
      end
   else
      for i=1, Count do
         Count2 = Count2 + 1
         NewestStuff[Count2]=AllStuff
      end
   end
end

function ShowRel(table)
   Msg = "\r\n"
   if table == NewestStuff then
      if Count2 == 0 then
         MsgNew = "\r\n\r\n".." --------- The Latest Releases -------- \r\n\r\n  No releases on the list yet\r\n\r\n --------- The Latest Releases -------- \r\n\r\n"
      else
         for i=1, Count2 do
            s,e,type,who,when,title=strfind(NewestStuff, "(.+)$(.+)$(.+)$(.+)")
            if title then
               Msg = Msg.."  "..when.." -- "..who.." -- "..type.." -- "..title.."\r\n"
            else
               Msg = Msg..NewestStuff.."\r\n"
            end
         end
         MsgNew = "\r\n\r\n".." --------- The Latest "..MaxNew.." Releases -------- "..Msg.."\r\n --------- The Latest "..MaxNew.."  Releases -------- \r\n\r\n"
      end
   else
      if Count == 0 then
         MsgAll = "\r\n\r\r\n".." --------- All The Releases -------- \r\n\r\n  No releases on the list yet\r\n\r\n --------- All The Releases -------- \r\n\r\n"
      else
         MsgHelp = "  use "..cmd2.."          for a,b in Types do
            MsgHelp = MsgHelp.."/"..a
         end
         MsgHelp = MsgHelp.."> to see only the selected types"
         for i=1, Count do
            s,e,type,who,when,title=strfind(AllStuff, "(.+)$(.+)$(.+)$(.+)")
            if title then
               Msg = Msg.."  "..when.." -- "..who.." -- "..type.." -- "..title.."\r\n"
            else
               Msg = Msg..AllStuff.."\r\n"
            end
         end
         MsgAll = "\r\n\r\r\n".." --------- All The Releases -------- "..Msg.."\r\n --------- All The Releases -------- \r\n"..MsgHelp.."\r\n"
      end
   end
end

function ShowRelType(what)
   Msg = "\r\n"
   tmp = 0
   if Count == 0 then
      MsgType = "\r\n\r\n".." --------- All The "..Types[what].." -------- \r\n\r\n  No "..strlower(Types[what]).." yet\r\n\r\n --------- All The "..Types[what].." -------- \r\n\r\n"
   else
      for i=1, Count do
         s,e,type,who,when,title=strfind(AllStuff, "(.+)$(.+)$(.+)$(.+)")
         if type == what then
            tmp = tmp + 1
            Msg = Msg.."  "..when.." -- "..who.." -- "..title.."\r\n"
         end
      end
      if tmp == 0 then
         MsgType = "\r\n\r\n".." --------- All The "..Types[what].." -------- \r\n\r\n  No "..strlower(Types[what]).." yet\r\n\r\n --------- All The "..Types[what].." -------- \r\n\r\n"
      else
         MsgType= "\r\n\r\n".." --------- All The "..Types[what].." -------- \r\n"..Msg.."\r\n --------- All The "..Types[what].." -------- \r\n\r\n"
      end
   end
end

function AddRel(user, what, type)
   Count = Count + 1
   AllStuff[Count]=(type.."$"..user.sName.."$"..date("%x").."$"..what)
   user:SendData(Bot, what.." is added to the releases as "..type.."|")
   SaveRel()
   ReloadRel()
end

function DelRel(user, what)
   Okie = nil
   for a,b in AllStuff do
      s,e,title=strfind(b, ".+$(.+)$")
      if title == what then
         AllStuff[a]=nil
         user:SendData(Bot, what.." is removed from the releases|")
         Okie = 1
         break
      end
   end
   if Okie then
      SaveRel()
      ReloadRel()
   else
      user:SendData(Bot, what.." wasn't found in the releases|")
   end
end

function SaveRel()
   writeto(file)
   for i=1,Count do
      if AllStuff then
         write(AllStuff.."\n")
      end
   end
   writeto()
end

function ReloadRel()
   OpenRel()
   ShowRel(NewestStuff)
   ShowRel(AllStuff)
end
Title:
Post by: TTB on 16 February, 2005, 16:02:40
Hi,

I just had some time to fix this... didn't test it, hope it will be ok. Please, next time paste your code with these TAGS -> {CODE} and {/CODE} where {} should be [].

Here is your modified script... please note that in this version VIPs also can delete a release and reload the albums... if you don't want to... please post again.

-- FreshStuff v.3.2
-- original idea/script by chilla
-- completely rewriten by plop
-- if you were running 3.0 then you gotta delete the old file
-- it's incompatible with this version

-- Name the commands to what U like
-- This command adds stuff, syntax : +addalbum TYPE/CATAGORY THESTUFF2ADD
cmd1 = "+addrls"

-- This command shows the stuff, syntax : +albums with options new/game/warez/music/movie
cmd2 = "+rlsall"

-- This command deletes an entry, syntax : +delalbum THESTUFF2DELETE
cmd3 = "+delrls"

-- This command shows the latest stuff, syntax : +newalbums
cmd4 = "+rls"

-- This command reloads the txt file. syntax : +reloadalbums
-- (this command is needed if you manualy edit the text file)
cmd5 = "+reloadalbums"

-- Show latest stuff on entry 1=yes, 0=no
ShowOnEntry = 0

-- Max stuff shown on newalbums/entry
MaxNew = 40

-- The file storing the stuff
file = "releases.txt"

-- Name of the bot
Bot = "-NemO-"

-- you can add catagory's yourself ["trigger_name"]="catagory_name"
Types = {["psychedelic"] = "Psychedelic", ["ambient"]="Ambient", ["electronic"]="Electronic", ["psytrance"]="Psytrance", ["goa"]="Goa", ["chill"]="Chill", ["psytrance"]="Psytrance", ["house"]="House", ["proggresive"]="Proggresive", ["trance"]="Trance", ["psymovie"]="Psymovie"}


--------------------- don't change anything below here
AllStuff = {}
NewestStuff = {}

function Main()
 frmHub:RegBot(Bot)
 ReloadRel()
end

function NewUserConnected(user)
 if ShowOnEntry == 1 then
 user:SendPM(Bot, MsgNew.."|")
 end
end

function OpConnected(user)
 if ShowOnEntry == 1 then
 user:SendPM(Bot, MsgNew.."|")
 end
end

function DataArrival(user,data)
 if (strsub(data, 1, 1) == "<") then
  data = strsub(data,1,strlen(data)-1)
  s,e,cmd,type,tune = strfind(data, "%b<>%s+(%S+)%s*(%S*)%s*(.*)")
  if cmd == cmd2 then
   if type == "" then
    user:SendPM(Bot, MsgAll.."|")
    elseif type == "new" then
    user:SendPM(Bot, MsgNew.."|")
   elseif Types[type] then
    ShowRelType(type)
    user:SendPM(Bot, MsgType.."|")
   end
  return 1
  elseif cmd == cmd4 then
 user:SendPM(Bot, MsgNew.."|")
 return 1
 elseif (user.bOperator or user.iProfile == 2) then
 if cmd == cmd3 then
  if type ~= "" then
  DelRel(user, type)
  else
  user:SendData(Bot, "yea right, like i know what i got 2 delete when you don't tell me!|")
  end
 return 1
 elseif cmd == cmd1 then
 if tune ~= "" and Types[type] then
  AddRel(user, tune, type)
  elseif Types[type] == nil then
  user:SendData(Bot, "I need to know the catagory to add it to!|")
  else
  user:SendData(Bot, "yea right, like i know what you got 2 add when you don't tell me!|")
  end
 return 1
 elseif cmd == cmd5 then
  ReloadRel()
  user:SendData(Bot, "Albums reloaded!|")
 return 1
 end
 end
end
end

function OpenRel()
AllStuff = nil
NewestStuff = nil
AllStuff = {}
NewestStuff = {}
Count = 0
Count2 = 0
readfrom(file)
while 1 do
local line = read()
if ( line == nil ) then
break
else
Count = Count +1
AllStuff[Count]=line
end
end
readfrom()
if Count > MaxNew then
local temp = Count - MaxNew + 1
for i=temp, Count do
Count2 = Count2 + 1
NewestStuff[Count2]=AllStuff[i]
end
else
for i=1, Count do
Count2 = Count2 + 1
NewestStuff[Count2]=AllStuff[i]
end
end
end

function ShowRel(table)
Msg = "\r\n"
if table == NewestStuff then
if Count2 == 0 then
MsgNew = "\r\n\r\n".." --------- The Latest Releases -------- \r\n\r\n No releases on the list yet\r\n\r\n --------- The Latest Releases -------- \r\n\r\n"
else
for i=1, Count2 do
s,e,type,who,when,title=strfind(NewestStuff[i], "(.+)$(.+)$(.+)$(.+)")
if title then
Msg = Msg.." "..when.." -- "..who.." -- "..type.." -- "..title.."\r\n"
else
Msg = Msg..NewestStuff[i].."\r\n"
end
end
MsgNew = "\r\n\r\n".." --------- The Latest "..MaxNew.." Releases -------- "..Msg.."\r\n --------- The Latest "..MaxNew.." Releases -------- \r\n\r\n"
end
else
if Count == 0 then
MsgAll = "\r\n\r\r\n".." --------- All The Releases -------- \r\n\r\n No releases on the list yet\r\n\r\n --------- All The Releases -------- \r\n\r\n"
else
MsgHelp = " use "..cmd2.." for a,b in Types do
MsgHelp = MsgHelp.."/"..a
end
MsgHelp = MsgHelp.."> to see only the selected types"
for i=1, Count do
s,e,type,who,when,title=strfind(AllStuff[i], "(.+)$(.+)$(.+)$(.+)")
if title then
Msg = Msg.." "..when.." -- "..who.." -- "..type.." -- "..title.."\r\n"
else
Msg = Msg..AllStuff[i].."\r\n"
end
end
MsgAll = "\r\n\r\r\n".." --------- All The Releases -------- "..Msg.."\r\n --------- All The Releases -------- \r\n"..MsgHelp.."\r\n"
end
end
end

function ShowRelType(what)
Msg = "\r\n"
tmp = 0
if Count == 0 then
MsgType = "\r\n\r\n".." --------- All The "..Types[what].." -------- \r\n\r\n No "..strlower(Types[what]).." yet\r\n\r\n --------- All The "..Types[what].." -------- \r\n\r\n"
else
for i=1, Count do
s,e,type,who,when,title=strfind(AllStuff[i], "(.+)$(.+)$(.+)$(.+)")
if type == what then
tmp = tmp + 1
Msg = Msg.." "..when.." -- "..who.." -- "..title.."\r\n"
end
end
if tmp == 0 then
MsgType = "\r\n\r\n".." --------- All The "..Types[what].." -------- \r\n\r\n No "..strlower(Types[what]).." yet\r\n\r\n --------- All The "..Types[what].." -------- \r\n\r\n"
else
MsgType= "\r\n\r\n".." --------- All The "..Types[what].." -------- \r\n"..Msg.."\r\n --------- All The "..Types[what].." -------- \r\n\r\n"
end
end
end

function AddRel(user, what, type)
Count = Count + 1
AllStuff[Count]=(type.."$"..user.sName.."$"..date("%x").."$"..what)
user:SendData(Bot, what.." is added to the releases as "..type.."|")
SaveRel()
ReloadRel()
end

function DelRel(user, what)
Okie = nil
for a,b in AllStuff do
s,e,title=strfind(b, ".+$(.+)$")
if title == what then
AllStuff[a]=nil
user:SendData(Bot, what.." is removed from the releases|")
Okie = 1
break
end
end
if Okie then
SaveRel()
ReloadRel()
else
user:SendData(Bot, what.." wasn't found in the releases|")
end
end

function SaveRel()
writeto(file)
for i=1,Count do
if AllStuff[i] then
write(AllStuff[i].."\n")
end
end
writeto()
end

function ReloadRel()
OpenRel()
ShowRel(NewestStuff)
ShowRel(AllStuff)
end
Title: hellooooooooooooooooooooooo
Post by: LiqUiD~TrolL on 18 February, 2005, 17:05:04
eheh well my firend the news are great, the correction of the script works well,and it s good =)


tnx a lot for your help mate, take care