Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
264ee8c61c | ||
|
|
85e44756e3 | ||
|
|
e628bdcf91 | ||
|
|
f929379569 | ||
|
|
d5f331ec7c |
1
.hgtags
1
.hgtags
@@ -1,2 +1,3 @@
|
||||
da295cede46d95848348292e04e54fa5a5713ae3 release-1.0.0
|
||||
34892054c34384edeafa2b04a483697d7d8a73a3 release-1.1.0
|
||||
3586b48a5abfdbdeef310f2e154b06f4d16d38bb release-1.2.0
|
||||
|
||||
@@ -65,6 +65,10 @@ Unusable:
|
||||
|
||||
=CHANGELOG=
|
||||
|
||||
2016-11-29 1.2.1
|
||||
- Update libnmdc to 0.11
|
||||
- Fix an issue with -devel version tag in 1.2.0 release binaries
|
||||
|
||||
2016-08-27 1.2.0
|
||||
- Feature: Support WHOIS (display NMDC user's description + client software)
|
||||
- Feature: `-version` command-line option
|
||||
|
||||
3
main.go
3
main.go
@@ -20,9 +20,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"libnmdc"
|
||||
"log"
|
||||
"net"
|
||||
|
||||
"code.ivysaur.me/libnmdc"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
@@ -22,13 +22,14 @@ import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"io"
|
||||
"libnmdc"
|
||||
"log"
|
||||
"net"
|
||||
"regexp"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"code.ivysaur.me/libnmdc"
|
||||
)
|
||||
|
||||
type ClientState int
|
||||
@@ -113,7 +114,7 @@ func (s *Server) RunWorker() {
|
||||
}
|
||||
|
||||
// If this was a /timeout/, send a KA and continue.
|
||||
if libnmdc.CheckIsNetTimeout(err) {
|
||||
if netErr, ok := err.(net.Error); ok && netErr.Timeout() {
|
||||
s.writeClient("PING :" + s.name)
|
||||
continue
|
||||
}
|
||||
@@ -240,7 +241,7 @@ func (s *Server) upstreamWorker() {
|
||||
// description change - no relevance for IRC users
|
||||
|
||||
case libnmdc.EVENT_CONNECTION_STATE_CHANGED:
|
||||
s.postGeneralMessageInRoom("* Upstream: " + hubEvent.StateChange.Format())
|
||||
s.postGeneralMessageInRoom("* Upstream: " + hubEvent.StateChange.String())
|
||||
|
||||
if hubEvent.StateChange == libnmdc.CONNECTIONSTATE_CONNECTED {
|
||||
s.sendNames() // delay doing this until now
|
||||
|
||||
@@ -18,8 +18,11 @@ You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
var (
|
||||
APP_VERSION = "1.x.x-dev" // overridden with build ldflags
|
||||
)
|
||||
|
||||
const (
|
||||
APP_VERSION = "1.x.x-dev" // override with build ldflags
|
||||
APP_NAME = "nmdc-ircfrontend"
|
||||
BLESSED_CHANNEL = "#chat" // must be lowercase
|
||||
BLESSED_CHANNEL_MODE = "n" // means that you have to be in the channel to chat, but that's it
|
||||
|
||||
Reference in New Issue
Block a user