9 Commits

Author SHA1 Message Date
53b72e0cb0 readme
--HG--
branch : nmdc-ircfrontend
2017-05-27 14:00:25 +12:00
839dea016a chmod +x godist.sh
--HG--
branch : nmdc-ircfrontend
2017-05-27 13:58:12 +12:00
e235ee014e fix wrong bounds check causing panic when server gets scanned by weird clients
--HG--
branch : nmdc-ircfrontend
2017-05-27 13:57:37 +12:00
.
c54a271f17 Added tag release-1.2.1 for changeset 49dcc63e80e9
--HG--
branch : nmdc-ircfrontend
2016-11-29 20:21:29 +13:00
.
264ee8c61c readme
--HG--
branch : nmdc-ircfrontend
2016-11-29 20:21:22 +13:00
.
85e44756e3 libnmdc compatibility updates
--HG--
branch : nmdc-ircfrontend
2016-11-29 19:58:12 +13:00
.
e628bdcf91 update libnmdc import path
--HG--
branch : nmdc-ircfrontend
2016-11-29 19:55:50 +13:00
.
f929379569 fix build script not overwriting app_version
--HG--
branch : nmdc-ircfrontend
2016-08-27 17:53:04 +12:00
.
d5f331ec7c Added tag release-1.2.0 for changeset 3586b48a5abf
--HG--
branch : nmdc-ircfrontend
2016-08-27 17:42:34 +12:00
6 changed files with 21 additions and 6 deletions

View File

@@ -1,2 +1,4 @@
da295cede46d95848348292e04e54fa5a5713ae3 release-1.0.0 da295cede46d95848348292e04e54fa5a5713ae3 release-1.0.0
34892054c34384edeafa2b04a483697d7d8a73a3 release-1.1.0 34892054c34384edeafa2b04a483697d7d8a73a3 release-1.1.0
3586b48a5abfdbdeef310f2e154b06f4d16d38bb release-1.2.0
49dcc63e80e98f8c2ce3bb029fe0c41a6426678f release-1.2.1

View File

@@ -65,6 +65,14 @@ Unusable:
=CHANGELOG= =CHANGELOG=
2017-05-27 1.2.2
- Update libnmdc to 0.14
- Fix a crash that could occur if the server is scanned by a non-irc client
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 2016-08-27 1.2.0
- Feature: Support WHOIS (display NMDC user's description + client software) - Feature: Support WHOIS (display NMDC user's description + client software)
- Feature: `-version` command-line option - Feature: `-version` command-line option

0
godist.sh Normal file → Executable file
View File

View File

@@ -20,9 +20,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
import ( import (
"flag" "flag"
"libnmdc"
"log" "log"
"net" "net"
"code.ivysaur.me/libnmdc"
) )
func main() { func main() {

View File

@@ -22,13 +22,14 @@ import (
"bytes" "bytes"
"fmt" "fmt"
"io" "io"
"libnmdc"
"log" "log"
"net" "net"
"regexp" "regexp"
"strings" "strings"
"sync" "sync"
"time" "time"
"code.ivysaur.me/libnmdc"
) )
type ClientState int type ClientState int
@@ -113,7 +114,7 @@ func (s *Server) RunWorker() {
} }
// If this was a /timeout/, send a KA and continue. // 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) s.writeClient("PING :" + s.name)
continue continue
} }
@@ -132,7 +133,7 @@ func (s *Server) RunWorker() {
// Client sent a command // Client sent a command
fields := strings.Fields(string(line)) fields := strings.Fields(string(line))
if len(fields) < 1 { if len(fields) < 2 {
return return
} }
@@ -240,7 +241,7 @@ func (s *Server) upstreamWorker() {
// description change - no relevance for IRC users // description change - no relevance for IRC users
case libnmdc.EVENT_CONNECTION_STATE_CHANGED: case libnmdc.EVENT_CONNECTION_STATE_CHANGED:
s.postGeneralMessageInRoom("* Upstream: " + hubEvent.StateChange.Format()) s.postGeneralMessageInRoom("* Upstream: " + hubEvent.StateChange.String())
if hubEvent.StateChange == libnmdc.CONNECTIONSTATE_CONNECTED { if hubEvent.StateChange == libnmdc.CONNECTIONSTATE_CONNECTED {
s.sendNames() // delay doing this until now s.sendNames() // delay doing this until now

View File

@@ -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/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
var (
APP_VERSION = "1.x.x-dev" // overridden with build ldflags
)
const ( const (
APP_VERSION = "1.x.x-dev" // override with build ldflags
APP_NAME = "nmdc-ircfrontend" APP_NAME = "nmdc-ircfrontend"
BLESSED_CHANNEL = "#chat" // must be lowercase 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 BLESSED_CHANNEL_MODE = "n" // means that you have to be in the channel to chat, but that's it