mIRC Home    About    Download    Register    News    Help

Print Thread
#191508 10/12/07 04:25 PM
Joined: Oct 2007
Posts: 102
B
bcancer Offline OP
Vogon poet
OP Offline
Vogon poet
B
Joined: Oct 2007
Posts: 102
This code is supose to pull the bad channel the user is on and send him a private notice telling him what bad channel he is on but its not working.
Code:

;on !*:JOIN:#: whois $nick
raw 319:*: {
  if (#laplapan isin $3-) || (#classmate isin $3-) || (#skul isin $3-) {
    var %t = $comchan($2,0)
    while (%t) {
      if ($me isop $comchan($2,%t)) {
        ban -u600 $comchan($2,%t) $2 2
        kick $comchan($2,%t) $2 11 Spam Channel - 10 Minute Ban
        ;  msg  $2 11,1 The channel 0,4 $3 11,1 has been mass advertising on other channels. You may enter Chat in 10 minutes when the ban is lifted providing you are no longer on 0,4  $3-
      }
      dec %t
    }
  }
}
 

Last edited by bcancer; 10/12/07 04:28 PM.
bcancer #191515 10/12/07 08:25 PM
Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
Well im not sure if you know that the msg is commented out

; msg is commented

also else then that all i can say is that you can also use if ($comchan($2,%t).op == $true) in your op check but else then that the script is ok


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
Lpfix5 #191529 10/12/07 11:17 PM
Joined: Oct 2007
Posts: 102
B
bcancer Offline OP
Vogon poet
OP Offline
Vogon poet
B
Joined: Oct 2007
Posts: 102
Is this ok?

Code:
;on !*:JOIN:#: whois $nick
raw 319:*: {
  if (#laplapan isin $3-) || (#classmate isin $3-) || (#skul isin $3-) {
    var %t = $comchan($2,0)
    while (%t) {
      if ($me isop $comchan($2,%t)) {
        ban -u600 $comchan($2,%t) $2 2
        kick if ($comchan($2,%t).op == $true) $2 11 Spam Channel - 10 Minute Ban
        /msg  $2 11,1 The channel 0,4 $3 11,1 has been mass advertising on other channels. You may enter Chat in 10 minutes when the ban is lifted providing you are no longer on 0,4  $3-
      }
      dec %t
    }
  }
}
 

bcancer #191555 11/12/07 03:34 PM
Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
/ is not needed

msg ... will do

but also your on join is commented out so it wont whois (This sux if your on a server life efnet in a popular channel...

But anyhoo its you

besides try it smile


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
Lpfix5 #191569 11/12/07 09:14 PM
Joined: Oct 2007
Posts: 102
B
bcancer Offline OP
Vogon poet
OP Offline
Vogon poet
B
Joined: Oct 2007
Posts: 102
Its working fine accept that its showing all the channels hes on but its supose to show only the ban channel :P

bcancer #191578 12/12/07 03:39 AM
Joined: May 2007
Posts: 89
T
Babel fish
Offline
Babel fish
T
Joined: May 2007
Posts: 89
It only shows all channels in fact, but it correctly reacts on one of those 3 channels at the top. You shouldn't put $3- in the msg you send to the user but rather the channel name the user was detected on.

And also, the line
Code:
kick if ($comchan($2,%t).op == $true) $2 11 Spam Channel - 10 Minute Ban

is incorrect. You can't put an if in the middle of another line ... except if you use $iif. You already verify if you're oped on the $comchan with
Code:
if ($me isop %c') {

So rechecking before kicking is not necessary.

Here's what I'm talking about.

Code:
;on !*:JOIN:#: whois $nick
raw 319:*: {
  if (#laplapan isin $3-) || (#classmate isin $3-) || (#skul isin $3-) {
    Var %c = $v1 , %t = $comchan($2,0)
    while (%t) {
      Var %c' = $comchan($2,%t)
      if ($me isop %c') {
        ban -u600 %c' $2 2
        kick %c' $2 Spam Channel - 10 Minute Ban
        msg $2 The channel %c has been mass advertising on other channels. You may enter Chat in 10 minutes when the ban is lifted providing you are no longer on %c
      }
      dec %t
    }
  }
}


Cordialement


tropnul
TropNul #191592 12/12/07 03:29 PM
Joined: Oct 2007
Posts: 102
B
bcancer Offline OP
Vogon poet
OP Offline
Vogon poet
B
Joined: Oct 2007
Posts: 102
ok thx :P


Link Copied to Clipboard