Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 48 lines (40 sloc) 1.231 kb
#! /usr/bin/env ruby
# failirc, a fail IRC server.
#
# Copyleft meh. [http://meh.doesntexist.org | meh.ffff@gmail.com]
#
# This file is part of failirc.
#
# failirc is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# failirc is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with failirc. If not, see <http://www.gnu.org/licenses/>.
require 'optparse'
require 'failirc/server'
options = {}
OptionParser.new do |o|
o.on '-v', '--version', 'output the version' do
puts "Fail IRCd #{IRC.version}"
exit
end
o.on '-c', '--config PATH', 'path to config file' do |value|
options[:config] = value
end
end.parse!
%w[INT KILL].each {|sig|
trap sig do
puts 'FailIRC stopping, bye'
EM.stop_event_loop
end
}
EM.run {
IRC::Server.new(options[:config]).start
}
Jump to Line
Something went wrong with that request. Please try again.