PtokaX forum

Archive => Archived 4.0 boards => Request for Lua 4 scripts => Topic started by: [G-T-E]Gate? on 17 April, 2004, 22:19:16

Title: Remove bot from Userslist
Post by: [G-T-E]Gate? on 17 April, 2004, 22:19:16
Searched the forum and cant find the script to delete a bot from the users list. I dont wish to reboot the hub to remove it.. any one can paste it or give a link , please
Title:
Post by: RDB on 17 April, 2004, 22:26:54
function Main()
   frmHub:UnregBot("BotName")
end


Not sure how to do the qoutes for this code thingy :-s
Title:
Post by: [NL]trucker on 18 April, 2004, 14:08:35
RDB

you are almost right

here is the one i have type in main +unreg


-- thought it was made by plop

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

Title:
Post by: [G-T-E]Gate? on 18 April, 2004, 14:13:04
Yeep Thats the one using cmd +unreg
Gr8 [NL]
tks
Title:
Post by: [G-T-E]Gate? on 18 April, 2004, 14:15:10
Little to fast I was,,  sorry ,
There is a script with cmd !rembot
Remove bot from Users list

To much coffe is speeding me up...
Title:
Post by: Snooze on 18 April, 2004, 14:24:27
Just change the command in the script above ..


-- thought it was made by plop

function DataArrival(user, data)
if strsub(data,1,1)=="<" then
data=strsub(data,1,strlen(data)-1)
s,e,cmd,name = strfind(data,"%b<>%s+(%S+)%s+(%S+)")
if cmd=="!rembot" then
frmHub:UnregBot(name)
end
end
end

That should do it...


Good luck

**Snooze
Title:
Post by: plop on 19 April, 2004, 22:48:03
i can't remember making this 1. lol

plop
Title:
Post by: Snooze on 19 April, 2004, 23:13:01
LOL

well... credit goes to whom ever made it ;)



**Snooze
Title:
Post by: pHaTTy on 19 April, 2004, 23:55:10
QuoteOriginally posted by plop
i can't remember making this 1. lol

plop

damn plop i bet that took some hard thinking to write  :D lmfaooooo must of just satrted lua =D

Title:
Post by: Snooze on 19 April, 2004, 23:57:02
hard = more than 20 secs of writing LOL
Title:
Post by: pHaTTy on 19 April, 2004, 23:58:56
here


--Unregister bot by Phatty
--v1.51

Bot = "TheBotName"
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



later,,
Title:
Post by: plop on 20 April, 2004, 00:13:18
maby i wrote it so fast that i forgot about it before even finishing it.  lol
or it could have been 1 of my 74 alter ego's. lol

plop
Title:
Post by: [G-T-E]Gate? on 20 April, 2004, 00:13:59
one tng u all, It works fine,
Fast Can be Gerat too..

Hope ur all enjoying the evening..

A Smile Goes a Long Way..........:D
Ty