mIRC Home    About    Download    Register    News    Help

Topic Options
#167668 - 28/12/06 05:19 PM Auto half-opping
THE_ADZ Offline
Ameglian cow

Registered: 28/12/06
Posts: 37
I want to automatically half op people on my channel. How do I do this?
Is there a button for it. If not, can I create one and how?

Top
#167669 - 28/12/06 05:21 PM Re: Auto half-opping [Re: THE_ADZ]
THE_ADZ Offline
Ameglian cow

Registered: 28/12/06
Posts: 37
oh yeah, and also is there an alternative to typing /mode #channel +h Nick. It is really long and I don't really have a lot of time to type it for every single member of my channel

Top
#167671 - 28/12/06 05:47 PM Re: Auto half-opping [Re: THE_ADZ]
Riamus2 Offline
Planetary brain

Registered: 13/10/04
Posts: 8327
Loc: MA, USA
You can do it various ways. If you want to halfop everyone when they join, you can press Alt-R > File > New and use this:

Code:
on @*:join:#yourchannel: {
  mode $chan +h $nick
}


As long as you are opped, you will halfop everyone who joins.

You can also set it to halfop everyone in the channel (who isn't already halfop or higher) with:

Code:
menu channel {
  Half-Op Everyone:if ($me isop $chan) { halfopall $chan } | else echo -a You're not an op. }
}

alias halfopall {
  var %cnt = 1
  var %total = $nick($chan,0,rv,o)
  while (%cnt <= %total) {
    var %halfops %halfops $nick($chan,%cnt,rv,o)
    if ($gettok(%halfops,0,32) == 6) {
      mode $1 +hhhhhh %halfops
      unset %halfops
    }
    inc %cnt
  }
  if (%halfops) {
    mode $1 + $+ $str(h,$gettok(%halfops,0,32)) %halfops
  }
}

That will be in the channel's right click menu.

Also, if you want an easy command to halfop someone from the edit line, you can also add this to the script:

Code:
alias h {
  if ($chan && $1 isin $chan) {
    if ($me !isop $chan) { echo -a You're not an op in this channel. | return }
    mode $chan +h $1
  }
}


To use that, just type this in the channel:
/h nick
_________________________
Invision Support
#Invision on irc.irchighway.net

Top
#167673 - 28/12/06 05:59 PM Re: Auto half-opping [Re: Riamus2]
THE_ADZ Offline
Ameglian cow

Registered: 28/12/06
Posts: 37
THANK YOU!
It took me around 10 mins but I figured it out
smile
Thanks again for your help

Top
#167677 - 28/12/06 07:46 PM Re: Auto half-opping [Re: THE_ADZ]
THE_ADZ Offline
Ameglian cow

Registered: 28/12/06
Posts: 37
ok new problem. I made this code:

on Rock@*:join:#avatarrp: {
mode #avatarrp +h Rock
}

on sissha11@*:join:#avatarrp: {
mode #avatarrp +h sisha11
}

on Zukos_One_Love@*:join:#avatarrp: {
mode #avatarrp +h Zukos_One_Love
}

and for some reason it is not half opping anyone
Any suggestions?

Top
#167688 - 28/12/06 10:13 PM Re: Auto half-opping [Re: THE_ADZ]
landonsandor Offline
Hoopy frood

Registered: 12/12/02
Posts: 1527
Loc: state of confusion
It has been suggested that HOP (among other modes) should be added to the address book list. I think this would be a lovely addition myself and would have made your issue go away much faster smile Perhaps you should find a thread that has it and (if you want) put your agreement on it. While we never know what options will get added or when, it's possible that our reactions can sway a decision.
_________________________
Those who fail history are doomed to repeat it

Top
#167693 - 28/12/06 11:33 PM Re: Auto half-opping [Re: Riamus2]
cold Offline
Hoopy frood

Registered: 25/02/03
Posts: 810
Loc: Brazil
To Riamus2:
You have this in /h...
Code:
if ($chan && $1 isin $chan) {


...when the correct code is below:
Code:
if ($1 ison $chan) {



To THE_ADZ:
Well, do you have Rock, sissha11 and Zukos_One_Love in your user list? In case you have, the correct syntax is this:
Code:
on @Rock:join:#avatarrp:{ ... }
on @sissha11:join:#avatarrp:{ ... }
on @Zukos_One_Love:join:#avatarrp:{ ... }


In case you thought you were dealing with their nicks instead of their entries in the user list, this is an working code:
Code:
on @*:join:#avatarrp:{
  if ($istok(Rock sissha11 Zukos_One_Love,$nick,32)) { mode # +h $nick }
}
_________________________
* cold edits his posts 24/7

Top
#167725 - 29/12/06 04:57 AM Re: Auto half-opping [Re: cold]
Riamus2 Offline
Planetary brain

Registered: 13/10/04
Posts: 8327
Loc: MA, USA
Originally Posted By: cold
To Riamus2:
You have this in /h...
Code:
if ($chan && $1 isin $chan) {


...when the correct code is below:
Code:
if ($1 ison $chan) {



Thanks. I always mix up ison and isin. I always think of being IN a channel rather than ON a channel. smile
_________________________
Invision Support
#Invision on irc.irchighway.net

Top
#167734 - 29/12/06 06:24 AM Re: Auto half-opping [Re: Riamus2]
cold Offline
Hoopy frood

Registered: 25/02/03
Posts: 810
Loc: Brazil
Quote:
Thanks. I always mix up ison and isin. I always think of being IN a channel rather than ON a channel. smile


Which makes sense to me, hehe. I always mix them up as well...
_________________________
* cold edits his posts 24/7

Top