PtokaX forum

Archive => Archived 4.0 boards => Request for Lua 4 scripts => Topic started by: NemeziS on 17 September, 2004, 11:39:19

Title: Selfreg script
Post by: NemeziS on 17 September, 2004, 11:39:19
Hello!

Wanted a selfreg script.

If writing !reg+password  or !regme+password, user

become a registered user. I wanted everyone can register himself.

Who can help me? =)
Title:
Post by: [UK]Madman on 17 September, 2004, 13:47:10

--Requested by Cp6uja
--Made by nErBoS

sBot = "Reg-Bot"

function Main()
frmHub:RegBot(sBot)
end

function DataArrival(user, data)
if (strsub(data,1,1) == "<" or strsub(data,1,5+strlen(sBot)) == "$To: "..sBot) then
data = strsub(data,1,strlen(data)-1)
s,e,cmd = strfind(data, "%b<>%s+(%S+)")
if (cmd == "!regme" or cmd =="!reg") then
local s,e,pass = strfind(data, "%b<>%s+%S+%s+(%S+)")
if (pass == nil) then
user:SendPM(sBot, "Syntax Error, !regme or !reg , you must write a password.")
else
AddRegUser(user.sName, pass, 3)
SendToOps(sBot, "The user "..user.sName.." has regiter himself.")
user:SendPM(sBot, "You have been successufly registered with the pass: "..pass)
user:SendPM(sBot, "Please reconnect and type your password.")
end
return 1
end
end
end



posted by Nerbos, just added !reg as a command so either !regme or !reg will work.
Title:
Post by: NemeziS on 17 September, 2004, 14:25:47
thank you very much! =)
Title:
Post by: NotRabidWombat on 18 September, 2004, 17:12:08
do NOT use that script.
It does not validate the username or password!!!

if(strfind(pass, "[%c|\n\r]")) then
   -- invalid password, kick/drop or whatever
   return;
end

if(strfind(user.sName, "[%c|\n\r]")) then
   -- invalid usename, kick/drop or whatever
   return;
end

Not doing this leaves your hub vulnerable to an exploit!!!

-NotRabidWombat
Title:
Post by: Psycho_Chihuahua on 18 September, 2004, 18:16:23
do you mean something like this (i know its full of bugs, just an example - no time to test)

--Requested by Cp6uja
--Made by nErBoS

sBot = "Reg-Bot"

function Main()
frmHub:RegBot(sBot)
end

function DataArrival(user, data)
if (strsub(data,1,1) == "<" or strsub(data,1,5+strlen(sBot)) == "$To: "..sBot) then
data = strsub(data,1,strlen(data)-1)
s,e,cmd = strfind(data, "%b<>%s+(%S+)")
if (cmd == "!regme" or cmd =="!reg") then
local s,e,pass = strfind(data, "%b<>%s+%S+%s+(%S+)")
elseif (strfind(pass, "[%c|\n\r]")) then
elseif  (strfind(user.sName, "[%c|\n\r]")) then
sUser:Disconnect()
SendPmToNick(sBot, Invalid Password. Please try again)
  elseif (pass == nil) then
user:SendPM(sBot, "Syntax Error, !regme or !reg , you must write a password.")
else
AddRegUser(user.sName, pass, 3)
SendToOps(sBot, "The user "..user.sName.." has regiter himself.")
user:SendPM(sBot, "You have been successufly registered with the pass: "..pass)
user:SendPM(sBot, "Please reconnect and type your password.")
end
return 1
end
end
end

Title:
Post by: nErBoS on 18 September, 2004, 18:42:08
Hi,

Thans RW for the warning. Fixed...

--## Self Register 1.0
--## Requested by Cp6uja
--## Secure Pass and Nick (thanks to RabidWombat)
--## Made by nErBoS
--## Commands;
--## !regme or !reg - Register the user who uses the command

sBot = "Reg-Bot"

function Main()
frmHub:RegBot(sBot)
end

function DataArrival(user, data)
if (strsub(data,1,1) == "<" or strsub(data,1,5+strlen(sBot)) == "$To: "..sBot) then
data = strsub(data,1,strlen(data)-1)
s,e,cmd = strfind(data, "%b<>%s+(%S+)")
if (cmd == "!regme" or cmd =="!reg") then
local s,e,pass = strfind(data, "%b<>%s+%S+%s+(%S+)")
if (pass == nil) then
user:SendPM(sBot, "Syntax Error, !regme or !reg , you must write a password.")
elseif (strfind(pass, "[%c|\n\r]")) then
user:SendPM(sBot, "Invalid Password. Try Again.")
elseif (strfind(user.sName, "[%c|\n\r]")) then
user:SendPM(sBot, "Your nick is invalid. Please choose a new one.")
else
AddRegUser(user.sName, pass, 3)
SendToOps(sBot, "The user "..user.sName.." has regiter himself.")
user:SendPM(sBot, "You have been successufly registered with the pass: "..pass)
user:SendPM(sBot, "Please reconnect and type your password.")
end
return 1
end
end
end

Best regards, nErBoS
Title:
Post by: NemeziS on 18 September, 2004, 23:14:16
Thanx, nErBoS! I've changed the code. Everything works fine. :)
Title:
Post by: BoJlk on 22 September, 2004, 20:09:44
Hi nErBoS

If it's possible to make a rule that checks if the password is a specific length like

if the user gives a less characters needed
it displays a message

"*** please provide a 6 length password"
Title:
Post by: Herodes on 22 September, 2004, 20:34:18
QuoteOriginally posted by BoJlk
Hi nErBoS

If it's possible to make a rule that checks if the password is a specific length like

if the user gives a less characters needed
it displays a message

"*** please provide a 6 length password"
uhmm the script nErBoS provided cant have generated this message since there isnt such message in his script ... so I bet it will be some other bot doing dirty .. :)

[*edit*] overdosed with many substances ....
Title:
Post by: nErBoS on 23 September, 2004, 00:25:16
Hi,

Here you have...

--## Self Register 1.1
--## Requested by Cp6uja
--## Secure Pass and Nick (thanks to RabidWombat)
--## Added a helper remenber of pass (requested by BoJlk)
--## Made by nErBoS
--## Commands;
--## !regme or !reg - Register the user who uses the command

sBot = "Reg-Bot"

PtokaxPath = "C:\\Ptokax\\" -- Put here you ptokax folder path
fReg = "RegisteredUsers.dat"

function Main()
frmHub:RegBot(sBot)
frmHub:EnableFullData(1)
end

function DataArrival(user, data)
if (strsub(data,1,7) == "$MyPass") then
execute("copy "..PtokaxPath..fReg)
local s,e,pass = strfind(data, "%$MyPass%s+(.+)|")
local validation,len = CheckPass(user.sName,pass)
if (validation == nil) then
if (len ~= strlen(pass)) then
user:SendData(sBot, "Your password is wrong. You must type a "..len.." length pass.")
user:Disconnect()
else
user:SendData(sBot, "Wrong Password.")
user:Disconnect()
end
end
end
if (strsub(data,1,1) == "<" or strsub(data,1,5+strlen(sBot)) == "$To: "..sBot) then
data = strsub(data,1,strlen(data)-1)
s,e,cmd = strfind(data, "%b<>%s+(%S+)")
if (cmd == "!regme" or cmd =="!reg") then
local s,e,pass = strfind(data, "%b<>%s+%S+%s+(%S+)")
if (pass == nil) then
user:SendPM(sBot, "Syntax Error, !regme or !reg , you must write a password.")
elseif (strfind(pass, "[%c|\n\r]")) then
user:SendPM(sBot, "Invalid Password. Try Again.")
elseif (strfind(user.sName, "[%c|\n\r]")) then
user:SendPM(sBot, "Your nick is invalid. Please choose a new one.")
else
AddRegUser(user.sName, pass, 3)
SendToOps(sBot, "The user "..user.sName.." has regiter himself.")
user:SendPM(sBot, "You have been successufly registered with the pass: "..pass)
user:SendPM(sBot, "Please reconnect and type your password.")
end
return 1
end
end
end

function CheckPass(nick, pass)
readfrom(fReg)
while 1 do
local sLine = read()
if (sLine == nil) then
break
else
local s,e,usr,rpass = strfind(sLine, "(.+)|(.+)|%d+")
if (usr == nick) then
if (rpass ~= pass) then
return nil,strlen(rpass)
else
return 0,0
end
end
end
end
readfrom()
return 0,0
end

Best regards, nErBoS
Title:
Post by: BoJlk on 25 September, 2004, 18:39:01
How do i combine this script's options with the
RoboCop's

I made the robocop to block any serach&download from the HUB option...
and the selfRegistering users...

what do i disable in the RoboCop to not interfere with the Selfreg Script???

I hope that wny1 understood what i wanted to say
because i don't ... ?(
Title:
Post by: nErBoS on 25 September, 2004, 22:27:04
Hi,

Just change the name of this script to be first then the RoboCop script in your script list, that way the RoboCop will not interfere with this script.

Best regards, nErBoS
Title:
Post by: BoJlk on 26 September, 2004, 02:26:37
Well i'll try that...

Something else!

Is it possible to make every registered user to have the [REG] prefix to be added automaticly

i mean Nickname have registered
*** reconnects and his nick will be changed to
[REG]NickName...

but if he'll change the nick and add the prefix on hisown he won't be registered!
Title:
Post by: Psycho_Chihuahua on 26 September, 2004, 02:42:49
hmm i was to slow for my suggestion *g*

would of been this or something like it

AddRegUser("[Reg]"..user.sName, pass, 3)
SendToOps(sBot, "The user [Reg]"..user.sName.." has registered himself.")
user:SendPM(sBot, "You have been successufly registered with the pass: "..pass)
user:SendPM(sBot, "Please reconnect and type your password.")
user:SendPM(sBot, "Please Insert [Reg] Prefix before your Nick.")

dunno if it would work though, just a thought that struck my mind
Title:
Post by: nErBoS on 26 September, 2004, 03:05:15
Hi,

I belive that BoJlk is talking about Fake Info in nick. I will do that in the morning.

Best regards, nErBoS
Title:
Post by: BoJlk on 26 September, 2004, 03:05:20
It's GOOD!

But not what i meant...

i'm talking about the users whom don't know how to change it
(and that it have to be added to Favourites first)

So if that user connects after been registered
 after 5 times he tried to type the !reg correctly

The prefix added Automaticly
HappyUser
Reconnects after been registered...
the script identifies him/her and adds the prefix

[REG]HappyUser
Title:
Post by: BoJlk on 26 September, 2004, 04:05:52
QuoteOriginally posted by nErBoS
Hi,

I belive that BoJlk is talking about Fake Info in nick. I will do that in the morning.

Best regards, nErBoS

That would be nice too...but in a different script
Title:
Post by: nErBoS on 26 September, 2004, 15:25:55
Hi,

A script can't change the favourites of a user, or neither force to change the nick. Like i said it can send FakeInfo Nick or warn a user when he regs himself to add to his nick the correct Prefix (like ty has said). Which do you want ??

Best regards, nErBoS
Title:
Post by: BoJlk on 26 September, 2004, 19:50:33
Well in that case if you can add to this script the
Warning...
*** Change your nick and Reconnect

and maybe to force the user to change the nick untill that the script won't let him in...

Because if he won't change the Nick he'll login as Unregistered user...

--## Self Register 1.1
--## Requested by Cp6uja
--## Secure Pass and Nick (thanks to RabidWombat)
--## Added a helper remenber of pass (requested by BoJlk)
--## Made by nErBoS
--## Commands;
--## !regme or !reg - Register the user who uses the command

sBot = "Reg-Bot"

PtokaxPath = "C:\\Ptokax\\" -- Put here you ptokax folder path
fReg = "RegisteredUsers.dat"

function Main()
frmHub:RegBot(sBot)
frmHub:EnableFullData(1)
end

function DataArrival(user, data)
if (strsub(data,1,7) == "$MyPass") then
execute("copy "..PtokaxPath..fReg)
local s,e,pass = strfind(data, "%$MyPass%s+(.+)|")
local validation,len = CheckPass(user.sName,pass)
if (validation == nil) then
if (len ~= strlen(pass)) then
user:SendData(sBot, "Your password is wrong. You must type a "..len.." length pass.")
user:Disconnect()
else
user:SendData(sBot, "Wrong Password.")
user:Disconnect()
end
end
end
if (strsub(data,1,1) == "<" or strsub(data,1,5+strlen(sBot)) == "$To: "..sBot) then
data = strsub(data,1,strlen(data)-1)
s,e,cmd = strfind(data, "%b<>%s+(%S+)")
if (cmd == "!regme" or cmd =="!reg") then
local s,e,pass = strfind(data, "%b<>%s+%S+%s+(%S+)")
if (pass == nil) then
user:SendPM(sBot, "Syntax Error, !regme or !reg , you must write a password.")
elseif (strfind(pass, "[%c|\n\r]")) then
user:SendPM(sBot, "Invalid Password. Try Again.")
elseif (strfind(user.sName, "[%c|\n\r]")) then
user:SendPM(sBot, "Your nick is invalid. Please choose a new one.")
else
AddRegUser(user.sName, pass, 3)
SendToOps(sBot, "The user "..user.sName.." has regiter himself.")
user:SendPM(sBot, "You have been successufly registered with the pass: "..pass)
user:SendPM(sBot, "Please reconnect and type your password.")
end
return 1
end
end
end

function CheckPass(nick, pass)
readfrom(fReg)
while 1 do
local sLine = read()
if (sLine == nil) then
break
else
local s,e,usr,rpass = strfind(sLine, "(.+)|(.+)|%d+")
if (usr == nick) then
if (rpass ~= pass) then
return nil,strlen(rpass)
else
return 0,0
end
end
end
end
readfrom()
return 0,0
end

And if you can explain about that?

QuoteFake Info in nick.
Title:
Post by: nErBoS on 26 September, 2004, 20:01:07
Hi,

Here is the script with the request and will avoid leting the user enters with his nick as unregister.

--## Self Register 1.2
--## Requested by Cp6uja
--## Secure Pass and Nick (thanks to RabidWombat)
--## Added a helper remenber of pass (requested by BoJlk)
--## Reg will obrigate which user to have [Reg] has a prefix (requested by BoJlk)
--## Made by nErBoS
--## Commands;
--## !regme or !reg - Register the user who uses the command

sBot = "Reg-Bot"

PtokaxPath = "C:\\Ptokax\\" -- Put here you ptokax folder path
fReg = "RegisteredUsers.dat"
arrReg = {}

function Main()
frmHub:RegBot(sBot)
frmHub:EnableFullData(1)
end

function NewUserConnected(user)
if (arrReg[user.sName] ~= nil) then
user:SendData(sBot, "Change your your nick to [Reg]"..user.sName)
user:Disconnect()
end
if (user.iProfile == 3) then
local name = strsub(data,5,strlen(user.sName))
arrReg[name] = nil
end
end

function DataArrival(user, data)
if (strsub(data,1,7) == "$MyPass") then
execute("copy "..PtokaxPath..fReg)
local s,e,pass = strfind(data, "%$MyPass%s+(.+)|")
local validation,len = CheckPass(user.sName,pass)
if (validation == nil) then
if (len ~= strlen(pass)) then
user:SendData(sBot, "Your password is wrong. You must type a "..len.." length pass.")
user:Disconnect()
else
user:SendData(sBot, "Wrong Password.")
user:Disconnect()
end
end
end
if (strsub(data,1,1) == "<" or strsub(data,1,5+strlen(sBot)) == "$To: "..sBot) then
data = strsub(data,1,strlen(data)-1)
s,e,cmd = strfind(data, "%b<>%s+(%S+)")
if (cmd == "!regme" or cmd =="!reg") then
local s,e,pass = strfind(data, "%b<>%s+%S+%s+(%S+)")
if (pass == nil) then
user:SendPM(sBot, "Syntax Error, !regme or !reg , you must write a password.")
elseif (strfind(pass, "[%c|\n\r]")) then
user:SendPM(sBot, "Invalid Password. Try Again.")
elseif (strfind(user.sName, "[%c|\n\r]")) then
user:SendPM(sBot, "Your nick is invalid. Please choose a new one.")
else
AddRegUser("[Reg]"..user.sName, pass, 3)
arrReg[user.sName] = 1
SendToOps(sBot, "The user "..user.sName.." has regiter himself.")
user:SendPM(sBot, "You have been successufly registered with the pass: "..pass)
user:SendPM(sBot, "Change your your nick to [Reg]"..user.sName)
user:SendPM(sBot, "Please reconnect and type your password.")
end
return 1
end
end
end

function CheckPass(nick, pass)
readfrom(fReg)
while 1 do
local sLine = read()
if (sLine == nil) then
break
else
local s,e,usr,rpass = strfind(sLine, "(.+)|(.+)|%d+")
if (usr == nick) then
if (rpass ~= pass) then
return nil,strlen(rpass)
else
return 0,0
end
end
end
end
readfrom()
return 0,0
end

About the Fake Info Nick, it would be leting the user entering with his own nick and then send fake info to all users and the user himself with the prefix on his nick. (but would take more resources that the other aproach)

Best regards, nErBoS
Title:
Post by: BoJlk on 26 September, 2004, 20:16:08
Thanks for the Script (that was fast)

And about the FakeNick!

You mean user enters the HUB with user001 nick and send to all a different Nick user002?
Title:
Post by: nErBoS on 26 September, 2004, 22:35:01
Hi,

Yes, but like i said it takes resources.

Best regards, nErBoS
Title:
Post by: BoJlk on 02 October, 2004, 00:41:04
A Question!?
Didn't fully tested the script
is the script works for the RoboCop's
!regvip/!regop/!upgrade Commands
or just for registered users?

And where do i change the password's Lenght in the script?
Title:
Post by: nErBoS on 02 October, 2004, 01:07:37
Hi,

You can use whatever reg script you want because this script will check the passwords from your ptokax file, so it doesn't matter which script you use. About the lenght, that i haven't understood, the lenght is the length of the pass, please be more clear.

Best regards, nErBoS
Title:
Post by: BoJlk on 02 October, 2004, 01:12:28
Well i've tested the script on
[ProtaX v0.3.3.0 build 15.18 with RC9a]

Two things
1.Error
Syntax error: bad argument #1 to `strsub' (string expected, got nil)
stack traceback:
   1:  function `strsub' [C]
   2:  function `NewUserConnected' at line 26 [file `...:\ProtaX TESTING\scripts\Self Register v1.2.lua']

2.When Removed the Registered user from the Protax it
Tried with !deluser as well
didn't let me Login (worng password)
Had to restart the HUB to correct it
Title:
Post by: nErBoS on 02 October, 2004, 23:26:39
Hi,

1) Fixed....

--## Self Register 1.2
--## Requested by Cp6uja
--## Secure Pass and Nick (thanks to RabidWombat)
--## Added a helper remenber of pass (requested by BoJlk)
--## Reg will obrigate which user to have [Reg] has a prefix (requested by BoJlk)
--## Made by nErBoS
--## Commands;
--## !regme or !reg - Register the user who uses the command

sBot = "Reg-Bot"

PtokaxPath = "C:\\Ptokax\\" -- Put here you ptokax folder path
fReg = "RegisteredUsers.dat"
arrReg = {}

function Main()
frmHub:RegBot(sBot)
frmHub:EnableFullData(1)
end

function NewUserConnected(user)
if (arrReg[user.sName] ~= nil) then
user:SendData(sBot, "Change your your nick to [Reg]"..user.sName)
user:Disconnect()
end
if (user.iProfile == 3) then
local name = strsub(user.sName,5,strlen(user.sName))
arrReg[name] = nil
end
end

function DataArrival(user, data)
if (strsub(data,1,7) == "$MyPass") then
execute("copy "..PtokaxPath..fReg)
local s,e,pass = strfind(data, "%$MyPass%s+(.+)|")
local validation,len = CheckPass(user.sName,pass)
if (validation == nil) then
if (len ~= strlen(pass)) then
user:SendData(sBot, "Your password is wrong. You must type a "..len.." length pass.")
user:Disconnect()
else
user:SendData(sBot, "Wrong Password.")
user:Disconnect()
end
end
end
if (strsub(data,1,1) == "<" or strsub(data,1,5+strlen(sBot)) == "$To: "..sBot) then
data = strsub(data,1,strlen(data)-1)
s,e,cmd = strfind(data, "%b<>%s+(%S+)")
if (cmd == "!regme" or cmd =="!reg") then
local s,e,pass = strfind(data, "%b<>%s+%S+%s+(%S+)")
if (pass == nil) then
user:SendPM(sBot, "Syntax Error, !regme or !reg , you must write a password.")
elseif (strfind(pass, "[%c|\n\r]")) then
user:SendPM(sBot, "Invalid Password. Try Again.")
elseif (strfind(user.sName, "[%c|\n\r]")) then
user:SendPM(sBot, "Your nick is invalid. Please choose a new one.")
else
AddRegUser("[Reg]"..user.sName, pass, 3)
arrReg[user.sName] = 1
SendToOps(sBot, "The user "..user.sName.." has regiter himself.")
user:SendPM(sBot, "You have been successufly registered with the pass: "..pass)
user:SendPM(sBot, "Change your your nick to [Reg]"..user.sName)
user:SendPM(sBot, "Please reconnect and type your password.")
end
return 1
end
end
end

function CheckPass(nick, pass)
readfrom(fReg)
while 1 do
local sLine = read()
if (sLine == nil) then
break
else
local s,e,usr,rpass = strfind(sLine, "(.+)|(.+)|%d+")
if (usr == nick) then
if (rpass ~= pass) then
return nil,strlen(rpass)
else
return 0,0
end
end
end
end
readfrom()
return 0,0
end

2) Well i have tried what you said and worked fine by me.

Best regards, nErBoS
Title:
Post by: BoJlk on 03 October, 2004, 00:34:52
First as far as i tried
Now i can't delete the user

with the command
!deluser [reg]User001
*** You can't delete [reg]User001 he is not a registered user!

And the script doesn't checks the Lenght of the password given
I mean, i want the users will register with no less then xxx characters password...
Title:
Post by: nErBoS on 03 October, 2004, 13:10:22
Hi,

About the Pass len here you have...

--## Self Register 1.3
--## Requested by Cp6uja
--## Secure Pass and Nick (thanks to RabidWombat)
--## Added a helper remenber of pass (requested by BoJlk)
--## Reg will obrigate which user to have [Reg] has a prefix (requested by BoJlk)
--## Added a Min and Max Password length (requested by BoJlk)
--## Made by nErBoS
--## Commands;
--## !regme or !reg - Register the user who uses the command

sBot = "Reg-Bot"

PtokaxPath = "C:\\Ptokax\\" -- Put here you ptokax folder path
minPassLen = 3 -- Put here the min Len accepted to register (If you want to disable just put 0)
maxPassLen = 20 -- Put here the max Len accepted to register (If you want to disable just put 0)
fReg = "RegisteredUsers.dat"
arrReg = {}

function Main()
frmHub:RegBot(sBot)
frmHub:EnableFullData(1)
end

function NewUserConnected(user)
if (arrReg[user.sName] ~= nil) then
user:SendData(sBot, "Change your your nick to [Reg]"..user.sName)
user:Disconnect()
end
if (user.iProfile == 3) then
local name = strsub(user.sName,5,strlen(user.sName))
arrReg[name] = nil
end
end

function DataArrival(user, data)
if (strsub(data,1,7) == "$MyPass") then
execute("copy "..PtokaxPath..fReg)
local s,e,pass = strfind(data, "%$MyPass%s+(.+)|")
local validation,len = CheckPass(user.sName,pass)
if (validation == nil) then
if (len ~= strlen(pass)) then
user:SendData(sBot, "Your password is wrong. You must type a "..len.." length pass.")
user:Disconnect()
else
user:SendData(sBot, "Wrong Password.")
user:Disconnect()
end
end
end
if (strsub(data,1,1) == "<" or strsub(data,1,5+strlen(sBot)) == "$To: "..sBot) then
data = strsub(data,1,strlen(data)-1)
s,e,cmd = strfind(data, "%b<>%s+(%S+)")
if (cmd == "!regme" or cmd =="!reg") then
local s,e,pass = strfind(data, "%b<>%s+%S+%s+(%S+)")
if (pass == nil) then
user:SendPM(sBot, "Syntax Error, !regme or !reg , you must write a password.")
elseif (strfind(pass, "[%c|\n\r]")) then
user:SendPM(sBot, "Invalid Password. Try Again.")
elseif (strfind(user.sName, "[%c|\n\r]")) then
user:SendPM(sBot, "Your nick is invalid. Please choose a new one.")
elseif (minPassLen ~= 0 and strlen(pass) < minPassLen) then
user:SendPM(sBot, "Your password is to short. You must write a password with a min lenght of "..minPassLen.." chars.")
elseif (maxPassLen ~= 0 and strlen(pass) > maxPassLen) then
user:SendPM(sBot, "Your password is to big. You must write a password with a max lenght of "..maxPassLen.." chars.")
else
AddRegUser("[Reg]"..user.sName, pass, 3)
arrReg[user.sName] = 1
SendToOps(sBot, "The user "..user.sName.." has regiter himself.")
user:SendPM(sBot, "You have been successufly registered with the pass: "..pass)
user:SendPM(sBot, "Change your your nick to [Reg]"..user.sName)
user:SendPM(sBot, "Please reconnect and type your password.")
end
return 1
end
end
end

function CheckPass(nick, pass)
readfrom(fReg)
while 1 do
local sLine = read()
if (sLine == nil) then
break
else
local s,e,usr,rpass = strfind(sLine, "(.+)|(.+)|%d+")
if (usr == nick) then
if (rpass ~= pass) then
return nil,strlen(rpass)
else
return 0,0
end
end
end
end
readfrom()
return 0,0
end

I belive Unregging users is case sensative, so trie out to input "!deluser [Reg]User001".

Best regards, nErBoS
Title:
Post by: BoJlk on 04 October, 2004, 16:13:06
I thought i might be CaseSensitive so i've tried it
and still got the same problem...

The only way i could delete the registered person is
by !upgrade to VIP,OP and the deleting the VIP,OP!
otherwise it made me ***disconnected.
without the [reg] prefix

about this scripts i'll try it later and keep you poseted...
Thanks a alot
Title:
Post by: nErBoS on 04 October, 2004, 21:59:36
Hi,

That error is pretty weird i have try to remove a user by the delreg command of ptokax and worked OK. Then i tried to remove the user from the ptokax software and worked OK.

Best regards, nErBoS
Title:
Post by: BoJlk on 05 October, 2004, 01:53:22
it only worked by removing the user from ProtaX...

But not by the sommand...
!deluser - Remove a user from registeredUsers.dat (All profiles)

 *** You can't delete [reg]User001 he is not a registered user!
Title:
Post by: nErBoS on 05 October, 2004, 12:42:14
Hi,

Beware the deluser command is case sensative like you said so the nick prefix is [Reg].

Best regards, nErBoS