• Welcome to Valhalla Legends Archive.
 

Re: Join home channel after login.

Started by Eibro, March 04, 2003, 12:41 PM

Previous topic - Next topic

Eibro

QuoteHello ok i'v made a chat bot any everything but now after it logins to Battle.net it gose to "Public chat-1" what can i add to make it join my channel eg. "inheaven"
i want it to join "inheaven" as soon as it logins to bnet
You can't. The most you can hope for is joining a public channel on the chat protocal. Send "/join channelname" after you connect.
Eibro of Yeti Lovers.

ILurker

#1
............Just make it so when your logged in, it automatically sends "/join " & homechannel
not too hard
Its impossible to dodge joining public chats on startup

ILurker

#2
well not really impossible but probably hard to do

Spht

For chat protocol, after you receive 2010 NAME from Battle.net, you could then send "/join <Home_Channel>."

For example, in Visual Basic, SOCKET.SendData "/join Clan [vL]" & vbCrLf. SOCKET being your Winsock control name, and vbCrLf being a substitute for the Enter key in the Telnet interface.

Grok

#4
Quote[snip]
'Call Appropriate Event based on ID
    Select Case Val(strArgs(1))
        Case 1001: Event_User strArgs(3), strArgs(4), strArgs(5)
        Case 1002: Event_Join strArgs(3), strArgs(4), strArgs(5)
        Case 1003: Event_Leave strArgs(3), strArgs(4)
        Case 1004: Event_RecvWhisper strArgs(3), strArgs(4), strData2
        Case 1005: Event_Talk strArgs(3), strArgs(4), strData2
    End Select
End Sub
[snip]

ACCCK!  That's not how events are supposed to be written!!

You should declare events from a class module as public, e.g...

---  ClassBot  class code
Public Event OnTalk(Name As String, Flags As String, Chat As String)

Somewhere in the class you fire an event like this:

RaiseEvent OnTalk(name, flags, chat)

Now, to use the class, in your form or wherever, call it like this:

Private WithEvents CBot As ClassBot

..by doing that, and choosing CBot from the ojbect dropdown, you'll see the OnTalk event in the procedure dropdown.  Click it .. You'll see this code:

Private Sub CBot_OnTalk(Name As String, Flags As String, Chat As String)

End Sub

Sorry for the seguey, but intervention was required!

haZe

#5
VaporBot, very nice chat bot, sort of outdated though, so your probably not going to go that far with it :-/

Noodlez

#6
proper events are just leeter  :P

(i think?)