mIRC Home    About    Download    Register    News    Help

Print Thread
'on nick' fine tuning #88335 27/06/04 08:45 AM
Joined: Jan 2004
Posts: 46
F
filedumphere Offline OP
Ameglian cow
OP Offline
Ameglian cow
F
Joined: Jan 2004
Posts: 46
okay, I am using this script, which does work:
Code:
 
;on *:NICK:  {
if (badword isin $newnick) {
  var %i = 0
  while (%i < $comchan($newnick,0)) { 
    ;This while loop goes through every channel both you and the nick are on
    inc %i 
    if ($me isop $comchan($newnick,%i)) {
      ;You can only kick if you are an op =)
      ban -u10 $comchan($newnick,%i) $newnick 11
      kick $comchan($newnick,%i) $newnick I didn't miss this part.
    }
  }
}
 


My problem is, if this script is left on, all are kicked, including ops. No matter what I put after "on *:NICK: " and the first bracket, it makes the script stop working. So this thing is literally 'all or nothing' for me. I am trying to stop it from kicking ops. I have tried isop return, !isop , with #, $chan, $comchan, etc etc. No variation of what normally works for me, will work here. Can anyone see what I need to stop kicking an op, who puts the badword in their nick?

Also, I have noticed that if ($nick isop #) etc, seems to cover all of ops, hops, and voice. If there a way to differentiate between them all singly? In other words, no action on ops, or hops, but it proceeds on voiced and regular users. Any help with these 2 problems would be greatly appreciated.

Thanks.

Re: 'on nick' fine tuning #88336 27/06/04 09:08 AM
Joined: Mar 2004
Posts: 130
T
tsoglanos Offline
Vogon poet
Offline
Vogon poet
T
Joined: Mar 2004
Posts: 130
betwen inc % and if ($me isop $comchan($newnick,%i)) {

If ($newnick isop $comchan($newnick,%i)) { return }


here again

inc %i
}
If ($newnick isop $comchan($newnick,%i)) { return }
if ($me isop $comchan($newnick,%i)) {
etc..



Re: 'on nick' fine tuning #88337 27/06/04 10:49 AM
Joined: Jan 2004
Posts: 46
F
filedumphere Offline OP
Ameglian cow
OP Offline
Ameglian cow
F
Joined: Jan 2004
Posts: 46
Thanks for the headache stopper!
That worked perfectly...And here i thought you were supposed to stop it right away, at the top. I was pretty wrong in this case I guess lol. I even added another just like it for hops, which also worked just fine. smile

Now if only I could get "if ($nick isop #) return" in other scripts, to only cover the op part, and not hop & voice as well. (like I said in my 2nd part up above). Can anyone help me with that part?

The only thing better than getting help that good, is getting it that fast. Thanks again, tsoglanos. Much appreciated.

Re: 'on nick' fine tuning #88338 27/06/04 11:21 AM
Joined: Mar 2004
Posts: 130
T
tsoglanos Offline
Vogon poet
Offline
Vogon poet
T
Joined: Mar 2004
Posts: 130
I am not sure i understend what your asking for i think your asking if you could make the same with voice and halfops ?

isop nickname v1 is an op on channel v2
ishop nickname v1 is a halfop on channel v2
isvoice nickname v1 has a voice on channel v2


you could make

if ($newnick isop $comchan($newnick,%i)) || ($newnick ishop $comchan($newnick,%i)) || ($newnick isvoice $comchan($newnick,%i)) { return }
else {

;this means you are an op in the channel you and newnick are both in
if ($comchan($newnick,%i).op) {
do stuff

Re: 'on nick' fine tuning #88339 27/06/04 06:49 PM
Joined: Jan 2004
Posts: 46
F
filedumphere Offline OP
Ameglian cow
OP Offline
Ameglian cow
F
Joined: Jan 2004
Posts: 46
Sorry I didn't make it any clearer.

Yes, what you gave me worked...with that particular type of coding...
Code:
 ($newnick ishop $comchan($newnick,%i))  

I was able to isolate each individual part of op, hop, voice.

MY point was, that with this coding:
Code:
 if (($Nick ishelp #) || ($Nick isop #) || ($Nick isvoice #)) return 


I really can't get any isolation between them , because "($Nick isop #)" seems to 'return' if the nicks are op, hop, as well as voice, instead of just op only.
Does that make it clearer? I hope so.

Re: 'on nick' fine tuning #88340 27/06/04 06:56 PM
Joined: Jan 2004
Posts: 46
F
filedumphere Offline OP
Ameglian cow
OP Offline
Ameglian cow
F
Joined: Jan 2004
Posts: 46
I also said in my earlier post, that I WAS able to successfully add another one for hop, using the code you gave me.
($newnick ishop $comchan($newnick,%i)) that was easy to figure out, just add an 'h'...lol

So, in short users & voice (action taken) hop * op, no action taken.
Your coding I could do that, my coding "($Nick isop #)" I was unable to acheive the same isolation.

I don't mean to be so redundant here, just trying to explain better. Maybe I'll just use your coding from now on, and drop that other style.

Re: 'on nick' fine tuning #88341 27/06/04 11:38 PM
Joined: Jan 2004
Posts: 26
F
Fibsi Offline
Ameglian cow
Offline
Ameglian cow
F
Joined: Jan 2004
Posts: 26
Code:
if (nick isreg chan) { ... }

isreg ... nickname v1 is a normal nick (no-@, no-%, no-+ ect.) on channel v2