Closed Bug 98251 Opened 22 years ago Closed 20 years ago

Implement Half-Op (mode +h) in Chatzilla


(Other Applications :: ChatZilla, enhancement)

Not set


(Not tracked)



(Reporter: willybur, Assigned: bugzilla-mozilla-20000923)


(Whiteboard: cz-patch)


(5 files, 5 obsolete files)

From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.3+) Gecko/20010904
BuildID:    2001090408

I'm not sure if half-op is an IRC standard or not, I've only recently seen or
heard about it, but it isn't implemented right.  Like the op gets a @, the
half-op gets a %.  
Rather than have one of those mode lights turn on for half op, the half op just
gets no lights.  
When one joins a channel, the existing half-ops do have a % next to their name.
 But when I half op myself, no % sign is added, since half-op isn't recognized.
To see the % sign with my nick, I have to do a whois on myself.  
A half-op light should be added.  As a color guideline, I believe that in Xchat,
the user gets a blue light turned on.

Reproducible: Always
Steps to Reproduce:
1. Connect to an IRC server supporting half-ops (i.e
2. Make a new channel (i.e #foobar)
3. You should be op, set mode +h (half-op) on yourself (i.e /mode #foobar +h
4. Deop yourself (i.e /mode #foobar -o IRCMonkey)
5. At this point, you are now a half-op

Actual Results:  Nothing happens in the nick list, and only the whois results
show the half op sign.

Expected Results:  A half-op light needs to be implemented, and the discrepancy
between existing and newly made half-ops needs to be fixed.
Marking NEW.
Ever confirmed: true
+h is only found on some small networks AFAIK. It's hardly pervasive.

It's usually not useful to talk about "standards" WRT IRC, since there really
aren't any. Sure, there are RFCs, but they only really pertain to EFnet. All
networks do things a little differently. You could fit all of the modes and
commands that all ircds support in the same way on a 3"x5" index card.
Remove myself from QA of 33 open Chatzilla bugs and change to default QA
contact, since I have no way to verify these easily.  Still no working Mozilla
on my primary platform and it doesn't look like it will happen anytime soon. :(
QA Contact: mozilla → samuel
Since Unreal and UltimateIRCd (and other IRCd's) support it over 100 'small' irc
networks are using it.

In addition what was said earlier, Halfops can kick non (half)ops and voice
other people.
Summary: [RFE] Implement Half-Op (mode +h) in Chatzilla → Implement Half-Op (mode +h) in Chatzilla
so painfull this samm vbug who add a % at the nickname in the users list, please
correct this !
It seems that implementing the 005 numeric (PREFIX) would solve this. This page
explains the format of the PREFIX response:
That 005 message would be nice if all servers supported it.  But it also looks
like the server doesn't even need to list *all* the modes either:
"Note: Some servers only show the most powerful, others may show all of them."
005 is in a strange situation. The updated RFCs, the de iure standard (such as
they are), say that it's RPL_BOUNCE, a message sent when the server is full and
can't accept new connections. However, before the updated RFCs, many servers
implemented it as RPL_ISUPPORT (aka RPL_PROTOCL), which lists the features of
the ircd the client may want to know about, and that's the de facto standard.
It's a sort of grey area, but lots of ircds (including major ones) do implement
it and I suppose some clients do understand it.
the handling of the "%" needs some tweaking

if I do a whois with the mouse it makes a /whois %nick which does ofc fail

Tab completion requires to type "%nic" instead "nic" and then ofc again remove
the "%"

yes and I would like to know too if I´m halfop
A friend of mind has suggested making ChatZilla support 'any' user modes, using
the PREFIX= part of the 005 message. At the end of next week (exams :) ) I'd be
happy to take this bug and actually implement this.
Ok, taking bug.
Assignee: rginda → silver
It has become apparent that having all three mode columns (with half-ops, which
I'm currently working on) visible looks quite messy. It would not be too much
work to move to a single column for the 'mode', and would make it much easier
for coping with multiple servers where only some have half-ops.

Attached patch diff -U 6 of /extensions/irc (obsolete) — Splinter Review
What this patch does:
 - Added userModeList to CIRCNetwork object to keep track of user modes
supported on the network. Defaults to the equivelant of "PREFIX=(ov)@+".
 - When a 005 message comes in, the CIRCNetwork parses the PREFIX section and
replaces it's default userModeList with whatever the PREFIX item contains,
assuming the item is in the right format. :)
 - /NAMES reply code checks for each code mentioned in PREFIX, as does the MODE
 - chan_adduser/new CIRCChanUser now takes a |modes| parameter instead of
|isOp| and |isVoice|. This parameter is a list of modes for the user, which may
be +/- prefixed if user is already an existing user. (e.g. passing ["o"] makes
a user /just/ Operator, passing ["+o"] makes them an Operator /as well/ as
anything they may already be, if they already exist (the list may only be all
"o"-style, or all "+o"-style - it won't work with a mix of the two).
 - CIRCChannel.prototype.getUsersLength/chan_userslen now takes a |mode|
parameter. When not passed, the function behaves as before and returns the
total count of users. When passed a mode, e.g. "o", it returns the ocunt of
users with that mode.
 - The is used by the GUI to list the number of people with each mode the
server supports in the *Mode* box in the header.
 - CIRCChannel.prototype.setTopic and many others now don't check for Operatory
status, since we have no way of knowing which modes the user needs for these
commands any more - half-ops may be able to do it, but what about some other
mode? The messages back from the server a clear enough, IMHO.
 - CIRCChanUser now has |isHalfOp| which is a shorthand for checking for "h" is
the user's mode list. They also now have |setHalfOp|, working just like |setOp|
and |setVoice|, to send +h/-h MODEs to the server.
 - The commands /hop and /dehop have been added to add/remove +h people, and a
Grant/Revoke Half-operator Status item has been added to the context menu -
only shows up if the server supports it and you have ops.
 - Finally, the user-list in the GUI now has just one column next to Nickname -
"Mode". This uses the is-op/is-halfop/is-voice/isnt-voice set of lights (I did
is-half-op as yellow). The column sorts by 'power' of the mode, too.
 - Entities added: hopUsage, hopHelp, dehopUsage, dehopHelp, cli_idehopMsg,
cli_idehopMsg2, cli_ihopMsg, cli_ihopMsg2
 - Updated/changed entities: cli_ideopMsg, cli_iopMsg

It also needs a 'light' in the skin/modern/images directory called
is-halfop.gif (I've used yellow colouring for mine).
/hop is not a good choice unfortunately.  This is already a known command in
other IRC clients and we may yet implement it as well.
Are you refering to the way mIRC uses it to cycle a channel?

I'd much rather use /cycle for that, should we implement it.
Attachment #125697 - Flags: review?(rginda)
Unless there's any objections, I'll start to port this patch over to ChatZilla
0.9.x in the next few days/this week.
What's the status on this?
Attached patch 005 numeric support (obsolete) — Splinter Review
Attached patch +h support. (obsolete) — Splinter Review
These two patches together allow ChatZilla 0.9.x to at least handle half ops
(in so far as not getting confused), and add the /hop /dehop commands. No GUI
elements have been added.
Attachment #125697 - Attachment is obsolete: true
Attachment #125697 - Flags: review?(rginda)
Whiteboard: cz-patch
Attached patch Updated +h support (obsolete) — Splinter Review
This is the same as attachement 135564, except it adds the RDF code for the
userlist, and makes it sort correctly. I have also make two new images, which
I'll attache (though they are just quick attempts).
Attachment #135564 - Attachment is obsolete: true
Attached image Halfop "light"
Initialises all properties on the server to null in ctor, and defaults in 001
Adds service.supports.rpl_isupport.
Moved channelModes, channelTypes and useModes to server object.
Attachment #135563 - Attachment is obsolete: true
Attached patch Updates +h patchSplinter Review
Updates ChanUser ctor to ignore null for the modes parameter as well as [].
Fixed getUsersLength.
Attachment #135576 - Attachment is obsolete: true
Attached image halfop-symbol.png
Made in the gimp with the following font:
-urw-gothic l-demi bold-r-normal--12-120-75-75-p-69-iso8859-2
Attachment #135579 - Attachment is obsolete: true
Checked in as part of the 0.9.49 landing.
Closed: 20 years ago
Resolution: --- → FIXED
seems to be working fine in today's nightly. thanks james and robert :)
ahem... I meant to mark this verified
Resolution: FIXED → ---
The items in the submenu were enabled by a previous patch, but I missed the
actual submenu item itself. This fixes that.
Attachment #139771 - Flags: review?(rginda)
Comment on attachment 139771 [details] [diff] [review]
Enables the operator submenus when you have half-ops

Attachment #139771 - Flags: review?(rginda) → review+
Comment on attachment 139771 [details] [diff] [review]
Enables the operator submenus when you have half-ops

Checked in.
Closed: 20 years ago20 years ago
Resolution: --- → FIXED
Product: Core → Other Applications
You need to log in before you can comment on or make changes to this bug.