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?
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...
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?
on !*:JOIN:#ffj:/whois $nick
raw 319:*#LivingLegends*:/kick #ffj $2 Livinglegends not wanted here, we don't need takeovers!
It's two lines
That's a lot better, except for one thing, the bot trys to ban itself, instead of the joiner? :S
heh oops
change the $1 to $2
Nice, can i specify more than one channel it checks for, or du i just use the code again and again?
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
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.
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
}
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 }
I'll try al your solutions in time. Thanks alto for being so helpfull guys, i appreciate it!
/popsy
var %chans = +#somechan ^#anotherchan #channel *#channel4
if ($wildtok(%chans,* $+ <#channel>,1,32)) { works }