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

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

REG Bot

Post by Paul_Don » 2003-03-04 12: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 11:41
Location: uk

Post by Paul_Don » 2003-03-04 13: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 18:42
Location: Denmark

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

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

Good luck ;)

Who is online

Users browsing this forum: Google [Bot] and 0 guests