Difference between revisions of "Unhide invisible users"

From Scriptwiki
Jump to: navigation, search
(Unhide script)
 
m (grammer fix)
Line 1: Line 1:
Delayed join \ auditorium mode (channel mode +D) in QuakeNet delays the join of users who are not talking or being voiced\opped\kicked. However, when removing +D when there are still hidden users, they will be kept hidden unless speak, leave or get voiced\opped\kicked, with automatically set channel mode +d.
+
Delayed join \ auditorium mode (channel mode +D) in QuakeNet delays the join of users who are not talking or being voiced\opped\kicked. However, when removing +D while there are still hidden users, they will be kept hidden unless speak, leave or get voiced\opped\kicked, with automatically set channel mode +d.
  
 
In order to unhide those users, you can use the script below. The script voices those hidden users and devoices them back to normal.
 
In order to unhide those users, you can use the script below. The script voices those hidden users and devoices them back to normal.

Revision as of 22:16, 19 March 2011

Delayed join \ auditorium mode (channel mode +D) in QuakeNet delays the join of users who are not talking or being voiced\opped\kicked. However, when removing +D while there are still hidden users, they will be kept hidden unless speak, leave or get voiced\opped\kicked, with automatically set channel mode +d.

In order to unhide those users, you can use the script below. The script voices those hidden users and devoices them back to normal.

Note that if you have alot of hidden users, you might want to consider raising the $unhide.int identifier in the script a bit higher, so you won't get excess flooded.

; Unhide invisible users in auditorium mode (+D\+d) snippet by NaNg
; Date: 19-03-2011
; Tested on mIRC 7.19
;
; Finds out all the hidden users, voices them and then devoices them.
; This action "unhides" the invisible users because of QuakeNet's +D channel mode.
;
; Usage:
; * /unhide <channel>
; * /unhide <channel> stop

; The interval in seconds between two unhides.
alias -l unhide.int { return 3 }

alias unhide {
  if (!$1) {
    echo -ag * Insufficient parameters.
    return
  }

  if ($me !isop $1) {
    echo -ag * Error: You are not opped in $1 !
    return
  }

  if ($2 == stop) {
    unset %unhide.*
    .timerunhide.* off
    return
  }

  if (%unhide.chan) {
    echo -ag * Error: You can't unhide two channels at once!
    return
  }

  set %unhide.chan $1
  mode $1 -D
  names -d $1
}

raw 355:*: {
  if (%unhide.chan == $3) {
    tokenize 32 %unhide.left $4-

    while ($7) {
      inc %unhide.count
      .timerunhide.v. $+ %unhide.count 1 $calc(%unhide.count * $unhide.int) mode %unhide.chan $+(+, $str(v, 6)) $1-6
      .timerunhide.d. $+ %unhide.count 1 $calc(%unhide.count * $unhide.int + 1) mode %unhide.chan $+(-, $str(v, 6)) $1-6
      tokenize 32 $7-
    }

    if ($0 > 0) {
      set %unhide.left $1-
    }
  }
}

raw 366:*: {
  if (%unhide.chan == $2) {
    tokenize 32 %unhide.left
    inc %unhide.count
    .timerunhide.v. $+ %unhide.count 1 $calc(%unhide.count * $unhide.int) mode %unhide.chan $+(+, $str(v, $0)) $1-6
    .timerunhide.d. $+ %unhide.count 1 $calc(%unhide.count * $unhide.int + 1) mode %unhide.chan $+(-, $str(v, $0)) $1-6
    unset %unhide.*
  }
}