Closed flexd closed 10 years ago
Looks like the problem is the in
check - .channels
is keyed off channel name, but you're passing in a Channel
object, and it's never converted to a string. That can probably be fixed by calling str()
before doing the in
check; let me check if that will break anything - otherwise I'll patch it right now.
I fixed https://github.com/ayust/kitnirc/blob/master/kitnirc/client.py#L440, by changing it to if channel.name not in self.server.channels
However, I still can't set a user mode (+o) because it does not seem to recognise o as a proper mode
WARNING 2014-07-14 14:15:09,256 kitnirc.client:0471 - Ignoring request to set channel mode 'o' because it is not a recognized mode.
Fix for original issue is checked in as d2fdc7c1d59b17be2da7f0b3a845edb782bce224. Looking at the other issue now.
argument_modes is set(['b', 'e', 'f', 'I', 'k', 'j', 'L', 'l'])
on client.py#L461
Can you tell me what the values of the variables set on client.py#446 are?
WARNING 2014-07-14 14:27:19,845 kitnirc.client:0449 - Argument Modes set(['b', 'e', 'f', 'I', 'k', 'L'])
WARNING 2014-07-14 14:27:19,845 kitnirc.client:0450 - user Modes set(['A', 'C', 'B', 'G', 'H', 'O', 'N', 'S', 'R', 'T', 'W', 'V', 'a', 'd', 'g', 'i', 'h', 'o', 'q', 'p', 's', 'r', 't', 'w', 'v', 'x', 'z'])
WARNING 2014-07-14 14:27:19,846 kitnirc.client:0451 - List modes set(['I', 'b', 'e'])
WARNING 2014-07-14 14:27:19,846 kitnirc.client:0452 - always_arg_modes set(['k', 'L', 'f'])
WARNING 2014-07-14 14:27:19,846 kitnirc.client:0453 - set_arg_modes set(['j', 'l'])
WARNING 2014-07-14 14:27:19,846 kitnirc.client:0454 - toggle_modes set(['A', 'C', 'G', 'K', 'M', 'O', 'N', 'Q', 'S', 'R', 'T', 'V', 'Z', 'c', 'i', 'j', 'm', 'l', 'n', 'p', 's', 'r', 'u', 't', 'z'])
What network is this on? Looks like it's not including user-channel-privilege modes in the set of always-arg modes, which is unfortunate. :<
irc.coldfront.net
Your host is snow.coldfront.net, running version Unreal3.2.9 CMDS=KNOCK,MAP,DCCALLOW,USERIP UHNAMES NAMESX SAFELIST HCN MAXCHANNELS=40 CHANLIMIT=#:40 MAXLIST=b:60,e:60,I:60 NICKLEN=30 CHANNELLEN=32 TOPICLEN=307 KICKLEN=307 AWAYLEN=307 :are supported by this server MAXTARGETS=20 WALLCHOPS WATCH=128 WATCHOPTS=A SILENCE=15 MODES=12 CHANTYPES=# PREFIX=(qaohv)~&@%+ CHANMODES=beI,kfL,lj,psmntirRcOAQKVCuzNSMTGZ NETWORK=Coldfront CASEMAPPING=ascii EXTBAN=~,qjncrR ELIST=MNUCT :are supported by this server STATUSMSG=~&@%+ EXCEPTS INVEX :are supported by this server
Okay, I think I see the issue. mode()
needs to incorporate _get_prefixes
output into its list of modes that can be set in a channel. I'll patch that quick.
I think 29edb9a818cbd72ecedb706ca17694521c1b26b8 should fix the second issue. Can you see if that solves your problem?
A somewhat related issue:
WARNING 2014-07-17 13:33:53,342 kitnirc.client:0479 - Ignoring request to set channel mode 'ov' because it is not a recognized mode.
Trying to set two modes at the same time should be possible?
Add them as separate dictionary entries, not the same one.
On Thu Jul 17 2014 at 4:34:56 AM, Kristoffer Berdal < notifications@github.com> wrote:
A somewhat related issue:
WARNING 2014-07-17 13:33:53,342 kitnirc.client:0479 - Ignoring request to set channel mode 'ov' because it is not a recognized mode.
Trying to set two modes at the same time should be possible?
— Reply to this email directly or view it on GitHub https://github.com/ayust/kitnirc/issues/13#issuecomment-49295599.
I am trying to op someone based on a command, but kitnirc seems determined that I am not in the channel.
Log output
Relevant code: https://github.com/ayust/kitnirc/blob/master/kitnirc/client.py#L429