Closed Bug 955179 Opened 12 years ago Closed 12 years ago

Add NAMESX support (to get all user modes of someone instead of just one)

Categories

(Chat Core :: IRC, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: benediktp, Assigned: clokep)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

*** Original post on bio 1748 at 2012-10-31 13:25:00 UTC *** Currently we don't get all the user modes when we join a channel after someone. The NAMESX extension is supposed to fix this. Thanks to clokep for already looking up documentation: http://wiki.inspircd.org/Modules/2.1/namesx
Attached patch Patch (obsolete) — Splinter Review
*** Original post on bio 1748 as attmnt 2111 at 2012-11-21 15:47:00 UTC *** I really dislike the loop introduced in the normalize method, but I couldn't come up with a cleaned way to do it...
Attachment #8353872 - Flags: review?(aleth)
Assignee: nobody → clokep
Status: NEW → ASSIGNED
Comment on attachment 8353872 [details] [diff] [review] Patch *** Original change on bio 1748 attmnt 2111 at 2012-11-21 21:00:38 UTC *** Thanks for adding this! >+ if (aPrefixes) { >+ let i; >+ for (i = 0; i < str.length && aPrefixes.indexOf(str[i]) != -1; ++i) { } >+ str = str.slice(i); >+ } Like you said, this looks like it wants to be better, but I can't think of anything either.
Attachment #8353872 - Flags: review?(aleth) → review+
Whiteboard: [checkin-needed]
*** Original post on bio 1748 at 2012-11-21 23:51:13 UTC *** (In reply to comment #2) > Comment on attachment 8353872 [details] [diff] [review] (bio-attmnt 2111) [details] > Patch > > Thanks for adding this! > > >+ if (aPrefixes) { > >+ let i; > >+ for (i = 0; i < str.length && aPrefixes.indexOf(str[i]) != -1; ++i) { } > >+ str = str.slice(i); > >+ } > Like you said, this looks like it wants to be better, but I can't think of > anything either. I think I would prefer: while (aPrefixes.indexOf(str[0]) != -1) str = str.slice(1);
*** Original post on bio 1748 at 2012-11-24 21:37:35 UTC *** (In reply to comment #3) [...] > I think I would prefer: > while (aPrefixes.indexOf(str[0]) != -1) > str = str.slice(1); So do you agree with this? If so, are you going to attach a new patch, or should I change it when doing the check-in?
Whiteboard: [checkin-needed]
*** Original post on bio 1748 at 2012-11-25 01:11:26 UTC *** (In reply to comment #4) > (In reply to comment #3) > [...] > > I think I would prefer: > > while (aPrefixes.indexOf(str[0]) != -1) > > str = str.slice(1); > > So do you agree with this? If so, are you going to attach a new patch, or > should I change it when doing the check-in? I'll attach a new patch.
Attached patch Patch v2Splinter Review
*** Original post on bio 1748 as attmnt 2129 at 2012-11-25 03:21:00 UTC *** With Florian's nit.
Attachment #8353890 - Flags: review?(aleth)
Comment on attachment 8353872 [details] [diff] [review] Patch *** Original change on bio 1748 attmnt 2111 at 2012-11-25 03:21:52 UTC was without comment, so any subsequent comment numbers will be shifted ***
Attachment #8353872 - Attachment is obsolete: true
Comment on attachment 8353890 [details] [diff] [review] Patch v2 *** Original change on bio 1748 attmnt 2129 at 2012-11-25 13:09:21 UTC was without comment, so any subsequent comment numbers will be shifted ***
Attachment #8353890 - Flags: review?(aleth) → review+
Whiteboard: [checkin-needed]
*** Original post on bio 1748 at 2012-11-25 23:37:15 UTC *** Committed as http://hg.instantbird.org/instantbird/rev/bac6503567d1
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Whiteboard: [checkin-needed]
Target Milestone: --- → 1.4
Blocks: ircv3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: