Skip to content
Permalink
Browse files

Sending SID_NOTIFYJOIN now leaves chat environment

The packet has similar behavior to SID_LEAVECHAT, but would only ever be
sent by scripts.
  • Loading branch information...
Davnit committed May 3, 2016
1 parent 2bb3688 commit 0f2956e8ba58a6d5b44373dab7556b9ff554f548
Showing with 4 additions and 1 deletion.
  1. +3 −1 trunk/clsDataBuffer.cls
  2. +1 −0 trunk/modBNCS.bas
@@ -338,7 +338,9 @@ Public Function SendPacket(Optional PacketID As Byte)
End Select
End If

If PacketID = SID_LEAVECHAT Then
' These two packets cause the client to leave chat, and do not have any responses.
' (SID_NOTIFYJOIN is not valid unless it's at least 10 bytes long)
If (PacketID = SID_LEAVECHAT Or (PacketID = SID_NOTIFYJOIN And m_bufsize >= 10)) Then
' there's no response to this one!
Call Event_LeftChatEnvironment
End If
@@ -22,6 +22,7 @@ Public Const SID_UDPPINGRESPONSE As Byte = &H14
Public Const SID_MESSAGEBOX As Byte = &H19
Public Const SID_LOGONCHALLENGEEX As Byte = &H1D
Public Const SID_CLIENTID2 As Byte = &H1E
Public Const SID_NOTIFYJOIN As Byte = &H22
Public Const SID_PING As Byte = &H25
Public Const SID_READUSERDATA As Byte = &H26
Public Const SID_WRITEUSERDATA As Byte = &H27

0 comments on commit 0f2956e

Please sign in to comment.
You can’t perform that action at this time.