release script help_(vips can t add releases)
 

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 script help_(vips can t add releases)

Started by LiqUiD~TrolL, 18 April, 2005, 18:38:39

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

LiqUiD~TrolL

hello ppl wel i hav e this script from my friend bastya_elvtars.
and i have a small problem , VIPs can t add releases in the hub,can anyone help in fixing this script???


-- FreshStuff 3 - 3.7beta
-----------------------------------------------------------------------------------------
-- original idea/script by chilla
-- completely rewriten by plop
-- taken over by bastya_elvtars (the rock n' roll doctor)
-- if you were running 3.0 then you gotta delete the old file
-- it's incompatible with this version
-- deleting now goes by id number
-- anounces the new releas in mainchat
-----------------------------------------------------------------------------------------
--------------------------- 3.7 -----------------------------
-- converted to lua5 and added search function by bastya_elvtars
-- also taken over with permission by plop. :P
-- rewrote the metadata routine: pattern matching is applied upon opening, using nested arrays ---> faster.
-- added ability to delete multiple releases with a single line.
--------------------------- 3.7.5 -----------------------------
-- added choice between showing in main or PM on entry
-- new stuff is shown by real ID (idea by LiqUiD~TrolL)
-- security fixes have been made, corrupt entries are ignored
-----------------------------------------------------------------------------------------

senddebugto={"[TGA-OP]bastya_elvtars"}

-- 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"


-- This is for searching inside releases.

cmd6="+rlsfind"

-- Show latest stuff on entry 1=PM, 2=mainchat, 0=no
ShowOnEntry = 0

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

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


-- 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 Show(user)
if ShowOnEntry ~=0 then
if ShowOnEntry==1 then
user:SendPM(Bot, MsgNew.."|")
end
end
end

function NewUserConnected(user)
Show(user)
end

function ChatArrival(user,data)
data = string.sub(data,1,string.len(data)-1)
local _,_,cmd,type,tune = string.find(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
ReloadRel()
user:SendData(Bot, "Albums reloaded!|")
elseif cmd==cmd6 then
if type~="" and tune=="" then
SearchRel(user,type)
else
user:SendData(Bot, "yea right, like i know what you got 2 search when you don't tell me!|")
end

return 1
end
end
end


function OpenRel()
AllStuff = nil
NewestStuff = nil
AllStuff = {}
NewestStuff = {}
Count = 0
Count2 = 0
local f=io.open(file,"r")
if f then
for line in f:lines() do
Count = Count +1
local _,_,type,who,when,title=string.find(line, "(.+)$(.+)$(.+)$(.+)")
if type and who and when and title then
AllStuff[Count]={type,who,when,title}
else
SendToOps(Bot, "Releases file is corrupt, failed to load all items.")
end
end
f:close()
end
if Count > MaxNew then
local tmp = Count - MaxNew + 1
Count2=Count - MaxNew + 1
for i = tmp, Count do
Count2=Count2 + 1
if AllStuff[Count2] then
NewestStuff[Count2]=AllStuff[Count2]
end
end
else
for i=1, Count do
Count2 = Count2 + 1
if AllStuff then
NewestStuff[Count2]=AllStuff
end
end
end
end

function ShowRel(table)
Msg = "\r\n"
local type,who,when,title
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
if NewestStuff then
type,who,when,title=NewestStuff[1],NewestStuff[2],NewestStuff[3],NewestStuff[4]
if title then
Msg = Msg.."  ID: "..i.." -- "..when.." -- "..who.." -- "..type.." -- "..title.."\r\n"
else
Msg = Msg..(table.concat(NewestStuff)).."\r\n"
end
end
end
end
MsgNew = "\r\n\r\n".." --------- The Latest "..MaxNew.." Releases -------- "..Msg.."\r\n --------- The Latest "..MaxNew.."  Releases -------- \r\n\r\n"
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
if AllStuff then
type,who,when,title=AllStuff[1],AllStuff[2],AllStuff[3],AllStuff[4]
if title then
Msg = Msg.."  ID: "..i.." -- "..when.." -- "..who.." -- "..type.." -- "..title.."\r\n"
else
Msg = Msg..(table.concat(AllStuff)).."\r\n"
end
end
end
end
MsgAll = "\r\n\r\r\n".." --------- All The Releases -------- "..Msg.."\r\n --------- All The Releases -------- \r\n"..MsgHelp.."\r\n"
end
end

function ShowRelType(what)
local type,who,when,title
Msg = "\r\n"
tmp = 0
if Count == 0 then
MsgType = "\r\n\r\n".." --------- All The "..Types[what].." -------- \r\n\r\n  No "..string.lower(Types[what]).." yet\r\n\r\n --------- All The "..Types[what].." -------- \r\n\r\n"
else
for i=1, Count do
type,who,when,title=AllStuff[1],AllStuff[2],AllStuff[3],AllStuff[4]
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 "..string.lower(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,os.date("%x"),what}
user:SendData(Bot, what.." is added to the releases as "..type.."|")
SendToAll(Bot, user.sName.." added to the "..type.." releases: "..what.."|")
SaveRel()
ReloadRel()
end

function DelRel(user, what)
string.gsub(what,"(%d+)",function(what)
what = tonumber(what)
if what then
if AllStuff[what] then
local which=(AllStuff[what][4])
user:SendData(Bot, which.." is deleted from the releases|")
AllStuff[what]=nil
else
user:SendData(Bot, "release numbered "..what.." wasn't found in the releases|")
end
else
user:SendData(parseenv(user,env,Bot).. "I need the ID number to delete an entry.|")
end
end)
SaveRel()
ReloadRel()
end

function SaveRel()
local f= io.open(file,"w+")
for i=1,Count do
if AllStuff then
f:write(AllStuff[1].."$"..AllStuff[2].."$"..AllStuff[3].."$"..AllStuff[4].."\n")
end
end
f:flush()
f:close(f)
end

function ReloadRel()
OpenRel()
ShowRel(NewestStuff)
ShowRel(AllStuff)
end

function DelRelOld(user, what)
Okie = nil
local title
for a,b in AllStuff do
title=b[4]
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 SearchRel(user,what)
local res=0
local rest={}
local _,_,bdc=string.find(what,"([%%%[%]%(%)%*%+%-%?%^])")
local msg="\r\n---------- You searched for keyword \""..what.."\". The results: ----------\r\n"
if bdc then
user:SendData(Bot,"you cannot use the character "..bdc)
return
end
for a,b in AllStuff do
if string.find(b[4],what) then
table.insert(rest,{b[1],b[2],b[3],b[4]})
end
end
if table.getn(rest)~=0 then
for i=1,table.getn(rest) do
local type,who,when,title=rest[1],rest[2],rest[3],rest[4]
res= res + 1
msg = msg.."\r\n  "..when.." -- "..who.." -- "..title
end
msg=msg.."\r\n\r\n"..res.." results."
else
msg=msg.."\r\nSearch string "..what.." was not found in releases database."
end
user:SendPM(Bot,msg)
end

function OnError(ErrorMsg)
if enabledebug==1 then
for f=1,table.getn(senddebugto) do
SendPmToNick(senddebugto[f],Bot, ErrorMsg.."\r\n".."Stack traceback: "..debug.traceback())
end
end
end

OpConnected=NewUserConnected
________<>________


            -=@_ psydream-land.no-ip.org _@=-


             
http://www.psychedelicdreams.bravehost.com

ConejoDelMal

here:

-- FreshStuff 3 - 3.7beta 
----------------------------------------------------------------------------------------- 
-- original idea/script by chilla 
-- completely rewriten by plop 
-- taken over by bastya_elvtars (the rock n' roll doctor) 
-- if you were running 3.0 then you gotta delete the old file 
-- it's incompatible with this version 
-- deleting now goes by id number 
-- anounces the new releas in mainchat 
----------------------------------------------------------------------------------------- 
--------------------------- 3.7 ----------------------------- 
-- converted to lua5 and added search function by bastya_elvtars 
-- also taken over with permission by plop. :P 
-- rewrote the metadata routine: pattern matching is applied upon opening, using nested arrays ---> faster. 
-- added ability to delete multiple releases with a single line. 
--------------------------- 3.7.5 ----------------------------- 
-- added choice between showing in main or PM on entry 
-- new stuff is shown by real ID (idea by LiqUiD~TrolL) 
-- security fixes have been made, corrupt entries are ignored 
----------------------------------------------------------------------------------------- 

senddebugto={"[TGA-OP]bastya_elvtars"} 

-- 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" 


-- This is for searching inside releases. 

cmd6="+rlsfind" 

-- Show latest stuff on entry 1=PM, 2=mainchat, 0=no 
ShowOnEntry = 0 

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

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


-- 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 Show(user) 
if ShowOnEntry ~=0 then 
if ShowOnEntry==1 then 
user:SendPM(Bot, MsgNew.."|") 
end 
end 
end 

function NewUserConnected(user) 
Show(user) 
end 

function ChatArrival(user,data) 
data = string.sub(data,1,string.len(data)-1) 
local _,_,cmd,type,tune = string.find(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!|") 
elseif cmd==cmd6 then 
if type~="" and tune=="" then 
SearchRel(user,type) 
else 
user:SendData(Bot, "yea right, like i know what you got 2 search when you don't tell me!|") 
end 

return 1 
end 
end 
end 


function OpenRel() 
AllStuff = nil 
NewestStuff = nil 
AllStuff = {} 
NewestStuff = {} 
Count = 0 
Count2 = 0 
local f=io.open(file,"r") 
if f then 
for line in f:lines() do 
Count = Count +1 
local _,_,type,who,when,title=string.find(line, "(.+)$(.+)$(.+)$(.+)") 
if type and who and when and title then 
AllStuff[Count]={type,who,when,title} 
else 
SendToOps(Bot, "Releases file is corrupt, failed to load all items.") 
end 
end 
f:close() 
end 
if Count > MaxNew then 
local tmp = Count - MaxNew + 1 
Count2=Count - MaxNew + 1 
for i = tmp, Count do 
Count2=Count2 + 1 
if AllStuff[Count2] then 
NewestStuff[Count2]=AllStuff[Count2] 
end 
end 
else 
for i=1, Count do 
Count2 = Count2 + 1 
if AllStuff[i] then 
NewestStuff[Count2]=AllStuff[i] 
end 
end 
end 
end 

function ShowRel(table) 
Msg = "\r\n" 
local type,who,when,title 
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 
if NewestStuff[i] then 
type,who,when,title=NewestStuff[i][1],NewestStuff[i][2],NewestStuff[i][3],N ewestStuff[i][4] 
if title then 
Msg = Msg.." ID: "..i.." -- "..when.." -- "..who.." -- "..type.." -- "..title.."\r\n" 
else 
Msg = Msg..(table.concat(NewestStuff[i])).."\r\n" 
end 
end 
end 
end 
MsgNew = "\r\n\r\n".." --------- The Latest "..MaxNew.." Releases -------- "..Msg.."\r\n --------- The Latest "..MaxNew.." Releases -------- \r\n\r\n" 
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.."  to see only the selected types" 
for i=1, Count do 
if AllStuff[i] then 
type,who,when,title=AllStuff[i][1],AllStuff[i][2],AllStuff[i][3],AllStuff[i ][4] 
if title then 
Msg = Msg.." ID: "..i.." -- "..when.." -- "..who.." -- "..type.." -- "..title.."\r\n" 
else 
Msg = Msg..(table.concat(AllStuff[i])).."\r\n" 
end 
end 
end 
end 
MsgAll = "\r\n\r\r\n".." --------- All The Releases -------- "..Msg.."\r\n --------- All The Releases -------- \r\n"..MsgHelp.."\r\n" 
end 
end 

function ShowRelType(what) 
local type,who,when,title 
Msg = "\r\n" 
tmp = 0 
if Count == 0 then 
MsgType = "\r\n\r\n".." --------- All The "..Types[what].." -------- \r\n\r\n No "..string.lower(Types[what]).." yet\r\n\r\n --------- All The "..Types[what].." -------- \r\n\r\n" 
else 
for i=1, Count do 
type,who,when,title=AllStuff[i][1],AllStuff[i][2],AllStuff[i][3],AllStuff[i ][4] 
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 "..string.lower(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,os.date("%x"),what} 
user:SendData(Bot, what.." is added to the releases as "..type.."|") 
SendToAll(Bot, user.sName.." added to the "..type.." releases: "..what.."|") 
SaveRel() 
ReloadRel() 
end 

function DelRel(user, what) 
string.gsub(what,"(%d+)",function(what) 
what = tonumber(what) 
if what then 
if AllStuff[what] then 
local which=(AllStuff[what][4]) 
user:SendData(Bot, which.." is deleted from the releases|") 
AllStuff[what]=nil 
else 
user:SendData(Bot, "release numbered "..what.." wasn't found in the releases|") 
end 
else 
user:SendData(parseenv(user,env,Bot).. "I need the ID number to delete an entry.|") 
end 
end) 
SaveRel() 
ReloadRel() 
end 

function SaveRel() 
local f= io.open(file,"w+") 
for i=1,Count do 
if AllStuff[i] then 
f:write(AllStuff[i][1].."$"..AllStuff[i][2].."$"..AllStuff[i][3].."$"..AllStuff[i][4].."\n") 
end 
end 
f:flush() 
f:close(f) 
end 

function ReloadRel() 
OpenRel() 
ShowRel(NewestStuff) 
ShowRel(AllStuff) 
end 

function DelRelOld(user, what) 
Okie = nil 
local title 
for a,b in AllStuff do 
title=b[4] 
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 SearchRel(user,what) 
local res=0 
local rest={} 
local _,_,bdc=string.find(what,"([%%%[%]%(%)%*%+%-%?%^])") 
local msg="\r\n---------- You searched for keyword \""..what.."\". The results: ----------\r\n" 
if bdc then 
user:SendData(Bot,"you cannot use the character "..bdc) 
return 
end 
for a,b in AllStuff do 
if string.find(b[4],what) then 
table.insert(rest,{b[1],b[2],b[3],b[4]}) 
end 
end 
if table.getn(rest)~=0 then 
for i=1,table.getn(rest) do 
local type,who,when,title=rest[i][1],rest[i][2],rest[i][3],rest[i][4] 
res= res + 1 
msg = msg.."\r\n "..when.." -- "..who.." -- "..title 
end 
msg=msg.."\r\n\r\n"..res.." results." 
else 
msg=msg.."\r\nSearch string "..what.." was not found in releases database." 
end 
user:SendPM(Bot,msg) 
end 

function OnError(ErrorMsg) 
if enabledebug==1 then 
for f=1,table.getn(senddebugto) do 
SendPmToNick(senddebugto[f],Bot, ErrorMsg.."\r\n".."Stack traceback: "..debug.traceback()) 
end 
end 
end 

OpConnected=NewUserConnected
Rede-DC Comunidade Portuguesa de DC

jiten

Replace ur ChatArrival(user,data) function with this:
function ChatArrival(user,data) 
	data = string.sub(data,1,string.len(data)-1) 
	local _,_,cmd,type,tune = string.find(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.iProfile == 2 then
		if 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
		end
	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 
			ReloadRel() 
			user:SendData(Bot, "Albums reloaded!|") 
		elseif cmd==cmd6 then 
			if type~="" and tune=="" then 
				SearchRel(user,type) 
			else 
				user:SendData(Bot, "yea right, like i know what you got 2 search when you don't tell me!|") 
			end 
			return 1 
		end 
	end 
end

Cheers

ConejoDelMal

lol.....trust jiten more, i know i would lol
Rede-DC Comunidade Portuguesa de DC

jiten

As requested by (-=TrIp-iN-SuN=-) so that Vips can add, del and search for releases.
Change ur ChatArrival(user,data) function to this:
function ChatArrival(user,data) 
	data = string.sub(data,1,string.len(data)-1) 
	local _,_,cmd,type,tune = string.find(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.iProfile == 2 then
		if 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 == 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==cmd6 then 
			if type~="" and tune=="" then 
				SearchRel(user,type) 
			else 
				user:SendData(Bot, "yea right, like i know what you got 2 search when you don't tell me!|") 
			end 
			return 1 
		end
	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 
			ReloadRel() 
			user:SendData(Bot, "Albums reloaded!|") 
		elseif cmd==cmd6 then 
			if type~="" and tune=="" then 
				SearchRel(user,type) 
			else 
				user:SendData(Bot, "yea right, like i know what you got 2 search when you don't tell me!|") 
			end 
			return 1 
		end 
	end 
end

Cheers



jiten


LiqUiD~TrolL

hello ppl =)

well tirp i was wondering where di you found it fixed in the net =) good try

but my my tread =) take care _!!
________<>________


            -=@_ psydream-land.no-ip.org _@=-


             
http://www.psychedelicdreams.bravehost.com

SMF spam blocked by CleanTalk