Comments (3)
running your sample code from irb, I get the same error:
$ irb 001:0> require 'cinch' true 002:0> Cinch::VERSION "1.0.1" 003:0> class Bot 004:1> def self.bot 005:2> bot = Cinch::Bot.new do 006:3* configure do |c| 007:4* c.server = "irc.freenode.org" 008:4> c.nick = "TestmeBot" 009:4> c.channels = ["#cinch"] 010:4> end 011:3> 012:3* on :message, /^!msg (.+?) (.+)/ do |m, who, text| 013:4* User(who).send text 014:4> end 015:3> end 016:2> end 017:1> end nil 018:0> Bot.bot.start !! Connecting to irc.freenode.org:6667 << NICK TestmeBot !! /usr/lib/ruby/gems/1.9.3dev/gems/cinch-1.0.1/lib/cinch/irc.rb:46:in `gets': code converter not found (UTF-8 to UTF-8) (Encoding::ConverterNotFoundError) !! /usr/lib/ruby/gems/1.9.3dev/gems/cinch-1.0.1/lib/cinch/irc.rb:46:in `block in connect' << USER TestmeBot 0 * :cinch fatal: deadlock detected from /usr/lib/ruby/1.9.3dev/thread.rb:189:in `sleep' from /usr/lib/ruby/1.9.3dev/thread.rb:189:in `block in pop' from :10:in `synchronize' from /usr/lib/ruby/1.9.3dev/thread.rb:184:in `pop' from /usr/lib/ruby/gems/1.9.3dev/gems/cinch-1.0.1/lib/cinch/message_queue.rb:52:in `process!' from /usr/lib/ruby/gems/1.9.3dev/gems/cinch-1.0.1/lib/cinch/irc.rb:60:in `connect' from /usr/lib/ruby/gems/1.9.3dev/gems/cinch-1.0.1/lib/cinch/bot.rb:404:in `start' from (irb):18 from /usr/bin/irb:12:in `'
my encoding stuff should be correct. my shell LANG is es_EC.utf8 and ruby picks it up as utf-8 encoding. Here is the encoding stuff from my .irbrc
# encoding: utf-8 [...] Encoding.default_internal="utf-8" Encoding.default_external="utf-8"
from cinch.
Setting default_internal to the same value as default_external will lead to Ruby attempting to convert from utf-8 to utf-8, which is not possible.
I might include a check/fix for that, but I am unsure yet.
from cinch.
check if internal and external encoding are the same
If setting both internal_encoding and external_encoding to the same
encoding, Ruby will raise an exception because it can't convert
between the two. But apparantly, some users have such a setup, so we
explicitly check for that and don't set an internal encoding for the
socket if it'd equal the external encoding.
Closed by 06891c6
from cinch.
Related Issues (20)
- How create an event for all message sended ? HOT 1
- Can I running In Background? HOT 3
- Site is offline HOT 1
- Cinch::Helper can't get instances of Channel and User objects HOT 5
- Upon timeout (either through internet loss or server connection loss), cinch replays already-executed messages and commands. HOT 3
- "Write" and "ping" irc threads still open after bot.quit HOT 1
- Uppercase CTCP commands so they always match
- Is this still maintained? HOT 3
- Method name typo cinch v2.3.3 HOT 1
- Support for reverse DCC SEND
- Sometimes on_channel handler receives message concatenated with other one
- IRCv3 tags broken if tag value contains a colon HOT 4
- backup file in gem HOT 3
- ":invite" event is not documented HOT 2
- adding proxy support HOT 1
- Bot#oper crashes the process when used specific IRCds
- Mismatch between code and released version. HOT 1
- Missing documentation for bot configuration HOT 5
- idle method always return 0 HOT 11
- SASL authentication times out HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cinch.