Sha256: d2eb483b64896d01ed9034e1fcbc45cd5f450c1e6d94c8f62903fc5bab69a44d
Contents?: true
Size: 1.2 KB
Versions: 16
Compression:
Stored size: 1.2 KB
Contents
Full-fledged config-hash looks like that: ```ruby { # Global section. Basically sets default values for server-hashes 'global': { 'user' => 'ProtonBot', 'nick' => 'YetAnotherBot', 'rnam' => 'An IRC bot in Ruby' # `rnam` is shortened version of `realname` }, # Define servers here 'servers' => { 'server1' => {}, # Will use default config 'server2' => { 'host' => 'irc.foo.bar.ru', 'port' => 6697, 'pass' => 'example_password', 'encoding' => 'koi-8r', 'cmdchar' => '%', 'autojoin' => ['#protonbot'], 'ssl' => true, # This is how you can use SSL 'ssl_crt' => './server2.crt', 'ssl_key' => './server2.key', 'sasl' => true, # This is how you can use SASL authentication. You also MUST provide `pass` variable 'sasl_user' => 'your_SASL_username' # For example, name of NickServ account } } } ``` Server-Hashes are merged in next way: `default.merge(global).merge(server)` Default server-hash: ```ruby { 'host' => '127.0.0.1', 'port' => 6667, 'user' => 'ProtonBot', 'nick' => 'ProtonBot', 'rnam' => 'An IRC bot in Ruby', 'queue_delay' => 0.7, 'cmdchar' => '\\', 'encoding' => 'UTF-8', 'autojoin' => [] } ```
Version data entries
16 entries across 16 versions & 1 rubygems