mIRC Home    About    Download    Register    News    Help

Print Thread
#163296 28/10/06 03:48 PM
G
Garou
Garou
G
on @*:op:#chat:{
if ( %opnick == off ) || ( %opnick == $null ) || ($nick isop #chat) || ($read($scriptdir $+ exempts.op,nw,$opnick)) { return }
if (!$read($scriptdir $+ guardian.op,nw,$opnick)) { mode $chan -o $opnick }
}
on *:nick:{
if ( %opnick == off ) || ( %opnick == $null ) || ($nick isop #chat) { return }
if ($read($scriptdir $+ exempts.op,nw,$newnick)) { return }
var %i = 1
while ($comchan($newnick,%i)) {
if ($me isop $v1) && ($newnick isop $v2) && (!$read($scriptdir $+ guardian.op,nw,$v1)) { mode $comchan($newnick,%i) -o $newnick }
inc %i
}
}

Can I also add full ban with a kick msg on deop?

Last edited by Garou; 28/10/06 03:50 PM.
#163297 28/10/06 04:03 PM
Joined: Jan 2003
Posts: 2,973
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Jan 2003
Posts: 2,973
I'm not sure I understand what you want to happen, but here is one way to take your request:

Code:
on @*:op:#chat:{
  if ( %opnick == off ) || ( %opnick == $null ) || ($nick isop #chat) || ($read($scriptdir $+ exempts.op,nw,$opnick)) { return }
  if (!$read($scriptdir $+ guardian.op,nw,$opnick)) {
    ;mode $chan -o $opnick
    [color:red]mode $chan -o+b $nick $wildsite
    kick $chan $nick You have been kicked for unauthorized op[/color]
  }
}

on *:nick:{
  if ( %opnick == off ) || ( %opnick == $null ) || ($nick isop #chat) { return }
  if ($read($scriptdir $+ exempts.op,nw,$newnick)) { return }
  var %i = 1
  while ($comchan($newnick,%i)) {
    if ($me isop $v1) && ($newnick isop $v2) && (!$read($scriptdir $+ guardian.op,nw,$v1)) {
      ;mode $comchan($newnick,%i) -o $newnick
      [color:red]mode $comchan($newnick,%i) -o+b $newnick $wildsite
      kick $comchan($newnick,%i) $nick You have been kicked for unauthorized op[/color]
    }
    inc %i
  }
} 


I commented out your previous line just incase, and added two more. If you meant to ban when you deop them, this is your solution. If you want a ban on deop (as in the on DEOP event) then I'd have to rewrite this solution.

#163298 28/10/06 04:06 PM
G
Garou
Garou
G
This is perfect thx KingTomato.

#163299 28/10/06 04:24 PM
G
Garou
Garou
G
This kick msg didnt work?

#163300 29/10/06 12:00 AM
G
Garou
Garou
G
The first part of the code red does not ban and the kick msg does not work.
The second part does work but again no kick msg.

Can anyone check what the error is?

#163301 29/10/06 08:38 PM
Joined: Jan 2003
Posts: 2,973
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Jan 2003
Posts: 2,973
I'm sorry, I goofed on the identifiers.

Code:
on @*:op:#chat:{
  if ( %opnick == off ) || ( %opnick == $null ) || ($nick isop #chat) || ($read($scriptdir $+ exempts.op,nw,$opnick)) { return }
  if (!$read($scriptdir $+ guardian.op,nw,$opnick)) {
    ;mode $chan -o $opnick
    mode $chan -o+b $opnick $wildsite
    kick $chan $opnick You have been kicked for unauthorized op
  }
}

on *:nick:{
  if ( %opnick == off ) || ( %opnick == $null ) || ($nick isop #chat) { return }
  if ($read($scriptdir $+ exempts.op,nw,$newnick)) { return }
  var %i = 1
  while ($comchan($newnick,%i)) {
    if ($me isop $v1) && ($newnick isop $v2) && (!$read($scriptdir $+ guardian.op,nw,$v1)) {
      ;mode $comchan($newnick,%i) -o $newnick
      mode $comchan($newnick,%i) -o+b $newnick $wildsite
      kick $comchan($newnick,%i) $newnick You have been kicked for unauthorized op
    }
    inc %i
  }
} 

#163302 30/10/06 01:54 AM
G
Garou
Garou
G
Thx it works fine now.

#163303 30/10/06 04:22 PM
G
Garou
Garou
G
on @*:op:#chat:{
if ( %opnick == off ) || ( %opnick == $null ) || ($nick isop #chat) { return }
if (!$read($scriptdir $+ guardian.op,nw,$opnick)) {
;mode $chan -o $opnick
mode $chan -o+b $opnick $wildsite
kick $chan $opnick 14Your nick does not have op access on this channel
}
}

on *:nick:{
if ( %opnick == off ) || ( %opnick == $null ) || ($nick isop #chat) { return }
if ($read($scriptdir $+ guardian.op,nw,$opnick)) { return }
var %i = 1
while ($comchan($newnick,%i)) {
if ($me isop $v1) && ($newnick isop $v2) && (!$read($scriptdir $+ guardian.op,nw,$v1)) {
;mode $comchan($newnick,%i) -o $newnick
mode $comchan($newnick,%i) -o+b $newnick $wildsite
kick $comchan($newnick,%i) $newnick 14Your nick does not have op access on this channel
}
inc %i
}
}


[11:10] * Mode (ChanServ:#chat +o _a`hay)
[11:10] * Mode (Linuxx:#chat -o+b _a`hay *!*@dal.net)
[11:10] * _a`hay was kicked by Me (Your nick does not have op access on this channel

On op it will deop but bans dalnet instead of the user any ideal why?

Last edited by Garou; 30/10/06 04:39 PM.
#163304 01/11/06 05:07 AM
Joined: Jan 2003
Posts: 2,973
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Jan 2003
Posts: 2,973
Yea, I used $wildsite to ban the user not knowing you're using DAL net. DAL net uses a bogus mask in an effort to keep everyone anonymous. Try replacing $wildsite with this: $address

To further specify a mask, fool around with $address(name,mask) where name is the name of the person, and mask is a numeric value such as 1, 2, 3, etc. Find ne that works using something like: //echo -a $address($me,mask)

Just keep changing mask until you find one you like. Then put this code in your script but use $opnick and $newnick instead of $me.

#163305 01/11/06 01:24 PM
D
deegee
deegee
D
Quote:

[11:10] * Mode (ChanServ:#chat +o _a`hay)
[11:10] * Mode (Linuxx:#chat -o+b _a`hay *!*@dal.net)
[11:10] * _a`hay was kicked by Me (Your nick does not have op access on this channel
...
On op it will deop but bans dalnet instead of the user any ideal why?


ChanServ opped _a`hay
The ban mask matches ChanServ!service@dal.net.

If you don't want the user opped, remove their access from ChanServ.

#163306 01/11/06 10:33 PM
G
Garou
Garou
G
Ya all I did was to add var %i = 1 and I removed $wildsite and its working now :P

if (!$read($scriptdir $+ guardian.op,nw,$opnick)) {
var %i = 1
;mode $chan -o $opnick
mode $chan -o+b $opnick


Link Copied to Clipboard