View Issue Details

IDProjectCategoryView StatusLast Update
0003953unrealircdpublic2012-01-22 16:55
ReporterNath Assigned Tosyzop  
PrioritynormalSeverityminorReproducibilityN/A
Status resolvedResolutionfixed 
OSLinux/WindowsOS VersionUbuntu (Linux) 
Product Version3.2.8 
Fixed in Version3.2.10-rc1 
Summary0003953: Mode +I for hiding oper Idle times.
DescriptionAfter reading through the m_whois.c file, I cam across a comment which didn't really apply to what the code was actually doing. The comment in question:

/*
* Fix /whois to not show idle times of
* global opers to anyone except another
* global oper or services.
* -CodeM/Barubary
*/

The code didn't appear to actually do that at all. So I decided to patch a usermode that opers can set, to hide their idle time if they so wish.

I have chose the usermode +I. For 2 reasons:

"I" can easily relate it "IDLE" and so seems practical to use.

"I" also can redeem itself as a sensible umode, and could potentially cause hassle for any more +I invisible hacks out there.

I have uploaded my patch, any constructive criticism is welcome. :)
TagsI, IDLE, OPER, UMODE, WHOIS
Attached Files
hidle.patch (2,395 bytes)
3rd party modules

Relationships

child of 0003915 resolvedsyzop Unreal3.2.10 TODO 
child of 0004301 resolvedsyzop Unreal3.2.10 TODO 

Activities

ohnobinki

2010-08-31 22:14

reporter   ~0016322

In the diff in umodes.c, I suggest to try to fit in to the surrounding convention of 0L instead of 0l.

I don't understand why you're adding minus signs in the middle of m_whois.c and gcc doesn't either:
gcc -I../include -pipe -g -O2 -funsigned-char -fno-strict-aliasing -Wno-pointer-sign -export-dynamic -fPIC -DPIC -shared -DDYNAMIC_LINKING \
                -o m_whois.so m_whois.c
m_whois.c: In function 'm_whois':
m_whois.c:332: error: wrong type argument to unary minus
make[2]: *** [m_whois.so] Error 1

In the comment about ``Umode I'', howabout ``Umode +I''? The + is a visual aid to me, not sure about others ;-). And prepend ``Nath'' with a `-' :-p

And I personally prefer simpler logic:
!((acptr->umodes & UMODE_HIDLE) && !IsAnOper(sptr))
could become the following perhaps?
(IsAnOper(sptr) || !(acptr->umodes & UMODE_HIDLE))

Stealth

2010-09-02 21:55

reporter   ~0016323

This is definitely a good idea, and I do agree with needing a little bit of cleanup to ensure that it is both functional and bettering the source.

ohnobinki

2010-09-02 22:23

reporter   ~0016324

unreal-3953-hidle-r1.patch: Fixes the things I addressed, compiles, and appears to work.

On a separate note, the m_whois.c lines that this patch modifies happens to be the line that causes user idle times to only show up if the WHOISee and the WHOISer are both on the same server. I.e., this ``MyConnect(acptr)'' check. Is this intended or should I open another bug to enable idle times to be checked from different servers?

Stealth

2010-09-03 02:59

reporter   ~0016325

Not showing remote idle times is intentional behavior (as most IRCds do this). To see remote idle times, you need to send "WHOIS <nick> <nick>". This might be addressed somewhere else in the source, as a server-server WHOIS is different than client-server.

syzop

2010-09-19 16:55

administrator   ~0016367

Patch looks fine (-r1).

I'm ok with putting it in (prolly post-3.2.9, though). Seems the consensus is that this is worth a user mode.

It needs some documentation, however. Like help.conf and unreal32docs.html.

As for your question ohnobinki, a server does not and cannot know the idle time of a remote user, only the server the target is on knows. The current code is correct. It does allow a remote user to whois a local user, in the way Stealth described, in which case it would show the idle time (or not, if +I).

Could anyone verify that services (current anope, latest ircservices, and possibly others) deal with +I properly? Like don't have any old code that treats it was some kind of danger and/or that it causes misunderstanding...
We once had that with +T, which used to be Techadmin, and then became (many years later) a CTCP blocker... this caused one of the services packages to treat normal users like admins :p

ohnobinki

2010-09-19 18:44

reporter   ~0016368

unreal-3953-hidle-r2.patch: Same as last patch, but includes docs for help.conf and unreal32docs.html. I sneaked in a blurb about WHOIS <nick> <nick> too.

Stealth

2010-09-19 21:32

reporter   ~0016369

Last edited: 2010-09-19 21:47

> Could anyone verify that services (current anope, latest ircservices, and possibly others) deal with +I properly?

Personally I believe (along with many others) we shouldn't be worried about the maintenance of services packages since there are many still compatible with Unreal that are no longer in development. Even though we do have a decent relationship with the 3 larger service projects (ircservices, anope, atheme), they should be responsible for checking the release notes and updating their supported modes accordingly as they should with every release.

Along with that +I was removed so long ago that any service package in current development with supporting code should have their developers tarred, feathered, hanged, and shot.

Nath

2010-09-21 22:09

reporter   ~0016376

Personally, for neatness I believe HIDLE should be unset when a user deopers, especially since the user cannot unset it themselves after deopering. I know I know it doesn't have an effect if the user isn't opered, but I'm a neatfreak :P

katsklaw

2011-12-09 00:31

reporter   ~0016809

Last edited: 2011-12-09 00:57

Found this while browsing the 3.2.10 TODO list.

Anope -
1.8 +I not found.
1.9 +I not found.

Atheme -
6.0.9 +I not found.
7.0.0-alpha11 +I not found.

Epona -
1.5rc3 - +I not found.

IRCServices -
5.1.24 +I found. old +I (invis) supported.

syzop

2012-01-22 16:55

administrator   ~0016889

http://hg.unrealircd.com/hg/unreal/rev/1a0842b10cd0
- New user mode +I (IRCOp only) which hides idle times to other users,
  suggested and patch supplied by Nath & binki (0003953).

Thanks for the patch.

http://hg.unrealircd.com/hg/unreal/rev/58c35ea52a1f
- Added remove_oper_modes(), which works just like remove_oper_snomasks(),
  and ensures that the user does not have any ircop-only user modes after
  de-opering. This (only) fixes the just added +I umode case, but could
  also prevent future bugs.

:)

Thanks for searching katsklaw. That looks good (otherwise I'd have sent an email to some of them). I can live with the ircservices, as it's unmaintained.

Issue History

Date Modified Username Field Change
2010-08-31 05:12 Nath New Issue
2010-08-31 05:12 Nath File Added: hidle.patch
2010-08-31 11:52 Nath Tag Attached: UMODE
2010-08-31 11:52 Nath Tag Attached: I
2010-08-31 11:52 Nath Tag Attached: IDLE
2010-08-31 11:52 Nath Tag Attached: OPER
2010-08-31 11:52 Nath Tag Attached: WHOIS
2010-08-31 22:14 ohnobinki Note Added: 0016322
2010-09-02 21:55 Stealth Note Added: 0016323
2010-09-02 22:10 ohnobinki File Added: unreal-3953-hidle-r1.patch
2010-09-02 22:23 ohnobinki Note Added: 0016324
2010-09-02 22:24 ohnobinki Status new => confirmed
2010-09-03 02:59 Stealth Note Added: 0016325
2010-09-19 16:55 syzop Note Added: 0016367
2010-09-19 16:55 syzop Relationship added child of 0003915
2010-09-19 18:43 ohnobinki File Added: unreal-3953-hidle-r2.patch
2010-09-19 18:44 ohnobinki Note Added: 0016368
2010-09-19 21:32 Stealth Note Added: 0016369
2010-09-19 21:47 Stealth Note Edited: 0016369
2010-09-21 22:09 Nath Note Added: 0016376
2010-09-21 22:12 ohnobinki QA => Not touched yet by developer
2010-09-21 22:12 ohnobinki U4: Need for upstream patch => No need for upstream InspIRCd patch
2010-09-21 22:12 ohnobinki U4: Upstream notification of bug => Not decided
2010-09-21 22:12 ohnobinki U4: Contributor working on this => None
2010-09-21 22:12 ohnobinki Summary Oper Idle times. => Mode +I for hiding oper Idle times.
2011-12-09 00:31 katsklaw Note Added: 0016809
2011-12-09 00:57 katsklaw Note Edited: 0016809
2012-01-22 16:55 syzop Note Added: 0016889
2012-01-22 16:55 syzop Status confirmed => resolved
2012-01-22 16:55 syzop Fixed in Version => 3.2.10-rc1
2012-01-22 16:55 syzop Resolution open => fixed
2012-01-22 16:55 syzop Assigned To => syzop