Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Support user modes adverised by server
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Konstantin Merenkov  
View profile  
 More options Nov 1 2010, 8:43 pm
From: Konstantin Merenkov <kmeren...@gmail.com>
Date: Tue, 2 Nov 2010 03:43:28 +0300
Local: Mon, Nov 1 2010 8:43 pm
Subject: Support user modes adverised by server
Hi all!

Recently I was given a macbook at work, and since I live in IRC I
immediately installed limechat (I wanted this app even few years back
:)).
However, the server I am living on, limechat performs badly ;-(

Nick completion is broken, modes aren't recognized by app, renames
aren't tracked (!), so if user renames I cannot see it, and I see that
memberlist isn't updated.

I filled an issue - http://github.com/psychs/limechat/issues#issue/26
- and decided to do what people do in opensource community - make a
patch. Not only for greater good but to be able to use limechat in my
environment.

Okay, here's the problem:
At the moment limechat has a hardcoded mapping of modes and prefixes,
like 'o' = '@', and if user is named @User, then he will be op and his
nick is User.
To make life simpler, some servers (the only exception I know is
irc.2ch.net) send 005 message with PREFIX=(ohv)@%+ so you can make a
mapping yourself, for example, user @User is an operator, %User is a
halfop, and +User is just a "vote".

Limechat doesn't do anything with this piece of information provided
by a server at the moment.
On irc.irchighway.net mapping is different from hardcoded in limechat,
they treat ! as op but limechat is not aware of that.
This leads to such behaviour: "!" becomes a part of user's nickname,
and in order to complete a nickname, you have to start it with "!".
Also to make whois work, you need to !U<tab> and then erase the first
"!". Because "!" is not a part of nickname at all and whois will
respond with error.

So I added support for PREFIX= to limechat.
Here's what I made so far - github.com/kmerenkov/limechat/tree/005_prefixes
I never coded in objective-c before, so any advice or review is highly
appreciated. For example, I am not familiar with memory management in
objective c.

My changes explained:
I parse this PREFIX= string and make two maps (dicts), one where mode
is a key and prefix is a value, and another one where prefix is a key
and mode is a value.
I could do with one map but they are not always 1:1 mirrored. Like, I
have a default map, and it has few prefixes mapped to the same mode.

So, IRCISupportInfo has this mapping and a new method -
userModeByPrefix, that returns "o" if it was given "@", for example.
IRCUser has a new method setModesMap, and when 'mark' is called, it
returns correct nick prefix for user's mode. The one it received from
server (and I think it is the biggest gain in this changeset). So if
server tells us that operators are ! and not @, it will be so in
member list, just as in many others IRC clients out there.
IRCClient takes rest of everything else.

Please comment on the code, I will improve it and send pull request.
I will try to tidy it up a bit myself, but still, this is my first
time with objective c.

Thank you!

--
Best Regards,
Konstantin Merenkov


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "R: Support user modes adverised by server" by Ryccardo
Ryccardo  
View profile  
 More options May 13 2011, 2:31 pm
From: Ryccardo <ricardovoto...@gmail.com>
Date: Fri, 13 May 2011 11:31:14 -0700 (PDT)
Local: Fri, May 13 2011 2:31 pm
Subject: R: Support user modes adverised by server

I fully support this.

Sometimes it's impossible to get an IRCOp to change the PREFIX=* setting,
even though most IRCDs are `properly` configured (with the exception of
SporksIRCd).


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Konstantin Merenkov  
View profile  
 More options May 14 2011, 8:29 am
From: Konstantin Merenkov <kmeren...@gmail.com>
Date: Sat, 14 May 2011 05:29:03 -0700 (PDT)
Local: Sat, May 14 2011 8:29 am
Subject: Re: R: Support user modes adverised by server
On May 13, 10:31 pm, Ryccardo <ricardovoto...@gmail.com> wrote:

> I fully support this.

> Sometimes it's impossible to get an IRCOp to change the PREFIX=* setting,
> even though most IRCDs are `properly` configured (with the exception of
> SporksIRCd).

Unfortunately it seems like nobody cares :-(
Author doesn't respond on github and continues to improve limechat
without this important bugfix.

You can get old version of limechat with the issue fixed here
https://github.com/kmerenkov/limechat/downloads

Also the reason why I don't use limechat on iOS is that I am afraid it
won't work on the servers I live.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »