PtokaX forum

Development Section => Your Developing Problems => Topic started by: _LindenJ_ on 03 August, 2004, 21:53:04

Title: hiding bots
Post by: _LindenJ_ on 03 August, 2004, 21:53:04
?(  does anyone know how u can hide a bot so that it doesnt display in the userlist, but still works, in the hubs i run we have a few bots and they get annoying as they take up so much space, so if anyone knows how to hide the little F@#kers id be very interested in knowing how to  :))  thankyou..
 please email me direct lindenj_@hotmail.com
Title:
Post by: Snooze on 03 August, 2004, 22:08:40
In your script find this line

Code: [Select]
frmHub:RegBot(Bot)
and either delete it or out comment it like this

Code: [Select]
--frmHub:RegBot(Bot)
(You'll most likely find it in the Main() function)

Though keep in mind that if the Bot isn't showing in the userlist it cannot send PMs as a PopUp.

Best regards,

Snooze
Title:
Post by: NightLitch on 03 August, 2004, 23:23:14
try this script out not tested but should work:

Code: [Select]
-------------------------------------------------------------------------------
-- Remove Bots from userlist
-- HubOwner can only unregister bots
-- By NightLitch 2004/08/03
-------------------------------------------------------------------------------
HubOwner = "NightLitch"
-------------------------------------------------------------------------------
Command = "unregbot"
-------------------------------------------------------------------------------
function DataArrival(sUser,sData)
if strsub(sData, 1,1) == "<" then
sData=strsub(sData,1,strlen(sData)-1)
local _,_,pfx,cmd,arg = strfind(sData, "%b<>%s+(%S)(%S+)%s*(%S*)")
if prx and cmd then
if cmd==Command and sUser.sName==HubOwner then
if arg~="" then frmHub:UnregBot(arg) return 1 else SendToNick(sUser.sName, "You must enter a botname") return 1 end
end
end
end
end
-------------------------------------------------------------------------------

Best Regards / NL
Title:
Post by: ((UKSN))shad_dow on 04 August, 2004, 03:31:39
this wont unrag a bot if its a user


Code: [Select]
--Unregister bot by Phatty
--v1.51

Bot = "genius"
Command = "!rembot" -- +
Command2 = "!adbot"
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

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

return 1
end
end
end
end
Title:
Post by: ??????Hawk?????? on 04 August, 2004, 23:51:02
hi m8


Quote
does anyone know how u can hide a bot so that it doesnt display in the userlist, but still works, in the hubs i run we have a few bots and they get annoying as they take up so much space, so if anyone knows how to hide the little F@#kers id be very interested in knowing how to  thankyou..
please email me direct lindenj_@hotmail.com




Try giving All your Scripts the same bot name.