Esempio n. 1
0
        private async void Client_OnTimeout(object sender, OnTimeoutArgs e)
        {
            UserEntry user = await Program.Users.GetUserByTwitchID(e.TimedoutUserId);

            if (user != null)
            {
                await Core.LOG(new LogEntry(LOGSEVERITY.INFO, EXTENSIONNAME,
                                            $"{_twitchChannelName} :: {e.TimedoutBy} timedout {user._twitchDisplayname} for {e.TimeoutDuration} because \"{e.TimeoutReason}\""
                                            ));
            }
        }
Esempio n. 2
0
        private async void OnTimeout(object sender, OnTimeoutArgs e)
        {
            Utils.LogToConsole($"User {e.TimedoutUser} ({e.TimedoutUserId}) timed out by {e.TimedoutBy} ({e.TimedoutById})");

            await SendActionAsync(new ActionTaken
            {
                ModUsername  = e.TimedoutBy,
                UserUsername = e.TimedoutUser,
                Action       = "timeout",
                Duration     = (int)Math.Ceiling(e.TimeoutDuration.TotalSeconds),
                Reason       = e.TimeoutReason
            });
        }
Esempio n. 3
0
 public static void onTimeout(object sender, OnTimeoutArgs e)
 {
     Models.Listing newListing = new Models.Listing()
     {
         DateTime        = DateTime.UtcNow,
         ActionPerformed = $"Timeout ({e.TimeoutDuration.ToReadableString()})",
         ModeratorName   = e.TimedoutBy,
         ViewerName      = e.TimedoutUser,
         ActionMessage   = e.TimeoutReason
     };
     Common.Data.Add(newListing);
     UI.Instance.addListing(newListing);
 }
Esempio n. 4
0
        private void PubSubService_OnTimeout(object sender, OnTimeoutArgs e)
        {
            if (!UserIdChannelName.TryGetValue(e.ChannelId, out var channelName))
            {
                return;
            }

            OnUserTimedout?.Invoke(this, new UserTimedoutEvent
            {
                Username        = e.TimedoutUser,
                Channel         = channelName,
                TimeoutDuration = (int)e.TimeoutDuration.TotalSeconds,
                TimeoutReason   = e.TimeoutReason,
                TimedoutBy      = e.TimedoutBy
            });
        }
Esempio n. 5
0
 private void pubsubOnTimeout(object sender, OnTimeoutArgs e)
 {
     Console.WriteLine("Test");
     MessageBox.Show($"New timeout event! Details below:\nTimedout user: {e.TimedoutUser}\nTimeout duration: {e.TimeoutDuration} seconds\nTimeout reason: {e.TimeoutReason}\nTimeout by: {e.TimedoutBy}");
 }
 /// <summary>
 /// Passes <see cref="OnTimeout"/> events down to subscribed plugins.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">An <see cref="OnTimeoutArgs"/> object.</param>
 private void TwitchPubSub_OnTimeout(object sender, OnTimeoutArgs e) => OnTimeout?.Invoke(this, e);
 private void PubSub_OnTimeout(object sender, OnTimeoutArgs e)
 {
     _logger.Information($"{e.TimedoutBy} timed out {e.TimedoutUser} ({e.TimeoutReason}) for {e.TimeoutDuration.Seconds} seconds");
 }