tcpbot changes lol
This commit is contained in:
parent
ce60b01c59
commit
d7104bf05c
@ -162,7 +162,13 @@ module Util
|
||||
def initialize(host)
|
||||
@bot = Cinch::Bot.new do
|
||||
configure do |c|
|
||||
c.server = host
|
||||
hostname, port = host.split(/:/)
|
||||
if(port.nil?)
|
||||
port=6667
|
||||
end
|
||||
c.server = hostname
|
||||
c.port = port
|
||||
c.ssl.use = port==6697
|
||||
mong = Util.instance
|
||||
conf = mong.getCollection("extendobot","config");
|
||||
name = mong.hton(host)
|
||||
@ -173,6 +179,8 @@ module Util
|
||||
if(pass.to_a[0])
|
||||
passwd = pass.to_a[0]["val"]
|
||||
end
|
||||
c.sasl.username=c.nick
|
||||
c.sasl.password=passwd
|
||||
|
||||
chans = mong.getCollection("chans","channels")
|
||||
cList = chans.find({'autojoin' => true, 'server' => name}).collect { |x|
|
||||
@ -193,6 +201,7 @@ module Util
|
||||
p m
|
||||
Timer(5, {:shots => 4}) { m.bot.join(m.channel) }
|
||||
end
|
||||
/*
|
||||
if(passwd != nil)
|
||||
c.plugins.plugins.push(Cinch::Plugins::Identify)
|
||||
c.plugins.options[Cinch::Plugins::Identify] = {
|
||||
@ -201,6 +210,7 @@ module Util
|
||||
:password => passwd
|
||||
}
|
||||
end
|
||||
*/
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user