mIRC Home    About    Download    Register    News    Help

Print Thread
#143149 21/02/06 07:40 PM
Joined: Jan 2006
Posts: 15
B
BatSaly Offline OP
Pikka bird
OP Offline
Pikka bird
B
Joined: Jan 2006
Posts: 15
Hi,
My problem is in that .. I can't create this bad channel detector:

on @!*:join:#: {
whois $nick
raw 319:*: {
if ([censored] isin $3-) || (utopia isin $3-) || (kotro isin $3-) || (aspirex isin $3-) {
ban -u60 $chan $2
kick $chan $2 Bad channel detect!
}
}
}


smirk
And is it some way to get forbidden channels from some list %forbidden
and this protection to be only for protected channels from %protectedchannels, or something like that?
Thanks smile

#143150 21/02/06 08:32 PM
Joined: Feb 2006
Posts: 11
H
Pikka bird
Offline
Pikka bird
H
Joined: Feb 2006
Posts: 11
on @!*:join:#: {
whois $nick
set %kick.chan $chan
}
raw 319:*: {
if ([censored] isin $3-) || (utopia isin $3-) || (kotro isin $3-) || (aspirex isin $3-) {
ban -u60 %kick.chan $2
kick %kick.chan $2 Bad channel detect!
}
}

that should work, u cant put raws inside an event


The more you learn, the less you know...
#143151 22/02/06 12:12 AM
Joined: Apr 2004
Posts: 218
P
Fjord artisan
Offline
Fjord artisan
P
Joined: Apr 2004
Posts: 218
Maybe a little more advance, but clear coding:
Code:
on @!*:join:#: {
  set %kick.chan $chan
  .whois $nick
}

; Set %bad.channels to:
; *#bad.channel.name *#anotherchannelname *#Hitler *#KillClowns
; the *'s are used for wildcards, can also use them for better things like #b*ad*chane*name*XDCC*someword*

raw 319:*:{
  ; $istok is alot better then a lot of "isin" operators.
  ; This will loop thru the channels in %bad.channels comparing each one with
  ; With the channels the user is in. I used $wildtok because I know on some network
  ; show user mode prefixes infront of the chan. (Eg: ~#channel, @#channel, etc.)
  ; There is probably a more efficient way of doing this. =p

  var %x = 1,%y = $gettok(%bad.channels,0,32)
  while (%x <= %y) {
    if ($wildtok($3-,$gettok(%bad.channels,%x,32),0,32) > 0) { 
      ban -u60 %kick.chan $2
      kick %kick.chan $2 Bad channel detect! (60s ban)
    }
    inc %x
  }
}


Live to Dream & Dream for Life
#143152 22/02/06 11:31 PM
Joined: Apr 2005
Posts: 64
V
Babel fish
Offline
Babel fish
V
Joined: Apr 2005
Posts: 64
I just did it with a vipscript:

Code:
raw 319:*:{
  if (%vipcheck) {
    var %vipchan = @/+#badchannel
    if ($istok($3-,%vipchan,32)) { mode %vipopchan +b $address($2,1)
    kick %vipopchan %vipnick You are not welcome here tbh! }
  }
  unset %vip*
}

on *:join:#chan: {
  set %vipcheck $true
  set %vipopchan $chan
  set %vipnick $nick
  whois $nick
}
  

#143153 22/02/06 11:35 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Code:
on [color:red]@[/color]*:join:#chan: {


I'd put the @ to check whether or not your're an op. I'd also add a check to see if you're an op prior to kicking.

-Andy


Link Copied to Clipboard