Link/URL Protection - Check URL Execute Code not working

I recently imported this extension:

The code for Check URL appears to not be working. I have tested the other elements and all appear to function correctly, however the Check URL code does not seem to activate. I have attempted to insert simple "Hello World"s at certain points within the code to find a specific fail point (before string permitUser, after string permitUser, and after the if!allowed timeout chain. I consulted a friend who is more familiar with C# code than I am, and neither of us was able to figure out what was wrong. He believes it may be a syntax error.

I also tried replacing the Check URL code with this piece of code:

using System.Text.RegularExpressions;
using System.Collections.Generic;

public class CPHInline
  public bool Execute()
    CPH.SendMessage("Hello world!");
    return true;

and it functioned properly, so the issue appears to be with the current Check URL code and not the Execute Code function itself. Thanks!

The solution has been found.

In line 41 of the Check URL script, CPH.TimeoutUser(args["user"].ToString(), 15); needs to be CPH.TwitchTimeoutUser(args["user"].ToString(), 15);

1 Like

Yeah, there’s going to be some stuff that needs to be altered and updated. If this still works as intended one of us may try to update the import code but most of the stuff is on the creator to update and if they don’t we’ll be starting to deprecate stuff. But glad you got it working and I’ll make a note for this.

With that one issue fixed, everything about this works as intended!

1 Like