PtokaX forum

Lua 5.3/5.2/5.1 Scripts (for PtokaX 0.4.0.0 and newer) => Request for scripts => Topic started by: BrotherBear on 08 July, 2008, 16:02:25

Title: Hiding comands from Main for standalone bot?
Post by: BrotherBear on 08 July, 2008, 16:02:25
Hi!

I am running GBot 0.285 Beta 1 and want to hide the commands from main and point them to the bot instead?

Is this possible?


Thanks in advance!


Regards,

BrotherBear
Title: Re: Hiding comands from Main for standalone bot?
Post by: CrazyGuy on 08 July, 2008, 21:34:16
If the bot is stand-alone (as your topic indicates) and is connected to the hub as a client, this is not possible because the hub will process the command before the bot does.
If the hub filters it, the bot doesn't see it. If the hub doesn't, the bot and all other connected users can see it.
Title: Re: Hiding comands from Main for standalone bot?
Post by: BrotherBear on 08 July, 2008, 22:42:33
Darn, that's to bad :S

Thanks for the explaining though CrazyGuy!

Regards,

BrotherBear
Title: Re: Hiding comands from Main for standalone bot?
Post by: uffetjur on 09 July, 2008, 17:39:30
This is the old script i used to hide - LBOT-  stand alone bot, to hide it in the matter of way as brother bear suggested,

[[

--// Hide +swenews
--// Revision 0.1 First public release
--// By Herman

botname = "-=swenews=-"


--// This function is fired when a new data arrives

function ChatArrival(curUser, sData)
   s,e,cmd = string.find(sData,"%b<>%s++(%S+)")
   if cmd ~= nil then
      cmd = (string.sub(cmd,1,string.len(cmd)-1))
   end
   if (cmd == "swenews") then
      SendToNick(botname, "<"..curUser.sName.."> +swenews")
      return 1
   end 
end

]]


this was created for lbot on ptokax 3.3.0 and probably not tested on newer versions