pteichman / cobe

A Markov chain based text generation library and MegaHAL style chatbot
http://teichman.org/blog/
MIT License
242 stars 51 forks source link

irc-client doesn't join channel #28

Open dylib opened 8 years ago

dylib commented 8 years ago

I've tried almost every combination possible for "channel" (no quotes, ##, #, etc):

# cobe irc-client --server "irc.freenode.net" --port 6667 --channel "#cobefun" --nick "cobie"
INFO: connected to irc.freenode.net:6667

Although the bot never joins the channel... Any suggestions?

Another issue apart from that is when trying to use SSL port (+6697) the irc-client crashes immediately after connecting to the server:

# cobe irc-client --server "irc.freenode.net" --port 6697 --channel "#cobefun" --nick "cobie"
INFO: connected to irc.freenode.net:6697
Traceback (most recent call last):
  File "/usr/bin/cobe", line 11, in <module>
    sys.exit(main())
  File "/usr/lib/python2.7/site-packages/cobe/control.py", line 42, in main
    args.run(args)
  File "/usr/lib/python2.7/site-packages/cobe/commands.py", line 244, in run
    Runner().run(b, args)
  File "/usr/lib/python2.7/site-packages/cobe/bot.py", line 115, in run
    bot.start()
  File "/usr/lib/python2.7/site-packages/irc/client.py", line 1273, in start
    self.reactor.process_forever()
  File "/usr/lib/python2.7/site-packages/irc/client.py", line 276, in process_forever
    self.process_once(timeout)
  File "/usr/lib/python2.7/site-packages/irc/client.py", line 257, in process_once
    self.process_data(i)
  File "/usr/lib/python2.7/site-packages/irc/client.py", line 214, in process_data
    c.process_data()
  File "/usr/lib/python2.7/site-packages/irc/client.py", line 570, in process_data
    self.disconnect("Connection reset by peer")
  File "/usr/lib/python2.7/site-packages/irc/client.py", line 783, in disconnect
    self._handle_event(Event("disconnect", self.server, "", [message]))
  File "/usr/lib/python2.7/site-packages/irc/client.py", line 677, in _handle_event
    self.reactor._handle_event(self, event)
  File "/usr/lib/python2.7/site-packages/irc/client.py", line 396, in _handle_event
    result = handler.callback(connection, event)
  File "/usr/lib/python2.7/site-packages/cobe/bot.py", line 34, in _dispatcher
    irc.client.SimpleIRCClient._dispatcher(self, c, e)
  File "/usr/lib/python2.7/site-packages/irc/client.py", line 1236, in _dispatcher
    method(connection, event)
  File "/usr/lib/python2.7/site-packages/cobe/bot.py", line 56, in on_disconnect
    self._check_connection()
  File "/usr/lib/python2.7/site-packages/cobe/bot.py", line 49, in _check_connection
    conn.username, conn.ircname, conn.localaddress,
AttributeError: 'ServerConnection' object has no attribute 'localaddress'