From b67868201041359c456457b62910866a8e072b2b Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Sat, 9 May 2015 18:27:06 +0300 Subject: [PATCH] Raise copyright year. Trivial changes --- INSTALL | 11 +++-------- Makefile | 4 ---- README | 7 +------ client.go | 3 ++- client_test.go | 3 ++- daemon.go | 30 +++++++++++++++++++++++------- daemon_test.go | 3 ++- events.go | 3 ++- goircd.go | 3 ++- makefile | 4 ++++ room.go | 3 ++- 11 files changed, 43 insertions(+), 31 deletions(-) delete mode 100644 Makefile create mode 100644 makefile diff --git a/INSTALL b/INSTALL index b73f970..7ec5896 100644 --- a/INSTALL +++ b/INSTALL @@ -1,12 +1,7 @@ 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 - % go install github.com/stargrave/goircd + % git clone https://github.com/stargrave/goircd.git + % 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. diff --git a/Makefile b/Makefile deleted file mode 100644 index 3a8e1ff..0000000 --- a/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -LDFLAGS="-X main.version \"$(shell git describe --tags)\"" - -goircd: - go install -ldflags $(LDFLAGS) $(BUILD_FLAGS) diff --git a/README b/README index 9b4d8cf..8782426 100644 --- a/README +++ b/README @@ -1,10 +1,6 @@ goircd -- minimalistic simple Internet Relay Chat (IRC) server ============================================================== -SYNOPSIS - -goircd is very simple IRC server, written on Go. - DESCRIPTION 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 has few basic IRC commands * There is no support for channel operators, modes, votes, invites - and so on * No ident lookups, reverse DNS queries 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 (so you can reload daemon and all channels topics and keys won't 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: diff --git a/client.go b/client.go index 1b4a9c3..95dd93f 100644 --- a/client.go +++ b/client.go @@ -1,6 +1,6 @@ /* goircd -- minimalistic simple Internet Relay Chat (IRC) server -Copyright (C) 2014 Sergey Matveev +Copyright (C) 2014-2015 Sergey Matveev 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 @@ -15,6 +15,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ + package main import ( diff --git a/client_test.go b/client_test.go index 5369bbe..38f8808 100644 --- a/client_test.go +++ b/client_test.go @@ -1,6 +1,6 @@ /* goircd -- minimalistic simple Internet Relay Chat (IRC) server -Copyright (C) 2014 Sergey Matveev +Copyright (C) 2014-2015 Sergey Matveev 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 @@ -15,6 +15,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ + package main import ( diff --git a/daemon.go b/daemon.go index ed708de..6b44039 100644 --- a/daemon.go +++ b/daemon.go @@ -1,6 +1,6 @@ /* goircd -- minimalistic simple Internet Relay Chat (IRC) server -Copyright (C) 2014 Sergey Matveev +Copyright (C) 2014-2015 Sergey Matveev 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 @@ -15,6 +15,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ + package main import ( @@ -29,9 +30,12 @@ import ( ) const ( - PingTimeout = time.Second * 180 // Max time deadline for client's unresponsiveness - PingThreshold = time.Second * 90 // Max idle client's time before PING are sent - AlivenessCheck = time.Second * 10 // Client's aliveness check period + // Max time deadline for client's unresponsiveness + PingTimeout = time.Second * 180 + // Max idle client's time before PING are sent + PingThreshold = time.Second * 90 + // Client's aliveness check period + AlivenessCheck = time.Second * 10 ) var ( @@ -54,7 +58,12 @@ type Daemon struct { } 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.clientAliveness = make(map[*Client]*ClientAlivenessState) daemon.rooms = make(map[string]*Room) @@ -324,7 +333,10 @@ func (daemon *Daemon) Processor(events <-chan ClientEvent) { switch event.eventType { case EventNew: daemon.clients[client] = true - daemon.clientAliveness[client] = &ClientAlivenessState{pingSent: false, timestamp: now} + daemon.clientAliveness[client] = &ClientAlivenessState{ + pingSent: false, + timestamp: now, + } case EventDel: delete(daemon.clients, client) delete(daemon.clientAliveness, client) @@ -445,7 +457,11 @@ func (daemon *Daemon) Processor(events <-chan ClientEvent) { if !found { 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": if len(cols) == 1 { client.ReplyNotEnoughParameters("TOPIC") diff --git a/daemon_test.go b/daemon_test.go index ac9bc4c..3db72cb 100644 --- a/daemon_test.go +++ b/daemon_test.go @@ -1,6 +1,6 @@ /* goircd -- minimalistic simple Internet Relay Chat (IRC) server -Copyright (C) 2014 Sergey Matveev +Copyright (C) 2014-2015 Sergey Matveev 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 @@ -15,6 +15,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ + package main import ( diff --git a/events.go b/events.go index 30444da..843e8b5 100644 --- a/events.go +++ b/events.go @@ -1,6 +1,6 @@ /* goircd -- minimalistic simple Internet Relay Chat (IRC) server -Copyright (C) 2014 Sergey Matveev +Copyright (C) 2014-2015 Sergey Matveev 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 @@ -15,6 +15,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ + package main import ( diff --git a/goircd.go b/goircd.go index 13efe2c..9486153 100644 --- a/goircd.go +++ b/goircd.go @@ -1,6 +1,6 @@ /* goircd -- minimalistic simple Internet Relay Chat (IRC) server -Copyright (C) 2014 Sergey Matveev +Copyright (C) 2014-2015 Sergey Matveev 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 @@ -15,6 +15,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ + package main import ( diff --git a/makefile b/makefile new file mode 100644 index 0000000..26e28a7 --- /dev/null +++ b/makefile @@ -0,0 +1,4 @@ +LDFLAGS=-X main.version \"$(shell git describe --tags)\" + +goircd: + go build -ldflags "$(LDFLAGS)" $(BUILD_FLAGS) diff --git a/room.go b/room.go index ff57231..99ec208 100644 --- a/room.go +++ b/room.go @@ -1,6 +1,6 @@ /* goircd -- minimalistic simple Internet Relay Chat (IRC) server -Copyright (C) 2014 Sergey Matveev +Copyright (C) 2014-2015 Sergey Matveev 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 @@ -15,6 +15,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ + package main import (