mIRC Home    About    Download    Register    News    Help

Print Thread
P
popsy
popsy
P
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?

B
bunar
bunar
B
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: 2,973
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Jan 2003
Posts: 2,973
Code:
on !*:JOIN:#: /whois $nick
raw 319:*[color:Red]#Channel_name[/color]*: /kick [color:blue]#your_channel[/color] $1 User is in takeover channel

P
popsy
popsy
P
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?

E
EVH
EVH
E
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.
P
popsy
popsy
P
That's a lot better, except for one thing, the bot trys to ban itself, instead of the joiner? :S

E
EVH
EVH
E
heh oops
change the $1 to $2

P
popsy
popsy
P
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: 2,973
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Jan 2003
Posts: 2,973
Code:
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

Joined: Apr 2003
Posts: 426
N
Fjord artisan
Offline
Fjord artisan
N
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.


Joined: Jan 2003
Posts: 2,973
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Jan 2003
Posts: 2,973
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
}

Q
Qw_
Qw_
Q
Isn't
Code:
 if $istok( %badchans , $ifmatch , 44) /kick #your_channel $2 User is in takeover channel

easier than
Code:
  var %a = 0
  while ($gettok(%badchans, %a, 44)) {
    if ($ifmatch isin $3-) /kick #your_channel $2 User is in takeover channel
    /inc %a
 

?

Joined: Jan 2003
Posts: 2,973
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Jan 2003
Posts: 2,973
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 }

P
popsy
popsy
P
I'll try al your solutions in time. Thanks alto for being so helpfull guys, i appreciate it!

/popsy

Joined: Feb 2003
Posts: 806
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Feb 2003
Posts: 806
var %chans = +#somechan ^#anotherchan #channel *#channel4
if ($wildtok(%chans,* $+ <#channel>,1,32)) { works }


Link Copied to Clipboard