Sorry 4 posting w/o searching but im off my time...
In my HUB when i set prefix in ptokax so that it must be [HUN] for everyone it still lets non-[HUN] ppl in... If there was a script for this... i would b happy! :D
Hi,
Hope it helps...
--Requested by bastya_elvtars
--Made by nErBoS
sBot = "Nick Prefix"
function Main()
frmHub:RegBot(sBot)
end
function NewUserConnected(user)
if (strsub(strlower(user.sName),1,5) ~= "[hun]") then
user:SendPM(sBot, "This Hub only accept users with [HUN]nick.")
user:Disconnect()
end
end
Best regards, nErBoS
Thank you, nerbos!
((()))
It reject VIPs... :(
VIPs do not have [HUN] prefix @ us...
Try this...
--Requested by bastya_elvtars
--Made by nErBoS
sBot = "Nick Prefix"
function Main()
frmHub:RegBot(sBot)
end
function NewUserConnected(user)
if GetProfileName(user.iProfile == -1) then
if (strsub(strlower(user.sName),1,5) ~= "[hun]") then
user:SendPM(sBot, "This Hub only accept users with [HUN]nick.")
user:Disconnect()
end
end
end
Hi,
Simpler and also to check reg....
--Requested by bastya_elvtars
--Made by nErBoS
sBot = "Nick Prefix"
function Main()
frmHub:RegBot(sBot)
end
function NewUserConnected(user)
if (user.iProfile ~= 2 and strsub(strlower(user.sName),1,5) ~= "[hun]") then
user:SendPM(sBot, "This Hub only accept users with [HUN]nick.")
user:Disconnect()
end
end
Best regards, nErBoS
The 2nd one rejected everyone, the 3rd one works...
Thx peepz!
((()))
(I know this was a noob thing but i get banned from hublist if its not 100% sure if [HUN] must be there)
Syntax error: bad argument #1 to `strsub' (string expected, got nil)
stack traceback:
1: function `strsub' [C]
2: function `NewUserConnected' at line 423 [file `Robocop\RoboCopv8.0a.lua']
WHY
;(
Hi,
The error comes from RoboCop, are you using this script apart ???
Best regards, nErBoS
yes on its own
--Requested by bastya_elvtars
--Made by nErBoS
sBot = "?''??.:']i[':.??''?"
function Main()
frmHub:RegBot(sBot)
end
function NewUserConnected(user)
if (user.iProfile ~= 2 and strsub(strlower(user.sName),1,5) ~= "?''??.:']i[':.??''?") then
user:SendPM(sBot, "THIS IS NOW A PRIVATE HUB ..IF YOU WANT TO BE PART OF IT Hub only accept users with ?''??.:']i[':.??''?nick.")
user:Disconnect()
end
end
Hi,
The script has been badly change try this...
--Requested by bastya_elvtars
--Made by nErBoS
sBot = "Nick Prefix"
prefix = "?''??.:']i[':.??''?"
function Main()
frmHub:RegBot(sBot)
end
function NewUserConnected(user)
if (user.iProfile ~= 2 and strsub(strlower(user.sName),1,strlen(prefix)) ~= strlower(prefix)) then
user:SendPM(sBot, "This Hub only accept users with "..prefix.."nick.")
user:Disconnect()
end
end
Best regards, nErBoS
nah..i get this shit
Syntax error: bad argument #1 to `strsub' (string expected, got nil)
stack traceback:
1: function `strsub' [C]
2: function `NewUserConnected' at line 423 [file `Robocop\RoboCopv8.0a.lua']
X(
Hi,
I have tested the script and is not giving any error, like i said the error comes from RoboCop...
2: function `NewUserConnected' at line 423 [file `Robocop\RoboCopv8.0a.lua']
This says all.
Best regards, nErBoS
maybe one for optimus...you watching mate?
I don't think the error is from Robocop ...
Nothing against you but I thing Robocop has
frmHub:EnableFullData(1)
So that is why the Robocop.lua is coming up ...
Although, I'm not sure and the above is a guess .. or a logical conclusion .. ;)
Most probably its the "special" tag ...
I think it would serve the same purpose if it where not using all these special chars .... :S
i just tried it without RC8a running, just using built in ptokax settings ..no syntax errors atall
looks like i will have to dump RC 8a..unless opti can rectify my problem ,,who knows!
try this 1.
--Requested by bastya_elvtars
--Made by nErBoS
sBot = "Nick Prefix"
prefix = "?''??.:']i[':.??''?"
function Main()
frmHub:RegBot(sBot)
end
function NewUserConnected(user)
if (user.iProfile ~= 2 and strsub(strlower(user.sName),1,strlen(prefix)) ~= strlower(prefix)) then
user:SendPM(sBot, "This Hub only accept users with "..prefix.."nick.")
user:Disconnect()
return 1
end
end
plop
nope...same shit happens ;( ..dam this
QuoteOriginally posted by oblivion
nope...same shit happens ;( ..dam this
ok next try.
--Requested by bastya_elvtars
--Made by nErBoS
sBot = "Nick Prefix"
prefix = "?''??.:']i[':.??''?"
function Main()
frmHub:RegBot(sBot)
end
function DataArrival(user, data)
if (user.iProfile ~= 2 and strsub(strlower(user.sName),1,strlen(prefix)) ~= strlower(prefix)) then
user:SendPM(sBot, "This Hub only accept users with "..prefix.."nick.")
user:Disconnect()
return 1
end
end
plop
hmm..no errors now..but.. nobody can connect ;(
Works here...
Whats the difference? :)
NOPE !
Syntax error: bad argument #1 to `strsub' (string expected, got nil)
stack traceback:
1: function `strsub' [C]
2: function `NewUserConnected' at line 423 [file `Robocop\RoboCopv8.0a.lua']
QuoteOriginally posted by oblivion
i just tried it without RC8a running, just using built in ptokax settings ..no syntax errors atall works excellent
looks like i will have to dump RC 8a..unless opti can rectify my problem ,,who knows!
this script conflicts with RC8a..without doubt
'User Tags' in RoboCop.
ie... [REG] , [OP], [VIP]?
NONE AT ALL
this message keeps repeating itself over and over
do you suggest i replace RC
Yup.. Re install Rc8... It works just fine for me..
btw nice hub :)
Syntax error: bad argument #1 to `strsub' (string expected, got nil)
stack traceback:
1: function `strsub' [C]
2: function `NewUserConnected' at line 423 [file `Robocop\RoboCopv8.0a.lua']
here i go again ..sorry ..
this is with everything fresh,, new rc8a,, new ptokax
WTF is causing this
hmm this works ok now..with 0.326 Testdrive 4.99
but not with 0.330.b15.25.dbg
@optimus: are you using the info string on line 423 in strsub??
plop
423 --// Check Allowed ISP
424 if CheckISP[user.iProfile]==1 then
425 if (strsub(data,1,7) == "$MyINFO") then
for key,isp in TableISP do
if not strfind(strlower(user.sName), strlower(isp),1,1) then
SendToNick(user.sName, "<" ..sBot.."> Your nick should start with one of the following tags: "..ShowTableISP())
SendToNick(user.sName, "<" ..sBot.."> Change it and you are welcome back.")
SendToNick(user.sName, "<" ..sBot.."> Disconnects...")
user:Disconnect()
break
end
end
end
end
Well duno if it's the case but ISP check isn't working like it shows here
if not strfind(strlower(user.sName), strlower(isp),1,1) then
mustbe:
if not strfind(strlower(user.sName), strlower(isp)) then
Further i don't see anything strange
QuoteOriginally posted by Optimus
423 --// Check Allowed ISP
424 if CheckISP[user.iProfile]==1 then
425 if (strsub(data,1,7) == "$MyINFO") then
Further i don't see anything strange
why line 425??
the error has 2 do with strsub and data, the $MyINFO can be emtpy sometimes.
beside that you ain't using the info string for that check so you can drop it.
plop
ok allright i'll remove it. Btw it was there so the message was send on the right moment. I can remember there were disconnects without the message
QuoteOriginally posted by Optimus
ok allright i'll remove it. Btw it was there so the message was send on the right moment. I can remember there were disconnects without the message
i used 2 be suffering from a bug like this on a.i..
the infostring can be missing, the prefix bot seems 2 trigger this by oblivion on your RC.
i hope you don't run into the same prob as me, my fix refuses 2 work on testdrive.
plop
aiii, that sounds bad ;(