mIRC Home    About    Download    Register    News    Help

Print Thread
Auto half-opping #167668 28/12/06 05:19 PM
Joined: Dec 2006
Posts: 37
T
THE_ADZ Offline OP
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Dec 2006
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?

Re: Auto half-opping [Re: THE_ADZ] #167669 28/12/06 05:21 PM
Joined: Dec 2006
Posts: 37
T
THE_ADZ Offline OP
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Dec 2006
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

Re: Auto half-opping [Re: THE_ADZ] #167671 28/12/06 05:47 PM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
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
Re: Auto half-opping [Re: Riamus2] #167673 28/12/06 05:59 PM
Joined: Dec 2006
Posts: 37
T
THE_ADZ Offline OP
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Dec 2006
Posts: 37
THANK YOU!
It took me around 10 mins but I figured it out
smile
Thanks again for your help

Re: Auto half-opping [Re: THE_ADZ] #167677 28/12/06 07:46 PM
Joined: Dec 2006
Posts: 37
T
THE_ADZ Offline OP
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Dec 2006
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?

Re: Auto half-opping [Re: THE_ADZ] #167688 28/12/06 10:13 PM
Joined: Dec 2002
Posts: 1,527
L
landonsandor Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,527
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
Re: Auto half-opping [Re: Riamus2] #167693 28/12/06 11:33 PM
Joined: Feb 2003
Posts: 810
C
cold Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Feb 2003
Posts: 810
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
Re: Auto half-opping [Re: cold] #167725 29/12/06 04:57 AM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
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
Re: Auto half-opping [Re: Riamus2] #167734 29/12/06 06:24 AM
Joined: Feb 2003
Posts: 810
C
cold Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Feb 2003
Posts: 810
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