Need a little update for join-script

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

Posts: 7
Joined: 2003-11-01 02:54

Need a little update for join-script

Post by Walz » 2004-01-29 10:29

So. I have a following request for you who can script, because I can't enough. I have now a bot running which informs everybody in mainchat if a registered user logs in. I can personalize a logintext for everyone, but I would like to get a little update, so every regged user could easily peronalize their messages themselves without me (for example with command like "!login <text>"), however so that not everyone could modify each others messages. :)

The actual script is like this (it's not mine i got it from somewhere here thx whoever made it):

Code: Select all

Dim sBotName, sUserMsg, sRegMsg, sOpMsg, oUser
Sub Main
sBotName = "MyBotName"
sUserMsg = ""
sRegMsg = "%USER% has entered"
sOpMsg = "%USER% Has Entered"
Set oUser = CreateObject("Scripting.Dictionary")
oUser("[1st]ReggedUser")= +vbCRLF+vbTab+vbTab+vbTab+vbTab+vbTab+"º¤  Example logintext  ¤º"
oUser("[2nd]ReggedUser")= +vbCRLF+vbTab+vbTab+vbTab+vbTab+vbTab+"º¤ Example logintext  ¤º"


End Sub

Sub OpConnected(curUser)
Call NewUserConnected(curUser)
End Sub

Sub NewUserConnected(curUser) 
If oUser.Exists(curUser.sName) Then
ElseIf curUser.bOperator Then
ElseIf frmHub.lstOps.FindItem(curUser.sName) Is Nothing Then
End If
If sMsg<>"" Then colUsers.SendChatToAll CStr(sBotName), CStr(Replace(sMsg,"%USER%",curUser.sName))
End Sub

(Edit: code tags work better than bold - GMT)