Top

Eh... another massmode.


mIRC Code
+ 0 likes
Please Register to submit score.
Bookmark and Share
Average Score  0.0 (of 0 scores)
Date Added  May 08, 2008
Last Updated  May 08, 2008
Tags  massmode  mode  simple 

Description

This is a _SIMPLE_ massmode, though it works like it should. Maybe someone learns something from this little snippet.. making a massmode script is not that tricky you'd think it is.

How the script works then?

Here's a few examples:
# Doing the massmode:
* shitbreak sets mode: +vvvvvv Teen SilverRain`AFK Putki[Tenesean] prem IF|SiLVeR`OFF gzt_
* shitbreak sets mode: +vvvvvv Deppis deep`_off- bindi BangBong Ark[Space]Angel [TWR]Robo_Sleep
* shitbreak sets mode: +vv Servicebots Q

# Not opped on channel:
* Can not use this script: not opped on channel.

# The requested massmode is not +/-v or +/-o:
* This massmode supports only op and voice (o & v).

That's it. Simple error preventing.

Grab the Code

alias mass {
  if ($left($1,1) !isin +-) || ($right($1,-1) != o) && ($right($1,-1) != v) { echo 2 -a * This massmode supports only op and voice (o & v). }
  else {
    if ($me !isop $chan) { echo 2 -a * Can not use this script: not opped on channel. }
    else {
      var %i = $nick($chan,0)
      while (%i) {
        if ($nick($chan,%i) != $me) {
          if (!%mode) || ($gettok(%mode,0,32) < $modespl) { var %mode = $addtok(%mode,$nick($chan,%i),32) }
          if ($gettok(%mode,0,32) == $modespl) { mode $chan $+($left($1,1),$str($remove($1,$left($1,1)),$gettok(%mode,0,32))) %mode | unset %mode }
        }     
        dec %i
      }
      if (%mode) { mode $chan $+($left($1,1),$str($remove($1,$left($1,1)),$gettok(%mode,0,32))) %mode }
    }
  }
}

Comments

  (12)  RSS
juhapuha
Comments: 73
 
mIRC Snippet:  Eh... another massmode.
Posted on May 8, 2008 7:07 pm
Comments!
mountaindew
Comments: 1,816
 
mIRC Snippet:  Eh... another massmode.
Posted on May 8, 2008 7:25 pm
Code:

  if ($left($1,1) != +) && ($left($1,1) != -) || ($remove($1,$left($1,1)) != o) && ($remove($1,$left($1,1)) != v) { echo 2 -a * This massmode supports only op and voice (o & v). }

if ($left($1,1) != +) && ($left($1,1) != -) can be if ($left($1,1) !isin +-)

Also, $remove($1,$left($1,1)) can be simplified to $right($1,-1)
juhapuha
Comments: 73
 
mIRC Snippet:  Eh... another massmode.
Posted on May 8, 2008 7:41 pm
Ah, so true ;d
juhapuha
Comments: 73
 
mIRC Snippet:  Eh... another massmode.
Posted on May 8, 2008 8:36 pm
fixed :)
napa182
Comments: 1,692
 
mIRC Snippet:  Eh... another massmode.
Posted on May 8, 2008 8:48 pm
nice but you can also do it like this as well
Code:
alias mass {
  if ($me !isop #) || (!$regex($1-,/^[+-][ov]$/)) { echo -a $iif($me !isop #,* Can not use this script: not opped on channel.,* This massmode supports only op and voice (o & v).) }
  else {
    var %a = $nick($chan,0), %o = 1
    while (%o <= %a) {
      if ($nick($chan,%o) != $me) var %m = $addtok(%m,$v1,32)
      inc %o
    }
    mode $chan $left($1,1) $+ $str($right($1,1),$modespl) %m
  }
}

napa182
Comments: 1,692
 
mIRC Snippet:  Eh... another massmode.
Posted on May 8, 2008 9:25 pm
also if you are making %mode a local var like you did then theres no need to unset it
napa182
Comments: 1,692
 
mIRC Snippet:  Eh... another massmode.
Posted on May 8, 2008 9:28 pm
er nvm i didnt read the last part lmao
Pepsi_Man0077
Comments: 76
 
mIRC Snippet:  Eh... another massmode.
Posted on May 9, 2008 3:34 am
anyway to make it mass voice selected nicks from the nicklist?
Pepsi_Man0077
Comments: 76
 
mIRC Snippet:  Eh... another massmode.
Posted on May 9, 2008 4:03 am
i went and researched this and i made this quick alias, if it helps at all:

Quote:


alias xmass {
var %nick.count $snick($chan,0)
:Nick.Select
if (%nick.count > 0) {
if ($1 = Voice) {
mode $chan v $snick($2,%nick.count)
dec %nick.count
}
elseif ($1 = op) {
mode $chan o $snick($2,%nick.count)
dec %nick.count
}
elseif ($1 = halfop) {
mode $chan h $snick($2,%nick.count)
dec %nick.count
goto Nick.Select
}
elseif ($1 = dehalfop) {
mode $chan -h $snick($2,%nick.count)
dec %nick.count
goto Nick.Select
}
elseif ($1 = kick) {
kick $chan $snick($2,%nick.count)
dec %nick.count
}
goto Nick.Select
}
}
Pepsi_Man0077
Comments: 76
 
mIRC Snippet:  Eh... another massmode.
Posted on May 9, 2008 4:04 am
i made it xmass because my IRC already had a mass alias in the scripts, so change it if you wish
napa182
Comments: 1,692
 
mIRC Snippet:  Eh... another massmode.
Posted on May 9, 2008 4:05 am
Pepsi_Man0077 said:
Quote:
anyway to make it mass voice selected nicks from the nicklist?


um on the one i posted as a comment you can change the
Code:
 $nick($chan,0) and ($nick($chan,%o) != $me)


to
Code:
$snick($chan,0) and ($snick($chan,%o) != $me)

to make it mass op/voice only selected nicks in the nicklist.
juhapuha
Comments: 73
 
mIRC Snippet:  Eh... another massmode.
Posted on May 10, 2008 12:54 pm
There is of course more than one way to make a massmode script.
Tbh that was my first massmode script. :)

Commenting Options

Register or Login to Hawkee.com or use your Facebook or Twitter account by clicking the corresponding button below.

  

Bottom