/*
goircd -- minimalistic simple Internet Relay Chat (IRC) server
-Copyright (C) 2014-2015 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2014-2019 Sergey Matveev <stargrave@stargrave.org>
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
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, version 3 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
EventTopic = iota
EventWho = iota
EventMode = iota
+ EventTerm = iota
+ EventTick = iota
FormatMsg = "[%s] <%s> %s\n"
FormatMeta = "[%s] * %s %s\n"
)
+var (
+ logSink chan LogEvent = make(chan LogEvent)
+ stateSink chan StateEvent = make(chan StateEvent)
+)
+
// Client events going from each of client
// They can be either NEW, DEL or unparsed MSG
type ClientEvent struct {
var fd *os.File
var err error
for event := range events {
- logfile = path.Join(logdir, event.where)
+ logfile = path.Join(logdir, event.where+".log")
fd, err = os.OpenFile(logfile, mode, perm)
if err != nil {
log.Println("Can not open logfile", logfile, err)