mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Nov 2003
Posts: 102
T
Vogon poet
OP Offline
Vogon poet
T
Joined: Nov 2003
Posts: 102
I am a owner of a small channel and im in great need of a small script that will just do a /whois on users as they join my #channel and then kick them along with sending them a small msg if the results of the /whois says they are in a certain #channel.

I have looked for 2 weeks now for anything that will do this and while the channel enforcer on the Invision script sounded good i have not been able to get it to work.
Please respond if you can help me at all
thanks
ToRmEnTeD


Rock and Metal Music videos ON DEMAND!
<<<<<< http://www.tormented.tv >>>>>>
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Added a few things that you didn't ask for, but thought you would like in any case.
You didn't specify if this was to be used on a bot or not your own client, so I tried to code for either possibility.
NOTE: This code may fail if two or more people enter the channel quickly. I was not able to think of a way to accommodate that situation.
Code:
menu * {
  Bad Channel
  .Add : bad_chan add $$?="Enter names of bad channels to add. Comma or space separated"
  .Remove : bad_chan del $$?="Enter names of bad channels to remove. Comma or space separated"
  .List : .play $me badchan.txt
}
alias -l bad_chan {
  var %a = 1, %b = $replace($2-,$chr(44),$chr(32)), %c = $numtok(%b,32)
  while %a <= %b {
    if $1 == add {
      if !$read(badchan.txt,n,$gettok(%b,%a,32)) {
        .write badchan.txt $gettok(%b,%a,32)
      }
    }
    elseif $1 == del {
      if $read(badchan.txt,n,$gettok(%b,%a,32)) {
        .write -dl $+ $readn badchan.txt
      }
    }
    inc %a
  }
}
on *:text:!*chan*:*:{
  if $nick == Tormented {
    if $1 == !listchan {
      .play $nick badchan.txt
    }
    else {
      bad_chan $iif($1 == !addchan,add,del) $$2-
    }
  }
}
on @*:join:#:{
  set %join.chan $chan
  .enable #chan_check
  .whois $nick
}
#chan_check off
raw 318:*:{
  .disable #chan_check
  halt
}
raw 311:*:{
  var %a = 1, %b = $numtok($3-,32)
  while %a <= %b {
    var %check_chan = $+($chr(35),$gettok($gettok($3-,%a,32),-1,35))
    if ($2 ison %join.chan) && $read(badchan.txt,n,%check_chan) {
      ban -ku60 %join.chan $2 Bad channel %check_chan detected
    }
    inc %a
  }
}
#chan_check end


Link Copied to Clipboard