2013-08-23 01:03:37 +00:00
|
|
|
package main
|
|
|
|
|
2016-05-05 07:20:36 +00:00
|
|
|
/*
|
|
|
|
Copyright (C) 2016 The `nmdc-ircfrontend' author(s)
|
|
|
|
Copyright (C) 2013 Harry Jeffery
|
|
|
|
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU Affero General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU Affero General Public License for more details.
|
|
|
|
|
|
|
|
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/>.
|
|
|
|
*/
|
|
|
|
|
2016-08-27 05:53:04 +00:00
|
|
|
var (
|
|
|
|
APP_VERSION = "1.x.x-dev" // overridden with build ldflags
|
|
|
|
)
|
|
|
|
|
2013-09-02 00:55:19 +00:00
|
|
|
const (
|
2016-05-09 06:30:24 +00:00
|
|
|
APP_NAME = "nmdc-ircfrontend"
|
2016-05-03 06:00:40 +00:00
|
|
|
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
|
2013-09-02 00:55:19 +00:00
|
|
|
|
2016-05-08 02:21:29 +00:00
|
|
|
NICKS_PER_PROTOMSG = 128 // Max number of nicks to send per message
|
|
|
|
CLIENT_READ_BUFFSIZE = 512
|
|
|
|
CLIENT_KEEPALIVE_EVERY = 60 // should be longer than the client's one, hexchat is 30s
|
2016-05-09 06:48:07 +00:00
|
|
|
WAIT_FOR_VERSION = 3 // Seconds to wait for the CTCP VERSION response before connecting with default MyINFO
|
2016-05-03 06:25:27 +00:00
|
|
|
)
|
2013-08-23 01:03:37 +00:00
|
|
|
|
2013-08-24 19:58:38 +00:00
|
|
|
type replyCode int
|
|
|
|
|
2013-08-23 01:03:37 +00:00
|
|
|
const (
|
2013-08-24 19:58:38 +00:00
|
|
|
rplWelcome replyCode = iota
|
2013-08-23 01:32:46 +00:00
|
|
|
rplJoin
|
|
|
|
rplPart
|
2013-08-23 01:03:37 +00:00
|
|
|
rplTopic
|
2013-08-23 01:32:46 +00:00
|
|
|
rplNoTopic
|
2013-08-23 01:03:37 +00:00
|
|
|
rplNames
|
2016-03-09 08:04:04 +00:00
|
|
|
rplEndOfNames
|
2016-05-07 01:55:29 +00:00
|
|
|
rplWho
|
|
|
|
rplEndOfWho
|
2013-08-23 01:03:37 +00:00
|
|
|
rplNickChange
|
2013-08-23 16:34:45 +00:00
|
|
|
rplKill
|
2013-08-23 16:39:10 +00:00
|
|
|
rplMsg
|
2013-08-23 21:09:29 +00:00
|
|
|
rplList
|
2016-03-13 09:07:16 +00:00
|
|
|
rplListEnd
|
2013-08-23 22:59:33 +00:00
|
|
|
rplOper
|
2013-08-27 18:34:52 +00:00
|
|
|
rplChannelModeIs
|
2013-08-29 20:10:28 +00:00
|
|
|
rplKick
|
2013-08-30 22:17:54 +00:00
|
|
|
rplInfo
|
2013-09-02 00:55:19 +00:00
|
|
|
rplVersion
|
2016-03-13 06:51:10 +00:00
|
|
|
rplMOTDStart
|
2013-09-08 15:06:03 +00:00
|
|
|
rplMOTD
|
2016-03-13 06:51:10 +00:00
|
|
|
rplEndOfMOTD
|
2013-10-21 12:34:12 +00:00
|
|
|
rplPong
|
2016-08-27 02:07:02 +00:00
|
|
|
rplWhoisUser
|
|
|
|
rplWhoisOperator
|
|
|
|
rplEndOfWhois
|
2013-08-23 01:03:37 +00:00
|
|
|
errMoreArgs
|
|
|
|
errNoNick
|
|
|
|
errInvalidNick
|
|
|
|
errNickInUse
|
|
|
|
errAlreadyReg
|
|
|
|
errNoSuchNick
|
2013-08-23 14:39:40 +00:00
|
|
|
errUnknownCommand
|
2013-08-23 15:24:06 +00:00
|
|
|
errNotReg
|
2013-08-23 22:59:33 +00:00
|
|
|
errPassword
|
2013-08-23 23:18:54 +00:00
|
|
|
errNoPriv
|
2013-08-27 18:40:14 +00:00
|
|
|
errCannotSend
|
2013-08-23 01:03:37 +00:00
|
|
|
)
|