mIRC Home    About    Download    Register    News    Help

Print Thread
autovoice and autokick? #20543 23/04/03 12:42 PM
Joined: Apr 2003
Posts: 5
C
christiansen Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
C
Joined: Apr 2003
Posts: 5
Hey,

are there any autovoice-scripts or information available where I can get one and how they work?

And I also need sth like a autokick-script, however you call it smile

e.g.
Someone whos on a "forbidden channel" (Gay, Teen ect.) should be kicked automatically if he attempts
to enter my channel, best with a kick-msg like "Your stay at #XXX is not tolerated here" or something like that...

I would be delighted to if someone could help me...thanks!

greets
Thomas Christiansen


Re: autovoice and autokick? #20544 23/04/03 12:57 PM
Joined: Dec 2002
Posts: 774
T
theRat Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 774
1) /help autovoice-list

2) For the autokick thing you'd have to whois every user joining your channel, to get the list of the channels they're on(/help on join), then capture the raw event and look for not wanted channels(/help raw events), but if many ppl joins your channel you get flooded off.


Code:
//if ( khaled isgod ) echo yes | else echo no
Re: autovoice and autokick? #20545 23/04/03 04:29 PM
Joined: Dec 2002
Posts: 339
F
FunChatter Offline
Fjord artisan
Offline
Fjord artisan
F
Joined: Dec 2002
Posts: 339
1)For an autovoice script you can either do what theRat told
you either make one yourself...

You will need:
/help on join
/help levels
you must know how to set a mode...right? mode # +v $nick

2) For the Ban channels kicker you asked check out this...

Hope you found what you needed. smile

Re: autovoice and autokick? #20546 23/04/03 06:01 PM
Joined: Jan 2003
Posts: 96
J
Jesper Offline
Babel fish
Offline
Babel fish
J
Joined: Jan 2003
Posts: 96
Auto voice is easy, use search next time wink

Code:
on 1:JOIN:#:{
  if ($me isop #) {
    if (%Voice.Count == $null) { inc %Voice.Count 1 | mode # +v $nick }
    if (%Voice.Count < 5) { inc %Voice.Count 1 | mode # +v $nick }
    set -u5 %Voice.Count %Voice.Count
  }
} 
Tested and works!Replace "if ($me isop #) {" with " if ($me isop #your channel) {"

Autokick: first you need to create an badnicks.ini file, like this:
filename=badnicks.ini
line 1 = [kicknick]
line 2 = whore
line3 = gayman
line4 = etc etc
(this will only work this way)
Code:
on 1:JOIN:#:{
  if ($me isop #) {
    if ($nick isin $readini(badnicks.ini,kicknick) { ban #channel $nick | kick #channel $nick [reason] }
  } 
} 
should work, if $nick event works here.
Combined:
Code:
on 1:JOIN:#:{
  if ($me isop #) {
    if (%Voice.Count == $null) { inc %Voice.Count 1 | mode # +v $nick }
    if (%Voice.Count < 5) { inc %Voice.Count 1 | mode # +v $nick }
    set -u5 %Voice.Count %Voice.Count
    if ($nick isin $readini(badnicks,kicknick) { ban #channel $nick | kick #channel $nick [reason]  }
  }
}

Re: autovoice and autokick? #20547 23/04/03 07:07 PM
Joined: Dec 2002
Posts: 1,527
_
_D3m0n_ Offline
Hoopy frood
Offline
Hoopy frood
_
Joined: Dec 2002
Posts: 1,527
no reason to set it up where u have to replace all the # with the real channel name ..... just change them all to $chan as the events they trigger under recognize $chan as #channame


D3m0nnet.com
Re: autovoice and autokick? #20548 23/04/03 07:17 PM
Joined: Dec 2002
Posts: 699
N
Nimue Offline
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
No need to do that either, # works the same as $chan. smile

Re: autovoice and autokick? #20549 23/04/03 07:18 PM
Joined: Jan 2003
Posts: 3,012
KingTomato Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
aaaand @<level>:<event> works the same as if ($me isop $chan) { >:D


-KingTomato
Re: autovoice and autokick? #20550 23/04/03 07:24 PM
Joined: Dec 2002
Posts: 699
N
Nimue Offline
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
Yes I am aware of that. crazy

Re: autovoice and autokick? #20551 23/04/03 07:26 PM
Joined: Dec 2002
Posts: 1,527
_
_D3m0n_ Offline
Hoopy frood
Offline
Hoopy frood
_
Joined: Dec 2002
Posts: 1,527
true on both accounts ..... just had me wondering tho why someone would instruct someone to change something that really doesnt need changing ..... maybe they would tell someone this with adding the fact the if u only want it to work in one specific channel change # to that channel name..... just hoping that was thier intent and they didnt want to confuse an admitted newbie to scripting


D3m0nnet.com
Re: autovoice and autokick? #20552 23/04/03 09:03 PM
Joined: Feb 2003
Posts: 76
G
gerdigos Offline
Babel fish
Offline
Babel fish
G
Joined: Feb 2003
Posts: 76
Jesper, your code won't work, as you don't have the right format for $readini. Here is a bad channel scanner:
Code:
 
on *:JOIN:#: { 
  if ($me isop #) { 
    var %a = 1
    while ($nick ison $readini(badchans.ini,chans,%a)) { 
      mode # +b $address($nick,2)
      kick # $nick $readini(badchans.ini,chans,kickmsg)
      if (!$readini(badchans.ini,chans,%a)) { return } 
      inc %a
    }
  }
}

Alternate the .ini and kickmsg accordingly. The blacklisted chans sould be added in numbers:
e.g.: (This is correct)
5=#blah
6=#blahblah
7=#blahblahblah
(This is wrong)
5=#blah
125=#blahblah
694345674632456=#blahblahblah

Hope i helped you out. Nice idea btw, although it might seem kind of including racism. smirk

Last edited by gerdigos; 23/04/03 09:05 PM.
Re: autovoice and autokick? #20553 23/04/03 09:37 PM
Joined: Dec 2002
Posts: 699
N
Nimue Offline
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
Well, as you say, that is a BAD channel scanner, though not in the way you meant bad. :tongue:

1. That would require you to be on every channel listed as bad, or you won't know "if ($nick ison <it>)". ("while" is an "if" statement)

2. It also will attempt to ban & kick $nick once for every "bad" channel they are on. Kicking a user more than once will cause errors.

3. $readini is slow, suppose after a netsplit, when 20 users re-join, and there were 10 channels listed as "bad". The script does $readini() 10 times for each nick, 20 x 10 = 200 $readini's. Even worse, it also checks the next channel before returning to the while condition. That makes a total of 20 x 20 x $readini frown

+++++++++
Personal opinion: If you don't like seeing that other users are on certain channels, don't look at the channels they are on. It isn't like you have to avoid this info, it is NOT shown to you by default, you have to actually seek it out.

Re: autovoice and autokick? #20554 23/04/03 10:26 PM
Joined: Apr 2003
Posts: 5
C
christiansen Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
C
Joined: Apr 2003
Posts: 5
Thanks for your help, guys!!

Most appreciated! smile

greets!


Re: autovoice and autokick? #20555 25/04/03 02:27 AM
Joined: Dec 2002
Posts: 699
N
Nimue Offline
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
Looking back on this post, it could be taken as an outright putdown of your scripting, but it wasn't meant that way. I was originally going to offer some ways around the things I pointed out, but then I decided that would be hypocritical considering my views on "bad channel kicks", so I left them out. Without them the post looks a bit nasty, please take it as pointing out where you might have done better, rather than however it may look. smile