|
Joined: Apr 2003
Posts: 5
Nutrimatic drinks dispenser
|
OP
Nutrimatic drinks dispenser
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  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
|
|
|
|
Joined: Dec 2002
Posts: 774
Hoopy frood
|
Hoopy frood
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.
|
|
|
|
Joined: Dec 2002
Posts: 334
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 334 |
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.
|
|
|
|
Joined: Jan 2003
Posts: 96
Babel fish
|
Babel fish
Joined: Jan 2003
Posts: 96 |
Auto voice is easy, use search next time 
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)
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:
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] }
}
}
|
|
|
|
Joined: Dec 2002
Posts: 1,518
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,518 |
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
|
|
|
|
Joined: Dec 2002
Posts: 698
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 698 |
No need to do that either, # works the same as $chan.
|
|
|
|
Joined: Jan 2003
Posts: 2,973
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 2,973 |
aaaand @<level>:<event> works the same as if ($me isop $chan) { >:D
|
|
|
|
Joined: Dec 2002
Posts: 698
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 698 |
Yes I am aware of that.
|
|
|
|
Joined: Dec 2002
Posts: 1,518
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,518 |
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
|
|
|
|
Joined: Feb 2003
Posts: 76
Babel fish
|
Babel fish
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:
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.
Last edited by gerdigos; 23/04/03 09:05 PM.
|
|
|
|
Joined: Dec 2002
Posts: 698
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 698 |
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  +++++++++ 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.
|
|
|
|
Joined: Apr 2003
Posts: 5
Nutrimatic drinks dispenser
|
OP
Nutrimatic drinks dispenser
Joined: Apr 2003
Posts: 5 |
Thanks for your help, guys!! Most appreciated!  greets!
|
|
|
|
Joined: Dec 2002
Posts: 698
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 698 |
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.
|
|
|
|
|