REG Bot
Moderator: Moderators
REG Bot
anyone tell me where i can find it or the equivalent for users to pm to the bot there password then they become registered
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