mIRC Home    About    Download    Register    News    Help

Print Thread
#213467 28/06/09 06:08 PM
Joined: May 2009
Posts: 28
B
Ameglian cow
OP Offline
Ameglian cow
B
Joined: May 2009
Posts: 28
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,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
Code:
on *:NICK: { 
  if ($me isop #mychannel && $nick ison #mychannel && *dick* iswm $newnick) {
    mode #mychannel +b *dick*!*@*
  }
}


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Joined: May 2009
Posts: 28
B
Ameglian cow
OP Offline
Ameglian cow
B
Joined: May 2009
Posts: 28
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,149
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,149
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,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
Wims, it's
Quote:
if ($me isop #myroom)
not $newnick

Joined: Jul 2006
Posts: 4,149
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,149
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,515
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
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


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
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,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
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,515
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
Yes, the *dick* is the manual example and i use it for example.


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Joined: Jul 2008
Posts: 236
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Jul 2008
Posts: 236
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,515
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
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.


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-

Link Copied to Clipboard