mIRC Home    About    Download    Register    News    Help

Print Thread
#213467 28/06/09 06:08 PM
B
Babystone
Babystone
B
can anyone help on this badnick ban on nick change ??

*** hot_man_848 is now known as awake-dick
*** lalala sets mode: +b *dick*!*@*

what is the correct code for this?

Joined: Oct 2003
Posts: 3,641
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,641
Code:
on *:NICK: { 
  if ($me isop #mychannel && $nick ison #mychannel && *dick* iswm $newnick) {
    mode #mychannel +b *dick*!*@*
  }
}

B
Babystone
Babystone
B
hmmm i put this but it dun seem to work

Originally Posted By: argv0
Code:
on *:NICK: { 
  if ($me isop #myroom && $nick ison #myroom && *dick* iswm $newnick) {
    mode #myroom +b *dick*!*@*
  }
}

Joined: Jul 2006
Posts: 4,035
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,035
Code:
on *:NICK: { 
  if ($newnick isop #myroom && $newnick ison #myroom && *dick* iswm $newnick) {
    mode #myroom +b *dick*!*@*
  }
}
Little mistake, he was checking $nick ison #chan instead of $newnick

Edit : was another mistake, $me is only updated at the end of processing all on nick event so here, the value is the same as $nick, and of course the old nick isn't op in the channel, I've updated the code.

Last edited by Wims; 29/06/09 09:55 PM.

#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Jul 2007
Posts: 1,124
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,124
Wims, it's
Quote:
if ($me isop #myroom)
not $newnick

Joined: Jul 2006
Posts: 4,035
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,035
He He true smile
I made some test related to this and simply considered my test as the answer smirk


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Dec 2008
Posts: 1,483
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,483
Correct with this :

Code:
on *:NICK: { 
  if (($me isop #myroom) && ($newnick ison #myroom) && (*dick* iswm $newnick)) {
    if ($newnick isop #myroom) { mode #myroom -o $newnick }
    mode #myroom +b *dick*!*@*
  }
}


NOTE: It checks if the newnick is operator if it is deop him first and then ban him

Joined: Jul 2007
Posts: 1,124
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,124
Yes, but that extra if statement is needlessly useful because I haven't seen an operator who likes to act like a "dick" yet...if you know what I mean. cry

Joined: Aug 2004
Posts: 7,168
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,168
The only ops that I've seen act that way didn't remain ops for long, once the owner/founder was notified.

Joined: Dec 2008
Posts: 1,483
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,483
Yes, the *dick* is the manual example and i use it for example.

S
s00p
s00p
S
Code:
on *:NICK: { 
  if (($me isop #myroom) && ($newnick ison #myroom) && (*dick* iswm $newnick)) {
    mode #myroom -o+b $newnick *dick*!*@*
  }
}


My question is, if course, why not just ban *dick*!*@* permenantly?

Joined: Dec 2008
Posts: 1,483
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,483
Originally Posted By: s00p
Code:
on *:NICK: { 
  if (($me isop #myroom) && ($newnick ison #myroom) && (*dick* iswm $newnick)) {
    mode #myroom -o+b $newnick *dick*!*@*
  }
}


My question is, if course, why not just ban *dick*!*@* permenantly?


This code will deop the *dick* and make a ban at *dick* , but if the *dick* is not oper why you must deop him/her ? , thats the way that i added the if ($newnick isop $chan) { mode $chan -o $newnick } , it check's first for if the user is an operator and if is deop him if not did not then just make the ban only.


Link Copied to Clipboard