mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jun 2005
Posts: 1
A
Mostly harmless
OP Offline
Mostly harmless
A
Joined: Jun 2005
Posts: 1
hello all, can any 1 tell me the exact codes for blacklisted or bad channel detector or kicker addon ? the addon should have triggers for the channels like if i dont want to use that addon in any channel then the addon shouldnt work in that specific channel but will work in other channels where i m on.. if any 1 can code that plz notify me.. thanx in advance smile

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Here's the code I use:
Usage: /alias channel nick

Code:
alias checknick { 
  if ($2 ison $1) { 
    .enable #chk.rooms 
    set -u5 $+(%,rchan,.,$2) $1 
    whois $2 
  } 
} 
on *:text:!addchan*:*:{
var %a = 1
while %a <= $numtok($2-,32) {
.write -s $+ $gettok($2-,%a,32) badchans.txt $gettok($2-,%a,32)
inc %a
}
}

#chk.rooms off
raw 301:*: halt 
raw 311:*: halt 
raw 313:*: halt 
raw 312:*: halt 
raw 330:*: halt 
raw 319:*: { 
  haltdef 
  var %o = $($+(%,rchan,.,$2),2) 
  if ($numtok($3-,32) > 5) { 
    if (!$($+(%,rchan,.,$2,.,mchans),2)) { 
      .msg %o $2 $+ : Maximum 5 channels/rooms including this one
      set $+(%,rchan,.,$2,.,mchans) 1 
      $+(.,timerrchan,.,$2) 1 60 checknick %o $2 
    } 
    else { 
      if ($me isop %o) && ($2 ison %o) { 
        ban -ku180 %o $2 2 You have been warned (Too many channels) 
        unset $+(%,rchan,.,$2,.,mchans) 
        goto end 
      } 
    } 
  } 
  var %n = 1 
  while %n <= $lines(badchans.txt) { 
    var %m = $read(badchans.txt,%n) 
    if (%m isin $3-) { 
      if (!$($+(%,rchan,.,$2,.,bchans),2)) { 
        .msg %o $2 $+ : Bad Channel Detected! $+([,,%m,,]) Please part that channel to remain in this room. 
        set $+(%,rchan,.,$2,.,bchans) 1 
        $+(.,timerrchan,.,$2) 1 60 checknick %o $2 
        goto end 
      } 
      else { 
        if ($me isop %o) && ($2 ison %o) { 
          ban -ku180 %o $2 2 You have been warned (Bad Channel Detected!) 
          unset $+(%,rchan,.,$2,.,bchans) 
          goto end    
        } 
      } 
    } 
    inc %n 
  } 
  :end 
} 
raw 318:*: .disable #chk.rooms | halt 
#chk.rooms end 
  


Link Copied to Clipboard