mIRC Home    About    Download    Register    News    Help

Print Thread
#155699 08/08/06 06:58 PM
Joined: Aug 2006
Posts: 6
D
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
D
Joined: Aug 2006
Posts: 6
Hi. I'm searching for a script that checks every user in a channel and if the user is in another specified channel, pops up a message or directly kicks/bans the user. Can you help me? blush

#155700 08/08/06 10:50 PM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
How often should this check be made?

#155701 09/08/06 01:04 AM
Joined: Feb 2005
Posts: 342
R
Fjord artisan
Offline
Fjord artisan
R
Joined: Feb 2005
Posts: 342
I really dislike scripts like this. No, they are not hard to write at all, however...

You have to whois each and every nick in the channel to figure out which channel they are on. This puts strain on the server. You might only be sending one or more commands, but the server is sending you back many more lines per each nick you whois.

#155702 09/08/06 10:12 AM
Joined: Aug 2006
Posts: 6
D
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
D
Joined: Aug 2006
Posts: 6
Quote:
How often should this check be made?

It should only check every user that joins the channel. Not already joined users;)

#155703 09/08/06 07:59 PM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
Here's a modification to a script I made in this post. Should do as requested.

Code:
on @*:JOIN:#: {
  .whois $nick
}
raw 319:*: {
  [color:blue]; List of channels unaccepted, seperated by a space[/color]
  var %bad_channels = #bad_chan1 #bad_chan2 #bad_chan3

  var %nick = $2, %c = 1
  if ($1 == $2) return

  while ($gettok($3-,%c,32)) {
    var %chan = $v1
    .echo -q $regex(%chan,/^.*(\x23.*)$/)
    var %chan = $regml(1)
    if ($istok(%bad_channels,%chan,32)) {
      var %c = $comchan(%nick,0)
      while (%c > 0) {
        if ($comchan(%nick,%c).op) /ban -ku300 $comchan(%nick,%c) %nick 2 Kicked for bad channel
        /dec %c
      }
      /break
    }
    /inc %c
  }
}


-KingTomato
#155704 09/08/06 09:53 PM
Joined: Aug 2006
Posts: 6
D
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
D
Joined: Aug 2006
Posts: 6
I 've got this code:
Code:
 on @*:JOIN:#: {
  .enable #badchannels
  .whois $nick
}
#badchannels off
raw 319:*: {
  var %bad_channels = #cska

  var %nick = $2, %c = 1
  if ($1 == $2) return

  while ($gettok($3-,%c,32)) {
    var %chan = $v1
    .echo -q $regex(%chan,/^.*(\x23.*)$/)
    var %chan = $regml(1)
    if ($istok(%bad_channels,%chan,32)) {
      var %c = $comchan(%nick,0)
      while (%c > 0) {
        if ($comchan(%nick,%c).op) /ban -ku300 $comchan(%nick,%c) %nick 2 Pig Found %nick
        /dec %c
      }
      /break
    }
    /inc %c
  }
}
raw *:*: {
  if ($numeric == 318) .disable #badchannels
  if ($istok(307 310 311 312 313 316 317 319 320 330 335 338 378 379 401,$numeric,32)) /haltdef
}
#badchannels end
 

Can you Tell me how to hide every whois that 's been made. I don't want to see the whois of every checked user! Thanks grin


Link Copied to Clipboard