⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ircmain.cpp

📁 eMule0.44b的原代码
💻 CPP
📖 第 1 页 / 共 5 页
字号:
					return;
				}
				
				//- When replying to the TIME message, a server MUST send
				//the reply using the RPL_TIME format above.  The string
				//showing the time need only contain the correct day and
				//time there.  There is no further requirement for the
				//time string.
				//391    RPL_TIME
				//"<server> :<string showing server's local time>"
				case 391:
				{
					m_pwndIRC->AddStatus( message );
					return;
				}
				
				//- If the USERS message is handled by a server, the
				//replies RPL_USERSTART, RPL_USERS, RPL_ENDOFUSERS and
				//RPL_NOUSERS are used.  RPL_USERSSTART MUST be sent
				//first, following by either a sequence of RPL_USERS
				//or a single RPL_NOUSER.  Following this is
				//RPL_ENDOFUSERS.
				//392    RPL_USERSSTART
				//":UserID   Terminal  Host"
				//393    RPL_USERS
				//":<username> <ttyline> <hostname>"
				//       394    RPL_ENDOFUSERS
				//              ":End of users"
				//395    RPL_NOUSERS
				//":Nobody logged in"
				case 392:
				case 393:
				case 395:
				{
					m_pwndIRC->AddStatus( message );
					return;
				}
				
				//- The RPL_TRACE* are all returned by the server in
				//response to the TRACE message.  How many are
				//returned is dependent on the TRACE message and
				//whether it was sent by an operator or not.  There
				//is no predefined order for which occurs first.
				//Replies RPL_TRACEUNKNOWN, RPL_TRACECONNECTING and
				//RPL_TRACEHANDSHAKE are all used for connections
				//which have not been fully established and are either
				//unknown, still attempting to connect or in the
				//process of completing the 'server handshake'.
				//RPL_TRACELINK is sent by any server which handles
				//a TRACE message and has to pass it on to another
				//server.  The list of RPL_TRACELINKs sent in
				//response to a TRACE command traversing the IRC
				//network should reflect the actual connectivity of
				//the servers themselves along that path.
				//RPL_TRACENEWTYPE is to be used for any connection
				//which does not fit in the other categories but is
				//being displayed anyway.
				//RPL_TRACEEND is sent to indicate the end of the list.
				//200    RPL_TRACELINK
				//"Link <version & debug level> <destination>
				//<next server> V<protocol version>
				//<link uptime in seconds> <backstream sendq>
				//<upstream sendq>"
				//201    RPL_TRACECONNECTING
				//"Try. <class> <server>"
				//202    RPL_TRACEHANDSHAKE
				//"H.S. <class> <server>"
				//203    RPL_TRACEUNKNOWN
				//"???? <class> [<client IP address in dot form>]"
				//204    RPL_TRACEOPERATOR
				//"Oper <class> <nick>"
				//205    RPL_TRACEUSER
				//"User <class> <nick>"
				//206    RPL_TRACESERVER
				//"Serv <class> <int>S <int>C <server>
				//<nick!user|*!*>@<host|server> V<protocol version>"
				//207    RPL_TRACESERVICE
				//"Service <class> <name> <type> <active type>"
				//208    RPL_TRACENEWTYPE
				//"<newtype> 0 <client name>"
				//209    RPL_TRACECLASS
				//"Class <class> <count>"
				//210    RPL_TRACERECONNECT
				//Unused.
				//261    RPL_TRACELOG
				//"File <logfile> <debug level>"
				//262    RPL_TRACEEND
				//"<server name> <version & debug level> :End of TRACE"
				case 200:
				case 201:
				case 202:
				case 203:
				case 204:
				case 205:
				case 206:
				case 207:
				case 208:
				case 209:
				case 210:
				case 261:
				case 262:
				{
					m_pwndIRC->AddStatus( message );
					return;
				}

				//- reports statistics on a connection.  <linkname>
				//identifies the particular connection, <sendq> is
				//the amount of data that is queued and waiting to be
				//sent <sent messages> the number of messages sent,
				//and <sent Kbytes> the amount of data sent, in
				//Kbytes. <received messages> and <received Kbytes>
				//are the equivalent of <sent messages> and <sent
				//Kbytes> for received data, respectively.  <time
				//open> indicates how long ago the connection was
				//opened, in seconds.
				//211    RPL_STATSLINKINFO
				//"<linkname> <sendq> <sent messages>
				//<sent Kbytes> <received messages>
				//<received Kbytes> <time open>"
				case 211:
				{
					m_pwndIRC->AddStatus( message );
					return;
				}
				
				//- reports statistics on commands usage.
				//212    RPL_STATSCOMMANDS
				//"<command> <count> <byte count> <remote count>"
				case 212:
				{
					m_pwndIRC->AddStatus( message );
					return;
				}
				
				//- reports the server uptime.
				//219    RPL_ENDOFSTATS
				//"<stats letter> :End of STATS report"
				//242    RPL_STATSUPTIME
				//":Server Up %d days %d:%02d:%02d"
				case 219:
				case 242:
				{
					m_pwndIRC->AddStatus( message );
					return;
				}
				
				//- reports the allowed hosts from where user may become IRC
				//operators.
				//243    RPL_STATSOLINE
				//"O <hostmask> * <name>"
				case 243:
				{
					m_pwndIRC->AddStatus( message );
					return;
				}
				
				//- To answer a query about a client's own mode,
				//RPL_UMODEIS is sent back.
				//221    RPL_UMODEIS
				//"<user mode string>"
				case 221:
				{
					m_pwndIRC->AddStatus( message );
					return;
				}
				
				//- When listing services in reply to a SERVLIST message,
				//a server is required to send the list back using the
				//RPL_SERVLIST and RPL_SERVLISTEND messages.  A separate
				//RPL_SERVLIST is sent for each service.  After the
				//services have been listed (or if none present) a
				//RPL_SERVLISTEND MUST be sent.
				//234    RPL_SERVLIST
				//"<name> <server> <mask> <type> <hopcount> <info>"
				//235    RPL_SERVLISTEND
				//"<mask> <type> :End of service listing"
				case 234:
				case 235:
				{
					m_pwndIRC->AddStatus( message );
					return;
				}

                //- In processing an LUSERS message, the server
				//sends a set of replies from RPL_LUSERCLIENT,
				//RPL_LUSEROP, RPL_USERUNKNOWN,
				//RPL_LUSERCHANNELS and RPL_LUSERME.  When
				//replying, a server MUST send back
				//RPL_LUSERCLIENT and RPL_LUSERME.  The other
				//replies are only sent back if a non-zero count
				//is found for them.
				//251    RPL_LUSERCLIENT
				//":There are <integer> users and <integer>
				//services on <integer> servers"
				//252    RPL_LUSEROP
				//"<integer> :operator(s) online"
				//253    RPL_LUSERUNKNOWN
				//"<integer> :unknown connection(s)"
				//254    RPL_LUSERCHANNELS
				//"<integer> :channels formed"
				//255    RPL_LUSERME
				//":I have <integer> clients and <integer>
				//servers"
				case 251:
				case 252:
				case 253:
				case 254:
				case 255:
				{
					m_pwndIRC->AddStatus( message );
					return;
				}
				
				//- When replying to an ADMIN message, a server
				//is expected to use replies RPL_ADMINME
				//through to RPL_ADMINEMAIL and provide a text
				//message with each.  For RPL_ADMINLOC1 a
				//description of what city, state and country
				//the server is in is expected, followed by
				//details of the institution (RPL_ADMINLOC2)
				//and finally the administrative contact for the
				//server (an email address here is REQUIRED)
				//in RPL_ADMINEMAIL.
				//256    RPL_ADMINME
				//"<server> :Administrative info"
				//257    RPL_ADMINLOC1
				//":<admin info>"
				//258    RPL_ADMINLOC2
				//":<admin info>"
				//259    RPL_ADMINEMAIL
				//":<admin info>"
				case 256:
				case 257:
				case 258:
				case 259:
				{
					m_pwndIRC->AddStatus( message );
					return;
				}
				
				//- When a server drops a command without processing it,
				//it MUST use the reply RPL_TRYAGAIN to inform the
				//originating client.
				//263    RPL_TRYAGAIN
				//"<command> :Please wait a while and try again."
				case 263:
				{
					m_pwndIRC->AddStatus( message );
					return;
				}
				
				//- Used to indicate the nickname parameter supplied to a
				//command is currently unused.
				//401    ERR_NOSUCHNICK
				//"<nickname> :No such nick/channel"
				case 401:
				{
					m_pwndIRC->AddStatus( message );
					return;
				}

                //- Used to indicate the server name given currently
				//does not exist.
				//402    ERR_NOSUCHSERVER
				//"<server name> :No such server"
				case 402:
				{
					m_pwndIRC->AddStatus( message );
					return;
				}

                //- Used to indicate the given channel name is invalid.
				//403    ERR_NOSUCHCHANNEL
				//"<channel name> :No such channel"
				case 403:
				{
					m_pwndIRC->AddStatus( message );
					return;
				}

                //- Sent to a user who is either (a) not on a channel
				//which is mode +n or (b) not a chanop (or mode +v) on
				//a channel which has mode +m set or where the user is
				//banned and is trying to send a PRIVMSG message to
				//that channel.
				//404    ERR_CANNOTSENDTOCHAN
				//"<channel name> :Cannot send to channel"
				case 404:
				{
					m_pwndIRC->AddStatus( message );
					return;
				}

				//- Sent to a user when they have joined the maximum
				//number of allowed channels and they try to join
				//another channel.
				//405    ERR_TOOMANYCHANNELS
				//"<channel name> :You have joined too many channels"
				case 405:
				{
					m_pwndIRC->AddStatus( message );
					return;
				}

                //- Returned by WHOWAS to indicate there is no history
				//information for that nickname.
				//406    ERR_WASNOSUCHNICK
				//"<nickname> :There was no such nickname"
				case 406:
				{
					m_pwndIRC->AddStatus( message );
					return;
				}

                //- Returned to a client which is attempting to send a
				//PRIVMSG/NOTICE using the user@host destination format
				//and for a user@host which has several occurrences.
				//- Returned to a client which trying to send a
				//PRIVMSG/NOTICE to too many recipients.
				//- Returned to a client which is attempting to JOIN a safe
				//channel using the shortname when there are more than one
				//such channel.
				//407    ERR_TOOMANYTARGETS
				//"<target> :<error code> recipients. <abort message>"
				case 407:
				{
					m_pwndIRC->AddStatus( message );
					return;
				}

				//- Returned to a client which is attempting to send a SQUERY
				//to a service which does not exist.
				//408    ERR_NOSUCHSERVICE
				//"<service name> :No such service"
				case 408:
				{
					m_pwndIRC->AddStatus( message );
					return;
				}
				
				//- PING or PONG message missing the originator parameter.
				//409    ERR_NOORIGIN
				//":No origin specified"
				case 409:
				{
					m_pwndIRC->AddStatus( message );
					return;
				}
				
				//- 412 - 415 are returned by PRIVMSG to indicate that
				//the message wasn't delivered for some reason.
				//ERR_NOTOPLEVEL and ERR_WILDTOPLEVEL are errors that
				//are returned when an invalid use of
				//"PRIVMSG $<server>" or "PRIVMSG #<host>" is attempted.
				//411    ERR_NORECIPIENT
				//":No recipient given (<command>)"
				//412    ERR_NOTEXTTOSEND
				//":No text to send"
				//413    ERR_NOTOPLEVEL
				//"<mask> :No toplevel domain specified"
				//414    ERR_WILDTOPLEVEL
				//"<mask> :Wildcard in toplevel domain"
				//415    ERR_BADMASK
				//"<mask> :Bad Server/host mask"
				case 411:
				case 412:
				case 413:
				case 414:
				case 415:
				{
					m_pwndIRC->AddStatus( message );
					return;
				}
				
				//- Returned to a registered client to indicate that the
				//command sent is unknown by the server.
				//421    ERR_UNKNOWNCOMMAND
				//"<command> :Unknown command"
				case 421:
				{
					m_pwndIRC->AddStatus( message );
					return;
				}
				
				//- Server's MOTD file could not be opened by the server.
				//422    ERR_NOMOTD
				//":MOTD File is missing"
				case 422:
				{
					m_pwndIRC->AddStatus( message );
					return;
				}
				
				//- Returned by a server in response to an ADMIN message
				//when there is an error in finding the appropriate
				//information.
				//423    ERR_NOADMININFO
				//"<server> :No administrative info available"
				case 423:
				{
					m_pwndIRC->AddStatus( message );
					return;
				}
				

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -