PtokaX forum

Archive => Archived 4.0 boards => Help with Lua 4 scripts => Topic started by: FunkyFender55 on 11 February, 2004, 05:34:28

Title: Hiding Bot Names on the users list
Post by: FunkyFender55 on 11 February, 2004, 05:34:28
I pretty sure it's possible, I just don't know how. Is there something I can add to a script for this?

TIA
Title:
Post by: DJ Bert on 11 February, 2004, 10:16:23
Just remove the follow rules in Function Main

   frmHub:UnregBot(BOTName)
   frmHub:RegBot(BOTName)










(http://www.danasoft.com/sig-dut.jpg)
Title:
Post by: [NL]trucker on 11 February, 2004, 12:58:17
QuoteJust remove the follow rules in Function Main
frmHub:UnregBot(BOTName)
frmHub:RegBot(BOTName)

yep thats one way easier would be to put  --  in front of lines that way the script doesnt recognise it.

other way is to give all the bots the same name; that way you can run as much bots as you wish but still only one is shown in userlist.
Title:
Post by: kepp on 11 February, 2004, 21:19:45
Well, That is hard to remove when you remove the script and the bot stays... :D

Let me see what i can dig up
Title:
Post by: kepp on 11 February, 2004, 21:25:22

function DataArrival(user, data)
local s,e,cmd,name = strfind(data,"%b<>%s+(%S+)%s+(%S+)")
   if ((cmd=="+getlost")) then
      if name == nil then
         user:SendData("*** Can't find the bot")
      else
         frmHub:UnregBot(name)
         user:SendData("*** Bot was succesfully removed")
      end
   end
end

Hope this helps
Title:
Post by: Event_Horizon on 11 February, 2004, 22:29:42
could you add +comeback & +listhidden ????

would be a nice feature :D
Title:
Post by: FunkyFender55 on 11 February, 2004, 22:57:28
Thanks for the help. I got it to work.
Title:
Post by: ((UKSN))shad_dow on 21 February, 2004, 14:26:14
heres 1 for removeing bots name after u taken script out of the script folder . its by phatty and its from 1 of my Q`s from a few monuths agao that i posted on here
only i change the bots  name to match my bot



--Unregister bot by Phatty
--v1.51

Bot = "-=Theraoy-Bot=-"
Command = "!rembot" -- +
Success = "Unregistered bot succesful"
Unsuccess = "Unregister bot unsuccesful"


function DataArrival(user,data)
if strsub(data, 1, 1) == "<" then
data=strsub(data,1,strlen(data)-1)
s,e,cmd = strfind(data,"%b<>%s+(%S+)")

if cmd == Command then
s,e,cmd,botsname = strfind(data,"%b<>%s+(%S+)%s+(%S+)")
if GetItemByName(botsname) then
user:SendData(Bot,Unsuccess)
return 1
else
frmHub:UnregBot(botsname)
user:SendData(Bot,Success)
end
return 1
end
end
end


hope this helps


PS. even checks to make shaw that the name is a bot and not a user , if its a users name it sends " Unregister bot unsuccesful " , if its a bots name it removes it from the list
 :D