i whan it to add release ONLY BIP and Higher Level
if some one can change it for me it will be great! :)
--Made by nErBoS
--Version 0.2
Bot = "-=<[LsD_-_BoT]>=-"
reltxt = "txt/Release.txt" -- Wil be created in the script folder
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=="+add") then --## Adds a Release to the list
if (strlen(user.iProfile == 0 or 1 or 2 or 4 or 5 or 6 or 7) > 100) then
user:SendData(Bot, "Your Nick is to long, can't post the release.")
else
AddRelease(user, data)
end
return 1
elseif (cmd=="+rdall") then --## Shows all releases
ShowRelease(user, data, "all")
user:SendToAll(user, cmd)
return 1
elseif (cmd=="+rlsfull") then --## Shows all releases
ShowRelease(user, data, "all")
user:SendToAll(user, cmd)
return 1
elseif (cmd=="+rd") then --## Shows the lats releases
ShowRelease(user, data, "last")
user:SendToAll(user, cmd)
return 1
elseif (cmd=="+rls") then --## Shows the lats releases
ShowRelease(user, data, "last")
user:SendToAll(user, cmd)
return 1
elseif (cmd=="+delrd") 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=="+rdfind") 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, ".."+rdfind , 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, ".."+add , you must write a name and a description.")
elseif (strlen(rel) > 100) 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, ""..rel.." has been added by "..user.sName..".."..".")
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\nL i s t o f t h e l a s t 3 0 R e l e a s e s : \r\n\r\n"
tmp = tmp.." Date\t\tPosted by\t\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\nL i s t o f a l l R e l e a s e s : \r\n\r\n"
tmp = tmp.." Date\t\tPosted by\t\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\nS e a r c h R e s u l t : \r\n\r\n"
tmp = tmp.." Date\t\tPosted by\t\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, ".."+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
Hi,
Done...
--Made by nErBoS
--Version 0.2
Bot = "-=<[LsD_-_BoT]>=-"
reltxt = "txt/Release.txt" -- Wil be created in the script folder
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=="+add" and (user.iProfile == 2 or user.bOperator)) then --## Adds a Release to the list
if (strlen(user.iProfile == 0 or 1 or 2 or 4 or 5 or 6 or 7) > 100) then
user:SendData(Bot, "Your Nick is to long, can't post the release.")
else
AddRelease(user, data)
end
return 1
elseif (cmd=="+rdall" and (user.iProfile == 2 or user.bOperator)) then --## Shows all releases
ShowRelease(user, data, "all")
user:SendToAll(user, cmd)
return 1
elseif (cmd=="+rlsfull") then --## Shows all releases
ShowRelease(user, data, "all")
user:SendToAll(user, cmd)
return 1
elseif (cmd=="+rd") then --## Shows the lats releases
ShowRelease(user, data, "last")
user:SendToAll(user, cmd)
return 1
elseif (cmd=="+rls") then --## Shows the lats releases
ShowRelease(user, data, "last")
user:SendToAll(user, cmd)
return 1
elseif (cmd=="+delrd" and (user.iProfile == 2 or user.bOperator)) 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=="+rdfind") 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, ".."+rdfind , 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, ".."+add , you must write a name and a description.")
elseif (strlen(rel) > 100) 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, ""..rel.." has been added by "..user.sName..".."..".")
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\nL i s t o f t h e l a s t 3 0 R e l e a s e s : \r\n\r\n"
tmp = tmp.." Date\t\tPosted by\t\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\nL i s t o f a l l R e l e a s e s : \r\n\r\n"
tmp = tmp.." Date\t\tPosted by\t\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\nS e a r c h R e s u l t : \r\n\r\n"
tmp = tmp.." Date\t\tPosted by\t\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, ".."+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
GREAT Man !!! :))) thank you for the 10000000000000000000000000000000000000000000000000000000000000000000000 time :)
1 more littel modefide in the BoT
whn i +rlsdel RELEASE i whant it to SentToAll
RELEASE has been deleted by DJ-Valhala
here how it looks
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, ".."+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
now this is how i moddefide it
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, ".."+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, "(.*)$.*$.*$.*|")
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
SendToAll(Bot, ""..rel.." has been deleted by "..user.sName.."")
else
user:SendData(Bot, "The Release wasn't found in the List.")
end
end
and the problam is in this line
SendToAll(Bot, ""..rel.." has been deleted "..user.sName.."")
and this is the error i get
Syntax Error: attempt to call field `SendToAll' (a nil value)
Syntax Error: attempt to concat global `rel' (a nil value)
Hi,
Try this one...
--Made by nErBoS
--Version 0.2
Bot = "-=<[LsD_-_BoT]>=-"
reltxt = "txt/Release.txt" -- Wil be created in the script folder
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=="+add" and (user.iProfile == 2 or user.bOperator)) then --## Adds a Release to the list
if (strlen(user.iProfile == 0 or 1 or 2 or 4 or 5 or 6 or 7) > 100) then
user:SendData(Bot, "Your Nick is to long, can't post the release.")
else
AddRelease(user, data)
end
return 1
elseif (cmd=="+rdall" and (user.iProfile == 2 or user.bOperator)) then --## Shows all releases
ShowRelease(user, data, "all")
user:SendToAll(user, cmd)
return 1
elseif (cmd=="+rlsfull") then --## Shows all releases
ShowRelease(user, data, "all")
user:SendToAll(user, cmd)
return 1
elseif (cmd=="+rd") then --## Shows the lats releases
ShowRelease(user, data, "last")
user:SendToAll(user, cmd)
return 1
elseif (cmd=="+rls") then --## Shows the lats releases
ShowRelease(user, data, "last")
user:SendToAll(user, cmd)
return 1
elseif (cmd=="+delrd" and (user.iProfile == 2 or user.bOperator)) 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=="+rdfind") 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, ".."+rdfind , 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, ".."+add , you must write a name and a description.")
elseif (strlen(rel) > 100) 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, ""..rel.." has been added by "..user.sName..".."..".")
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\nL i s t o f t h e l a s t 3 0 R e l e a s e s : \r\n\r\n"
tmp = tmp.." Date\t\tPosted by\t\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\nL i s t o f a l l R e l e a s e s : \r\n\r\n"
tmp = tmp.." Date\t\tPosted by\t\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\nS e a r c h R e s u l t : \r\n\r\n"
tmp = tmp.." Date\t\tPosted by\t\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, ".."+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
SendToAll(Bot, "The Release"..release.." was been deleted by "..user.sName.." .")
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
great man just GREAT! :D i dont know how to thank you... :)
and the lest thing to make the BoT perfect if you if not no harm you help more then i needed :)))
i want to change the way the bot show the release now i know how to show it here :)
and i if you can make it to send PM TO MAIN?
<-=<[LsD_-_BoT]>=->
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
24/05/04 DJ-Valhala Chromosome_-_The_Genome_Project-2004-MYCEL PsyTrance
24/05/04 DJ-Valhala Blue_Vortex_-_Mirage-2004-MYCEL PsyTrance
24/05/04 DJ-Valhala VA_-_Open_Air_Vol_2-2CD-2004-MYCEL PsyTrance
24/05/04 DJ-Valhala VA_-_Hypernova-2004-MYCEL PsyTrance
22/05/04 (-=trip-in-sun=-) Beat_Hackers-Revolution_(Unreleased)-CDS-2004-knk psytrance
22/05/04 (-=trip-in-sun=-) Astrix_-_Disco_Valley_(Sub6_Remix)-Promo_CDS-2004-iL psytrance
22/05/04 DJ-Valhala Finster-Next_Season-Retail-2004-XXL PsyTrance
22/05/04 DJ-Valhala Sub6_-_Unreleased_Tracks-CDR-2004-HEB FakeTrance
22/05/04 DJ-Valhala transdriver_-_eshioraz_(unreleased)-2004-dig PsyTrance
22/05/04 DJ-Valhala Astrix_-_Move_on-Proper-Promo-CDS-2004-QMI PsyTrance
21/05/04 GorizDollz Transdriver_-_Eshioraz_(Unreleased)-2004-DiG Psytrance
21/05/04 DJ-Valhala Protoculture_-_Neuro_Pop-CDS-2004-HEB FakeTrance
20/05/04 (-=trip-in-sun=-) VA_-_Soul_Reflection-Promo-2004-UPE Psytrance
20/05/04 DJ-Valhala Zion_Epic_-_Tribal_into_Trance-2004-PHS PsyTrance
20/05/04 (-=trip-in-sun=-) Absolum_Vs._C.P.U_-_One_Eyed_Man-CDS-2004-HEB Psychedelic
20/05/04 DJ-Valhala X-Dream_-_The_1st-(BBS011)-Vinyl-2004-NRG PsyTrance
20/05/04 DJ-Valhala Sub6_Vs_Space_Cat-Side_Off_(Unreleased)-CDS-2004-knk PsyTrance
20/05/04 DJ-Valhala X-Dream_-_The_1st-(BBS011)-Vinyl-2004-NR PsyTrance
19/05/04 Lurfilur Lhome_-_The_Groovemaschine_and_Lokomotive_EP-(Demo)-2004-TBS Techno_(Lurfilur_Demo)
19/05/04 DJ-Valhala Brain_Damage_-_We_Are_the_Musions-CDS-2004-HEB FakeTrance
19/05/04 DJ-Valhala VA_-_Conspiracy_2_Vol_2-2004-HLSMP3 PsyTrance
18/05/04 DJ-Valhala Tomcraft_-_Loneliness_(Psytek_Remix)-Promo_CDS-2004-iL PsyTrance
17/05/04 DJ-Valhala Silicon_Sound_-_Cypher-CDS-2004-HEB FakeTrance
17/05/04 DJ-Valhala Astrix_-_Eye_to_Eye_(GMS_Remix)-CDS-2004-HEB FakeTrance
17/05/04 DJ-Valhala Astrix_-_Scientific_Reality_(Silent_Sphere_Remix)_(Unreleased)-CDS-2004-iL PsyTrance
17/05/04 DJ-Valhala Fatali_-_No_Doubt-CDS-2004-HEB FakeTrance
17/05/04 DJ-Valhala Absolum_-_Inside_the_Sphere-2004-zEn PsyTrance
17/05/04 DJ-Valhala VA_-_Spiritual_Worlds-2CD-2002-zEn Ambient
17/05/04 DJ-Valhala Lagoon_-_The_Beam_of_Love-Promo_Vinyl-2004-QMI PsyTrance
17/05/04 DJ-Valhala Portion_Control-Well_Come-2CD-2004-FWYH Electronic
Electronic
to this
<-=<[LsD_-_BoT]>=->
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 Description Release Name
24/05/04 DJ-Valhala PsyTrance Chromosome_-_The_Genome_Project-2004-MYCEL
24/05/04 DJ-Valhala PsyTrance Blue_Vortex_-_Mirage-2004-MYCEL
24/05/04 DJ-Valhala PsyTrance VA_-_Open_Air_Vol_2-2CD-2004-MYCEL
24/05/04 DJ-Valhala PsyTrance VA_-_Hypernova-2004-MYCEL
22/05/04 (-=trip-in-sun=-) PsyTrance Beat_Hackers-Revolution_(Unreleased)-CDS-2004-knk
22/05/04 (-=trip-in-sun=-) PsyTrance Astrix_-_Disco_Valley_(Sub6_Remix)-Promo_CDS-2004-iL
22/05/04 DJ-Valhala PsyTrance Finster-Next_Season-Retail-2004-XXL
22/05/04 DJ-Valhala FakeTrance Sub6_-_Unreleased_Tracks-CDR-2004-HEB
Hi,
Done...
--Made by nErBoS
--Version 0.2
Bot = "-=<[LsD_-_BoT]>=-"
reltxt = "txt/Release.txt" -- Wil be created in the script folder
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=="+add" and (user.iProfile == 2 or user.bOperator)) then --## Adds a Release to the list
if (strlen(user.iProfile == 0 or 1 or 2 or 4 or 5 or 6 or 7) > 100) then
user:SendData(Bot, "Your Nick is to long, can't post the release.")
else
AddRelease(user, data)
end
return 1
elseif (cmd=="+rdall" and (user.iProfile == 2 or user.bOperator)) then --## Shows all releases
ShowRelease(user, data, "all")
user:SendToAll(user, cmd)
return 1
elseif (cmd=="+rlsfull") then --## Shows all releases
ShowRelease(user, data, "all")
user:SendToAll(user, cmd)
return 1
elseif (cmd=="+rd") then --## Shows the lats releases
ShowRelease(user, data, "last")
user:SendToAll(user, cmd)
return 1
elseif (cmd=="+rls") then --## Shows the lats releases
ShowRelease(user, data, "last")
user:SendToAll(user, cmd)
return 1
elseif (cmd=="+delrd" and (user.iProfile == 2 or user.bOperator)) 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=="+rdfind") 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, ".."+rdfind , 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, ".."+add , you must write a name and a description.")
elseif (strlen(rel) > 100) 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, ""..rel.." has been added by "..user.sName..".."..".")
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\nL i s t o f t h e l a s t 3 0 R e l e a s e s : \r\n\r\n"
tmp = tmp.." Date\t\tPosted by\t\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\nL i s t o f a l l R e l e a s e s : \r\n\r\n"
tmp = tmp.." Date\t\tPosted by\t\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\nS e a r c h R e s u l t : \r\n\r\n"
tmp = tmp.." Date\t\tPosted by\t\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:SendData(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, ".."+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
SendToAll(Bot, "The Release"..release.." was been deleted by "..user.sName.." .")
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
hehe great man but you forget littel ting :)
to organized it to look like that...
<-=<[LsD_-_BoT]>=->
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
24/05/04 DJ-Valhala Chromosome_-_The_Genome_Project-2004-MYCEL PsyTrance
24/05/04 DJ-Valhala Blue_Vortex_-_Mirage-2004-MYCEL PsyTrance
24/05/04 DJ-Valhala VA_-_Open_Air_Vol_2-2CD-2004-MYCEL PsyTrance
24/05/04 DJ-Valhala VA_-_Hypernova-2004-MYCEL PsyTrance
22/05/04 (-=trip-in-sun=-) Beat_Hackers-Revolution_(Unreleased)-CDS-2004-knk psytrance
22/05/04 (-=trip-in-sun=-) Astrix_-_Disco_Valley_(Sub6_Remix)-Promo_CDS-2004-iL psytrance
22/05/04 DJ-Valhala Finster-Next_Season-Retail-2004-XXL PsyTrance
22/05/04 DJ-Valhala Sub6_-_Unreleased_Tracks-CDR-2004-HEB FakeTrance
22/05/04 DJ-Valhala transdriver_-_eshioraz_(unreleased)-2004-dig PsyTrance
22/05/04 DJ-Valhala Astrix_-_Move_on-Proper-Promo-CDS-2004-QMI PsyTrance
21/05/04 GorizDollz Transdriver_-_Eshioraz_(Unreleased)-2004-DiG Psytrance
21/05/04 DJ-Valhala Protoculture_-_Neuro_Pop-CDS-2004-HEB FakeTrance
20/05/04 (-=trip-in-sun=-) VA_-_Soul_Reflection-Promo-2004-UPE Psytrance
20/05/04 DJ-Valhala Zion_Epic_-_Tribal_into_Trance-2004-PHS PsyTrance
20/05/04 (-=trip-in-sun=-) Absolum_Vs._C.P.U_-_One_Eyed_Man-CDS-2004-HEB Psychedelic
20/05/04 DJ-Valhala X-Dream_-_The_1st-(BBS011)-Vinyl-2004-NRG PsyTrance
20/05/04 DJ-Valhala Sub6_Vs_Space_Cat-Side_Off_(Unreleased)-CDS-2004-knk PsyTrance
20/05/04 DJ-Valhala X-Dream_-_The_1st-(BBS011)-Vinyl-2004-NR PsyTrance
19/05/04 Lurfilur Lhome_-_The_Groovemaschine_and_Lokomotive_EP-(Demo)-2004-TBS Techno_(Lurfilur_Demo)
19/05/04 DJ-Valhala Brain_Damage_-_We_Are_the_Musions-CDS-2004-HEB FakeTrance
19/05/04 DJ-Valhala VA_-_Conspiracy_2_Vol_2-2004-HLSMP3 PsyTrance
18/05/04 DJ-Valhala Tomcraft_-_Loneliness_(Psytek_Remix)-Promo_CDS-2004-iL PsyTrance
17/05/04 DJ-Valhala Silicon_Sound_-_Cypher-CDS-2004-HEB FakeTrance
17/05/04 DJ-Valhala Astrix_-_Eye_to_Eye_(GMS_Remix)-CDS-2004-HEB FakeTrance
17/05/04 DJ-Valhala Astrix_-_Scientific_Reality_(Silent_Sphere_Remix)_(Unreleased)-CDS-2004-iL PsyTrance
17/05/04 DJ-Valhala Fatali_-_No_Doubt-CDS-2004-HEB FakeTrance
17/05/04 DJ-Valhala Absolum_-_Inside_the_Sphere-2004-zEn PsyTrance
17/05/04 DJ-Valhala VA_-_Spiritual_Worlds-2CD-2002-zEn Ambient
17/05/04 DJ-Valhala Lagoon_-_The_Beam_of_Love-Promo_Vinyl-2004-QMI PsyTrance
17/05/04 DJ-Valhala Portion_Control-Well_Come-2CD-2004-FWYH Electronic
Electronic
to this
<-=<[LsD_-_BoT]>=->
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 Description Release Name
24/05/04 DJ-Valhala PsyTrance Chromosome_-_The_Genome_Project-2004-MYCEL
24/05/04 DJ-Valhala PsyTrance Blue_Vortex_-_Mirage-2004-MYCEL
24/05/04 DJ-Valhala PsyTrance VA_-_Open_Air_Vol_2-2CD-2004-MYCEL
24/05/04 DJ-Valhala PsyTrance VA_-_Hypernova-2004-MYCEL
22/05/04 (-=trip-in-sun=-) PsyTrance Beat_Hackers-Revolution_(Unreleased)-CDS-2004-knk
22/05/04 (-=trip-in-sun=-) PsyTrance Astrix_-_Disco_Valley_(Sub6_Remix)-Promo_CDS-2004-iL
22/05/04 DJ-Valhala PsyTrance Finster-Next_Season-Retail-2004-XXL
22/05/04 DJ-Valhala FakeTrance Sub6_-_Unreleased_Tracks-CDR-2004-HEB
SORRY FOR LEECIHNG YOU!
Hi,
I have made this version some time ago...
--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" and (user.iProfile == 2 or user.bOperator)) 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" and (user.iProfile == 2 or user.bOperator)) 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:SendData(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 man but i moddefide your script to my own use and it's hard to it all over again if you can do it in the script i posted it will be nice if not no hard fillin :)
nerbos, could you make so the last release gets to the bottom of the list, not the top as it is now.
Hi,
D-J Valhala...
Sorry man you have to make your modifies on this BOT, the bot already have your previous request.
blackwings ...
You want to show the oldest releases ???
Best regards, nErBoS
QuoteOriginally posted by nErBoS
blackwings ...
You want to show the oldest releases ???
Best regards, nErBoS
No, but when the list gets long (and it will sometimes), the latest one will not be visible on the screen, the will disapear at the top of the screen and you need to scroll to see them.
Hi,
Just use the command rls30 show the last 30 relases inputed.
Best regards, nErBoS
seems like the script has a bugg. Sometimes when a user add a release, the release and the description gets displace, with other words they sometimes gets added on or two tabs to the left and how they do that are random. I hope you understand what I tried to tell you.
ah, fixed the bug myself.
it must be like this if it should work=
elseif (strlen(string) < 20) then
not this =
elseif (strlen(string) < 16) then
Hi,
Great then, but the tables could be mispalced because of some characters.
Best regards, nErBoS
could you make a function that will kick a user that use it to much under a short time(like user sends +rls30 3 times a second). So if he like sends more than 2 times per second, he gets kicked and also gets a message about why he/she got kicked
QuoteOriginally posted by blackwings
could you make a function that will kick a user that use it to much under a short time(like user sends +rls30 3 times a second). So if he like sends more than 2 times per second, he gets kicked and also gets a message about why he/she got kicked
I think I have it covered here ...
--Made by nErBoS
--Version 0.2b
Bot = "RBot"
reltxt = "releases.txt" -- Will be created in the script folder
prefix = "+" -- The prefix for the commands
delay = 6 -- The seconds delay for flooding the Bot
fastNicks = {};
function Main()
frmHub:RegBot(Bot)
SetTimer(delay*1000)
StartTimer()
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" and (user.iProfile == 2 or user.bOperator)) 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
Spammers(user.sName, 1)
ShowRelease(user, data, "all")
return 1
elseif (cmd==prefix.."rls30") then --## Shows the lats releases
Spammers(user.sName, 1)
ShowRelease(user, data, "last")
return 1
elseif (cmd==prefix.."delrls" and (user.iProfile == 2 or user.bOperator)) 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
Spammers(user.sName, 1)
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 OnTimer()
for nick, rep in fastNicks do
if fastNicks[nick] == 3 then
SendPmToNick( nick, Bot, "Please! Next time don't spam me ....")
DisconnectByName("..nick..")
end
end
fastNicks = {}
end
function Spammers(nick, rep)
if fastNicks[nick] then
for name, rep in fastNicks do
if tonumber(rep) == 3 then
SendPmToNick( nick, Bot, "Please! Next time don't spam me ....")
DisconnectByName(nick)
else
fastNicks[nick] = tonumber(rep)+1
end
end
else fastNicks[nick] = 1 end
end
----------------------------------------------------(goes on the same script from here on...)
function AddRelease(user, data)
local s,e,rel,desc = strfind(data ...
I think that PtX has an anti flood function ...
( if wrong I apologise .... *at least on the tests with or without any script running I was getting disconnected after repeating something 5 + 1 times .... )I 'd like to know if this is actualy working, and if yes if it is doing it efficiently ...
Don't worry I tested but PtX *confused me a lot