mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Mar 2024
Posts: 5
Y
YoSiTo Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
Y
Joined: Mar 2024
Posts: 5
Hello everyone

I wanted you to help me, I want to kick/ban users from my channel if they are on certain channels, if you could help me I would appreciate it.

And if it was possible to automatically delete that 15 min ban, thank you if you could help me with this remote.

Joined: Jul 2006
Posts: 4,164
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,164
Code
alias isonchannels {
;$isonanychannels(nick,#chan1 #chan2 #chanN)
  var %a 1
  while ($gettok($2,%a,32)) {
    if ($1 ison $v1) return $v2
    inc %a 
  }
  return $false
}
Put that in your remote and then you can do from the editbox //if ($isonanychannels(nick,#chan1 #chan2 #chanN...)) ban -ku900 #yourchan nick [kick reason]
If you wanted to do it automatically when people join your channel you would use the following event in remote:
Code
on !*:join:#yourchannel:if ($isonanychannels($nick,#chan1 #chan2 #chanN...)) ban -ku900 $chan $nick (kicked because you're on channel $v1 $+ )


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Mar 2024
Posts: 5
Y
YoSiTo Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
Y
Joined: Mar 2024
Posts: 5
Thank you very much, I will try it and see how it works and if I wanted it to be when they join

Joined: Jul 2006
Posts: 4,164
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,164
There's a typo in the code, I call the alias as isonanychannels but the name of the alias is defined as 'isonchannels' so you would have to fix that.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel

Link Copied to Clipboard