hi chilla , Plop , Phatty , Kepp , tezlo
and Nightlitch
hope ya can help me please.
if (cmd == "+ipbann" ) then
IpBanN(user, data,cmd)
return 1
end
function IpBanN(user, data,cmd)
s,e,cmd,Ip = strfind(data, "%b<>%s+(%S+)%s+(%S+)%s+.+")
local UserIp = Ip
UserIp:Ban()
SendToAll(Bot, " IP "..UserIp " has been banned ")
end
Syntax Error: attempt to index local `Ip' (a nil value)
right 1) tryed to create the strfind with the little guide i got from plop .. but me thinks i aint got it quite right and its not getting the value
or
2) this line is wrong> local UserIp = Ip
or
3) ive missed a bit of code out (hand coded stright from my mem)
please help as im confused as what to do
first of all go check the hows goto lesson 1 on writing a bot, so you can understand the data arrival process and as for banip i not sure there is an external command for that, i think you have to ban the with ip im not to sure :/
cheers phatty , think i go over the lessons again , good job i printed them out :) ...
shame ther aint a way to !ipban ip and it just ban the ip u typed in , just like the hub does ??? mmmm
thats all i was doing seeing if i could code in to a script the same commands as in ptokax , just using diffent prefix .. thourght it might make me better @ coding :)
ps.. thank u for ur quick responce :)
have you tried "Ban(UserIp)"?
HINT:
I want to find "0.54.1"
local s,e,cmd,IP = strfind(data,"%b<>%s+(%d.%d+.%d)")
%d = numbers
Now go try :P
QuoteOriginally posted by kepp
have you tried "Ban(UserIp)"?
that shudnt work :S, if it does you tought me sumit new :)
banning ip's is imposible from the scripts.
kepp you can do this easyer.
local s,e,cmd,IP = strfind(data,"%b<>%s+(%d.%d+.%d)")
replace for.
local s,e,cmd,IP = strfind(data,"%b<>%s+(%S+)%s+([%d%.]+)")
plop
ok, lol, i've never tried myself.. ,
That reminds me of something, I gotta check that post of your again! :)