Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Channel windows not created (irssi-proxy) #39

Closed
rasher opened this issue Feb 8, 2011 · 6 comments
Closed

Channel windows not created (irssi-proxy) #39

rasher opened this issue Feb 8, 2011 · 6 comments
Labels

Comments

@rasher
Copy link
Contributor

rasher commented Feb 8, 2011

In a number of scenarios, channel windows don't seem to get created when I connect through irssi-proxy. Irssi-proxy acts as a plugin to irssi (an irc client), that presents the state of the irssi session as an IRC Server (sort of like a bouncer, but built into my "everyday" irc client).

  1. On connect, channel windows for the channels I am already joined to are not created.
  2. If I do a join from yaaic, a channel window is not created.
  3. If I do a join from irssi, while yaaic is connected, a channel window is not created.

I tried connecting to irssi-proxy with telnet, to see what a client would see. The transcript is below (scrubbed). You'll notice that the nick gets changed (to whatever the nick is in irssi, regardless what the connecting client requests), and the server sends joins for a channel (or more).

$ telnet localhost 7779
Trying ::1...
escape character is '^T'.
Connected to localhost.
Escape character is '^T'.
PASS password
NICK somenick
USER jonas jonas jonas :jonas jonas
:somenick!proxy NICK :nickname
:IrcNetwork.proxy 001 nickname :Welcome to the Internet Relay Network nickname!rasher@proxy
:IrcNetwork.proxy 002 nickname :Your host is irssi-proxy, running version 0.8.15
:IrcNetwork.proxy 003 nickname :This server was created ...
:IrcNetwork.proxy 004 nickname IrcNetwork.proxy 0.8.15 oirw abiklmnopqstv
:IrcNetwork.proxy 005 nickname MODES=6 MAXBANS=45 WALLVOICES SILENCE=15 CHANTYPES=#& CASEMAPPING=rfc1459 CHANMODES=b,k,l,imnpstrDducCNMT MAXCHANNELLEN=200 PREFIX=(ov)@+ USERIP WHOX NETWORK=IrcNetwork CNOTICE CPRIVMSG NICKLEN=15 :are supported by this server
:IrcNetwork.proxy 005 nickname MAXNICKLEN=15 MAXCHANNELS=20 WALLCHOPS TOPICLEN=250 AWAYLEN=160 KICKLEN=250 CHANNELLEN=200 STATUSMSG=@+ :are supported by this server
:IrcNetwork.proxy 251 nickname :There are 0 users and 0 invisible on 1 servers
:IrcNetwork.proxy 255 nickname :I have 0 clients, 0 services and 0 servers
:IrcNetwork.proxy 422 nickname :MOTD File is missing
:nickname!rasher@proxy MODE nickname :+i
:nickname!rasher@proxy JOIN #channel
:IrcNetwork.proxy 353 nickname @ #channel :@nickname
:IrcNetwork.proxy 366 nickname #channel :End of /NAMES list.
:IrcNetwork.proxy 332 nickname #channel :topic
:IrcNetwork.proxy 333 nickname #channel nick!~ident@hostname 1297116799
QUIT moo
Connection closed by foreign host.
@carstenn
Copy link

carstenn commented Feb 8, 2011

Think the problem is with the 422 reply.
:IrcNetwork.proxy 422 nickname :MOTD File is missing

https://github.com/pocmo/Yaaic/blob/master/application/src/org/jibble/pircbot/PircBot.java#L237

A quick fix would be trying to add a MOTD to the irssi-proxy, not sure how.
Or wait for a hack to ignore the 422 reply, since I don't see the reason for a disconnect if there is no MOTD.

@pocmo
Copy link
Owner

pocmo commented Feb 8, 2011

Hi. Thanks for the detailed report!

I think it could be the nickchange before the connect has been done. In the code of the PircBot API it looks like the connect is always done if a 004 reply was sent by the server which is obviously done here.

I'll use your log to fake a server and will have a look at how yaaic behaves.

@pocmo
Copy link
Owner

pocmo commented Feb 8, 2011

Okay. I did some tests. It seems like yaaic ignores the NICK line completly
:somenick!proxy NICK :nickname

Therefore it ignores all the JOIN commands because the nicknames do not match (another user joined some channel we are not in currently).

@pocmo
Copy link
Owner

pocmo commented Feb 8, 2011

Okay, I had to fix two things in the PircBot Framework:

  • The nickname was not parsed correctly as "somenick!proxy" does not contain a hostname part with @ which was always assumed
  • In the connect loop the nickname was always overwritten with the one set in the settings. Therefore even when the nickname was parsed correctly it was overwritten again before the JOIN messages were parsed.

It works now correctly with the above log as server response. Can you verify that by running the following build?

http://dl.dropbox.com/u/8801842/yaaic-20110209.apk

@rasher
Copy link
Contributor Author

rasher commented Feb 8, 2011

Wow, that was quick! I can confirm that the apk you posted works beautifully. Thanks a lot.

@pocmo
Copy link
Owner

pocmo commented Feb 8, 2011

Great :)

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants