konn-rupircd 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Manifest +21 -0
- data/Rakefile +16 -0
- data/VERSION +1 -0
- data/changes.html +41 -0
- data/changes.ja.html +41 -0
- data/index.html +75 -0
- data/index.ja.html +72 -0
- data/info.txt +54 -0
- data/ircd.rb +26 -0
- data/lib/rupircd/channel.rb +418 -0
- data/lib/rupircd/conf.rb +26 -0
- data/lib/rupircd/message.rb +254 -0
- data/lib/rupircd/server.rb +677 -0
- data/lib/rupircd/user.rb +103 -0
- data/lib/rupircd/utils.rb +32 -0
- data/lib/rupircd.rb +12 -0
- data/mkpassword.rb +3 -0
- data/motd.txt +16 -0
- data/rupircd.gemspec +72 -0
- data/sample.conf +10 -0
- data/usage.html +112 -0
- data/usage.ja.html +112 -0
- metadata +25 -1
data/lib/rupircd/user.rb
ADDED
@@ -0,0 +1,103 @@
|
|
1
|
+
=begin
|
2
|
+
= rupircd -- Ruby Pseudo IRC Deamon
|
3
|
+
|
4
|
+
ver 0.6 2009-08-11T23:45:52+09:00
|
5
|
+
|
6
|
+
Copyright (c) 2009 Hiromi Ishii
|
7
|
+
|
8
|
+
You can redistribute it and/or modify it under the same term as Ruby.
|
9
|
+
=end
|
10
|
+
|
11
|
+
require 'rupircd/channel'
|
12
|
+
|
13
|
+
module IRCd
|
14
|
+
|
15
|
+
class User
|
16
|
+
attr_reader :user, :host, :identifier, :socket
|
17
|
+
attr_accessor :nick, :away, :invisible, :wallop, :restriction, :operator, :local_operator, :s, :joined_channels, :real
|
18
|
+
@@identifier = 0
|
19
|
+
|
20
|
+
def to_s
|
21
|
+
@nick + "!" + @user + "@" + @host
|
22
|
+
end
|
23
|
+
|
24
|
+
def initialize(nick, user, host, real, socket, mode=0)
|
25
|
+
@nick = nick
|
26
|
+
@user = user
|
27
|
+
@host = host
|
28
|
+
@real = real
|
29
|
+
@identifier = (@@identifier += 1)
|
30
|
+
@away = ""
|
31
|
+
@invisible = false
|
32
|
+
@wallop = false
|
33
|
+
@restriction = false
|
34
|
+
@operator = false
|
35
|
+
@local_operator = false
|
36
|
+
@s = false
|
37
|
+
@socket = socket
|
38
|
+
@joined_channels = []
|
39
|
+
end
|
40
|
+
|
41
|
+
def away?
|
42
|
+
!@away.empty?
|
43
|
+
end
|
44
|
+
|
45
|
+
def to_a
|
46
|
+
[@nick, @user, @host, "*", @real]
|
47
|
+
end
|
48
|
+
|
49
|
+
def set_flags(*flags)
|
50
|
+
rls = []
|
51
|
+
flags.each{|flg|
|
52
|
+
fl = flg[0,1]
|
53
|
+
toggle = flg[0] == ?+
|
54
|
+
flg[1..-1].split("").each{|md|
|
55
|
+
case md
|
56
|
+
when "i"
|
57
|
+
@invisible = toggle
|
58
|
+
fl << "i"
|
59
|
+
when "w"
|
60
|
+
@wallop = toggle
|
61
|
+
fl << "w"
|
62
|
+
when"r"
|
63
|
+
if toggle
|
64
|
+
@restriction = true
|
65
|
+
fl << "r"
|
66
|
+
end
|
67
|
+
when "o"
|
68
|
+
unless toggle
|
69
|
+
@operator = false
|
70
|
+
fl << "o"
|
71
|
+
end
|
72
|
+
when "O"
|
73
|
+
unless toggle
|
74
|
+
@local_operator = false
|
75
|
+
fl << "O"
|
76
|
+
end
|
77
|
+
when "s"
|
78
|
+
@s = toggle
|
79
|
+
fl << "s"
|
80
|
+
end
|
81
|
+
}
|
82
|
+
rls << fl
|
83
|
+
}
|
84
|
+
rls
|
85
|
+
end
|
86
|
+
|
87
|
+
def get_mode_flags
|
88
|
+
mode = ""
|
89
|
+
mode << "i" if @invisible
|
90
|
+
mode << "w" if @wallop
|
91
|
+
mode << "r" if @restriction
|
92
|
+
mode << "o" if @operator
|
93
|
+
mode << "O" if @local_operator
|
94
|
+
mode << "s" if @s
|
95
|
+
mode
|
96
|
+
end
|
97
|
+
|
98
|
+
def ==(other)
|
99
|
+
@identifier == other.identifier
|
100
|
+
end
|
101
|
+
|
102
|
+
end
|
103
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
=begin
|
2
|
+
= rupircd -- Ruby Pseudo IRC Deamon
|
3
|
+
|
4
|
+
ver 0.6 2009-08-11T23:45:52+09:00
|
5
|
+
|
6
|
+
Copyright (c) 2009 Hiromi Ishii
|
7
|
+
|
8
|
+
You can redistribute it and/or modify it under the same term as Ruby.
|
9
|
+
=end
|
10
|
+
|
11
|
+
module IRCd
|
12
|
+
|
13
|
+
module Utils
|
14
|
+
|
15
|
+
def channame?(str)
|
16
|
+
str =~ /^[#+!\+]/
|
17
|
+
end
|
18
|
+
|
19
|
+
def correct_nick?(nick)
|
20
|
+
nick =~ /^[a-zA-Z\x5B-\x60\x7B-\x7D][-\w\x5B-\x60\x7B-\x7D]{0,14}$/
|
21
|
+
end
|
22
|
+
|
23
|
+
def mask_to_regex(mask)
|
24
|
+
mask = Regexp.escape(mask)
|
25
|
+
mask.gsub!('\*', '.*')
|
26
|
+
mask.gsub!('\?', '.')
|
27
|
+
return Regexp.new('^' + mask + '$')
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
data/lib/rupircd.rb
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
=begin
|
2
|
+
= rupircd -- Ruby Pseudo IRC Deamon
|
3
|
+
|
4
|
+
ver 0.6 2009-08-11T23:45:52+09:00
|
5
|
+
|
6
|
+
Copyright (c) 2009 Hiromi Ishii
|
7
|
+
|
8
|
+
You can redistribute it and/or modify it under the same term as Ruby.
|
9
|
+
=end
|
10
|
+
|
11
|
+
require 'rupircd/server.rb'
|
12
|
+
require 'rupircd/conf.rb'
|
data/mkpassword.rb
ADDED
data/motd.txt
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
************** ほげほげほげほげ **************
|
2
|
+
みんな!
|
3
|
+
ほげほげしてるかい!?
|
4
|
+
ほげほげしてないのなら
|
5
|
+
いまからほげほげすればいいさ!
|
6
|
+
|
7
|
+
ほげほげはせかいのほげほげだ!
|
8
|
+
さあ、Let's ほげほげ!
|
9
|
+
|
10
|
+
|
11
|
+
かの有名なパスカルは、
|
12
|
+
「人間は、考えるほげほげである!」
|
13
|
+
とさとったそうだよ!
|
14
|
+
みんなも、パスカルに習って
|
15
|
+
ほげほげしようぜ!!!!
|
16
|
+
************** ほげほげほげほげ **************
|
data/rupircd.gemspec
ADDED
@@ -0,0 +1,72 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{rupircd}
|
8
|
+
s.version = "0.6.1"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["konn"]
|
12
|
+
s.date = %q{2009-08-12}
|
13
|
+
s.description = %q{rupircd is a light IRC daemon written in 100% pure ruby.}
|
14
|
+
s.email = %q{mr_konn[at]jcom[dot]home[dot]ne[dot]jp}
|
15
|
+
s.executables = ["mkpassword", "rupircd"]
|
16
|
+
s.extra_rdoc_files = [
|
17
|
+
"Changes.ja.rd",
|
18
|
+
"Changes.rd",
|
19
|
+
"README.ja.rd",
|
20
|
+
"README.rd",
|
21
|
+
"Usage.ja.rd",
|
22
|
+
"Usage.rd"
|
23
|
+
]
|
24
|
+
s.files = [
|
25
|
+
"Changes.ja.rd",
|
26
|
+
"Changes.rd",
|
27
|
+
"Manifest",
|
28
|
+
"README.ja.rd",
|
29
|
+
"README.rd",
|
30
|
+
"Rakefile",
|
31
|
+
"Usage.ja.rd",
|
32
|
+
"Usage.rd",
|
33
|
+
"VERSION",
|
34
|
+
"bin/mkpassword",
|
35
|
+
"bin/rupircd",
|
36
|
+
"changes.html",
|
37
|
+
"changes.ja.html",
|
38
|
+
"index.html",
|
39
|
+
"index.ja.html",
|
40
|
+
"info.txt",
|
41
|
+
"ircd.rb",
|
42
|
+
"lib/rupircd.rb",
|
43
|
+
"lib/rupircd/channel.rb",
|
44
|
+
"lib/rupircd/conf.rb",
|
45
|
+
"lib/rupircd/message.rb",
|
46
|
+
"lib/rupircd/server.rb",
|
47
|
+
"lib/rupircd/user.rb",
|
48
|
+
"lib/rupircd/utils.rb",
|
49
|
+
"mkpassword.rb",
|
50
|
+
"motd.txt",
|
51
|
+
"rupircd.gemspec",
|
52
|
+
"sample.conf",
|
53
|
+
"usage.html",
|
54
|
+
"usage.ja.html"
|
55
|
+
]
|
56
|
+
s.has_rdoc = true
|
57
|
+
s.homepage = %q{http://github.com/konn/rupircd}
|
58
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
59
|
+
s.require_paths = ["lib"]
|
60
|
+
s.rubygems_version = %q{1.3.1}
|
61
|
+
s.summary = %q{rupircd - RUby Pseudo IRC Daemon}
|
62
|
+
|
63
|
+
if s.respond_to? :specification_version then
|
64
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
65
|
+
s.specification_version = 2
|
66
|
+
|
67
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
68
|
+
else
|
69
|
+
end
|
70
|
+
else
|
71
|
+
end
|
72
|
+
end
|
data/sample.conf
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
Conf = {
|
2
|
+
:Motd => open("motd.txt"){|f| f.read },
|
3
|
+
:Info => open("info.txt"){|f| f.read },
|
4
|
+
:Port => 6667,
|
5
|
+
:Opers => {"superoper*"=>"329435e5e66be809a656af105f42401e"},
|
6
|
+
# :Encoding => "UTF-8",
|
7
|
+
:MaxClients => 100,
|
8
|
+
:PINGInterval => 10,
|
9
|
+
:PINGLimit => 90,
|
10
|
+
}
|
data/usage.html
ADDED
@@ -0,0 +1,112 @@
|
|
1
|
+
<?xml version="1.0" ?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
6
|
+
<head>
|
7
|
+
<title>Usage.rd</title>
|
8
|
+
</head>
|
9
|
+
<body>
|
10
|
+
<h1><a name="label-0" id="label-0">Usage</a></h1><!-- RDLabel: "Usage" -->
|
11
|
+
<h2><a name="label-1" id="label-1">Start up</a></h2><!-- RDLabel: "Start up" -->
|
12
|
+
<p>To start up server on 6667, to execute this command: </p>
|
13
|
+
<pre>$ ruby ircd.rb [Configuration File(e.g. sample.conf)]</pre>
|
14
|
+
<p>It might shut down when it received ^C (SIGINT).</p>
|
15
|
+
<h2><a name="label-2" id="label-2">How to write configuration file</a></h2><!-- RDLabel: "How to write configuration file" -->
|
16
|
+
<p>Contents of sample.conf might be like this:</p>
|
17
|
+
<pre>Conf = {
|
18
|
+
:Motd => open("motd.txt"){|f| f.read }.tojis,
|
19
|
+
:Info => open("info.txt"){|f| f.read }.tojis,
|
20
|
+
:Port => 6667,
|
21
|
+
:Opers => {"superoper*"=>"ea703e7aa1efda0064eaa507d9e8ab7e"},
|
22
|
+
:MaxClients => 100,
|
23
|
+
:PINGInterval => 300,
|
24
|
+
:PINGLimit => 90,
|
25
|
+
}</pre>
|
26
|
+
<p>As you can see, its contents is written in Ruby Hash Object.
|
27
|
+
To configure, write like this;</p>
|
28
|
+
<pre>
|
29
|
+
:name => value, </pre>
|
30
|
+
<p>between "{" and "}" .</p>
|
31
|
+
<p>For now, you can configure these items: </p>
|
32
|
+
<dl>
|
33
|
+
<dt><a name="label-3" id="label-3">:Motd</a></dt><!-- RDLabel: ":Motd" -->
|
34
|
+
<dd>
|
35
|
+
Set down the paragraph shown first when user connected to Server. It's good to write the information, greetings, your poem, line-shoot, bla bla bla...
|
36
|
+
In sample.conf, it is set to contents of "info.txt".
|
37
|
+
</dd>
|
38
|
+
<dt><a name="label-4" id="label-4">:Info</a></dt><!-- RDLabel: ":Info" -->
|
39
|
+
<dd>
|
40
|
+
Set down the paragraph for answer to INFO command.
|
41
|
+
It's good to write server's information or history.
|
42
|
+
In sample.conf, it is set to contents of "info.txt".
|
43
|
+
</dd>
|
44
|
+
<dt><a name="label-5" id="label-5">:Port</a></dt><!-- RDLabel: ":Port" -->
|
45
|
+
<dd>
|
46
|
+
The port server will be running on. Please select unused port. (recommended: 6660 ~ 6669).
|
47
|
+
In sample.conf, it is set to 6667.
|
48
|
+
</dd>
|
49
|
+
<dt><a name="label-6" id="label-6">:Opers</a></dt><!-- RDLabel: ":Opers" -->
|
50
|
+
<dd>
|
51
|
+
Hash of password and the mask of server operator's name.
|
52
|
+
To know more detail, read "((How to use OPER))".
|
53
|
+
</dd>
|
54
|
+
<dt><a name="label-7" id="label-7">:MaxClients</a></dt><!-- RDLabel: ":MaxClients" -->
|
55
|
+
<dd>
|
56
|
+
Number of the clients which can connect to server in same time.
|
57
|
+
In sample.conf, it is set to 100.
|
58
|
+
</dd>
|
59
|
+
<dt><a name="label-8" id="label-8">:PINGInterval</a></dt><!-- RDLabel: ":PINGInterval" -->
|
60
|
+
<dd>
|
61
|
+
Interval of time to ping (sec).
|
62
|
+
After some seconds(set down in :PINGLimit) server send to PING, server disconnect the clients if clients doesn't respond PONG.
|
63
|
+
In sample.conf, it's set to 300sec.
|
64
|
+
</dd>
|
65
|
+
<dt><a name="label-9" id="label-9">:PINGLimit</a></dt><!-- RDLabel: ":PINGLimit" -->
|
66
|
+
<dd>
|
67
|
+
Seconds the server wait for PONG message from clients after server sent PING.
|
68
|
+
In sample.conf, it's set to 90 seconds.
|
69
|
+
</dd>
|
70
|
+
</dl>
|
71
|
+
<p>I will add items when in the mood.</p>
|
72
|
+
<h1><a name="label-10" id="label-10">How to use OPER</a></h1><!-- RDLabel: "How to use OPER" -->
|
73
|
+
<h2><a name="label-11" id="label-11">Configuration</a></h2><!-- RDLabel: "Configuration" -->
|
74
|
+
<p>Oper means Server Operator. It is user who has the authority to restart, stop and rehash server.</p>
|
75
|
+
<p>To become an Oper requires the pair of correct OPER nick name and password. Conversely, anybody can become an Oper if he/she knows those.
|
76
|
+
To get authority of Oper, you have to send OPER message to the server.
|
77
|
+
For example, if Oper nick name is oper and password is foo, to send this:</p>
|
78
|
+
<pre>OPER oper1 hoge</pre>
|
79
|
+
<p>to be an Oper.</p>
|
80
|
+
<p>You can set these combination in the configuration file. Like this:</p>
|
81
|
+
<dl>
|
82
|
+
<dt><a name="label-12" id="label-12">Opers => {OPER1 => pass1, OPER2 => pass2, ...},</a></dt><!-- RDLabel: "Opers => {OPER1 => pass1, OPER2 => pass2, ...}," -->
|
83
|
+
</dl>
|
84
|
+
<p>For example, in sample.conf:</p>
|
85
|
+
<dl>
|
86
|
+
<dt><a name="label-13" id="label-13">Opers => {"superoper*" => "ea703e7aa1efda0064eaa507d9e8ab7e"},</a></dt><!-- RDLabel: "Opers => {"superoper*" => "ea703e7aa1efda0064eaa507d9e8ab7e"}," -->
|
87
|
+
</dl>
|
88
|
+
<p>In this case, relate Oper name starts from "superoper" and password "hoge".</p>
|
89
|
+
<p>Password is encrypted by MD5. To know the MD5-value for any password, use included program "mkpassword.rb" :</p>
|
90
|
+
<pre>$ ruby mkpassword.rb password</pre>
|
91
|
+
<h2><a name="label-14" id="label-14">Available commands on Oper</a></h2><!-- RDLabel: "Available commands on Oper" -->
|
92
|
+
<dl>
|
93
|
+
<dt><a name="label-15" id="label-15">REHASH</a></dt><!-- RDLabel: "REHASH" -->
|
94
|
+
<dd>
|
95
|
+
Reload the configuration file.
|
96
|
+
</dd>
|
97
|
+
<dt><a name="label-16" id="label-16">CLOSE</a></dt><!-- RDLabel: "CLOSE" -->
|
98
|
+
<dd>
|
99
|
+
Close the connection between all clients and the server.
|
100
|
+
</dd>
|
101
|
+
<dt><a name="label-17" id="label-17">RESTART</a></dt><!-- RDLabel: "RESTART" -->
|
102
|
+
<dd>
|
103
|
+
Restart the server.
|
104
|
+
</dd>
|
105
|
+
<dt><a name="label-18" id="label-18">DIE</a></dt><!-- RDLabel: "DIE" -->
|
106
|
+
<dd>
|
107
|
+
Shut down the server.
|
108
|
+
</dd>
|
109
|
+
</dl>
|
110
|
+
|
111
|
+
</body>
|
112
|
+
</html>
|
data/usage.ja.html
ADDED
@@ -0,0 +1,112 @@
|
|
1
|
+
<?xml version="1.0" ?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
6
|
+
<head>
|
7
|
+
<title>Usage.ja.rd</title>
|
8
|
+
</head>
|
9
|
+
<body>
|
10
|
+
<h1><a name="label-0" id="label-0">Usage</a></h1><!-- RDLabel: "Usage" -->
|
11
|
+
<h2><a name="label-1" id="label-1">起動</a></h2><!-- RDLabel: "起動" -->
|
12
|
+
<pre>$ ruby ircd.rb [設定ファイル(sample.conf など)]</pre>
|
13
|
+
<p>と実行すると、ローカルのポート6667でサーバが開始されます。
|
14
|
+
終了するときは^Cで落ちるとおもいます。</p>
|
15
|
+
<h2><a name="label-2" id="label-2">設定ファイルの書き方</a></h2><!-- RDLabel: "設定ファイルの書き方" -->
|
16
|
+
<p>sample.confを開けるとこんな感じに成っていると思います。</p>
|
17
|
+
<pre>Conf = {
|
18
|
+
:Motd => open("motd.txt"){|f| f.read }.tojis,
|
19
|
+
:Info => open("info.txt"){|f| f.read }.tojis,
|
20
|
+
:Port => 6667,
|
21
|
+
:Opers => {"superoper*"=>"ea703e7aa1efda0064eaa507d9e8ab7e"},
|
22
|
+
:MaxClients => 100,
|
23
|
+
:PINGInterval => 300,
|
24
|
+
:PINGLimit => 90,
|
25
|
+
}</pre>
|
26
|
+
<p>設定はRubyのHashオブジェクトになっています。{}の中に</p>
|
27
|
+
<pre>
|
28
|
+
:設定名 => 値, </pre>
|
29
|
+
<p>という感じで設定を書いていきます。</p>
|
30
|
+
<p>設定項目はこんなかんじです。</p>
|
31
|
+
<dl>
|
32
|
+
<dt><a name="label-3" id="label-3">:Motd</a></dt><!-- RDLabel: ":Motd" -->
|
33
|
+
<dd>
|
34
|
+
MOTD(Message of the day)で出力される文章を指定します。
|
35
|
+
サーバに接続すると最初に渡されるメッセージです。お知らせとか時候の挨拶とか詩とかプチ自慢とかを書くといいでしょう。
|
36
|
+
サンプルでは"motd.txt"の内容が出力されるようになっています。
|
37
|
+
</dd>
|
38
|
+
<dt><a name="label-4" id="label-4">:Info</a></dt><!-- RDLabel: ":Info" -->
|
39
|
+
<dd>
|
40
|
+
INFOで出力される文章を指定します。
|
41
|
+
サーバの情報とか沿革を書くといいんじゃないでしょうか。
|
42
|
+
サンプルでは"info.txt"の内容が出力される設定になっています。
|
43
|
+
</dd>
|
44
|
+
<dt><a name="label-5" id="label-5">:Port</a></dt><!-- RDLabel: ":Port" -->
|
45
|
+
<dd>
|
46
|
+
サーバを実行するポートです。空いているポートを指定してください(6660 ~ 6669 辺りが良いと思います。)
|
47
|
+
サンプルでは 6667 です。
|
48
|
+
</dd>
|
49
|
+
<dt><a name="label-6" id="label-6">:Opers</a></dt><!-- RDLabel: ":Opers" -->
|
50
|
+
<dd>
|
51
|
+
サーバオペレータの名前マスクとパスワードのHashを指定します。
|
52
|
+
詳しくはOperの使い方を参照。
|
53
|
+
</dd>
|
54
|
+
<dt><a name="label-7" id="label-7">:MaxClients</a></dt><!-- RDLabel: ":MaxClients" -->
|
55
|
+
<dd>
|
56
|
+
同時に繋げるクライアント数。サンプルでは100。
|
57
|
+
</dd>
|
58
|
+
<dt><a name="label-8" id="label-8">:PINGInterval</a></dt><!-- RDLabel: ":PINGInterval" -->
|
59
|
+
<dd>
|
60
|
+
クライアントにPINGを打つ間隔(秒)。PINGとは、クライアントとの接続が切れていないか確認するためのメッセージです。
|
61
|
+
PINGを打って一定時間(PINGLimitで指定された秒数)経過しても返答(PONG)が無ければ、クライアントとの接続を切ります。
|
62
|
+
サンプルでは300秒に一回です。
|
63
|
+
</dd>
|
64
|
+
<dt><a name="label-9" id="label-9">:PINGLimit</a></dt><!-- RDLabel: ":PINGLimit" -->
|
65
|
+
<dd>
|
66
|
+
PINGを打ってからPONGが返ってくるまで待つ時間(秒)。指定された時間を過ぎても返ってこない場合、クライアントとの接続を打ち切ります。
|
67
|
+
サンプルでは90秒です。
|
68
|
+
</dd>
|
69
|
+
</dl>
|
70
|
+
<p>気が向いたらもっと増やします。</p>
|
71
|
+
<h1><a name="label-10" id="label-10">Operの使い方</a></h1><!-- RDLabel: "Operの使い方" -->
|
72
|
+
<h2><a name="label-11" id="label-11">Operの設定法</a></h2><!-- RDLabel: "Operの設定法" -->
|
73
|
+
<p>Operとは、サーバオペレータの事で、平たく云ってしまえばサーバを再起動させたり終了させたり、再読込みさせたりする権限のあるユーザの事です。</p>
|
74
|
+
<p>Operに成るには、正しい OPER名 とパスワードの組合せが必要です。逆に云えば、それさえ分かれば誰でもOperに成れると云うことです。
|
75
|
+
Operになるには、サーバにOPERコマンドを打つ必要があります。
|
76
|
+
例えば、OPER名が oper1, パスワードが hoge の場合、</p>
|
77
|
+
<pre>OPER oper1 hoge</pre>
|
78
|
+
<p>とすると、OPER権限が貰えるわけです。</p>
|
79
|
+
<p>この組合せの設定は設定ファイルのOpersの欄で行います。こんな書式です:</p>
|
80
|
+
<dl>
|
81
|
+
<dt><a name="label-12" id="label-12">Opers => {OPER名1 => パスワード1, OPER名2 => パスワード2, ...},</a></dt><!-- RDLabel: "Opers => {OPER名1 => パスワード1, OPER名2 => パスワード2, ...}," -->
|
82
|
+
</dl>
|
83
|
+
<p>サンプルではこうなっています。</p>
|
84
|
+
<dl>
|
85
|
+
<dt><a name="label-13" id="label-13">Opers => {"superoper*" => "ea703e7aa1efda0064eaa507d9e8ab7e"},</a></dt><!-- RDLabel: "Opers => {"superoper*" => "ea703e7aa1efda0064eaa507d9e8ab7e"}," -->
|
86
|
+
</dl>
|
87
|
+
<p>この例では、 superoper で始まるOPER名と、hogeというパスワードが関連付けられています。</p>
|
88
|
+
<p>パスワードの欄がなにやら複雑なことになっていますが、此れはMD5という方式で暗号化されているからです。任意のパスワードについてそのMD5値を知るには、同梱のmkpassword.rbを使ってください。</p>
|
89
|
+
<pre>$ ruby mkpassword.rb パスワード</pre>
|
90
|
+
<p>とすると分かります。</p>
|
91
|
+
<h2><a name="label-14" id="label-14">Operの使えるコマンド</a></h2><!-- RDLabel: "Operの使えるコマンド" -->
|
92
|
+
<dl>
|
93
|
+
<dt><a name="label-15" id="label-15">REHASH</a></dt><!-- RDLabel: "REHASH" -->
|
94
|
+
<dd>
|
95
|
+
サーバの設定を再読込みさせます
|
96
|
+
</dd>
|
97
|
+
<dt><a name="label-16" id="label-16">CLOSE</a></dt><!-- RDLabel: "CLOSE" -->
|
98
|
+
<dd>
|
99
|
+
サーバに接続している全クライアントとの接続を切ります
|
100
|
+
</dd>
|
101
|
+
<dt><a name="label-17" id="label-17">RESTART</a></dt><!-- RDLabel: "RESTART" -->
|
102
|
+
<dd>
|
103
|
+
サーバを再起動させます
|
104
|
+
</dd>
|
105
|
+
<dt><a name="label-18" id="label-18">DIE</a></dt><!-- RDLabel: "DIE" -->
|
106
|
+
<dd>
|
107
|
+
サーバを終了します
|
108
|
+
</dd>
|
109
|
+
</dl>
|
110
|
+
|
111
|
+
</body>
|
112
|
+
</html>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: konn-rupircd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- konn
|
@@ -30,10 +30,34 @@ extra_rdoc_files:
|
|
30
30
|
files:
|
31
31
|
- Changes.ja.rd
|
32
32
|
- Changes.rd
|
33
|
+
- Manifest
|
33
34
|
- README.ja.rd
|
34
35
|
- README.rd
|
36
|
+
- Rakefile
|
35
37
|
- Usage.ja.rd
|
36
38
|
- Usage.rd
|
39
|
+
- VERSION
|
40
|
+
- bin/mkpassword
|
41
|
+
- bin/rupircd
|
42
|
+
- changes.html
|
43
|
+
- changes.ja.html
|
44
|
+
- index.html
|
45
|
+
- index.ja.html
|
46
|
+
- info.txt
|
47
|
+
- ircd.rb
|
48
|
+
- lib/rupircd.rb
|
49
|
+
- lib/rupircd/channel.rb
|
50
|
+
- lib/rupircd/conf.rb
|
51
|
+
- lib/rupircd/message.rb
|
52
|
+
- lib/rupircd/server.rb
|
53
|
+
- lib/rupircd/user.rb
|
54
|
+
- lib/rupircd/utils.rb
|
55
|
+
- mkpassword.rb
|
56
|
+
- motd.txt
|
57
|
+
- rupircd.gemspec
|
58
|
+
- sample.conf
|
59
|
+
- usage.html
|
60
|
+
- usage.ja.html
|
37
61
|
has_rdoc: true
|
38
62
|
homepage: http://github.com/konn/rupircd
|
39
63
|
licenses:
|