Creating temporary link permission system in mIRC for Twitch chat moderation

I’m trying to build a moderator command system for my Twitch channel using mIRC scripting. I need help creating two specific commands:

First command: A temporary allow command that gives a specific user permission to share links for exactly 20 seconds. After that time expires, they should go back to normal restrictions.

Second command: A permanent whitelist command that adds users to a list where they can always share links without getting timed out.

Right now I’m really struggling with the scripting part. I’m pretty new to mSL and could use some guidance.

Here’s my basic attempt so far:

on *:TEXT:!allow *:#: {
  if (($nick isop #channel)) 
  { msg # User $+ $2 can now share links for 20 seconds }
}

This only sends a message but doesn’t actually track the permission or set any timers. How can I make this work properly with actual link detection and timeout functionality?

you’ll need variables to track users and timers. use %tempallow. $+ $2 to store the nick, then .timerallow $+ $2 1 20 unset %tempallow. $+ $2 for the 20-second timer. for link detection, add on *:TEXT:*:#: { if (!$var(%tempallow. $+ $nick)) { // check for links here } - that’s the basic structure.

Your script’s missing two key things: link detection and proper variable handling. When someone uses !allow, set a tracking variable like set %linkallow. $+ $2 $ctime and add timer $+ $2 1 20 /unset %linkallow. $+ $2 to auto-clear it. For blocking links, create a TEXT event with if ((*://* iswm $1-) && (!$var(%linkallow. $+ $nick)) && (!$var(%whitelist. $+ $nick))) { /timeout $nick 600 } - this catches http/https links and times out users who don’t have temp or permanent permissions. Include the username in your timer names or multiple allows will mess with each other.

Your main issue is you’re missing the timer implementation and link detection logic. For temp allows, after setting your variable you need a named timer like timer $+ tempallow $+ $2 1 20 unset %tempallow. $+ $2 - this automatically removes the permission after 20 seconds. For permanent whitelist just use a different variable prefix like %whitelist. with no timer.

For link detection, add pattern matching to your TEXT event: if (*http* iswm $1- || *www.* iswm $1-) catches most common link patterns. Check if the user has temp or permanent permission before taking action.

Test the timer functionality first - that’s where most people get stuck with mSL.