Raise copyright year. Trivial changes
This commit is contained in:
parent
8702ace766
commit
b678682010
11
INSTALL
11
INSTALL
@ -1,12 +1,7 @@
|
|||||||
goircd requires only standard Go's libraries and consists of single main
|
goircd requires only standard Go's libraries and consists of single main
|
||||||
package. You can install it using either:
|
package. You can install it like that:
|
||||||
|
|
||||||
% go get github.com/stargrave/goircd
|
% git clone https://github.com/stargrave/goircd.git
|
||||||
% go install github.com/stargrave/goircd
|
% gmake -C goircd
|
||||||
|
|
||||||
or if you are already inside goircd directory:
|
|
||||||
|
|
||||||
% go install
|
|
||||||
|
|
||||||
You should found goircd executable binary in your $GOPATH/bin/goircd.
|
|
||||||
Just run it with -help argument to see available options.
|
Just run it with -help argument to see available options.
|
||||||
|
4
Makefile
4
Makefile
@ -1,4 +0,0 @@
|
|||||||
LDFLAGS="-X main.version \"$(shell git describe --tags)\""
|
|
||||||
|
|
||||||
goircd:
|
|
||||||
go install -ldflags $(LDFLAGS) $(BUILD_FLAGS)
|
|
7
README
7
README
@ -1,10 +1,6 @@
|
|||||||
goircd -- minimalistic simple Internet Relay Chat (IRC) server
|
goircd -- minimalistic simple Internet Relay Chat (IRC) server
|
||||||
==============================================================
|
==============================================================
|
||||||
|
|
||||||
SYNOPSIS
|
|
||||||
|
|
||||||
goircd is very simple IRC server, written on Go.
|
|
||||||
|
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
|
|
||||||
goircd is very simple IRC server, written on Go.
|
goircd is very simple IRC server, written on Go.
|
||||||
@ -14,7 +10,6 @@ It does not aim to replace full featured mass scalable IRC networks:
|
|||||||
* It can not connect to other servers. Just standalone installation
|
* It can not connect to other servers. Just standalone installation
|
||||||
* It has few basic IRC commands
|
* It has few basic IRC commands
|
||||||
* There is no support for channel operators, modes, votes, invites
|
* There is no support for channel operators, modes, votes, invites
|
||||||
and so on
|
|
||||||
* No ident lookups, reverse DNS queries
|
* No ident lookups, reverse DNS queries
|
||||||
|
|
||||||
But it has some convincing features:
|
But it has some convincing features:
|
||||||
@ -28,7 +23,7 @@ But it has some convincing features:
|
|||||||
* Optional permanent channel's state saving in plain text files
|
* Optional permanent channel's state saving in plain text files
|
||||||
(so you can reload daemon and all channels topics and keys won't
|
(so you can reload daemon and all channels topics and keys won't
|
||||||
disappear)
|
disappear)
|
||||||
* Optional ability to authenticate users by nickname↔password
|
* Optional ability to authenticate users by nickname and password
|
||||||
|
|
||||||
Some remarks and recommendations related to it's simplicity:
|
Some remarks and recommendations related to it's simplicity:
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
goircd -- minimalistic simple Internet Relay Chat (IRC) server
|
goircd -- minimalistic simple Internet Relay Chat (IRC) server
|
||||||
Copyright (C) 2014 Sergey Matveev <stargrave@stargrave.org>
|
Copyright (C) 2014-2015 Sergey Matveev <stargrave@stargrave.org>
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -15,6 +15,7 @@ GNU General Public License for more details.
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
goircd -- minimalistic simple Internet Relay Chat (IRC) server
|
goircd -- minimalistic simple Internet Relay Chat (IRC) server
|
||||||
Copyright (C) 2014 Sergey Matveev <stargrave@stargrave.org>
|
Copyright (C) 2014-2015 Sergey Matveev <stargrave@stargrave.org>
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -15,6 +15,7 @@ GNU General Public License for more details.
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
30
daemon.go
30
daemon.go
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
goircd -- minimalistic simple Internet Relay Chat (IRC) server
|
goircd -- minimalistic simple Internet Relay Chat (IRC) server
|
||||||
Copyright (C) 2014 Sergey Matveev <stargrave@stargrave.org>
|
Copyright (C) 2014-2015 Sergey Matveev <stargrave@stargrave.org>
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -15,6 +15,7 @@ GNU General Public License for more details.
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@ -29,9 +30,12 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
PingTimeout = time.Second * 180 // Max time deadline for client's unresponsiveness
|
// Max time deadline for client's unresponsiveness
|
||||||
PingThreshold = time.Second * 90 // Max idle client's time before PING are sent
|
PingTimeout = time.Second * 180
|
||||||
AlivenessCheck = time.Second * 10 // Client's aliveness check period
|
// Max idle client's time before PING are sent
|
||||||
|
PingThreshold = time.Second * 90
|
||||||
|
// Client's aliveness check period
|
||||||
|
AlivenessCheck = time.Second * 10
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -54,7 +58,12 @@ type Daemon struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func NewDaemon(version string, hostname, motd, passwords *string, logSink chan<- LogEvent, stateSink chan<- StateEvent) *Daemon {
|
func NewDaemon(version string, hostname, motd, passwords *string, logSink chan<- LogEvent, stateSink chan<- StateEvent) *Daemon {
|
||||||
daemon := Daemon{version: version, hostname: hostname, motd: motd, passwords: passwords}
|
daemon := Daemon{
|
||||||
|
version: version,
|
||||||
|
hostname: hostname,
|
||||||
|
motd: motd,
|
||||||
|
passwords: passwords,
|
||||||
|
}
|
||||||
daemon.clients = make(map[*Client]bool)
|
daemon.clients = make(map[*Client]bool)
|
||||||
daemon.clientAliveness = make(map[*Client]*ClientAlivenessState)
|
daemon.clientAliveness = make(map[*Client]*ClientAlivenessState)
|
||||||
daemon.rooms = make(map[string]*Room)
|
daemon.rooms = make(map[string]*Room)
|
||||||
@ -324,7 +333,10 @@ func (daemon *Daemon) Processor(events <-chan ClientEvent) {
|
|||||||
switch event.eventType {
|
switch event.eventType {
|
||||||
case EventNew:
|
case EventNew:
|
||||||
daemon.clients[client] = true
|
daemon.clients[client] = true
|
||||||
daemon.clientAliveness[client] = &ClientAlivenessState{pingSent: false, timestamp: now}
|
daemon.clientAliveness[client] = &ClientAlivenessState{
|
||||||
|
pingSent: false,
|
||||||
|
timestamp: now,
|
||||||
|
}
|
||||||
case EventDel:
|
case EventDel:
|
||||||
delete(daemon.clients, client)
|
delete(daemon.clients, client)
|
||||||
delete(daemon.clientAliveness, client)
|
delete(daemon.clientAliveness, client)
|
||||||
@ -445,7 +457,11 @@ func (daemon *Daemon) Processor(events <-chan ClientEvent) {
|
|||||||
if !found {
|
if !found {
|
||||||
client.ReplyNoNickChan(target)
|
client.ReplyNoNickChan(target)
|
||||||
}
|
}
|
||||||
daemon.roomSinks[r] <- ClientEvent{client, EventMsg, command + " " + strings.TrimLeft(cols[1], ":")}
|
daemon.roomSinks[r] <- ClientEvent{
|
||||||
|
client,
|
||||||
|
EventMsg,
|
||||||
|
command + " " + strings.TrimLeft(cols[1], ":"),
|
||||||
|
}
|
||||||
case "TOPIC":
|
case "TOPIC":
|
||||||
if len(cols) == 1 {
|
if len(cols) == 1 {
|
||||||
client.ReplyNotEnoughParameters("TOPIC")
|
client.ReplyNotEnoughParameters("TOPIC")
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
goircd -- minimalistic simple Internet Relay Chat (IRC) server
|
goircd -- minimalistic simple Internet Relay Chat (IRC) server
|
||||||
Copyright (C) 2014 Sergey Matveev <stargrave@stargrave.org>
|
Copyright (C) 2014-2015 Sergey Matveev <stargrave@stargrave.org>
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -15,6 +15,7 @@ GNU General Public License for more details.
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
goircd -- minimalistic simple Internet Relay Chat (IRC) server
|
goircd -- minimalistic simple Internet Relay Chat (IRC) server
|
||||||
Copyright (C) 2014 Sergey Matveev <stargrave@stargrave.org>
|
Copyright (C) 2014-2015 Sergey Matveev <stargrave@stargrave.org>
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -15,6 +15,7 @@ GNU General Public License for more details.
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
goircd -- minimalistic simple Internet Relay Chat (IRC) server
|
goircd -- minimalistic simple Internet Relay Chat (IRC) server
|
||||||
Copyright (C) 2014 Sergey Matveev <stargrave@stargrave.org>
|
Copyright (C) 2014-2015 Sergey Matveev <stargrave@stargrave.org>
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -15,6 +15,7 @@ GNU General Public License for more details.
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
4
makefile
Normal file
4
makefile
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
LDFLAGS=-X main.version \"$(shell git describe --tags)\"
|
||||||
|
|
||||||
|
goircd:
|
||||||
|
go build -ldflags "$(LDFLAGS)" $(BUILD_FLAGS)
|
3
room.go
3
room.go
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
goircd -- minimalistic simple Internet Relay Chat (IRC) server
|
goircd -- minimalistic simple Internet Relay Chat (IRC) server
|
||||||
Copyright (C) 2014 Sergey Matveev <stargrave@stargrave.org>
|
Copyright (C) 2014-2015 Sergey Matveev <stargrave@stargrave.org>
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -15,6 +15,7 @@ GNU General Public License for more details.
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
Loading…
Reference in New Issue
Block a user