From 64498d4a12000e7881f6128618a21a17ccb2fb77 Mon Sep 17 00:00:00 2001 From: Daniel Date: Wed, 27 Jan 2010 07:28:05 -0500 Subject: [PATCH] Added opertype and numeric to the config file (both optional and inspire-only) --- bitserv.yaml.dist | 6 +++++- protocols/inspircd.rb | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/bitserv.yaml.dist b/bitserv.yaml.dist index 73d6e29..392acf1 100644 --- a/bitserv.yaml.dist +++ b/bitserv.yaml.dist @@ -2,7 +2,11 @@ uplink: hostname: localhost port: 7776 - protocol: unrealircd + protocol: inspircd + numeric: 00A + #opertype: Services + + #protocol: unrealircd password: PASSWORD HERE diff --git a/protocols/inspircd.rb b/protocols/inspircd.rb index ef23257..4d59ab4 100644 --- a/protocols/inspircd.rb +++ b/protocols/inspircd.rb @@ -14,7 +14,7 @@ def initialize services, config @services = services @config = config - @me = '00B' # TODO: user a config + @me = @config['numeric'] || '00B' @uplink = nil @servers = {} @servers[@me] = services.config['hostname'] @@ -92,7 +92,7 @@ def introduce_clone uid, ts, nick, ident=nil, realname=nil, umodes='io' realname ||= "Your friendly neighborhood #{nick}" send_from_me 'uid', uid, ts, nick, @servers[@me], @servers[@me], ident, '0.0.0.0', ts, "+#{umodes}", realname - send_from uid, 'opertype', 'Services' + send_from uid, 'opertype', @config['opertype'] || 'Services' end def introduce_bot bot