Mode -- +m and -m

By iProTopia on Jul 09, 2011

I would like to thanks napa182 for helping me with this script :)
Simple -m and +m script

[21:09] <@napa182> +m
[21:09] * Masonic sets mode: +m

[21:09] <@napa182> -m
[21:09] * Masonic sets mode: -m

on $@*:TEXT:/^([+-]m)$/S:#: {
  if (!%flood && $nick(#,$nick,oh)) { inc -u5 %flood
    mode # $regml(1)
  }
}
on *:load:{
  echo 12 -a Thank you for using this snippet.
  echo 04 -a Have fun...
}

Comments

Sign in to comment.
Cheiron   -  Jul 11, 2011

thats fair enough :)

 Respond  
napa182   -  Jul 11, 2011

I only like to have on inputs events to be disable cuz it is easier to debug a conflicting on input event.
but if you don't want an on n off:

on *:input:#:{
  if ($regex($1,/^([+-]m)$/S)) {
    if ($nick(#,$me,oh)) {
      .timermode 1 1 mode # $regml(1)
    }
    else { haltdef }
  }
}
 Respond  
Cheiron   -  Jul 11, 2011

thats true napa indeed.. i was keeping things as basic as i could with the minimum on/off manual input :)

the manual code i supplied doesnt require a code to turn it off as its 2 fixed commands.. to turn on you type +m and to take off you type -m

interesting take though on the original code!

 Respond  
napa182   -  Jul 11, 2011

Cheiron if you go the route of using an on input maybe have away to turn it off n on maybe something like this..

#modem off
on *:input:#:if ($regex($1,/^([+-]m)$/S)) .timermode 1 1 mode # $regml(1) 
#modem end
menu channel {
  -
  .Turn $iif($group(#modem) = on,Off,On) +/- m:{
    $+(.,$iif($group(#modem) = on,dis,en),able) #modem
    echo -a +/- m is now $group(#modem)
  }
  -
}
 Respond  
Cheiron   -  Jul 11, 2011

you can also do an alias based save using a bot...

on your mirc on a clean remote

on *:input:#: {
 if ($$1 === +m) {   .timer 1 1 mode $active +m }
  if ($$1 === -m) {   .timer 1 1 mode $active -m  }
}

command simply be typing on your mirc +m or -m
and ensuring you have ops on said channel

otherwise neat code and does what it says.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.