Need help ... plz

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
cyberjack1488
Posts: 10
Joined: 2003-03-03 17:56

Need help ... plz

Post by cyberjack1488 » 2003-03-05 16:21

Hi, i need a script, wich will send me all $ValidateNick requests per private message.


thx alot. ;)


Sorry for my bad english ...
°--=={HiGhSp33d HUB}==--° highspeedhub.no-ip.org

TasMan
Posts: 196
Joined: 2003-01-03 08:31
Location: Canada
Contact:

Post by TasMan » 2003-03-05 17:26

Code: Select all

Dim sBotName, aWho

Sub Main
  sBotName = "ValidateNicker"
  aWho = Array("Yourname", "Another")

  frmHub.RegisterBotName(CStr(sBotName))
End Sub

Sub DataArival(curUser, sData)
  If Left(sData, 13) = "$ValidateNick" Then
    Dim i

    For i = 0 To UBound(aWho)
      If colUsers.Online(CStr(aWho(i))) Then colUsers.ItemByName(CStr(aWho(i)).PrivateMessage CStr(sBotName), "Validate nick request from " & curUser.IP & " - " & CStr(sData)
    Next
  End If
End Sub

TasMan
Posts: 196
Joined: 2003-01-03 08:31
Location: Canada
Contact:

Post by TasMan » 2003-03-05 17:27

or if you just want it sent to a single user, this is better

Code: Select all

Dim sBotName, sWho 

Sub Main 
  sBotName = "ValidateNicker" 
  sWho = "Yourname"

  frmHub.RegisterBotName(CStr(sBotName)) 
End Sub 

Sub DataArival(curUser, sData) 
  If Left(sData, 13) = "$ValidateNick" Then 
      If colUsers.Online(CStr(sWho)) Then colUsers.ItemByName(CStr(sWho)).PrivateMessage CStr(sBotName), "Validate nick request from " & curUser.IP & " - " & CStr(sData) 
    Next 
  End If 
End Sub 


TasMan
Posts: 196
Joined: 2003-01-03 08:31
Location: Canada
Contact:

Post by TasMan » 2003-03-05 17:28

lol 3 posts in a row :P

remove that next statement in the second script....the first script needs another ) after ItemByName(CStr(aWho(i))...

cyberjack1488
Posts: 10
Joined: 2003-03-03 17:56

The Script won´t work

Post by cyberjack1488 » 2003-03-05 18:26

The script won´t work ... ive removed the NEXT of the second script but it won´t send me anny PM on $ValidateNick :cry:
°--=={HiGhSp33d HUB}==--° highspeedhub.no-ip.org

TasMan
Posts: 196
Joined: 2003-01-03 08:31
Location: Canada
Contact:

Post by TasMan » 2003-03-05 18:39

hmmmm the script is fine....it seems that the NMDC hub doesn't send the $ValidateNick message to the DataArival sub...

Gadget
Posts: 62
Joined: 2003-01-11 06:24
Location: Finland
Contact:

Post by Gadget » 2003-03-05 20:44

Nope, but it activates NewUserConnected(curUser) or OpConnected(curUser) sub...

Locked