- RoboCop v4.0 - Testdrive 3 or Higher! - Page 46
 

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

- RoboCop v4.0 - Testdrive 3 or Higher!

Started by Optimus, 12 October, 2003, 23:07:26

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

blackwings

ehm, could someone explain how cmd protection works?


mOrrI

Opti congrats and thanks...
u never stop to amaze us... :D

Good Job mate!

We are all here to support u :D

xfiles

#1127
Opti you are a GOD!! :)
RoboCop is the best Script i?ve ever used!
Great Job m8!

QuikThinker

Damn Opti i'm just gettin the same probs with this as I did with v7.


Ma system resources are even at 87% free :(

Any ideas?

MetalPriest

hmm..my DC++k-CDM-v3.0 can't login..

Any id'e Optimus ??

MetalPriest
   ?? ?.(*?.?( ?.??.??)?.?*).?? ?
    ???*?.?*???RoboCop???*.??.?*? ?
      ???*?.?Checks you here !!!.??.?*? ?
          (?.?* MetalSweden *?.?) ?.?)
 (?.?* metalsweden.servemp3.com *?.?)
             \'?.(*?.?( ?.? ?.??)?.?*).??

TiMeTrAVelleR

QuikThinker

Can  you pm  me  whit youre hub adress  i made  5  hubs  this night    whit robo 8  no  probs at all    no one has  that prob what you have  i would like to check youre hub  if i may

TiMe

TiMeTrAVelleR

MetalPriest

Check cleints   allow ore not allow   i have  cmd  3.0 in my hub   np  at all   make sure  cmd  is allowd

TiMe

Optimus

I asked Timetraveller to help you out if you want to, so everybody is happy again. That's all we can do for you :D

night_hawk

#1133
how do i add (NetFounder/Moderator) to my ptokax settings so it works right can not get it to work right. just so ptokax commands and not robocops commands..is there something i am doing wrong????

Herodes

Good job Optimus ...

night_hawk,...
 try replacing your Profiles.dat in the ptokaX folder
 with the one you'll find in ur \\("ptokaXfolder")\scripts\profiles\("PtokXversion")\

and about the second part of your question, I am not sure what you mean, be a bit clearer ...

night_hawk

-----------------------------------------------------
-- Chat Bot v3.5 Coded by   [aXs] Wellx   01/09-03
-- Formerly known as the Developer-Chat for TIC50
-- Based on the idea VIPChat from Piglja
-- Thx goes to Piglja & aMutex for Ideas and Help
-----------------------------------------------------

ChatBot = "[chatroom]"   -- Chat Bot Name
CanUseCommands = { -1 , 0 , 1 , 2 , 3 , 5 }   -- Can Use Chat Bot Commands Lvl ( 0 = Master ~~ 1 = Operators ~~ 2 = VIPs ~~ 3 = Reg ~~ etc.)

ChatArray={}
ChatFile = "Chatters.tbl"

function Main()
frmHub:RegBot(ChatBot)
ChatArray = LoadFromFile(ChatFile)
end

--========================================================    DataArrival:    =========================================================--

function DataArrival(user, data)
   if (strsub(data, 1, 1) == "<" ) then
   data=strsub(data,1,strlen(data)-1)
   _,_,cmd=strfind(data, "%b<>%s+(%S+)")
   local Commands = (DeveloperCommands(user, data, cmd))
   return Commands
   elseif strsub(data, 1, 5) == "$To: " then
      local s, e, to = strfind(data, "$To: (%S+)")
      if to ~= ChatBot then
         return 0
      else
         if to == ChatBot then
         local data=strsub(data,1,strlen(data)-1)  
         local s,e,from,msg = strfind(data,"From:%s+(%S+)%s+$%b<>%s+(.+)")  
            if ChatArray[user.sName] ~= nil then
            ChatArray[user.sName] = nil
               for i,v in ChatArray do
               Developer=GetItemByName(i)
                  if (Developer~=nil) then
                  Developer:SendData("$To: "..i.." From: "..ChatBot.." $<"..user.sName.."> "..msg.."|")
                  end
               end
            ChatArray[user.sName] = user.sName
            else
            user:SendPM(ChatBot,"You do not have permission to write inhere (Join or Talk to a Operator if you need permission)")
            end
         local _,_,cmd = strfind(data,"$%b<>%s+(%S+)")
         local Commands = (DeveloperCommands(user, data, cmd))
         end
      end
   end
end

--=====================================================      Chat Commands:      ======================================================--

function DeveloperCommands(user, data, cmd)
   if tfind(CanUseCommands, user.iProfile) then
      if (cmd == "+chathelp") then
      DevHelp(user)
      return 1
      elseif (cmd == "+chat") then
      local s,e,cmd,ChatName = strfind( data, "%b<>%s+(%S+)%s+(.*)" )
         if (ChatName == nil) then
         ChatName = user.sName
         end
         if ChatArray[ChatName] == nil then
         ChatArray[ChatName] = ChatName
            for index, value in ChatArray do
            SendPmToNick(index, ChatBot, "  "..ChatName.." Has joined the "..ChatBot)
            end
         else
            for index, value in ChatArray do
            SendPmToNick(index, ChatBot, "  "..ChatName.." Has left the "..ChatBot)
            end
         ChatArray[ChatName] = nil
         end
         SaveToFile(ChatName,ChatFile,ChatArray)
         return 1
      elseif (cmd == "+showchatters") then
         function DevList()
         local DevList = ""
            for index, value in ChatArray do
            local line = index
               if GetItemByName(index) then
                  if (strlen(index) <= 10) then
                  DevList = DevList.." ? "..line.."\t\t\t~ On-line ~\r\n"
                  else
                  DevList = DevList.." ? "..line.."\t\t~ On-line ~\r\n"
                  end
               else
                  if (strlen(index) <= 10) then
                  DevList = DevList.." ? "..line.."\t\t\t? Off-Line ?\r\n"
                  else
                  DevList = DevList.." ? "..line.."\t\t? Off-Line ?\r\n"
                  end
               end
            end
            return DevList
         end
         user:SendPM(ChatBot, "\r\n\r\n(? ?.??.->      "..ChatBot.." Chatters      <-.??.???) \r\n\r\n"..DevList())
         return 1
      end
   else user:SendData("You don't have permission to use the commands to the "..ChatBot.." ask a Operator for permission !!") return 0 end
end

function DevHelp (user)
   local disp = "\r\n\r\n"
   disp = disp.."~~ Scripted DeveloperChat Commands: ~~\r\n\r\n"
   disp = disp.."   +chat       -   Add or part a user to the list of people that can chat in the "..ChatBot.."\r\n"
   disp = disp.."   +showchatters      -   See witch users that can chat in the "..ChatBot.."\r\n"
   disp = disp.."\r\n"
   user:SendPM(ChatBot, disp)
end

--========================================================    Functions:    ===========================================================--

function SaveToFile(arg,file,table)
   local aString = pickle(table)
   writeto(file)
   write(aString)
   writeto()
end

function LoadFromFile(file)
   readfrom(file)
   local aString = read("*all")
   return  unpickle(aString)
end

function tfind(table, key)
return foreachi(table, function(id, tmp) return (tmp == %key) and id end)
end

----------------------------------------------
-- Pickle.lua
-- An table serialization utility for lua
-- Steve Dekorte, http://www.dekorte.com, Apr 2000
-- Freeware
----------------------------------------------
function pickle(t)
return Pickle:clone():pickle_(t)
end

Pickle = {
clone = function (t) local nt={}; for i, v in t do nt=v end return nt end
}

function Pickle:pickle_(root)
   if type(root) ~= "table" then
   error("can only pickle tables, not ".. type(root).."s")
   end
   self._tableToRef = {}
   self._refToTable = {}
   local savecount = 0
   self:ref_(root)
   local s = ""
   while getn(self._refToTable) > savecount do
   savecount = savecount + 1
   local t = self._refToTable[savecount]
   s = s.."{\n"
      for i, v in t do
      s = format("%s[%s]=%s,\n", s, self:value_(i), self:value_(v))
      end
   s = s.."},\n"
   end
return format("{%s}", s)
end

function Pickle:value_(v)
local vtype = type(v)
   if vtype == "string" then return format("%q", v)
   elseif vtype == "number" then return v
   elseif vtype == "table" then return "{"..self:ref_(v).."}"
   else --error("pickle a "..type(v).." is not supported")
   end  
end

function Pickle:ref_(t)
local ref = self._tableToRef[t]
   if not ref then
      if t == self then error("can't pickle the pickle class") end
   tinsert(self._refToTable, t)
   ref = getn(self._refToTable)
   self._tableToRef[t] = ref
   end
return ref
end

----------------------------------------------
-- unpickle
----------------------------------------------

function unpickle(s)
   if type(s) ~= "string" then
   error("can't unpickle a "..type(s)..", only strings")
   end
   local tables = dostring("return "..s)
   for tnum = 1, getn(tables) do
   local t = tables[tnum]
   local tcopy = {}; for i, v in t do tcopy = v end
      for i, v in tcopy do
      local ni, nv
         if type(i) == "table" then ni = tables[i[1]] else ni = i end
         if type(v) == "table" then nv = tables[v[1]] else nv = v end
      t[ni] = nv
      end
   end
return tables[1]
end

night_hawk

Hi i need help setting up my chat room for the to new set up thank you....
0|Master|11111111111111111100000000000000
1|Operator|11110100001101111100000000000000
2|VIP|10000000000001111100000000000000
3|Reg|10000000000000000000000000000000
4|Moderator|11111110001101111100000000000000
5|NetFounder|11111111111111111100000000000000

can some one fix this up for me thank you or i can not use there robocop verion

Mikey

Try this it should work :



-----------------------------------------------------
-- Chat Bot v3.5 Coded by [aXs] Wellx 01/09-03
-- Formerly known as the Developer-Chat for TIC50
-- Based on the idea VIPChat from Piglja
-- Thx goes to Piglja & aMutex for Ideas and Help
-----------------------------------------------------

ChatBot = "[chatroom]" -- Chat Bot Name
CanUseCommands = { -1 , 0 , 1 , 2 , 3 ,4, 5 } -- Can Use Chat Bot Commands Lvl ( 0 = Master ~~ 1 = Operators ~~ 2 = VIPs ~~ 3 = Reg ~~ etc.)

ChatArray={}
ChatFile = "Chatters.tbl"

function Main()
frmHub:RegBot(ChatBot)
ChatArray = LoadFromFile(ChatFile)
end

--======================================================== DataArrival: =========================================================--

function DataArrival(user, data)
if (strsub(data, 1, 1) == "<" ) then
data=strsub(data,1,strlen(data)-1)
_,_,cmd=strfind(data, "%b<>%s+(%S+)")
local Commands = (DeveloperCommands(user, data, cmd))
return Commands
elseif strsub(data, 1, 5) == "$To: " then
local s, e, to = strfind(data, "$To: (%S+)")
if to ~= ChatBot then
return 0
else
if to == ChatBot then
local data=strsub(data,1,strlen(data)-1)
local s,e,from,msg = strfind(data,"From:%s+(%S+)%s+$%b<>%s+(.+)")
if ChatArray[user.sName] ~= nil then
ChatArray[user.sName] = nil
for i,v in ChatArray do
Developer=GetItemByName(i)
if (Developer~=nil) then
Developer:SendData("$To: "..i.." From: "..ChatBot.." $<"..user.sName.."> "..msg.."|")
end
end
ChatArray[user.sName] = user.sName
else
user:SendPM(ChatBot,"You do not have permission to write inhere (Join or Talk to a Operator if you need permission)")
end
local _,_,cmd = strfind(data,"$%b<>%s+(%S+)")
local Commands = (DeveloperCommands(user, data, cmd))
end
end
end
end

--===================================================== Chat Commands: ======================================================--

function DeveloperCommands(user, data, cmd)
if tfind(CanUseCommands, user.iProfile) then
if (cmd == "+chathelp") then
DevHelp(user)
return 1
elseif (cmd == "+chat") then
local s,e,cmd,ChatName = strfind( data, "%b<>%s+(%S+)%s+(.*)" )
if (ChatName == nil) then
ChatName = user.sName
end
if ChatArray[ChatName] == nil then
ChatArray[ChatName] = ChatName
for index, value in ChatArray do
SendPmToNick(index, ChatBot, " "..ChatName.." Has joined the "..ChatBot)
end
else
for index, value in ChatArray do
SendPmToNick(index, ChatBot, " "..ChatName.." Has left the "..ChatBot)
end
ChatArray[ChatName] = nil
end
SaveToFile(ChatName,ChatFile,ChatArray)
return 1
elseif (cmd == "+showchatters") then
function DevList()
local DevList = ""
for index, value in ChatArray do
local line = index
if GetItemByName(index) then
if (strlen(index) <= 10) then
DevList = DevList.." ? "..line.."\t\t\t~ On-line ~\r\n"
else
DevList = DevList.." ? "..line.."\t\t~ On-line ~\r\n"
end
else
if (strlen(index) <= 10) then
DevList = DevList.." ? "..line.."\t\t\t? Off-Line ?\r\n"
else
DevList = DevList.." ? "..line.."\t\t? Off-Line ?\r\n"
end
end
end
return DevList
end
user:SendPM(ChatBot, "\r\n\r\n(? ?.??.-> "..ChatBot.." Chatters <-.??.???) \r\n\r\n"..DevList())
return 1
end
else user:SendData("You don't have permission to use the commands to the "..ChatBot.." ask a Operator for permission !!") return 0 end
end

function DevHelp (user)
local disp = "\r\n\r\n"
disp = disp.."~~ Scripted DeveloperChat Commands: ~~\r\n\r\n"
disp = disp.." +chat - Add or part a user to the list of people that can chat in the "..ChatBot.."\r\n"
disp = disp.." +showchatters - See witch users that can chat in the "..ChatBot.."\r\n"
disp = disp.."\r\n"
user:SendPM(ChatBot, disp)
end

--======================================================== Functions: ===========================================================--

function SaveToFile(arg,file,table)
local aString = pickle(table)
writeto(file)
write(aString)
writeto()
end

function LoadFromFile(file)
readfrom(file)
local aString = read("*all")
return unpickle(aString)
end

function tfind(table, key)
return foreachi(table, function(id, tmp) return (tmp == %key) and id end)
end

----------------------------------------------
-- Pickle.lua
-- An table serialization utility for lua
-- Steve Dekorte, http://www.dekorte.com, Apr 2000
-- Freeware
----------------------------------------------
function pickle(t)
return Pickle:clone():pickle_(t)
end

Pickle = {
clone = function (t) local nt={}; for i, v in t do nt=v end return nt end
}

function Pickle:pickle_(root)
if type(root) ~= "table" then
error("can only pickle tables, not ".. type(root).."s")
end
self._tableToRef = {}
self._refToTable = {}
local savecount = 0
self:ref_(root)
local s = ""
while getn(self._refToTable) > savecount do
savecount = savecount + 1
local t = self._refToTable[savecount]
s = s.."{\n"
for i, v in t do
s = format("%s[%s]=%s,\n", s, self:value_(i), self:value_(v))
end
s = s.."},\n"
end
return format("{%s}", s)
end

function Pickle:value_(v)
local vtype = type(v)
if vtype == "string" then return format("%q", v)
elseif vtype == "number" then return v
elseif vtype == "table" then return "{"..self:ref_(v).."}"
else --error("pickle a "..type(v).." is not supported")
end
end

function Pickle:ref_(t)
local ref = self._tableToRef[t]
if not ref then
if t == self then error("can't pickle the pickle class") end
tinsert(self._refToTable, t)
ref = getn(self._refToTable)
self._tableToRef[t] = ref
end
return ref
end

----------------------------------------------
-- unpickle
----------------------------------------------

function unpickle(s)
if type(s) ~= "string" then
error("can't unpickle a "..type(s)..", only strings")
end
local tables = dostring("return "..s)
for tnum = 1, getn(tables) do
local t = tables[tnum]
local tcopy = {}; for i, v in t do tcopy = v end
for i, v in tcopy do
local ni, nv
if type(i) == "table" then ni = tables[i[1]] else ni = i end
if type(v) == "table" then nv = tables[v[1]] else nv = v end
t[ni] = nv
end
end
return tables[1]
end
Mikey

**Friends Unlimited Network**
    Network Founder

Mikko

Thanks Optimus. Great work.

MetalPriest

Jiipiii thiis work now...Don't know what happens before,now is DC++k-CDM-v3.0 welcome again..

MetalPriest  :D  :D  :D
   ?? ?.(*?.?( ?.??.??)?.?*).?? ?
    ???*?.?*???RoboCop???*.??.?*? ?
      ???*?.?Checks you here !!!.??.?*? ?
          (?.?* MetalSweden *?.?) ?.?)
 (?.?* metalsweden.servemp3.com *?.?)
             \'?.(*?.?( ?.? ?.??)?.?*).??

KX250

yep great work optimus!

just 1 lil prob,when i try an kick/ban/kill i get this:

*** Command is blocked, use !kick

*** Command is blocked, use !kill

*** Command is blocked, use !ban

so how do i unblock the commands.had a look in
command protection.still no luck, just keep getting the same msg's from robo...

Optimus

Well everything is possible in live, but i think you have messaged up somewhere.

1. There is only 1 command blocked with this message ( Command is blocked, use !kick )
And that is the Inbuild Client $kick - So in my eyes it's not possible to have these messages for !ban, !kill also.

A problem maybe the profiles.dat or you haven't done a clean install and left some old files in the folder or somelike that. Have you installed the right profiles.dat from folder /profiles??????

Other do a clean install or read the manual

::))

sander815

how do i use the block a nick?
i see  this command, but don't know how to add a nick
? !getblocked               - Show all blocked users (They can't download/search/etc)

TiMeTrAVelleR

If  you have  hubproteckt Enabeld   than you can use that command  to see the users that  cant download ore search in youre hub

TiMe

KX250

mybad optimus,It Was the profiles.dat :S

Optimus

nice, things solved once again.  ;)

Things look good at this moment guys, all bugs were related to Not correctly installation, or wrong profiles.dat

Ciao Opti

KX250

Your the man!!  :)

IsoD

First of all I'll have to thank you Optimus. I have used RC 7 in my hub and really enjoyd its easy configuratiom interface  8)

But there is some thing you you could add to the packet: a decent trigger bot. You know, bot reacts by saying something when it notices a trigger word in main. I haven't really found a good trigger bot written in lua and I'm very disappointed because I founf a good bot written in .script format and it was even in my motherlanguage Finnish.... but I can't use it in Ptokax.

So if you would be so good an kind to include a triggerbot to RC8 I would be really thankfull  :D
You born and you die. YOU  decide what happens in between....

Catch me in action from Dannyluola -= [FIN]Empire Hubs =-

uffetjur

HEy IsoD

There are several trigger bots
And. Dont include them in robocop

And Opti!

are you goin to include flood protect in next version?
Somewhere in Cyberspace

Optimus

Yes i think it's a option, but me first have to studie it somemore haven't done any test with it myself.

Second RoboCop will keep on going so request are allways welcome then i will see what i can do with it.

SMF spam blocked by CleanTalk