READ THE RULES
0 Members and 1 Guest are viewing this topic.
-- FreshStuff v.3.0 -- original idea/script by chilla-- completely rewriten by plop-- Name the commands to what U like -- This command adds stuff, syntax : +addalbum THESTUFF2ADD cmd1 = "+addalbum" -- This command shows the stuff, syntax : +albumscmd2 = "+albums" -- This command deletes an entry, syntax : +delalbum THESTUFF2DELETE cmd3 = "+delalbum" -- This command shows the latest stuff, syntax : +newalbumscmd4 = "+newalbums"-- 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=noShowOnEntry = 1-- Max stuff shown on newalbums/entryMaxNew = 20-- The file storing the stufffile = "txt/AlbumsAll.txt"-- Name of the botBot = "post-it_memo"--------------------- don't change anything below hereAllStuff = {}NewestStuff = {}function Main() frmHub:RegBot(Bot) Reload()endfunction NewUserConnected(user) if ShowOnEntry == 1 then user:SendPM(Bot, MsgNew.."|") endend function OpConnected(user) if ShowOnEntry == 1 then user:SendPM(Bot, MsgNew.."|") endend function DataArrival(user,data) if (strsub(data, 1, 1) == "<") then data = strsub(data,1,strlen(data)-1) s,e,cmd,tune = strfind(data, "%b<>%s+(%S+)%s*(.*)") if cmd == cmd2 then user:SendPM(Bot, MsgAll.."|") return 1 elseif cmd == cmd4 then user:SendPM(Bot, MsgNew.."|") return 1 elseif user.bOperator then if cmd == cmd3 then if tune ~= "" then DelStuff(user, tune) 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 ~= "" then AddStuff(user, tune) 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 endendfunction 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[i] end else for i=1, Count do Count2 = Count2 + 1 NewestStuff[Count2]=AllStuff[i] end endendfunction SaveStuff() writeto(file) for i=1,Count do if AllStuff[i] then write(AllStuff[i].."\n") end end writeto()endfunction ShowAlbums(table) Msg = "\r\n" if table == NewestStuff then if Count2 == 0 then MsgNew = "\r\n\r\n".." --------- The Latest Albums -------- \r\nNo albums on the list yet\r\n --------- The Latest Albums -------- \r\n\r\n" else for i=1, Count2 do Msg = Msg..NewestStuff[i].."\r\n" end MsgNew = "\r\n\r\n".." --------- The Latest Albums -------- \r\n"..Msg.."\r\n --------- The Latest Albums -------- \r\n\r\n" end else if Count == 0 then MsgAll = "\r\n\r\r\n".." --------- All The Albums -------- \r\nNo albums on the list yet\r\n --------- All The Albums -------- \r\n\r\n" else for i=1, Count do Msg = Msg..AllStuff[i].."\r\n" end MsgAll = "\r\n\r\r\n".." --------- All The Albums -------- \r\n"..Msg.."\r\n --------- All The Albums -------- \r\n\r\n" end endendfunction AddStuff(user, what) Count = Count + 1 AllStuff[Count]=what user:SendData(Bot, what.." is added to the albums|") SaveStuff() Reload()endfunction DelStuff(user, what) Okie = nil for a,b in AllStuff do if b == what then AllStuff[a]=nil user:SendData(Bot, what.." is removed from the albums|") Okie = 1 break end end if Okie then SaveStuff() Reload() else user:SendData(Bot, what.." wasn't found in the albums|") endendfunction Reload() OpenStuff() ShowAlbums(NewestStuff) ShowAlbums(AllStuff)end
--------- All The Releases -------- 12/26/03 -- [TGA-OP]plop -- movie -- zusenzo 12/26/03 -- [TGA-OP]plop -- music -- snap - cult of snap 12/26/03 -- [TGA-OP]plop -- music -- herrie 12/29/03 -- [TGA-OP]plopop -- warez -- tvtool v9.5.5.2 + v9.5.5.3 12/29/03 -- [TGA-OP]plopop -- warez -- pixopedia 24 v1.0.4 12/29/03 -- [TGA-OP]plopop -- warez -- SFV checker v1.10 12/29/03 -- [TGA-OP]plopop -- warez -- trail doctor tdv131.zip --------- All The Releases -------- use +albums to see only the selected types
-- 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 = "+addalbum" -- This command shows the stuff, syntax : +albums with options new/game/warez/music/moviecmd2 = "+albums" -- This command deletes an entry, syntax : +delalbum THESTUFF2DELETE cmd3 = "+delalbum" -- This command shows the latest stuff, syntax : +newalbumscmd4 = "+newalbums"-- 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=noShowOnEntry = 0-- Max stuff shown on newalbums/entryMaxNew = 20-- The file storing the stufffile = "txt/AlbumsAll.txt"-- Name of the botBot = "post-it_memo"-- you can add catagory's yourself ["trigger_name"]="catagory_name"Types = {["movie"] = "Movies", ["music"]="Music", ["warez"]="Warez", ["game"]="Games"}--------------------- don't change anything below hereAllStuff = {}NewestStuff = {}function Main() frmHub:RegBot(Bot) ReloadRel()endfunction NewUserConnected(user) if ShowOnEntry == 1 then user:SendPM(Bot, MsgNew.."|") endend function OpConnected(user) if ShowOnEntry == 1 then user:SendPM(Bot, MsgNew.."|") endend 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 endendfunction 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 endendfunction 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 endendfunction 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 endendfunction 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()endfunction 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|") endendfunction SaveRel() writeto(file) for i=1,Count do if AllStuff[i] then write(AllStuff[i].."\n") end end writeto()endfunction ReloadRel() OpenRel() ShowRel(NewestStuff) ShowRel(AllStuff)end
Originally posted by BlazeXxX Good work plop ;) Will it have control of who is allowed to add etc..?for e.g. Only ops and above can add new releases or some kind?
-- FreshStuff v.3.3 -- 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-- deleting now goes by id number-- Name the commands to what U like -- This command adds stuff, syntax : +addalbum TYPE/CATAGORY THESTUFF2ADD cmd1 = "+addalbum" -- This command shows the stuff, syntax : +albums with options new/game/warez/music/moviecmd2 = "+albums" -- This command deletes an entry, syntax : +delalbum THESTUFF2DELETE cmd3 = "+delalbum" -- This command shows the latest stuff, syntax : +newalbumscmd4 = "+newalbums"-- 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=noShowOnEntry = 0-- Max stuff shown on newalbums/entryMaxNew = 20-- The file storing the stufffile = "txt/AlbumsAll.txt"-- Name of the botBot = "post-it_memo"-- you can add catagory's yourself ["trigger_name"]="catagory_name"Types = {["movie"] = "Movies", ["music"]="Music", ["warez"]="Warez", ["game"]="Games"}--------------------- don't change anything below hereAllStuff = {}NewestStuff = {}function Main() frmHub:RegBot(Bot) ReloadRel()endfunction NewUserConnected(user) if ShowOnEntry == 1 then user:SendPM(Bot, MsgNew.."|") endend function OpConnected(user) if ShowOnEntry == 1 then user:SendPM(Bot, MsgNew.."|") endend 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 ReloadRel() user:SendData(Bot, "Albums reloaded!|") return 1 end end endendfunction 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 endendfunction 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.." ID: "..i.." -- "..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 endendfunction 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 endendfunction 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()endfunction DelRel(user, what) if tonumber(what) then what = tonumber(what) if AllStuff[what] then local s,e,which=strfind(AllStuff[what], "([^%$]+)$") user:SendData(Bot, which.." is deleted from the releases|") AllStuff[what]=nil SaveRel() ReloadRel() else user:SendData(Bot, what.." wasn't found in the releases|") end else user:SendData(Bot, "I need the ID number to delete a releas|") endendfunction SaveRel() writeto(file) for i=1,Count do if AllStuff[i] then write(AllStuff[i].."\n") end end writeto()endfunction ReloadRel() OpenRel() ShowRel(NewestStuff) ShowRel(AllStuff)end
Originally posted by Trust_in_Trance Hi i found a small mistake in the last script you postplob.The manually reload of the list brings you an error.Correct this elseif cmd == cmd5 then Reload() user:SendData(Bot, "Albums reloaded!|") return 1 endto: elseif cmd == cmd5 then ReloadRel() user:SendData(Bot, "Albums reloaded!|") return 1 endand there won`t be a problem any more.
Originally posted by Trust_in_Trance One question!How i have to modify the bot that when a user tipes +allhubtime that this is shown to all users in the main chat not only to the one who wrote it?
elseif cmd == cmd4 then user:SendPM(Bot, MsgNew.."|") return 1 elseif user.bOperator then
elseif cmd == cmd4 then user:SendPM(Bot, MsgNew.."|") return 1 elseif cmd == cmd6 then SendToAll(Bot, MsgNew.."|") return 1 elseif user.bOperator then
-- you can add catagory's yourself ["trigger_name"]="catagory_name"Types = {["movie"] = "Movies", ["music"]="Music", ["warez"]="Warez", ["game"]="Games"}
["music"]="Music",
Originally posted by DoN Wonder if someone could offer some help..At the mo FreshshStuff has Categories such as..Quote-- you can add catagory's yourself ["trigger_name"]="catagory_name"Types = {["movie"] = "Movies", ["music"]="Music", ["warez"]="Warez", ["game"]="Games"}I was just wondering if there will be a way to implement Sub Categories like for example for Quote["music"]="Music", you could have like POP, ROCK, JAZZ. As sub cats.PLOP or any 1 willing to help?Brgs
Types = {["pop"] = "Pop",
Originally posted by DoN Well I wouldn't mind neither. As for the 1st idea as you said I could do that myself. I've already tried by just having loads of categories. So if I was to do +albums pop then in my categories I had already setted a "Code: [Select]Types = {["pop"] = "Pop", But if I had the 2nd if you could make it better or the 2nd option of having +albums music pop is not 2 much to ask then I would appreciate whatever I end up with. :)Is it possible so you could also have the content added formatted as...Item ID - [DD/MM/YY] Category added by [Nick] :: Added ContentBrgs
Msg = Msg.." ID: "..i.." -- "..when.." -- "..who.." -- "..type.." -- "..title.."\r\n"
Originally posted by plop the id's are added the moment the script is running, you'll see that the number change the moment you add/delete something.this makes it a bit useless 2 save them also.the order it shows things like catagory/time/thingy can be changed by yourself.just modify lines like this.Code: [Select]Msg = Msg.." ID: "..i.." -- "..when.." -- "..who.." -- "..type.." -- "..title.."\r\n"i'll try 2 add the sub catagory's later, it's a nifty idea.plop
Originally posted by [DK]DjBent is there any way to change the prefix from + to !..as the other scripts i use are using ! in prefix.. and the sub catogoryes will be great...Looking forward to your next update Plop
--------------------------------------- @show [option] - option can be (sub)catagory name or ID number. @add - add's a entry's to the given catagory name. @del - deletes the given id. @comment - adds your comment to the given id number. @decomment - deletes the given comment on the given ID. @addartist - adds the given artist name to the ID. @delartist - deletes the artist from the given ID. @addfilename - adds the given filename to the ID. @delfilename - deletes the filename from the given ID. @addurl - adds the given url to the ID. @delurl - deletes the url from the given ID. @addcat [subcat] - adds a (sub)catagory. @delcat - deletes a (sub)catagory. @search - searches the database for the given string. @config [ ] - shows the current config, more info is shown when no options are given!---------------------------------------
Originally posted by [DK]DjBent Looks Great... can't wait to get my hands on that script
Originally posted by Habalua Can't you add so that it writes in mainchat that a new release is added not just to the bot. And can you update it for bcdc++ to?Maybe a switch on/off on this funktion
Originally posted by daveP is there a way to set this script so that anyone can add stuff to the list not just opsthanks dave
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.."|") return 1 end 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 == 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 == cmd5 then Reload() user:SendData(Bot, "Albums reloaded!|") return 1 end end endend
Originally posted by daveP yeh thats good m8 cheers :) but is there anyway you can get it so send to main chat screen what the bot says to the person adding so that everyone can see when a new release is addedchairs,dave
Originally posted by plop QuoteOriginally posted by daveP yeh thats good m8 cheers :) but is there anyway you can get it so send to main chat screen what the bot says to the person adding so that everyone can see when a new release is addedchairs,davefreshstuff 3.4 allready does this.plop
Originally posted by Robban First 3.4 does not do this...I use it for DCDM and it have work good until now I can only add 56 ID:s then I can't add any more. Nothing happning...// Robban
dcpp:setListener( "pm", "releases", function( hub, user, text ) local s = string.lower( text ) d,e,cmd,typ,tune = string.find(s, "^(%S+)%s*(%S*)%s*(.*)") if cmd == cmd2 then if typ == "" then SendPMMsg( hub, user, MsgAll ) --user:sendPrivMsgFmtNoWin( MsgAll ) return 1 elseif typ == "new" then SendPMMsg( hub, user, MsgNew ) --user:sendPrivMsgFmtNoWin( MsgNew ) return 1 elseif Types[typ] then SendPMMsg( hub, user, ShowRelType(typ) ) --user:sendPrivMsgFmtNoWin( MsgType ) return 1 end elseif cmd == cmd4 then SendPMMsg( hub, user, MsgNew ) --user:sendPrivMsgFmtNoWin( MsgNew ) return 1 elseif user:isOp() then if cmd == cmd3 then if typ ~= "" then SendPMMsg( hub, user, DelRel(user, typ) ) --user:sendPrivMsgFmtNoWin( DelRel(user, typ) ) else SendPMMsg( hub, user, "yea right, like i know what i got 2 delete when you don't tell me!" ) --user:sendPrivMsgFmtNoWin( "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[typ] then SendPMMsg( hub, user, AddRel(user, tune, typ) ) --user:sendPrivMsgFmtNoWin( AddRel(user, tune, typ) ) elseif Types[typ] == nil then SendPMMsg( hub, user, "I need to know the catagory to add it to!" ) --user:sendPrivMsgFmtNoWin( "I need to know the catagory to add it to!" ) else SendPMMsg( hub, user, "yea right, like i know what you got 2 add when you don't tell me!" ) --user:sendPrivMsgFmtNoWin( "yea right, like i know what you got 2 add when you don't tell me!" ) end return 1 elseif cmd == cmd5 then ReloadRel() SendPMMsg( hub, user, "Reloaded!" ) --user:sendPrivMsgFmtNoWin( "Reloaded!" ) return 1 end return 1 -- make bcdc++ forget the original messageend