mIRC Homepage
Posted By: Deep3D On join - 09/12/02 04:26 PM
Hi, i don't get it. it don't work..

on 1:join:#: {
if ($nick ison #channel) {
/ban $chan $nick
/kick $nick $chan and out you go!
}
else {
/halt
}
}
Posted By: wshs Re: On join - 09/12/02 04:29 PM
For ison to work, you'd need to be on the channel. If not, you'll have to work with a whois reply via numerics and the raw prefix.
Posted By: Deep3D Re: On join - 09/12/02 04:34 PM
hem, but how to do that?! confused
Posted By: chanserv Re: On join - 09/12/02 04:43 PM
What are you trying to do?
Posted By: Merlin Re: On join - 09/12/02 04:59 PM
Line 1: The ON @1 triggers only if you are operator in your channel.
Line 2: $chan hold the channel name the event occurs
Line 3:Also i suggest to ban the address instead of only the nick
Line 3+4: The / is not needed in an event.
Code:
ON @1:join:#YourChannel: {
  IF ($nick ison $chan) {
    ban $chan $address($nick,3)
   kick $nick $chan and out you go!
  }
}
Posted By: Deep3D Re: On join - 09/12/02 05:08 PM
hm.. ok.. if you say so..
Posted By: wshs Re: On join - 09/12/02 05:09 PM
You'll need something to queue this, so you don't get flooded off. I won't include my queue script, though.
Code:
on 1:JOIN:#:whois $nick
raw 319:*#*:{
  var %chans = $3- , %i = 0
  while (%i < $numtok(%chans,32)) {
    inc %i
    if ($gettok(%chans,%i,32) == #badchan) && $comchan($2,0)) {
      ;cycle through your chans through $comchan, and ban them
    }
  }
}
Posted By: Deep3D Re: On join - 09/12/02 05:12 PM
What im trying to do is:

If a person from, lets say the channel #test. Joins my channel, and i don't want any people from "#test" to be at my channel. Then they get kick/banned.. Sorry for my bad english.. wink
Posted By: Deep3D Re: On join - 09/12/02 05:13 PM
ohh thanks dude.. smile
Posted By: zack Re: On join - 09/12/02 10:55 PM
Using if ($nick ison $chan) is quite useless since s/he joined s/he must be in the channel smirk
Posted By: FunChatter Re: On join - 11/12/02 08:32 PM
well, the first explain wasn't verry clear also.. smirk
Posted By: wyx Try this if you want ............ - 12/12/02 02:10 AM
on @1:JOIN:#: if ($nick ison #test) {
/kick $chan $nick Get Out From Here
/ban $chan $nick 9
}

^^^^^^^^^^^^^^ it will be kban nick who online on channel #test, but you must idle on channel #test and you must have operator type @ kick that nick
Posted By: Deep3D Re: Try this if you want ............ - 14/12/02 11:06 AM
Yeah, it works. But I have to be in the channel #test, or else it’s not working...

I need, if I am in channel #1, and a nick from #2 joins... Then kick the nick from chan #2... And am not in chan #2.. How to get it work!?
Posted By: Hammer Re: Try this if you want ............ - 14/12/02 02:32 PM
Code:
;
on @*:JOIN:#: .raw WHOIS $nick
;
raw 319:*:{
  ;
  ; An easy way to set up a kick message in an easy spot to change it. Just to make the message easier to read, I have 
  ; set it across three lines. Yours might not be as long.
  var %KickMessage
  ;
  %KickMessage = :I have the right to decide which channels you may join. You may not be on $gettok($3-,%i,32) while I have
  %KickMessage = %KickMessage anything to say about it. Furthermore, if I should join a channel where you are opped, I will
  %KickMessage = %KickMessage take offense if you check my channels and find one that is disagreeable to your personal 
  %KickMessage = %KickMessage beliefs and kick me as a result, as your beliefs do not pertain to me.
  ;
  var %BadChannels = #Chan2 #Chan3 #Chan4  | ; The list of channels we feel, in our inestimable wisdom, people should not be in
  var %i = 1                               | ; Loop index through the visible channels in 319
  var %j = $comchan($2,0)                  | ; The number of common channels shared with $2 ($nick)
  ;
  ; While there are more channels to check for their evilness...
  while ($gettok($3-,%i,32)) {
    ;
    ; If we find a channel that we feel they shouldn't be on...
    if ($istok(%BadChannels,$ifmatch,32)) {
      ;
      ; Then while there are more common channels I share with $2 ($nick)...
      while (%j) {
        ;
        ; If I'm opped in this channel, then kickban him with my haughty kick message in one data packet.
        if ($comchan($2,%j).op) .raw mode $comchan($2,%j) +b $address($2,2) $+ $crlf $+ kick $comchan($2,%j) $2 %KickMessage
        ;
        ; Back up to the previous common channel
        dec %j
      }
      ;
      ; Since we have removed this evil person from all the channels we can, there is no need to continue looking to see if 
      ; they match anymore appalling channels.
      break
    }
    ;
    ; Otherswise, try to go to the next channel and check it for foulness.
    inc %i
  }
}
<rant seeing=red>

If you don't want to see the horrid channels I'm in, don't look. You are not my keeper, nor my judge; you're not even my Mom. I'm quite sure you probably have some beliefs that I would find offensive, but I also believe in your right to have those beliefs, however I feel personally about them. I'm also pretty sure I believe in some things which will probably offend you. Who are you to tell me or anyone else what channels are acceptable and which channels I may not frequent? If you are God, then I will listen; last time I checked, God didn't need to talk to people using IRC directly and, to date, no one has let me know of anyone providing Internet service for the hosts of Heaven, so God is probably not on IRC, typing messages to me.

</rant>
Posted By: Deep3D Re: Try this if you want ............ - 14/12/02 09:53 PM
wee, thanks man. smile really nice of you.. smirk
© mIRC Discussion Forums