Is there a script for user registering for OPs ?
stimorol has register user pass command, but I don't want to use stim...
it kicked half of my users away...hundread user lost...well...no problem, but still I don't want to use it, but I need register command for my OPs
-Sd
Register command for OPs
Moderator: Moderators
-
Marvin
- Posts: 147
- Joined: 2003-03-06 11:56
- Location: France
To add a non-op registered user, you should use something like :
Where oRegUser is an object created by the code following the "=" sign, Username is a string containing the name of the new user, Password the password the client will ask to that user to validate connection.
This should be put in the code that deals with your op commands.
Code: Select all
set oRegUser = frmhub.lstOps.listItems.Add(,,cstr(Username))
oRegUser.SubItems(1)=cstr(Password)
oRegUser.SubItems(2)="False"
Where oRegUser is an object created by the code following the "=" sign, Username is a string containing the name of the new user, Password the password the client will ask to that user to validate connection.
This should be put in the code that deals with your op commands.
-
Marvin
- Posts: 147
- Joined: 2003-03-06 11:56
- Location: France
To prevent the same nick to be registered several times, here is a little function :
bIsReg is a boolean function, returning true if sUserName is registered.
You can use it before adding or removing a registered user (or an Op).
Code: Select all
Function bIsReg (sUserName) ' checks if sUserName is registered
bIsReg = False
For Each oElement In frmHub.lstOps.listItems
If Lcase(oElement.Text) = Lcase(sUserName) Then
bIsReg=True
Exit For
End If
Next
End FunctionbIsReg is a boolean function, returning true if sUserName is registered.
You can use it before adding or removing a registered user (or an Op).
-
Marvin
- Posts: 147
- Joined: 2003-03-06 11:56
- Location: France
Well, I hope this will work (I've never read generalbot before)
This should be placed in the sub DataArival, after the line
You should also put the function bIsReg somewhere in the script, before the last line should be ok
You should add a check of the sUser and sInfo strings if you want users to have an error message when they use the command inproperly.
Command usage will be adduser username password, typed wherever you type op's commands for this bot.
Code: Select all
Case sCmdPrefix+"adduser"
if not bIsReg(sUser) then
set oRegUser = frmhub.lstOps.listItems.Add(,,cstr(sUser))
oRegUser.SubItems(1)=cstr(sInfo)
oRegUser.SubItems(2)="False"
sA=sUser&" registered with the pass: "&sInfo
else
sA=sUser&" is already registered"
end ifThis should be placed in the sub DataArival, after the line
Code: Select all
Select Case sCmdYou should also put the function bIsReg somewhere in the script, before the last line should be ok
You should add a check of the sUser and sInfo strings if you want users to have an error message when they use the command inproperly.
Command usage will be adduser username password, typed wherever you type op's commands for this bot.
-
Scoffer
- Posts: 15
- Joined: 2003-02-18 09:51
I really had to think for a while about where to add all and stuff, but It really works...very very biiig thanks for you =)
It's great when there are people willing to help when urgently needed..
you should write a separate script from that...I know many admins who are in need of that command =)
(ofcoz' I give this generalbot add instruction to them also)
-Sc
It's great when there are people willing to help when urgently needed..
you should write a separate script from that...I know many admins who are in need of that command =)
(ofcoz' I give this generalbot add instruction to them also)
-Sc
Who is online
Users browsing this forum: Google [Bot] and 0 guests