Jump to content
chain

Silence script using .ini's for multi chan's.

Recommended Posts

  • Administrators
alias sil {
  if ($me isop $chan) || ($me ishop $chan) {
    if (!$1) || (!$2) { echo -at * Error: Incorrect syntax used, /sil <nick> <timer in minutes> }
    elseif ($1) || ($2) {
      mode $chan +bb ~q: $+ $address($1,2) ~n: $+ $address($1,2)
      writeini Silence.ini $$1 chan $active
      if ($$1 ishop $active) { writeini Silence.ini $1 status HOP | mode $active -h $1 }
      if ($$1 isvoice $active) { writeini Silence.ini $1 status VOP | mode $active -v $1 }
      $iif($$1 isreg $active,writeini Silence.ini $1 status REG)
      .timer 1 $calc($2 * 60) desil $1 $address($1,2) $chan
    }
  }
}

on *:JOIN:#: {
  if ($ini(Silence.ini,$nick,chan)) {
    if ($readini(Silence.ini,$nick,status) == HOP) {
      mode $chan -h $nick
    }
    elseif ($readini(Silence.ini,$nick,status) == VOP) {
      mode $chan -v $nick
    }
  }
}

alias -l desil {
  if ($1 ison $3) {
    if ($readini(Silence.ini,$1,status) == HOP) { mode $$3 +h $1 | remini Silence.ini $1 }
    if ($readini(Silence.ini,$1,status) == VOP) { mode $$3 +v $1 | remini Silence.ini $1 }
    mode $3 -bb ~q: $+ $2 ~n: $+ $2
  }
  elseif ($1 !ison $3) { mode $3 -bb ~q: $+ $2 ~n: $+ $2 | remini Silence.ini $1 }
}

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...