|
Joined: Jan 2004
Posts: 20
Ameglian cow
|
OP
Ameglian cow
Joined: Jan 2004
Posts: 20 |
We have a problem with people doing takeovers on our channel. We are protected in any possible scripting way, but the human possibility of making a fault still stands. Most of the takeovers are done by pwople from one single takeover clan, with their own channel.
Therefore i wondered if a script could be fed to my bot, making it check if every joiner is in a forbidden channel, specified by me, and if they are, then kick and ban them immediatly?
|
|
|
|
Joined: Sep 2003
Posts: 584
Fjord artisan
|
Fjord artisan
Joined: Sep 2003
Posts: 584 |
that wouldn't help if they set +s (secert) or +p (private) mode for channel, so it will be invisible on whois list and therefore your bot/script could not be able to check it...
|
|
|
|
Joined: Jan 2003
Posts: 3,012
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 3,012 |
on !*:JOIN:#: /whois $nick
raw 319:*[color:Red]#Channel_name[/color]*: /kick [color:blue]#your_channel[/color] $1 User is in takeover channel
-KingTomato
|
|
|
|
Joined: Jan 2004
Posts: 20
Ameglian cow
|
OP
Ameglian cow
Joined: Jan 2004
Posts: 20 |
Hmm, it doesn't seem to work.
on *:JOIN:#ffj: /whois $nickraw 319:*#LivingLegends*: /kick #ffj $1 Livinglegends not wanted here, we don't need takeovers!
Isn't that correct?
|
|
|
|
Joined: Oct 2003
Posts: 273
Fjord artisan
|
Fjord artisan
Joined: Oct 2003
Posts: 273 |
on !*:JOIN:#ffj:/whois $nick
raw 319:*#LivingLegends*:/kick #ffj $2 Livinglegends not wanted here, we don't need takeovers!
It's two lines
Last edited by EVH; 04/01/04 04:26 PM.
|
|
|
|
Joined: Jan 2004
Posts: 20
Ameglian cow
|
OP
Ameglian cow
Joined: Jan 2004
Posts: 20 |
That's a lot better, except for one thing, the bot trys to ban itself, instead of the joiner? :S
|
|
|
|
Joined: Oct 2003
Posts: 273
Fjord artisan
|
Fjord artisan
Joined: Oct 2003
Posts: 273 |
heh oops change the $1 to $2
|
|
|
|
Joined: Jan 2004
Posts: 20
Ameglian cow
|
OP
Ameglian cow
Joined: Jan 2004
Posts: 20 |
Nice, can i specify more than one channel it checks for, or du i just use the code again and again?
|
|
|
|
Joined: Jan 2003
Posts: 3,012
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 3,012 |
on !*:JOIN:#: /whois $nick
raw 319:*: {
; Add the channel names here, seperated by a comma
var %badchans = [color:red]#channel1,#channel2,#channel3[/color]
; code
var %a = 0
while ($gettok(%badchans, %a, 44)) {
if ($ifmatch isin $3-) /kick [color:blue]#your_channel[/color] $2 User is in takeover channel
/inc %a
}
}
Copy it into wordpad first (Start>>run "wordpad") then copy it from wordpad into mirc. That wayy it keeps it formatting >:P
-KingTomato
|
|
|
|
Joined: Apr 2003
Posts: 426
Fjord artisan
|
Fjord artisan
Joined: Apr 2003
Posts: 426 |
You will need to be careful with all the posted solutions, as in the event of a join flood, you could be k-lined or g-lined from the server/network for flooding.
-------- mIRC - fun for all the family (except grandma and grandpa)
|
|
|
|
Joined: Jan 2003
Posts: 3,012
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 3,012 |
good point. Maybe you should try replacing that on join wiht this one:
on !*:JOIN:#: { /inc -u3 %whois.delay 3 .timer 1 %whois.delay /whois $nick }
-KingTomato
|
|
|
|
Joined: Nov 2003
Posts: 6
Nutrimatic drinks dispenser
|
Nutrimatic drinks dispenser
Joined: Nov 2003
Posts: 6 |
Isn't if $istok( %badchans , $ifmatch , 44) /kick #your_channel $2 User is in takeover channel easier than var %a = 0
while ($gettok(%badchans, %a, 44)) {
if ($ifmatch isin $3-) /kick #your_channel $2 User is in takeover channel
/inc %a
?
while ( 0 = 0 ) { echo 4 IRC is cancer for You! Type /exit !!! }
|
|
|
|
Joined: Jan 2003
Posts: 3,012
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 3,012 |
Won't work. Some channels have prefixes for voice, op, halfop, admin, protected, etc etc. Ex: A typical list could look like
var %chan = +#somechan ^#anotherchan #channel *#channel4
if ($istok(%chans, $Somechan, 32)) { /echo -a Won't Work }
-KingTomato
|
|
|
|
Joined: Jan 2004
Posts: 20
Ameglian cow
|
OP
Ameglian cow
Joined: Jan 2004
Posts: 20 |
I'll try al your solutions in time. Thanks alto for being so helpfull guys, i appreciate it!
/popsy
|
|
|
|
Joined: Feb 2003
Posts: 810
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 810 |
var %chans = +#somechan ^#anotherchan #channel *#channel4 if ($wildtok(%chans,* $+ <#channel>,1,32)) { works }
* cold edits his posts 24/7
|
|
|
|
|