Ejemplo n.º 1
0
        public void OnServiceMethod(SteamUnifiedMessages.ServiceMethodNotification cb)
        {
            Log.WriteLine("OnServiceMethod for method '{0}'", cb.MethodName);

            if (cb.ServiceName == "ChatRoomClient")
            {
                switch (cb.RpcName)
                {
                default:
                    Log.WriteLine("Unknown method `{0}` for service `{1}`", cb.RpcName, "ChatRoomClient");
                    break;
                }
            }
            else if (cb.ServiceName == "ChatRoom")
            {
                switch (cb.RpcName)
                {
                default:
                    Log.WriteLine("Unknown method `{0}` for service `{1}`", cb.RpcName, "ChatRoom");
                    break;
                }
            }
            else if (cb.ServiceName == "Chat")
            {
                switch (cb.RpcName)
                {
                default:
                    Log.WriteLine("Unknown method `{0}` for service `{1}`", cb.RpcName, "Chat");
                    break;
                }
            }
        }
Ejemplo n.º 2
0
        private static async void OnServiceMethod(SteamUnifiedMessages.ServiceMethodNotification notification)
        {
            switch (notification.MethodName)
            {
            case "ChatRoomClient.NotifyIncomingChatMessage#1":
                await OnIncomingChatMessage((CChatRoom_IncomingChatMessage_Notification)notification.Body);

                break;
            }
        }
Ejemplo n.º 3
0
        private void OnServiceMethod(SteamUnifiedMessages.ServiceMethodNotification callback)
        {
            Log.WriteInfo("Bridge", $"{callback.MethodName}");
            switch (callback.MethodName)
            {
            //ge: ChatRoomClient.NotifyIncomingChatMessage#1
            case "ChatRoomClient.NotifyIncomingChatMessage#1":
                CChatRoom_IncomingChatMessage_Notification body = (CChatRoom_IncomingChatMessage_Notification)callback.Body;
                Log.WriteDebug("Bridge", $"({body.chat_group_id}-{body.chat_id}), <{body.steamid_sender}> {body.message}");
                if (body.chat_group_id == 17013 && body.chat_id == 289194)
                {
                    IRC.Instance.Send("#test", $"<{body.steamid_sender}> {body.message}");
                }    // else
                     //{
                     //    IRC.Instance.Send("#test", $"Elsewhere({body.chat_group_id}-{body.chat_id}), <{body.steamid_sender}> {body.message}");
                     //}

                break;
            }
        }