REG Bot

Which hub software is the best? Where can I find script XXX? Discuss it here...(no, this is not for advertising your hub...)

Moderator: Moderators

Locked
Paul_Don
Posts: 146
Joined: 2003-01-29 06:41
Location: uk
Contact:

REG Bot

Post by Paul_Don » 2003-03-04 07:22

anyone tell me where i can find it or the equivalent for users to pm to the bot there password then they become registered

Paul_Don
Posts: 146
Joined: 2003-01-29 06:41
Location: uk
Contact:

Post by Paul_Don » 2003-03-04 08:29

its ok i got one and if any of ya need one to here it is

Code: Select all

'Use +reg <PASS>
Dim sBotName, Input

Sub Main()
sBotName="[uF]Reg"
frmHub.RegisterBotName(CStr(sBotName)) 
End Sub

Sub NewUserConnected(curUser)
curUser.PrivateMessage CStr(sBotName), "To register your name, PM [uF]Reg with this message:   +reg <PASS>   Example: +reg secret22"
End Sub

Sub DataArival(curUser, sCurData)
If Left(sCurData, 4)<>"$To:" Then Exit Sub
If Left(sCurData, 5+Len(sBotName)) = ("$To: "+sBotName) Then Input=AfterFirst(sCurData, "> ")
If Left(LCase(Input), 5)="+reg " then Call AddRUser(curUser, Cstr(curUser.sName), AfterFirst(AfterFirst(Input, " "), " ")): Input="" :Exit Sub
End Sub

Sub AddRUser(curUser, sRUser, sPass)
Dim newRUser
  Set newRUser=frmHub.lstOps.listItems.add(,,cstr(sRUser))
  newRUser.SubItems(1)=cstr(sPass)
  newRUser.SubItems(2)="False"
curUser.PrivateMessage CStr(sBotName), "You are now a [uF] Registered user. Your password has been set as: "+Cstr(sPass)
curUser.ForceMove frmHub.txtIP+":"+frmHub.txtListenPort
End Sub

Function BeforeFirst(sIn, sFirst)               
   BeforeFirst = Left(sIn, InStr(1, sIn, sFirst) - 1)
End Function
Function AfterFirst(sIn, sFirst)  
   AfterFirst = Right(sIn, Len(sIn) - InStr(1, sIn, sFirst) - (Len(sFirst) - 1))
End Function

Snooze
Posts: 119
Joined: 2003-01-26 13:42
Location: Denmark
Contact:

Post by Snooze » 2003-03-04 14:04

If that wasnt what you had in mind, check my website...you will find more than 120 scripts there.. :-)

Good luck ;)

Locked