]> git.mxchange.org Git - quix0rs-gnu-social.git/blob - plugins/Irc/extlib/phergie/Phergie/Event/Response.php
097e2535e8f28256165f3ef7150b403704a36579
[quix0rs-gnu-social.git] / plugins / Irc / extlib / phergie / Phergie / Event / Response.php
1 <?php
2 /**
3  * Phergie 
4  *
5  * PHP version 5
6  *
7  * LICENSE
8  *
9  * This source file is subject to the new BSD license that is bundled
10  * with this package in the file LICENSE.
11  * It is also available through the world-wide-web at this URL:
12  * http://phergie.org/license
13  *
14  * @category  Phergie 
15  * @package   Phergie
16  * @author    Phergie Development Team <team@phergie.org>
17  * @copyright 2008-2010 Phergie Development Team (http://phergie.org)
18  * @license   http://phergie.org/license New BSD License
19  * @link      http://pear.phergie.org/package/Phergie
20  */
21
22 /**
23  * Event originating from the server in response to an event sent by the
24  * current client.
25  *
26  * @category Phergie 
27  * @package  Phergie
28  * @author   Phergie Development Team <team@phergie.org>
29  * @license  http://phergie.org/license New BSD License
30  * @link     http://pear.phergie.org/package/Phergie
31  * @link     http://www.irchelp.org/irchelp/rfc/chapter6.html
32  */
33 class Phergie_Event_Response extends Phergie_Event_Abstract
34 {
35     /**
36      * <nickname> No such nick/channel
37      *
38      * Used to indicate the nickname parameter supplied to a command is currently
39      * unused.
40      */
41     const ERR_NOSUCHNICK = '401';
42
43     /**
44      * <server name> No such server
45      *
46      * Used to indicate the server name given currently doesn't exist.
47      */
48     const ERR_NOSUCHSERVER = '402';
49
50     /**
51      * <channel name> No such channel
52      *
53      * Used to indicate the given channel name is invalid.
54      */
55     const ERR_NOSUCHCHANNEL = '403';
56
57     /**
58      * <channel name> Cannot send to channel
59      *
60      * Sent to a user who is either (a) not on a channel which is mode +n or (b) not
61      * a chanop (or mode +v) on a channel which has mode +m set and is trying to send
62      * a PRIVMSG message to that channel.
63      */
64     const ERR_CANNOTSENDTOCHAN = '404';
65
66     /**
67      * <channel name> You have joined too many channels
68      *
69      * Sent to a user when they have joined the maximum number of allowed channels
70      * and they try to join another channel.
71      */
72     const ERR_TOOMANYCHANNELS = '405';
73
74     /**
75      * <nickname> There was no such nickname
76      *
77      * Returned by WHOWAS to indicate there is no history information for that
78      * nickname.
79      */
80     const ERR_WASNOSUCHNICK = '406';
81
82     /**
83      * <target> Duplicate recipients. No message delivered
84      *
85      * Returned to a client which is attempting to send PRIVMSG/NOTICE using the
86      * user@host destination format and for a user@host which has several
87      * occurrences.
88      */
89     const ERR_TOOMANYTARGETS = '407';
90
91     /**
92      * No origin specified
93      *
94      * PING or PONG message missing the originator parameter which is required since
95      * these commands must work without valid prefixes.
96      */
97     const ERR_NOORIGIN = '409';
98
99     /**
100      * No recipient given (<command>)
101      */
102     const ERR_NORECIPIENT = '411';
103
104     /**
105      * No text to send
106      */
107     const ERR_NOTEXTTOSEND = '412';
108
109     /**
110      * <mask> No toplevel domain specified
111      */
112     const ERR_NOTOPLEVEL = '413';
113
114     /**
115      * <mask> Wildcard in toplevel domain
116      *
117      * 412 - 414 are returned by PRIVMSG to indicate that the message wasn't
118      * delivered for some reason. ERR_NOTOPLEVEL and ERR_WILDTOPLEVEL are errors that
119      * are returned when an invalid use of "PRIVMSG $<server>" or "PRIVMSG #<host>"
120      * is attempted.
121      */
122     const ERR_WILDTOPLEVEL = '414';
123
124     /**
125      * <command> Unknown command
126      *
127      * Returned to a registered client to indicate that the command sent is unknown
128      * by the server.
129      */
130     const ERR_UNKNOWNCOMMAND = '421';
131
132     /**
133      * MOTD File is missing
134      *
135      * Server's MOTD file could not be opened by the server.
136      */
137     const ERR_NOMOTD = '422';
138
139     /**
140      * <server> No administrative info available
141      *
142      * Returned by a server in response to an ADMIN message when there is an error in
143      * finding the appropriate information.
144      */
145     const ERR_NOADMININFO = '423';
146
147     /**
148      * File error doing <file op> on <file>
149      *
150      * Generic error message used to report a failed file operation during the
151      * processing of a message.
152      */
153     const ERR_FILEERROR = '424';
154
155     /**
156      * No nickname given
157      *
158      * Returned when a nickname parameter expected for a command and isn't found.
159      */
160     const ERR_NONICKNAMEGIVEN = '431';
161
162     /**
163      * <nick> Erroneus nickname
164      *
165      * Returned after receiving a NICK message which contains characters which do not
166      * fall in the defined set. See section x.x.x for details on valid nicknames.
167      */
168     const ERR_ERRONEUSNICKNAME = '432';
169
170     /**
171      * <nick> Nickname is already in use
172      *
173      * Returned when a NICK message is processed that results in an attempt to change
174      * to a currently existing nickname.
175      */
176     const ERR_NICKNAMEINUSE = '433';
177
178     /**
179      * <nick> Nickname collision KILL
180      *
181      * Returned by a server to a client when it detects a nickname collision
182      * (registered of a NICK that already exists by another server).
183      */
184     const ERR_NICKCOLLISION = '436';
185
186     /**
187      * <nick> <channel> They aren't on that channel
188      *
189      * Returned by the server to indicate that the target user of the command is not
190      * on the given channel.
191      */
192     const ERR_USERNOTINCHANNEL = '441';
193
194     /**
195      * <channel> You're not on that channel
196      *
197      * Returned by the server whenever a client tries to perform a channel effecting
198      * command for which the client isn't a member.
199      */
200     const ERR_NOTONCHANNEL = '442';
201
202     /**
203      * <user> <channel> is already on channel
204      *
205      * Returned when a client tries to invite a user to a channel they are already
206      * on.
207      */
208     const ERR_USERONCHANNEL = '443';
209
210     /**
211      * <user> User not logged in
212      *
213      * Returned by the summon after a SUMMON command for a user was unable to be
214      * performed since they were not logged in.
215      */
216     const ERR_NOLOGIN = '444';
217
218     /**
219      * SUMMON has been disabled
220      *
221      * Returned as a response to the SUMMON command. Must be returned by any server
222      * which does not implement it.
223      */
224     const ERR_SUMMONDISABLED = '445';
225
226     /**
227      * USERS has been disabled
228      *
229      * Returned as a response to the USERS command. Must be returned by any server
230      * which does not implement it.
231      */
232     const ERR_USERSDISABLED = '446';
233
234     /**
235      * You have not registered
236      *
237      * Returned by the server to indicate that the client must be registered before
238      * the server will allow it to be parsed in detail.
239      */
240     const ERR_NOTREGISTERED = '451';
241
242     /**
243      * <command> Not enough parameters
244      *
245      * Returned by the server by numerous commands to indicate to the client that it
246      * didn't supply enough parameters.
247      */
248     const ERR_NEEDMOREPARAMS = '461';
249
250     /**
251      * You may not reregister
252      *
253      * Returned by the server to any link which tries to change part of the
254      * registered details (such as password or user details from second USER
255      * message).
256      */
257     const ERR_ALREADYREGISTRED = '462';
258
259     /**
260      * Your host isn't among the privileged
261      *
262      * Returned to a client which attempts to register with a server which does not
263      * been setup to allow connections from the host the attempted connection is
264      * tried.
265      */
266     const ERR_NOPERMFORHOST = '463';
267
268     /**
269      * Password incorrect
270      *
271      * Returned to indicate a failed attempt at registering a connection for which a
272      * password was required and was either not given or incorrect.
273      */
274     const ERR_PASSWDMISMATCH = '464';
275
276     /**
277      * You are banned from this server
278      *
279      * Returned after an attempt to connect and register yourself with a server which
280      * has been setup to explicitly deny connections to you.
281      */
282     const ERR_YOUREBANNEDCREEP = '465';
283
284     /**
285      * <channel> Channel key already set
286      */
287     const ERR_KEYSET = '467';
288
289     /**
290      * <channel> Cannot join channel (+l)
291      */
292     const ERR_CHANNELISFULL = '471';
293
294     /**
295      * <char> is unknown mode char to me
296      */
297     const ERR_UNKNOWNMODE = '472';
298
299     /**
300      * <channel> Cannot join channel (+i)
301      */
302     const ERR_INVITEONLYCHAN = '473';
303
304     /**
305      * <channel> Cannot join channel (+b)
306      */
307     const ERR_BANNEDFROMCHAN = '474';
308
309     /**
310      * <channel> Cannot join channel (+k)
311      */
312     const ERR_BADCHANNELKEY = '475';
313
314     /**
315      * Permission Denied- You're not an IRC operator
316      *
317      * Any command requiring operator privileges to operate must return this error to
318      * indicate the attempt was unsuccessful.
319      */
320     const ERR_NOPRIVILEGES = '481';
321
322     /**
323      * <channel> You're not channel operator
324      *
325      * Any command requiring 'chanop' privileges (such as MODE messages) must return
326      * this error if the client making the attempt is not a chanop on the specified
327      * channel.
328      */
329     const ERR_CHANOPRIVSNEEDED = '482';
330
331     /**
332      * You cant kill a server!
333      *
334      * Any attempts to use the KILL command on a server are to be refused and this
335      * error returned directly to the client.
336      */
337     const ERR_CANTKILLSERVER = '483';
338
339     /**
340      * No O-lines for your host
341      *
342      * If a client sends an OPER message and the server has not been configured to
343      * allow connections from the client's host as an operator, this error must be
344      * returned.
345      */
346     const ERR_NOOPERHOST = '491';
347
348     /**
349      * Unknown MODE flag
350      *
351      * Returned by the server to indicate that a MODE message was sent with a
352      * nickname parameter and that the a mode flag sent was not recognized.
353      */
354     const ERR_UMODEUNKNOWNFLAG = '501';
355
356     /**
357      * Cant change mode for other users
358      *
359      * Error sent to any user trying to view or change the user mode for a user other
360      * than themselves.
361      */
362     const ERR_USERSDONTMATCH = '502';
363
364     /**
365      * Dummy reply number. Not used.
366      */
367     const RPL_NONE = '300';
368
369     /**
370      * [<reply>{<space><reply>}]
371      *
372      * Reply format used by USERHOST to list replies to the query list. The reply
373      * string is composed as follows <reply> = <nick>['*'] '=' <'+'|'-'><hostname>
374      * The '*' indicates whether the client has registered as an Operator. The '-' or
375      * '+' characters represent whether the client has set an AWAY message or not
376      * respectively.
377      */
378     const RPL_USERHOST = '302';
379
380     /**
381      * [<nick> {<space><nick>}]
382      *
383      * Reply format used by ISON to list replies to the query list.
384      */
385     const RPL_ISON = '303';
386
387     /**
388      * <nick> <away message>
389      */
390     const RPL_AWAY = '301';
391
392     /**
393      * You are no longer marked as being away
394      */
395     const RPL_UNAWAY = '305';
396
397     /**
398      * You have been marked as being away
399      *
400      * These replies are used with the AWAY command (if allowed). RPL_AWAY is sent to
401      * any client sending a PRIVMSG to a client which is away. RPL_AWAY is only sent
402      * by the server to which the client is connected. Replies RPL_UNAWAY and
403      * RPL_NOWAWAY are sent when the client removes and sets an AWAY message.
404      */
405     const RPL_NOWAWAY = '306';
406
407     /**
408      * <nick> <user> <host> * <real name>
409      */
410     const RPL_WHOISUSER = '311';
411
412     /**
413      * <nick> <server> <server info>
414      */
415     const RPL_WHOISSERVER = '312';
416
417     /**
418      * <nick> is an IRC operator
419      */
420     const RPL_WHOISOPERATOR = '313';
421
422     /**
423      * <nick> <integer> seconds idle
424      */
425     const RPL_WHOISIDLE = '317';
426
427     /**
428      * <nick> End of /WHOIS list
429      */
430     const RPL_ENDOFWHOIS = '318';
431
432     /**
433      * <nick> {[@|+]<channel><space>}
434      *
435      * Replies 311 - 313, 317 - 319 are all replies generated in response to a WHOIS
436      * message. Given that there are enough parameters present, the answering server
437      * must either formulate a reply out of the above numerics (if the query nick is
438      * found) or return an error reply. The '*' in RPL_WHOISUSER is there as the
439      * literal character and not as a wild card. For each reply set, only
440      * RPL_WHOISCHANNELS may appear more than once (for long lists of channel names).
441      * The '@' and '+' characters next to the channel name indicate whether a client
442      * is a channel operator or has been granted permission to speak on a moderated
443      * channel. The RPL_ENDOFWHOIS reply is used to mark the end of processing a
444      * WHOIS message.
445      */
446     const RPL_WHOISCHANNELS = '319';
447
448     /**
449      * <nick> <user> <host> * <real name>
450      */
451     const RPL_WHOWASUSER = '314';
452
453     /**
454      * <nick> End of WHOWAS
455      *
456      * When replying to a WHOWAS message, a server must use the replies
457      * RPL_WHOWASUSER, RPL_WHOISSERVER or ERR_WASNOSUCHNICK for each nickname in the
458      * presented list. At the end of all reply batches, there must be RPL_ENDOFWHOWAS
459      * (even if there was only one reply and it was an error).
460      */
461     const RPL_ENDOFWHOWAS = '369';
462
463     /**
464      * Channel Users Name
465      */
466     const RPL_LISTSTART = '321';
467
468     /**
469      * <channel> <# visible> <topic>
470      */
471     const RPL_LIST = '322';
472
473     /**
474      * End of /LIST
475      *
476      * Replies RPL_LISTSTART, RPL_LIST, RPL_LISTEND mark the start, actual replies
477      * with data and end of the server's response to a LIST command. If there are no
478      * channels available to return, only the start and end reply must be sent.
479      */
480     const RPL_LISTEND = '323';
481
482     /**
483      * <channel> <mode> <mode params>
484      */
485     const RPL_CHANNELMODEIS = '324';
486
487     /**
488      * <channel> No topic is set
489      */
490     const RPL_NOTOPIC = '331';
491
492     /**
493      * <channel> <topic>
494      *
495      * When sending a TOPIC message to determine the channel topic, one of two
496      * replies is sent. If the topic is set, RPL_TOPIC is sent back else RPL_NOTOPIC.
497      */
498     const RPL_TOPIC = '332';
499
500     /**
501      * <channel> <nick>
502      *
503      * Returned by the server to indicate that the attempted INVITE message was
504      * successful and is being passed onto the end client.
505      */
506     const RPL_INVITING = '341';
507
508     /**
509      * <user> Summoning user to IRC
510      *
511      * Returned by a server answering a SUMMON message to indicate that it is
512      * summoning that user.
513      */
514     const RPL_SUMMONING = '342';
515
516     /**
517      * <version>.<debuglevel> <server> <comments>
518      *
519      * Reply by the server showing its version details. The <version> is the version
520      * of the software being used (including any patchlevel revisions) and the
521      * <debuglevel> is used to indicate if the server is running in "debug mode". The
522      * "comments" field may contain any comments about the version or further version
523      * details.
524      */
525     const RPL_VERSION = '351';
526
527     /**
528      * <channel> <user> <host> <server> <nick> <H|G>[*][@|+] <hopcount> <real name>
529      */
530     const RPL_WHOREPLY = '352';
531
532     /**
533      * <name> End of /WHO list
534      *
535      * The RPL_WHOREPLY and RPL_ENDOFWHO pair are used to answer a WHO message. The
536      * RPL_WHOREPLY is only sent if there is an appropriate match to the WHO query.
537      * If there is a list of parameters supplied with a WHO message, a RPL_ENDOFWHO
538      * must be sent after processing each list item with <name> being the item.
539      */
540     const RPL_ENDOFWHO = '315';
541
542     /**
543      * <channel> [[@|+]<nick> [[@|+]<nick> [...]]]
544      */
545     const RPL_NAMREPLY = '353';
546
547     /**
548      * <channel> End of /NAMES list
549      *
550      * To reply to a NAMES message, a reply pair consisting of RPL_NAMREPLY and
551      * RPL_ENDOFNAMES is sent by the server back to the client. If there is no
552      * channel found as in the query, then only RPL_ENDOFNAMES is returned. The
553      * exception to this is when a NAMES message is sent with no parameters and all
554      * visible channels and contents are sent back in a series of RPL_NAMEREPLY
555      * messages with a RPL_ENDOFNAMES to mark the end.
556      */
557     const RPL_ENDOFNAMES = '366';
558
559     /**
560      * <mask> <server> <hopcount> <server info>
561      */
562     const RPL_LINKS = '364';
563
564     /**
565      * <mask> End of /LINKS list
566      *
567      * In replying to the LINKS message, a server must send replies back using the
568      * RPL_LINKS numeric and mark the end of the list using an RPL_ENDOFLINKS reply.v
569      */
570     const RPL_ENDOFLINKS = '365';
571
572     /**
573      * <channel> <banid>
574      */
575     const RPL_BANLIST = '367';
576
577     /**
578      * <channel> End of channel ban list
579      *
580      * When listing the active 'bans' for a given channel, a server is required to
581      * send the list back using the RPL_BANLIST and RPL_ENDOFBANLIST messages. A
582      * separate RPL_BANLIST is sent for each active banid. After the banids have been
583      * listed (or if none present) a RPL_ENDOFBANLIST must be sent.
584      */
585     const RPL_ENDOFBANLIST = '368';
586
587     /**
588      * <string>
589      */
590     const RPL_INFO = '371';
591
592     /**
593      * End of /INFO list
594      *
595      * A server responding to an INFO message is required to send all its 'info' in a
596      * series of RPL_INFO messages with a RPL_ENDOFINFO reply to indicate the end of
597      * the replies.
598      */
599     const RPL_ENDOFINFO = '374';
600
601     /**
602      * - <server> Message of the day -
603      */
604     const RPL_MOTDSTART = '375';
605
606     /**
607      * - <text>
608      */
609     const RPL_MOTD = '372';
610
611     /**
612      * End of /MOTD command
613      *
614      * When responding to the MOTD message and the MOTD file is found, the file is
615      * displayed line by line, with each line no longer than 80 characters, using
616      * RPL_MOTD format replies. These should be surrounded by a RPL_MOTDSTART (before
617      * the RPL_MOTDs) and an RPL_ENDOFMOTD (after).
618      */
619     const RPL_ENDOFMOTD = '376';
620
621     /**
622      * You are now an IRC operator
623      *
624      * RPL_YOUREOPER is sent back to a client which has just successfully issued an
625      * OPER message and gained operator status.
626      */
627     const RPL_YOUREOPER = '381';
628
629     /**
630      * <config file> Rehashing
631      *
632      * If the REHASH option is used and an operator sends a REHASH message, an
633      * RPL_REHASHING is sent back to the operator.
634      */
635     const RPL_REHASHING = '382';
636
637     /**
638      * <server> <string showing server's local time>
639      *
640      * When replying to the TIME message, a server must send the reply using the
641      * RPL_TIME format above. The string showing the time need only contain the
642      * correct day and time there. There is no further requirement for the time
643      * string.
644      */
645     const RPL_TIME = '391';
646
647     /**
648      * UserID Terminal Host
649      */
650     const RPL_USERSSTART = '392';
651
652     /**
653      * %-8s %-9s %-8s
654      */
655     const RPL_USERS = '393';
656
657     /**
658      * End of users
659      */
660     const RPL_ENDOFUSERS = '394';
661
662     /**
663      * Nobody logged in
664      *
665      * If the USERS message is handled by a server, the replies RPL_USERSTART,
666      * RPL_USERS, RPL_ENDOFUSERS and RPL_NOUSERS are used. RPL_USERSSTART must be
667      * sent first, following by either a sequence of RPL_USERS or a single
668      * RPL_NOUSER. Following this is RPL_ENDOFUSERS.
669      */
670     const RPL_NOUSERS = '395';
671
672     /**
673      * Link <version & debug level> <destination> <next server>
674      */
675     const RPL_TRACELINK = '200';
676
677     /**
678      * Try. <class> <server>
679      */
680     const RPL_TRACECONNECTING = '201';
681
682     /**
683      * H.S. <class> <server>
684      */
685     const RPL_TRACEHANDSHAKE = '202';
686
687     /**
688      * ???? <class> [<client IP address in dot form>]
689      */
690     const RPL_TRACEUNKNOWN = '203';
691
692     /**
693      * Oper <class> <nick>
694      */
695     const RPL_TRACEOPERATOR = '204';
696
697     /**
698      * User <class> <nick>
699      */
700     const RPL_TRACEUSER = '205';
701
702     /**
703      * Serv <class> <int>S <int>C <server> <nick!user|*!*>@<host|server>
704      */
705     const RPL_TRACESERVER = '206';
706
707     /**
708      * <newtype> 0 <client name>
709      */
710     const RPL_TRACENEWTYPE = '208';
711
712     /**
713      * File <logfile> <debug level>
714      *
715      * The RPL_TRACE* are all returned by the server in response to the TRACE
716      * message. How many are returned is dependent on the the TRACE message and
717      * whether it was sent by an operator or not. There is no predefined order for
718      * which occurs first. Replies RPL_TRACEUNKNOWN, RPL_TRACECONNECTING and
719      * RPL_TRACEHANDSHAKE are all used for connections which have not been fully
720      * established and are either unknown, still attempting to connect or in the
721      * process of completing the 'server handshake'. RPL_TRACELINK is sent by any
722      * server which handles a TRACE message and has to pass it on to another server.
723      * The list of RPL_TRACELINKs sent in response to a TRACE command traversing the
724      * IRC network should reflect the actual connectivity of the servers themselves
725      * along that path. RPL_TRACENEWTYPE is to be used for any connection which does
726      * not fit in the other categories but is being displayed anyway.
727      */
728     const RPL_TRACELOG = '261';
729
730     /**
731      * <linkname> <sendq> <sent messages> <sent bytes> <received messages> <received
732      * bytes> <time open>
733      */
734     const RPL_STATSLINKINFO = '211';
735
736     /**
737      * <command> <count>
738      */
739     const RPL_STATSCOMMANDS = '212';
740
741     /**
742      * C <host> * <name> <port> <class>
743      */
744     const RPL_STATSCLINE = '213';
745
746     /**
747      * N <host> * <name> <port> <class>
748      */
749     const RPL_STATSNLINE = '214';
750
751     /**
752      * I <host> * <host> <port> <class>
753      */
754     const RPL_STATSILINE = '215';
755
756     /**
757      * K <host> * <username> <port> <class>
758      */
759     const RPL_STATSKLINE = '216';
760
761     /**
762      * Y <class> <ping frequency> <connect frequency> <max sendq>
763      */
764     const RPL_STATSYLINE = '218';
765
766     /**
767      * <stats letter> End of /STATS report
768      */
769     const RPL_ENDOFSTATS = '219';
770
771     /**
772      * L <hostmask> * <servername> <maxdepth>
773      */
774     const RPL_STATSLLINE = '241';
775
776     /**
777      * Server Up %d days %d%02d%02d
778      */
779     const RPL_STATSUPTIME = '242';
780
781     /**
782      * O <hostmask> * <name>
783      */
784     const RPL_STATSOLINE = '243';
785
786     /**
787      * H <hostmask> * <servername>
788      */
789     const RPL_STATSHLINE = '244';
790
791     /**
792      * <user mode string>
793      *
794      * To answer a query about a client's own mode, RPL_UMODEIS is sent back.
795      */
796     const RPL_UMODEIS = '221';
797
798     /**
799      * There are <integer> users and <integer> invisible on <integer> servers
800      */
801     const RPL_LUSERCLIENT = '251';
802
803     /**
804      * <integer> operator(s) online
805      */
806     const RPL_LUSEROP = '252';
807
808     /**
809      * <integer> unknown connection(s)
810      */
811     const RPL_LUSERUNKNOWN = '253';
812
813     /**
814      * <integer> channels formed
815      */
816     const RPL_LUSERCHANNELS = '254';
817
818     /**
819      * I have <integer> clients and <integer> servers
820      *
821      * In processing an LUSERS message, the server sends a set of replies from
822      * RPL_LUSERCLIENT, RPL_LUSEROP, RPL_USERUNKNOWN, RPL_LUSERCHANNELS and
823      * RPL_LUSERME. When replying, a server must send back RPL_LUSERCLIENT and
824      * RPL_LUSERME. The other replies are only sent back if a non-zero count is found
825      * for them.
826      */
827     const RPL_LUSERME = '255';
828
829     /**
830      * <server> Administrative info
831      */
832     const RPL_ADMINME = '256';
833
834     /**
835      * <admin info>
836      */
837     const RPL_ADMINLOC1 = '257';
838
839     /**
840      * <admin info>
841      */
842     const RPL_ADMINLOC2 = '258';
843
844     /**
845      * <admin info>
846      *
847      * When replying to an ADMIN message, a server is expected to use replies
848      * RLP_ADMINME through to RPL_ADMINEMAIL and provide a text message with each.
849      * For RPL_ADMINLOC1 a description of what city, state and country the server is
850      * in is expected, followed by details of the university and department
851      * (RPL_ADMINLOC2) and finally the administrative contact for the server (an
852      * email address here is required) in RPL_ADMINEMAIL.
853      */
854     const RPL_ADMINEMAIL = '259';
855
856     /**
857      * Reply code sent by the server, which can be compared to the ERR_* and
858      * RPL_* constants
859      *
860      * @var string
861      */
862     protected $code;
863
864     /**
865      * Reply code description sent by the server.
866      *
867      * @var string
868      */
869     protected $description;
870
871     /**
872      * Raw data sent by the server
873      *
874      * @var string
875      */
876     protected $rawData;
877
878     /**
879      * Event type
880      *
881      * @var string
882      */
883     protected $type = 'response';
884
885     /**
886      * Sets the reply code sent by the server.
887      *
888      * @param string $code Reply code
889      *
890      * @return Phergie_Event_Response Provides a fluent interface
891      */
892     public function setCode($code)
893     {
894         $this->code = $code;
895         return $this;
896     }
897
898     /**
899      * Returns the reply code sent by the server.
900      *
901      * @return string
902      */
903     public function getCode()
904     {
905         return $this->code;
906     }
907
908     /**
909      * Sets the reply code description sent by the server.
910      *
911      * @param string $description Reply code description
912      *
913      * @return Phergie_Event_Response Provides a fluent interface
914      */
915     public function setDescription($description)
916     {
917         $this->description = $description;
918         return $this;
919     }
920
921     /**
922      * Returns the reply code description sent by the server.
923      *
924      * @return string
925      */
926     public function getDescription()
927     {
928         return $this->description;
929     }
930
931     /**
932      * Sets the raw buffer for the given event
933      *
934      * @param string $buffer Raw event buffer
935      *
936      * @return Phergie_Event_Response Provides a fluent interface
937      */
938     public function setRawData($buffer)
939     {
940         $this->rawData = $buffer;
941         return $this;
942     }
943
944     /**
945      * Returns the raw buffer that was sent from the server for that event
946      *
947      * @return string
948      */
949     public function getRawData()
950     {
951         return $this->rawData;
952     }
953 }