mIRC Home    About    Download    Register    News    Help

Print Thread
On join #621 09/12/02 04:26 PM
Joined: Dec 2002
Posts: 477
Deep3D Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Dec 2002
Posts: 477
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
}
}

Re: On join #622 09/12/02 04:29 PM
Joined: Dec 2002
Posts: 56
W
wshs Offline
Babel fish
Offline
Babel fish
W
Joined: Dec 2002
Posts: 56
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.


Acquire. Analyze. Adapt.
Re: On join #623 09/12/02 04:34 PM
Joined: Dec 2002
Posts: 477
Deep3D Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Dec 2002
Posts: 477
hem, but how to do that?! confused

Re: On join #624 09/12/02 04:43 PM
Joined: Dec 2002
Posts: 14
chanserv Offline
Pikka bird
Offline
Pikka bird
Joined: Dec 2002
Posts: 14
What are you trying to do?

Re: On join #625 09/12/02 04:59 PM
Joined: Dec 2002
Posts: 164
M
Merlin Offline
Vogon poet
Offline
Vogon poet
M
Joined: Dec 2002
Posts: 164
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!
  }
}


DALnet: #HelpDesk, #mIRC, #MISHScript - Undernet: #mIRC, #mIRC-Scripts
Re: On join #626 09/12/02 05:08 PM
Joined: Dec 2002
Posts: 477
Deep3D Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Dec 2002
Posts: 477
hm.. ok.. if you say so..

Re: On join #627 09/12/02 05:09 PM
Joined: Dec 2002
Posts: 56
W
wshs Offline
Babel fish
Offline
Babel fish
W
Joined: Dec 2002
Posts: 56
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
    }
  }
}


Acquire. Analyze. Adapt.
Re: On join #628 09/12/02 05:12 PM
Joined: Dec 2002
Posts: 477
Deep3D Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Dec 2002
Posts: 477
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

Re: On join #629 09/12/02 05:13 PM
Joined: Dec 2002
Posts: 477
Deep3D Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Dec 2002
Posts: 477
ohh thanks dude.. smile

Re: On join #630 09/12/02 10:55 PM
Joined: Dec 2002
Posts: 266
Z
zack Offline
Fjord artisan
Offline
Fjord artisan
Z
Joined: Dec 2002
Posts: 266
Using if ($nick ison $chan) is quite useless since s/he joined s/he must be in the channel smirk


You won't like it when I get angry.
Re: On join #631 11/12/02 08:32 PM
Joined: Dec 2002
Posts: 339
F
FunChatter Offline
Fjord artisan
Offline
Fjord artisan
F
Joined: Dec 2002
Posts: 339
well, the first explain wasn't verry clear also.. smirk

Try this if you want ............ #632 12/12/02 02:10 AM
Joined: Dec 2002
Posts: 75
wyx Offline
Babel fish
Offline
Babel fish
Joined: Dec 2002
Posts: 75
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


-= Win 95 Virusses =-
-= Try To Infecting Virus =-
Re: Try this if you want ............ #633 14/12/02 11:06 AM
Joined: Dec 2002
Posts: 477
Deep3D Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Dec 2002
Posts: 477
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!?

Re: Try this if you want ............ #634 14/12/02 02:32 PM
Joined: Dec 2002
Posts: 1,321
H
Hammer Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
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>


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
Re: Try this if you want ............ #635 14/12/02 09:53 PM
Joined: Dec 2002
Posts: 477
Deep3D Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Dec 2002
Posts: 477
wee, thanks man. smile really nice of you.. smirk