178 lines
4.3 KiB
Go
178 lines
4.3 KiB
Go
package main
|
|
|
|
type command string
|
|
|
|
type channelType int
|
|
|
|
const (
|
|
REGULAR channelType = iota
|
|
LOCAL
|
|
)
|
|
|
|
// client commands
|
|
const (
|
|
CAP command = "CAP"
|
|
AUTHENTICATE command = "AUTHENTICATE"
|
|
PASS command = "PASS"
|
|
NICK command = "NICK"
|
|
USER command = "USER"
|
|
OPER command = "OPER"
|
|
QUIT command = "QUIT"
|
|
|
|
JOIN command = "JOIN"
|
|
PART command = "PART"
|
|
TOPIC command = "TOPIC"
|
|
NAMES command = "NAMES"
|
|
LIST command = "LIST"
|
|
INVITE command = "INVITE"
|
|
KICK command = "KICK"
|
|
|
|
MOTD command = "MOTD"
|
|
VERSION command = "VERSION"
|
|
ADMIN command = "ADMIN"
|
|
CONNECT command = "CONNECT"
|
|
TIME command = "TIME"
|
|
STATS command = "STATS"
|
|
INFO command = "INFO"
|
|
MODE command = "MODE"
|
|
|
|
PRIVMSG command = "PRIVMSG"
|
|
NOTICE command = "NOTICE"
|
|
|
|
KILL command = "KILL"
|
|
|
|
AWAY command = "AWAY"
|
|
USERHOST command = "USERHOST"
|
|
)
|
|
|
|
// numerics
|
|
const (
|
|
RPL_WELCOME command = "001"
|
|
RPL_YOURHOST command = "002"
|
|
RPL_CREATED command = "003"
|
|
RPL_MYINFO command = "004"
|
|
RPL_ISUPPORT command = "005"
|
|
|
|
RPL_BOUNCE command = "010"
|
|
|
|
RPL_UMODEIS command = "221"
|
|
RPL_LUSERCLIENT command = "251"
|
|
RPL_LUSEROP command = "252"
|
|
RPL_LUSERUNKNOWN command = "253"
|
|
RPL_LUSERCHANNELS command = "254"
|
|
RPL_LUSERME command = "255"
|
|
RPL_ADMINME command = "256"
|
|
RPL_ADMINLOC1 command = "257"
|
|
RPL_ADMINLOC2 command = "258"
|
|
RPL_ADMINEMAIL command = "259"
|
|
|
|
RPL_TRYAGAIN command = "263"
|
|
|
|
RPL_LOCALUSERS command = "265"
|
|
RPL_GLOBALUSERS command = "266"
|
|
|
|
RPL_WHOISCERTFP command = "276"
|
|
|
|
RPL_NONE command = "300"
|
|
|
|
RPL_AWAY command = "301"
|
|
RPL_USERHOST command = "302"
|
|
RPL_ISON command = "303"
|
|
RPL_UNAWAY command = "305"
|
|
RPL_NOWAWAY command = "306"
|
|
|
|
RPL_WHOISUSER command = "311"
|
|
RPL_WHOISSERVER command = "312"
|
|
RPL_WHOISOPERATOR command = "313"
|
|
RPL_WHOWASUSER command = "314"
|
|
RPL_WHOISIDLE command = "317"
|
|
RPL_ENDOFWHOIS command = "318"
|
|
RPL_WHOISCHANNELS command = "319"
|
|
|
|
RPL_LISTSTART command = "321"
|
|
RPL_LIST command = "322"
|
|
RPL_LISTEND command = "323"
|
|
|
|
RPL_CHANNELMODEIS command = "324"
|
|
RPL_CREATIONTIME command = "329"
|
|
RPL_NOTOPIC command = "331"
|
|
RPL_TOPIC command = "332"
|
|
RPL_TOPICWHOTIME command = "333"
|
|
|
|
RPL_INVITING command = "341"
|
|
RPL_INVITELIST command = "346"
|
|
RPL_ENDOFINVITELIST command = "347"
|
|
RPL_EXCEPTLIST command = "348"
|
|
RPL_ENDOFEXCEPTLIST command = "349"
|
|
|
|
RPL_VERSION command = "351"
|
|
|
|
RPL_NAMREPLY command = "353"
|
|
RPL_ENDOFNAMES command = "366"
|
|
RPL_BANLIST command = "367"
|
|
RPL_ENDOFBANLIST command = "368"
|
|
RPL_ENDOFWHOWAS command = "369"
|
|
|
|
RPL_MOTD command = "372"
|
|
RPL_MOTDSTART command = "375"
|
|
RPL_ENDOFMOTD command = "376" // see also ERR_NOMOTD
|
|
|
|
RPL_YOUREOPER command = "381"
|
|
|
|
RPL_REHASHING command = "382"
|
|
|
|
ERR_UNKNOWNERROR command = "400"
|
|
ERR_NOSUCHNICK command = "401"
|
|
ERR_NOSUCHSERVER command = "402"
|
|
ERR_NOSUCHCHANNEL command = "403"
|
|
ERR_CANNOTSENDTOCHAN command = "404"
|
|
ERR_TOOMANYCHANNELS command = "405"
|
|
|
|
ERR_UNKNOWNCOMMAND command = "421"
|
|
|
|
ERR_NOMOTD command = "422"
|
|
|
|
ERR_ERRONEUSNICKNAME command = "432"
|
|
ERR_NICKNAMEINUSE command = "433"
|
|
|
|
ERR_USERNOTINCHANNEL command = "441"
|
|
ERR_NOTONCHANNEL command = "442"
|
|
ERR_USERONCHANNEL command = "443"
|
|
|
|
ERR_NOTREGISTERED command = "451"
|
|
|
|
ERR_NEEDMOREPARAMS command = "461"
|
|
ERR_ALREADYREGISTERED command = "462"
|
|
ERR_PASSWDMISMATCH command = "464"
|
|
ERR_YOUREBANNEDCREEP command = "465"
|
|
ERR_CHANNELISFULL command = "471"
|
|
ERR_UNKNOWNMODE command = "472"
|
|
ERR_INVITEONLYCHAN command = "473"
|
|
ERR_BANNEDFROMCHAN command = "474"
|
|
ERR_BADCHANNELKEY command = "475"
|
|
ERR_BADCHANMASK command = "476"
|
|
|
|
ERR_NOPRIVILEGES command = "481"
|
|
ERR_CHANOPRIVSNEEDED command = "482"
|
|
ERR_CANTKILLSERVER command = "483"
|
|
ERR_NOOPERHOST command = "491"
|
|
|
|
ERR_UMODEUNKNOWNFLAG command = "501"
|
|
ERR_USERSDONTMATCH command = "502"
|
|
|
|
RPL_STARTTLS command = "670"
|
|
ERR_STARTTLS command = "691"
|
|
|
|
ERR_NOPRIVS command = "723"
|
|
|
|
RPL_LOGGEDIN command = "900"
|
|
RPL_LOGGEDOUT command = "901"
|
|
ERR_NICKLOCKED command = "902"
|
|
RPL_SASLSUCCESS command = "903"
|
|
ERR_SASLFAIL command = "904"
|
|
ERR_SASLTOOLONG command = "905"
|
|
ERR_SASLABORTED command = "906"
|
|
ERR_SASLALREADY command = "907"
|
|
RPL_SASLMECHS command = "908"
|
|
)
|