PtokaX forum

Archive => Archived 5.1 boards => Help with scripts => Topic started by: speedX on 27 August, 2006, 11:54:30

Title: Bots...
Post by: speedX on 27 August, 2006, 11:54:30
hi guys..

  Can anyone tel me how to remove bots frm userlist on DC.....i mean when I add a script its bot comes in DC in the userlist like record bot & postman......Some scripts have settings thru wich i can remove it...but some dont have.....plzz help me....thank u..
Title: Re: Bots...
Post by: ??']['??l? on 27 August, 2006, 12:46:16
Name all your bots after your hubs mainbot, i think that`s the easiest way... ;)
Title: Re: Bots...
Post by: ??']['??l? on 27 August, 2006, 13:03:50
Or if you don`t wanna give the same name to all your bot`s u can also use this script by Hawk...
You can hide users and bots with this script... :) :) :)
Script includes RC and profile permit who can hide users and bots... ;)





-- Hider Script By ??????Hawk??????
--28/11/2005
-- Hides Users From the user list

function Main()
sTable["loadfile"]()
end

function NewUserConnected(user)
if sTable.tAllowList[user.iProfile] == 1 then
user:SendData("$UserCommand 1 3 "..sTable["Menu"].."\\Show Hidden User list$<%[mynick]> !showhiders|")
user:SendData("$UserCommand 1 3 "..sTable["Menu"].."\\Hide Nick from user list$<%[mynick]> !hidebot %[nick]|")
user:SendData("$UserCommand 1 3 "..sTable["Menu"].."\\Unhide Nick from user list$<%[mynick]> !unhidebot %[line:User Name]|")
end
for a,b in sTable.Hiders do
user:SendData( "$Quit "..a.."|" )
end
end
OpConnected = NewUserConnected

function UserDisconnected(user)
if sTable.Hiders[user.sName] then
sTable.Hiders[user.sName] = nil
end
end
OpDisconnected = UserDisconnected

function ChatArrival(user, data)
local s, e, cmd,BotName = string.find(data, "%b<>%s+(%S+)%s*(.*)|")
if sTable.tAllowList[user.iProfile] == 1 and cmd and BotName and sTable.commands[cmd] then
return sTable.commands[cmd](user, cmd, BotName)
end
end

sTable = {
["Menu"] = "Hider", --//  Sets the Name used in the right click Menu
["Bot"] = frmHub:GetHubBotName(), --//   Sets the Bot name to the same as set in Ptokax
Hiders = {},

tAllowList = {
[0] = 1, --// Master Profile (enabled)
[1] = 1, --// Ops Profile (enabled)
[2] = 0, --// VIP Profile (Disabled) --// Profiles Allowed to use the command  1 = yes  / 0 = No
[3] = 0, --// REG Profile (Disabled)
[4] = 0, --// Moderator Profile (Disabled)
[5] = 1, --// Netfounder Profile (Disabled)
},

commands = {
["!unhidebot"] = function(user, cmd, BotName)
if sTable.Hiders[BotName] then
if BotName == frmHub:GetOpChatName() or BotName == frmHub:GetHubBotName() then
local MyOpsList = "$OpList "
for aux, usr in frmHub:GetOnlineOperators() do
MyOpsList = MyOpsList..usr.sName.."$$"
end
MyOpsList = MyOpsList..BotName.."$$"

sTable.Hiders[BotName] = nil
SendToAll(MyOpsList.."|")
user:SendData(sTable["Bot"],"Bot "..BotName.." added to userlist!")
else
local Nick = GetItemByName(BotName)
if Nick then
local s,e,name,desc,speed,email,share = string.find(Nick.sMyInfoString, "$MyINFO $ALL (%S+)%s+([^$]*)$ $([^$]*)$([^$]*)$([^$]+)")
SendToAll( "$MyINFO $ALL "..name.." "..desc.."$ $"..speed.."$"..email.."$"..share.."$")
sTable.Hiders[BotName] = nil
user:SendData(sTable["Bot"],BotName.." Has been added to userlist!")
end
end
end
return 1
end,

["!hidebot"] = function(user, cmd, BotName)
sTable.Hiders[BotName] = 1
sTable["SaveTable"]()
SendToAll( "$Quit "..BotName.."|" )
user:SendData(sTable["Bot"],BotName.." Has been removed from userlist!")
return 1
end ,

["!showhiders"] = function(user, cmd, BotName)
local ttempline = "\r\n\r\n\t["..string.rep("~",17).."] "..sTable["Menu"].." ["..string.rep("~",17).."]\r\n\r\n\tNicks\r\n\r\n"
for a , b in sTable.Hiders do
ttempline = ttempline.."\t"..a.."\r\n"
end
ttempline = ttempline.."\r\n\r\n\t="..string.rep("~",53).."="
user:SendData(sTable["Bot"],ttempline)
return 1
end,
},

["loadfile"] = function()
local f,e = io.open("HiddenUsers.lst","r")
if f then
while 1 do
line = f:read("*l")
if line ==  nil then
break
end
local s,e,InfoOne,InfoTwo = string.find(line, "(.+)$$$(.+)")
if InfoOne ~= nil then
sTable.Hiders[InfoOne]=InfoTwo
end
end
f:close(f)
else
f,e = io.open("HiddenUsers.lst", "w" )
f:write()
f:close()
end
end,

["SaveTable"] = function()
local f,e = io.open("HiddenUsers.lst", "w" )
for aaa,bbb in sTable.Hiders do
f:write(aaa.."$$$"..bbb.."\n")
end
f:close()
end,
}



Title: Re: Bots...
Post by: speedX on 27 August, 2006, 16:37:25
thxx dude.....both r very easy....