mIRC Homepage
Posted By: databgrlz Need Script - 08/08/06 06:58 PM
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
Posted By: RusselB Re: Need Script - 08/08/06 10:50 PM
How often should this check be made?
Posted By: Rand Re: Need Script - 09/08/06 01:04 AM
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.
Posted By: databgrlz Re: Need Script - 09/08/06 10:12 AM
Quote:
How often should this check be made?

It should only check every user that joins the channel. Not already joined users;)
Posted By: KingTomato Re: Need Script - 09/08/06 07:59 PM
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
  }
}
Posted By: databgrlz Help - 09/08/06 09:53 PM
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
© mIRC Discussion Forums