mIRC Home    About    Download    Register    News    Help

Print Thread
alias mk, need help #130042 12/09/05 02:33 PM
Joined: Sep 2005
Posts: 15
O
ownageee3 Offline OP
Pikka bird
OP Offline
Pikka bird
O
Joined: Sep 2005
Posts: 15
alias masskick {
unset %total
set %count.nick 0
set %total $nick(#,0)
:start
inc %count.nick
if (%count.nick > %total) { halt }
if ($nick(#,%count.nick) == $me) { goto start }
else { kick # $nick(#,%count.nick) Masskick Everyone is kicked so don't take it personal . | goto start }
}

I need a protect on the tag: rotk`

Can someone create that for me?

Re: alias mk, need help #130043 12/09/05 02:45 PM
Joined: Aug 2005
Posts: 1,052
L
Lpfix5 Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
Quote:
alias masskick {
set %count.nick 0
set %total $nick(#,0)
:start
inc %count.nick
if (%count.nick > %total) { halt }
if (rotk' isin $nick(#,%count.nick)) { goto start }
if ($nick(#,%count.nick) == $me) { goto start }
else { kick # $nick(#,%count.nick) Masskick Everyone is kicked so don't take it personal . | goto start }
}

I need a protect on the tag: rotk`

Can someone create that for me?


im not sure what rotk' tag stands for is it the nick if so i scripted it in your script otherwise explain a bit more please


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
Re: alias mk, need help #130044 12/09/05 03:10 PM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
I'd use iswm so that you're not matching that tag at the end of the nick or in the middle of the nick.

Code:
alias masskick {
  [color:blue]; Check to see if the alias is typed inside a channel, or if a channel name is specified.  If not, give error and exit.[/color]
  if ($chan == $null && $1 == $null) { echo -a ERROR: Use this command in a channel, or specify the channel to use. | return }
  [color:blue]; Set %chan to either the current channel or to $1.[/color]
  if ($1 != $null) {
    var %chan = $1
  }
  else var %chan = $chan
  [color:blue]; Check to see if you have ops.  If not, give an error and halt.[/color]
  if ($me !isop %chan) { echo -a ERROR: You are not opped in the channel. | return }
  var %c = 1
  var %i = $nick(%chan,0)
  while (%c <= %i) {
    var %nick = $nick(%chan,%c)
    [color:blue]; Check to see if the nick is $me, or if the nick has the rotk' tag at the beginning of the nick.  If either is true, skip the nick.  Otherwise, continue with the kick.[/color]
    if (rotk'* !iswm %nick && %nick != $me) { 
      kick %chan %nick Masskick Everyone is kicked so don't take it personal.
    }
    inc %c
  }
}


As you can see, I've added some error checking. I also got rid of those annoying GOTOs and swapped sets for vars. laugh

Use: /masskick [#chan]

You can type /masskick inside a channel and it will work, or you can type /masskick #channelname anywhere and it will work for the channel specified.


Invision Support
#Invision on irc.irchighway.net
Re: alias mk, need help #130045 12/09/05 08:41 PM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
I never knew you could have ASCII nicknames, I guess you do learn something new every day..

-Andy

Re: alias mk, need help #130046 12/09/05 08:43 PM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
ASCII nick names? Where did that come from?


Invision Support
#Invision on irc.irchighway.net
Re: alias mk, need help #130047 12/09/05 08:48 PM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Code:
if (rotk[color:red]'[/color]* !iswm %nick && %nick != $me) { 


There is illegal characters in that, just didn't think IRC supported that that's all.

-Andy

Re: alias mk, need help #130048 12/09/05 08:52 PM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
An apostrophe is an illegal character? Why?


Invision Support
#Invision on irc.irchighway.net
Re: alias mk, need help #130049 12/09/05 08:59 PM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
It wont add it to your nickname:

/nick SladeKraven' - Changes my nickname to SladeKraven without the apostrophe.

/nick SladeKraven'' (2 apostrophes) - Returns SladeKraven' Erroneus Nickname

-Andy

Re: alias mk, need help #130050 12/09/05 09:03 PM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
That's interesting. I could have sworn I'd seen nicks with apostrophes in them. Maybe I'm imagining things, or perhaps some networks allow them. Oh well. Maybe it's not really an apostrophe he's talking about and is the ` instead.


Invision Support
#Invision on irc.irchighway.net
Re: alias mk, need help #130051 12/09/05 09:48 PM
Joined: Sep 2005
Posts: 2,876
H
hixxy Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,876
He is talking about `, not ':

Quote:

I need a protect on the tag: rotk`

Re: alias mk, need help #130052 12/09/05 09:51 PM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
Heh. So he is. laugh

Updated for the correct type of apostrophe:

Code:
alias masskick {
  [color:blue]; Check to see if the alias is typed inside a channel, or if a channel name is specified.  If not, give error and exit.[/color]
  if ($chan == $null && $1 == $null) { echo -a ERROR: Use this command in a channel, or specify the channel to use. | return }
  [color:blue]; Set %chan to either the current channel or to $1.[/color]
  if ($1 != $null) {
    var %chan = $1
  }
  else var %chan = $chan
  [color:blue]; Check to see if you have ops.  If not, give an error and halt.[/color]
  if ($me !isop %chan) { echo -a ERROR: You are not opped in the channel. | return }
  var %c = 1
  var %i = $nick(%chan,0)
  while (%c <= %i) {
    var %nick = $nick(%chan,%c)
    [color:blue]; Check to see if the nick is $me, or if the nick has the rotk' tag at the beginning of the nick.  If either is true, skip the nick.  Otherwise, continue with the kick.[/color]
    if (rotk`* !iswm %nick && %nick != $me) { 
      kick %chan %nick Masskick Everyone is kicked so don't take it personal.
    }
    inc %c
  }
}


Invision Support
#Invision on irc.irchighway.net