Hi,
Maybe usefull for all...
--Made by nErBoS
Bot = "RBot"
reltxt = "releases.txt" -- Wil be created in the script folder
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=="!addrls") then --## Add the release to the list
if (strlen(user.sName) > 20) then
user:SendData(Bot, "Your nick is to long, you can't post the release.")
else
AddRelease(user, data)
end
return 1
elseif (cmd=="!rdall") then --## Shows all releases
ShowRelease(user, data, "all")
return 1
elseif (cmd=="!rd30") then --## Shows the last 30 releases
ShowRelease(user, data, "last")
return 1
elseif (cmd=="!delrls") then --## To delete 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
end
end
end
function AddRelease(user, data)
local s,e,rel,desc = strfind(data,"%b<>%s+%S+%s+(%S+)%s+(.*)")
local tmp = ""
if (rel == nil or rel == "" or desc == nil or desc == "") then
user:SendData(Bot, "Syntax Error, !add , must have a release name and description.")
elseif (strlen(rel) > 20) then
user:SendData(Bot, "The Release Name lenght can only have 20 characters in maximum.")
else
if (readfrom(reltxt) == nil) then
writeto(reltxt)
write("\r\n"..rel.."$"..desc.."$"..user.sName.."$"..GetTime().."|")
writeto()
else
readfrom(reltxt)
while 1 do
local line = read()
if (line == "") then
tmp = tmp.."\r\n"..rel.."$"..desc.."$"..user.sName.."$"..GetTime().."|"
elseif(line == nil) then
break
else
tmp = tmp.."\r\n"..line
end
end
readfrom()
writeto(reltxt)
write(tmp)
writeto()
end
SendToAll(Bot, "New Release has been added by "..user.sName.."... Type !rdall to see the release list.")
user:SendData(Bot, "Your Release as been added to our list, thank you.")
end
end
function ShowRelease(user, data, type)
local tmp = ""
local tline = 0
if (type == "last") then
tmp = tmp.."\r\n\r\nOur List of the last 30 Releases: \r\n\r\n"
tmp = tmp.." Date\t\tPosted by\t\t\tRelease Name\t\tDescription\r\n\r\n"
else
tmp = tmp.."\r\n\r\nOur List of Releases: \r\n\r\n"
tmp = tmp.." Date\t\tPosted by\t\t\tRelease Name\t\tDescription\r\n\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 = strfind(line, "(.*)$(.*)$(.*)$(.*)|")
if (rel ~= nil) then
tmp = tmp.." "..time.."\t"..who..Coluns(who)..rel..Coluns(rel)..desc.."\r\n"
tline = tline + 1
end
end
end
readfrom()
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, "Sytanx Error, !rlsdel , 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 hasn't found in the list.")
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
Best regards, nErBoS
How would one retrieve the data added to releases?
[EDIT] Don't worry I see that to see all relases you use !rdall command [EDIT]
Also is it possible to have Categories and Sub Cats??
Brgs
Hi,
Can you give me a example it would be more easy to me to see what you want :)
Best regards, nErBoS
the bot not work m8 it wont add a release...
QuoteOriginally posted by nErBoS
Hi,
Can you give me a example it would be more easy to me to see what you want :)
Best regards, nErBoS
Basically so that in your releases you can have a category such as Music, Movies, Games, Applications.
& lets say for the music category you could have rock, pop, jazz as your sub categories.
Hi,
Some Updates and corrections...
--Made by nErBoS
--Version 0.2
Bot = "RBot"
reltxt = "releases.txt" -- Will be created in the script folder
prefix = "+" -- The prefix for the commands
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.."addrls") then --## Adds a Release to the list
if (strlen(user.sName) > 20) then
user:SendData(Bot, "Your Nick is to long, can't post the release.")
else
AddRelease(user, data)
end
return 1
elseif (cmd==prefix.."rlsall") then --## Shows all releases
ShowRelease(user, data, "all")
return 1
elseif (cmd==prefix.."rls30") then --## Shows the lats releases
ShowRelease(user, data, "last")
return 1
elseif (cmd==prefix.."delrls") then --## Erase a Release
if (user.bOperator) then
DelRelease(user, data)
else
user:SendData(Bot, "You don't hve permission to use this command.")
end
return 1
elseif (cmd==prefix.."rlsfind") then --## Find 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.."rlsfind , you must write a name.")
else
ShowRelease(user, data, "find", findrel)
end
return 1
end
end
end
function AddRelease(user, data)
local s,e,rel,desc = strfind(data,"%b<>%s+%S+%s+(%S+)%s+(.*)")
local tmp = ""
if (rel == nil or rel == "" or desc == nil or desc == "") then
user:SendData(Bot, "Sintaxe Erro, "..prefix.."addrls , you must write a name and a description.")
elseif (strlen(rel) > 90) then
user:SendData(Bot, "The Release can't have more then 90 caracters.")
else
if (readfrom(reltxt) == nil) then
writeto(reltxt)
write("\r\n"..rel.."$"..desc.."$"..user.sName.."$"..GetTime().."|")
writeto()
else
readfrom(reltxt)
while 1 do
local line = read()
if (line == "") then
tmp = tmp.."\r\n"..rel.."$"..desc.."$"..user.sName.."$"..GetTime().."|"
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.."rlsall to see all Releases.")
user:SendData(Bot, "Your Release has been added to our list, thank you.")
end
end
function ShowRelease(user, data, type, string)
local tmp = ""
local tline = 0
if (type == "last") then
tmp = tmp.."\r\n\r\nList of the last 30 Releases: \r\n\r\n"
tmp = tmp.." Date\t\tPosted by\t\tRelease Name\t\t\t\t\t\t\t\t\t\t\tDescription\r\n\r\n"
elseif (type == "all") then
tmp = tmp.."\r\n\r\nList of all Releases: \r\n\r\n"
tmp = tmp.." Date\t\tPosted by\t\tRelease Name\t\t\t\t\t\t\t\t\t\t\tDescription\r\n\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\tRelease Name\t\t\t\t\t\t\t\t\t\t\tDescription\r\n\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 = strfind(line, "(.*)$(.*)$(.*)$(.*)|")
if (type == "last" or type == "all") then
if (rel ~= nil) then
tmp = tmp.." "..time.."\t"..who..Coluns(who,"NP")..rel..Coluns(rel,"RN")..desc.."\r\n"
tline = tline + 1
end
elseif (type == "find") then
if (rel ~= nil and rel == string) then
tmp = tmp.." "..time.."\t"..who..Coluns(who,"NP")..rel..Coluns(rel,"RN")..desc.."\r\n"
end
end
end
end
readfrom()
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, "Sintax Error, "..prefix.."rlsdel , 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 wasn't found in the List.")
end
end
function GetTime()
d = date("%d")
mm = date("%m")
y = date("%y")
Date = d.."/"..mm.."/"..y
return Date
end
function Coluns(string, type)
local tmp = ""
if (type == "NP") then
if (strlen(string) < 8) then
tmp = "\t\t\t"
elseif (strlen(string) < 16) then
tmp = "\t\t"
else
tmp = "\t"
end
elseif (type == "RN") then
if (strlen(string) < 8) then
tmp = "\t\t\t\t\t\t\t\t\t\t\t\t"
elseif (strlen(string) < 16) then
tmp = "\t\t\t\t\t\t\t\t\t\t\t"
elseif (strlen(string) < 24) then
tmp = "\t\t\t\t\t\t\t\t\t\t"
elseif (strlen(string) < 32) then
tmp = "\t\t\t\t\t\t\t\t\t"
elseif (strlen(string) < 40) then
tmp = "\t\t\t\t\t\t\t\t"
elseif (strlen(string) < 48) then
tmp = "\t\t\t\t\t\t\t"
elseif (strlen(string) < 56) then
tmp = "\t\t\t\t\t\t"
elseif (strlen(string) < 64) then
tmp = "\t\t\t\t\t"
elseif (strlen(string) < 72) then
tmp = "\t\t\t\t"
elseif (strlen(string) < 80) then
tmp = "\t\t\t"
elseif (strlen(string) < 88) then
tmp = "\t\t"
else
tmp = "\t"
end
end
return tmp
end
Best regards, nErBoS
Hi,
DoN
If i understand you want a list that shows Release bt categories., you want one command to each categories ?? Or you want the List to Make a separion ??
Please tell me all the categories and thier sub-categories.
Best regards, nErBoS
QuoteOriginally posted by nErBoS
Hi,
DoN
If i understand you want a list that shows Release bt categories., you want one command to each categories ?? Or you want the List to Make a separion ??
Please tell me all the categories and thier sub-categories.
Best regards, nErBoS
Basically its like if you want to add a release. The release can be of any category. It could be a Movie, Game, Music, Application.. But at the same time if the release is a music category you could also have it so that it has its own sub category like POP, ROCK, JAZZ, Hip Hop.. So that when its added.. It could be something like +add music POP or so... If it could work on just +add pop and the script will identfy that it belongs in the music category then that would be great. If not then its not a biggie.
All in all this is just a recomendation ;)
Brgs
Hi,
If i understand you want something like this..
Music
Rock
Date Posted by ReleaseName Description
Date Posted by ReleaseName Description
Pop
Date Posted by ReleaseName Description
Date Posted by ReleaseName Description
Date Posted by ReleaseName Description
Film
Action
Date Posted by ReleaseName Description
Date Posted by ReleaseName Description
and so one...
So in the +add i have to add more option for exmaple...
+add
is this what you want ???
Best regards, nErBoS
nice one pinky ;))...eheh...
this gives me some ideas....hmmmm
QuoteOriginally posted by nErBoS
Hi,
If i understand you want something like this..
Music
Rock
Date Posted by ReleaseName Description
Date Posted by ReleaseName Description
Pop
Date Posted by ReleaseName Description
Date Posted by ReleaseName Description
Date Posted by ReleaseName Description
Film
Action
Date Posted by ReleaseName Description
Date Posted by ReleaseName Description
and so one...
So in the +add i have to add more option for exmaple...
+add
is this what you want ???
Best regards, nErBoS
yeah a bit like that. Would a command like this be easy to implement....
+add pop Britteny Spears - BlahWith that added the script will know that POP is in the MUSIC Category so it will be classed as that.... I've asked of something like this from plop's FreshStuff but still waiting to see how he implements it.
Brgs
QuoteOriginally posted by DoN
yeah a bit like that. Would a command like this be easy to implement....
+add pop Britteny Spears - Blah
With that added the script will know that POP is in the MUSIC Category so it will be classed as that.... I've asked of something like this from plop's FreshStuff but still waiting to see how he implements it.
Brgs
yep, i know, but bit busy here.
but it's looking good, most the things i wanted 2 fix/do are done.
plop
Hi,
Like plop my time is few but i will start to work on that when i can.
Best regards, nErBoS
Hi,
Double post sorry, please erase
Best regards, nErBoS
Hi,
Update...
--Made by nErBoS
--Version 0.3
Bot = "RBot"
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.."addrls") 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.."rlsall") then --## Show all releases
ShowRelease(user, data, "all")
return 1
elseif (cmd==prefix.."rls30") then --## Show the last 30 releases
ShowRelease(user, data, "last")
return 1
elseif (cmd==prefix.."delrls") 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.."rlsfind") 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.."rlsfind , 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.."addrls , you must write a type, a name for the release and a description.")
user:SendData(Bot, "Types Avaibale:\r\n\r\n Musica:\r\n\t-Pop\r\n\t-Rock\r\n\t-Jazz\r\n\t-HipHop\r\n\r\nIf isn?t none of this just write 0.")
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.."rlsall 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 pop = ""
local rock = ""
local jazz = ""
local hiphop = ""
local other = ""
if (type == "last") then
tmp = tmp.."\r\n\r\nThe Last 30 Releases: \r\n\r\n"
tmp = tmp.." Music:\r\n\r\n"
tmp = tmp.." Date\t\tPosted by\t\t\tDescription\t\tRelease Name\r\n\r\n"
elseif (type == "all") then
tmp = tmp.."\r\n\r\nAll Releases: \r\n\r\n"
tmp = tmp.." Music:\r\n\r\n"
tmp = tmp.." Date\t\tPosted by\t\t\tDescription\t\tRelease Name\r\n\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.." Music:\r\n\r\n"
tmp = tmp.." Date\t\tPosted by\t\t\tDescription\t\tRelease Name\r\n\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 == "pop") then
pop = pop.." "..time.."\t"..who..Coluns(who)..desc..Coluns(desc)..rel.."\r\n"
elseif (tp == "rock") then
rock = rock.." "..time.."\t"..who..Coluns(who)..desc..Coluns(desc)..rel.."\r\n"
elseif (tp == "jazz") then
jazz = jazz.." "..time.."\t"..who..Coluns(who)..desc..Coluns(desc)..rel.."\r\n"
elseif (tp == "hiphop") then
hiphop = hiphop.." "..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 == "pop") then
pop = pop.." "..time.."\t"..who..Coluns(who)..desc..Coluns(desc)..rel.."\r\n"
elseif (tp == "rock") then
rock = rock.." "..time.."\t"..who..Coluns(who)..desc..Coluns(desc)..rel.."\r\n"
elseif (tp == "jazz") then
jazz = jazz.." "..time.."\t"..who..Coluns(who)..desc..Coluns(desc)..rel.."\r\n"
elseif (tp == "hiphop") then
hiphop = hiphop.." "..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 (pop ~= "") then
tmp = tmp.." -Pop\r\n"
tmp = tmp..pop
end
if (jazz ~= "") then
tmp = tmp.." -Jazz\r\n"
tmp = tmp..jazz
end
if (rock ~= "") then
tmp = tmp.." -Rock\r\n"
tmp = tmp..rock
end
if (hiphop ~= "") then
tmp = tmp.." -HipHop\r\n"
tmp = tmp..hiphop
end
if (other ~= "") then
tmp = tmp.."\r\n Other:\r\n\r\n"
tmp = tmp.." Date\t\tPosted by\t\t\tDescription\t\tRelease Name\r\n\r\n"
tmp = tmp..other
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.."rlsdel , 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
Don..
Is this what you want ??
Best regards, nErBoS
Haven't tested yet. Will do as soon as I can get on my test machine.
Brgs
high :P
the but is very GooD !!! but how it's show the releases is not right i try to show you here but i dont know how to right the code... if it's not write good coonct my hub i will show you :)
( SORRY FOR MY CRAP ENGLISH...!)
code
<-=<[Releases]>=->
L i s t o f t h e l a s t 3 0 R e l e a s e s :
Date Posted by Release Name Description
30/03/04 DJ-Valhala VA-Full_On_7-On_A_Rush-CD-2004-JAH PsyTrance
30/03/04 DJ-Valhala Beat_Bizarre_-_Pandoras_Groove_Box-2004-PsyCZ PsyTrance
29/03/04 Lurfilur VA_-_There_Is_No_Tomorrow-2004-MYCEL Psychedelic
29/03/04 Lurfilur VA_-_Mass_Distraction-2004-MYCEL Psychedelic
29/03/04 Lurfilur VA_-_Accelerator_1.0-2004-PsyCZ Psychedelic
29/03/04 Lurfilur Tikal_-_Ritual_Cycle_(Unreleased_DAT)-2004 Psychedelic
29/03/04 Lurfilur Sub6-Ra_Heya-CDS-2004-JAH Psychedelic
29/03/04 Lurfilur Son_Kite_-_On_Air_Remixes-CDS-2004-UPE Psychedelic
29/03/04 Lurfilur Son_Kite_-_On_Air_(DIG_025)-Vinyl-2004-gEm Psychedelic
29/03/04 Lurfilur Day.Din_-_Flasterphasen_EP_(Madurai_Inc_Promo)-2004-UPE Psychedelic
29/03/04 Lurfilur VA_-_Irresistible_Meltdown_Vol.3-Promo-2004-UPE Psychedelic
29/03/04 Lurfilur Neo_Logic_-_Groove_Logic-2004-PsyCZ Psychedelic
29/03/04 Lurfilur Crunchy_Punch_-_Maximum_Velocity-2004-MYCEL Psychedelic
29/03/04 Lurfilur Mikrokosmos-Two_Places-Vinyl-2004-HOT Progressive
29/03/04 Lurfilur VA_-_Rainbow_Serpent_Festival_2003_Promo-2003-MYCEL Psychedelic
29/03/04 Lurfilur VA_-_Positive_2-2004-UPE Psychedelic
29/03/04 Lurfilur Marcus_Decay_-_Feel_4_You-Vinyl-2004-HSE Trance
29/03/04 Lurfilur Ghreg_On_Earth_-_Untitled_Promo-2004-UPE Psychedelic
28/03/04 psylink VA_-_There_Is_No_Tomorrow-2004-MYCEL Psytrance
28/03/04 psylink VA_-_Accelerator_1.0-2004-PsyCZ Psytrance
28/03/04 psylink VA_-_Mass_Distraction-2004-MYCEL Psytrance
28/03/04 psylink Quantum_-_Flangerized-CDS-2004-UPE Psytrance
28/03/04 psylink Megalopsy_-_Megalopsy-(Artist_Promo)-2004-PsyCZ Psytrance
28/03/04 psylink Son_Kite_-_On_Air_(DIG_025)-Vinyl-2004-GEM Psytrance
28/03/04 psylink VA_-_Irresistible_Meltdown_Vol.3-Promo-2004-UPE Psytrance
28/03/04 psylink Crunchy_Punch_-_Maximum_Velocity-2004-MYCEL Psytrance
28/03/04 psylink Sub6-Ra_Heya-CDS-2004-JAH Psytrance
28/03/04 psylink Neo_Logic_-_Groove_Logic-2004-PsyCZ Psytrance
28/03/04 Lurfilur VA_-_Mental_Case-2004-MYCEL Psychedelic
28/03/04 Lurfilur VA_-_Gap_Sessions_Vol.1-(Promo)-2004-gap Psychedelic
Keep Up The GooD Work m8 :)
now i adited the post for 50 times but i can't do the CODE :(
Hi,
Sorry for the latly repley, have you used the last version that i send ?? It have some changes.
Best regards, nErBoS
QuoteOriginally posted by nErBoS
Hi,
Like plop my time is few but i will start to work on that when i can.
Best regards, nErBoS
thx.
i started on freshstuf 4.x, but can take a while before i release it.
gone be more like a database then a normal release bot.
plop
no coz this
if (pop ~= "") then
tmp = tmp.." -Pop\r\n"
tmp = tmp..pop
end
if (jazz ~= "") then
tmp = tmp.." -Jazz\r\n"
tmp = tmp..jazz
end
if (rock ~= "") then
tmp = tmp.." -Rock\r\n"
tmp = tmp..rock
end
if (hiphop ~= "") then
tmp = tmp.." -HipHop\r\n"
tmp = tmp..hiphop
end
if (other ~= "") then
tmp = tmp.."\r\n Other:\r\n\r\n"
tmp = tmp.." Date\t\tPosted by\t\t\tDescription\t\tRelease Name\r\n\r\n"
tmp = tmp..other
in my hub there is ONLY PsyTrance other things are not alowd only trance music...
Hi,
Try this one them..
--Made by nErBoS
--Version 0.2b
Bot = "RBot"
reltxt = "releases.txt" -- Will be created in the script folder
prefix = "+" -- The prefix for the commands
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.."addrls") then --## Adds a Release to the list
if (strlen(user.sName) > 20) then
user:SendData(Bot, "Your Nick is to long, can't post the release.")
else
AddRelease(user, data)
end
return 1
elseif (cmd==prefix.."rlsall") then --## Shows all releases
ShowRelease(user, data, "all")
return 1
elseif (cmd==prefix.."rls30") then --## Shows the lats releases
ShowRelease(user, data, "last")
return 1
elseif (cmd==prefix.."delrls") then --## Erase a Release
if (user.bOperator) then
DelRelease(user, data)
else
user:SendData(Bot, "You don't hve permission to use this command.")
end
return 1
elseif (cmd==prefix.."rlsfind") then --## Find 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.."rlsfind , you must write a name.")
else
ShowRelease(user, data, "find", findrel)
end
return 1
end
end
end
function AddRelease(user, data)
local s,e,rel,desc = strfind(data,"%b<>%s+%S+%s+(%S+)%s+(.*)")
local tmp = ""
if (rel == nil or rel == "" or desc == nil or desc == "") then
user:SendData(Bot, "Sintaxe Erro, "..prefix.."addrls , you must write a name and a description.")
elseif (strlen(rel) > 90) then
user:SendData(Bot, "The Release can't have more then 90 caracters.")
elseif (strlen(desc) > 20) then
user:SendData(Bot, "The Release descrition can't have more then 20 caracters.")
else
if (readfrom(reltxt) == nil) then
writeto(reltxt)
write("\r\n"..rel.."$"..desc.."$"..user.sName.."$"..GetTime().."|")
writeto()
else
readfrom(reltxt)
while 1 do
local line = read()
if (line == "") then
tmp = tmp.."\r\n"..rel.."$"..desc.."$"..user.sName.."$"..GetTime().."|"
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.."rlsall to see all Releases.")
user:SendData(Bot, "Your Release has been added to our list, thank you.")
end
end
function ShowRelease(user, data, type, string)
local tmp = ""
local tline = 0
if (type == "last") then
tmp = tmp.."\r\n\r\nList of the last 30 Releases: \r\n\r\n"
tmp = tmp.." Date\t\tPosted by\t\t\tDescription\t\tRelease Name\r\n\r\n"
elseif (type == "all") then
tmp = tmp.."\r\n\r\nList of all Releases: \r\n\r\n"
tmp = tmp.." Date\t\tPosted by\t\t\tDescription\t\tRelease Name\r\n\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\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 = strfind(line, "(.*)$(.*)$(.*)$(.*)|")
if (type == "last" or type == "all") then
if (rel ~= nil) then
tmp = tmp.." "..time.."\t"..who..Coluns(who)..desc..Coluns(desc)..rel.."\r\n"
tline = tline + 1
end
elseif (type == "find") then
if (rel ~= nil and rel == string) then
tmp = tmp.." "..time.."\t"..who..Coluns(who)..desc..Coluns(desc)..rel.."\r\n"
end
end
end
end
readfrom()
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, "Sintax Error, "..prefix.."rlsdel , 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 wasn't found in the List.")
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
Best regards, nErBoS
nice script.. but..
Hi,
aL1en...
I think that we are talked in that matter you know the reasons.
Best regards, nErBoS
QuoteOriginally posted by aL1en
bad move nErBoS :\
nice script.. but..
Whats the but?
Brgs
no but or butts
nice job nerbos ;)
Up to ya topic
Hi,
I have re-written this Bot, here you are...
--## Release Bot Re-Written
--## Made by nErBoS
--## Commands:
--## +add