2012-04-18 03:49:14 +02:00
|
|
|
package irc
|
|
|
|
|
|
|
|
const (
|
2014-04-16 06:25:55 +02:00
|
|
|
SEM_VER = "ergonomadic-1.4.4"
|
2014-02-25 18:42:50 +01:00
|
|
|
CRLF = "\r\n"
|
|
|
|
MAX_REPLY_LEN = 512 - len(CRLF)
|
2014-02-09 21:13:09 +01:00
|
|
|
|
2014-02-17 02:23:47 +01:00
|
|
|
// string codes
|
2014-02-17 08:29:11 +01:00
|
|
|
AWAY StringCode = "AWAY"
|
|
|
|
CAP StringCode = "CAP"
|
2014-02-23 19:04:31 +01:00
|
|
|
DEBUG StringCode = "DEBUG"
|
2014-02-17 08:29:11 +01:00
|
|
|
ERROR StringCode = "ERROR"
|
|
|
|
INVITE StringCode = "INVITE"
|
|
|
|
ISON StringCode = "ISON"
|
2014-02-17 02:23:47 +01:00
|
|
|
JOIN StringCode = "JOIN"
|
2014-02-17 08:29:11 +01:00
|
|
|
KICK StringCode = "KICK"
|
2014-02-25 18:10:16 +01:00
|
|
|
KILL StringCode = "KILL"
|
2014-02-17 08:51:27 +01:00
|
|
|
LIST StringCode = "LIST"
|
2014-02-17 02:23:47 +01:00
|
|
|
MODE StringCode = "MODE"
|
2014-02-17 08:29:11 +01:00
|
|
|
MOTD StringCode = "MOTD"
|
2014-02-18 06:02:03 +01:00
|
|
|
NAMES StringCode = "NAMES"
|
2014-02-17 08:29:11 +01:00
|
|
|
NICK StringCode = "NICK"
|
|
|
|
NOTICE StringCode = "NOTICE"
|
2014-03-17 20:11:35 +01:00
|
|
|
ONICK StringCode = "ONICK"
|
2014-02-17 08:29:11 +01:00
|
|
|
OPER StringCode = "OPER"
|
|
|
|
PART StringCode = "PART"
|
|
|
|
PASS StringCode = "PASS"
|
2014-02-17 02:23:47 +01:00
|
|
|
PING StringCode = "PING"
|
|
|
|
PONG StringCode = "PONG"
|
2014-02-17 08:29:11 +01:00
|
|
|
PRIVMSG StringCode = "PRIVMSG"
|
|
|
|
PROXY StringCode = "PROXY"
|
2014-02-17 02:23:47 +01:00
|
|
|
QUIT StringCode = "QUIT"
|
2014-03-13 09:55:46 +01:00
|
|
|
THEATER StringCode = "THEATER" // nonstandard
|
2014-02-25 16:45:40 +01:00
|
|
|
TIME StringCode = "TIME"
|
2014-02-17 08:29:11 +01:00
|
|
|
TOPIC StringCode = "TOPIC"
|
|
|
|
USER StringCode = "USER"
|
2014-02-25 07:04:11 +01:00
|
|
|
VERSION StringCode = "VERSION"
|
2014-02-17 08:29:11 +01:00
|
|
|
WHO StringCode = "WHO"
|
|
|
|
WHOIS StringCode = "WHOIS"
|
2014-03-06 21:14:21 +01:00
|
|
|
WHOWAS StringCode = "WHOWAS"
|
2014-02-17 02:23:47 +01:00
|
|
|
|
2012-12-09 22:47:02 +01:00
|
|
|
// numeric codes
|
2014-02-17 02:23:47 +01:00
|
|
|
RPL_WELCOME NumericCode = 1
|
|
|
|
RPL_YOURHOST NumericCode = 2
|
|
|
|
RPL_CREATED NumericCode = 3
|
|
|
|
RPL_MYINFO NumericCode = 4
|
|
|
|
RPL_BOUNCE NumericCode = 5
|
|
|
|
RPL_TRACELINK NumericCode = 200
|
|
|
|
RPL_TRACECONNECTING NumericCode = 201
|
|
|
|
RPL_TRACEHANDSHAKE NumericCode = 202
|
|
|
|
RPL_TRACEUNKNOWN NumericCode = 203
|
|
|
|
RPL_TRACEOPERATOR NumericCode = 204
|
|
|
|
RPL_TRACEUSER NumericCode = 205
|
|
|
|
RPL_TRACESERVER NumericCode = 206
|
|
|
|
RPL_TRACESERVICE NumericCode = 207
|
|
|
|
RPL_TRACENEWTYPE NumericCode = 208
|
|
|
|
RPL_TRACECLASS NumericCode = 209
|
|
|
|
RPL_TRACERECONNECT NumericCode = 210
|
|
|
|
RPL_STATSLINKINFO NumericCode = 211
|
|
|
|
RPL_STATSCOMMANDS NumericCode = 212
|
|
|
|
RPL_ENDOFSTATS NumericCode = 219
|
|
|
|
RPL_UMODEIS NumericCode = 221
|
|
|
|
RPL_SERVLIST NumericCode = 234
|
|
|
|
RPL_SERVLISTEND NumericCode = 235
|
|
|
|
RPL_STATSUPTIME NumericCode = 242
|
|
|
|
RPL_STATSOLINE NumericCode = 243
|
|
|
|
RPL_LUSERCLIENT NumericCode = 251
|
|
|
|
RPL_LUSEROP NumericCode = 252
|
|
|
|
RPL_LUSERUNKNOWN NumericCode = 253
|
|
|
|
RPL_LUSERCHANNELS NumericCode = 254
|
|
|
|
RPL_LUSERME NumericCode = 255
|
|
|
|
RPL_ADMINME NumericCode = 256
|
|
|
|
RPL_ADMINLOC1 NumericCode = 257
|
|
|
|
RPL_ADMINLOC2 NumericCode = 258
|
|
|
|
RPL_ADMINEMAIL NumericCode = 259
|
|
|
|
RPL_TRACELOG NumericCode = 261
|
|
|
|
RPL_TRACEEND NumericCode = 262
|
|
|
|
RPL_TRYAGAIN NumericCode = 263
|
|
|
|
RPL_AWAY NumericCode = 301
|
|
|
|
RPL_USERHOST NumericCode = 302
|
|
|
|
RPL_ISON NumericCode = 303
|
|
|
|
RPL_UNAWAY NumericCode = 305
|
|
|
|
RPL_NOWAWAY NumericCode = 306
|
|
|
|
RPL_WHOISUSER NumericCode = 311
|
|
|
|
RPL_WHOISSERVER NumericCode = 312
|
|
|
|
RPL_WHOISOPERATOR NumericCode = 313
|
|
|
|
RPL_WHOWASUSER NumericCode = 314
|
|
|
|
RPL_ENDOFWHO NumericCode = 315
|
|
|
|
RPL_WHOISIDLE NumericCode = 317
|
|
|
|
RPL_ENDOFWHOIS NumericCode = 318
|
|
|
|
RPL_WHOISCHANNELS NumericCode = 319
|
|
|
|
RPL_LIST NumericCode = 322
|
|
|
|
RPL_LISTEND NumericCode = 323
|
|
|
|
RPL_CHANNELMODEIS NumericCode = 324
|
|
|
|
RPL_UNIQOPIS NumericCode = 325
|
|
|
|
RPL_NOTOPIC NumericCode = 331
|
|
|
|
RPL_TOPIC NumericCode = 332
|
|
|
|
RPL_INVITING NumericCode = 341
|
|
|
|
RPL_SUMMONING NumericCode = 342
|
|
|
|
RPL_INVITELIST NumericCode = 346
|
|
|
|
RPL_ENDOFINVITELIST NumericCode = 347
|
|
|
|
RPL_EXCEPTLIST NumericCode = 348
|
|
|
|
RPL_ENDOFEXCEPTLIST NumericCode = 349
|
|
|
|
RPL_VERSION NumericCode = 351
|
|
|
|
RPL_WHOREPLY NumericCode = 352
|
|
|
|
RPL_NAMREPLY NumericCode = 353
|
|
|
|
RPL_LINKS NumericCode = 364
|
|
|
|
RPL_ENDOFLINKS NumericCode = 365
|
|
|
|
RPL_ENDOFNAMES NumericCode = 366
|
|
|
|
RPL_BANLIST NumericCode = 367
|
|
|
|
RPL_ENDOFBANLIST NumericCode = 368
|
|
|
|
RPL_ENDOFWHOWAS NumericCode = 369
|
|
|
|
RPL_INFO NumericCode = 371
|
|
|
|
RPL_MOTD NumericCode = 372
|
|
|
|
RPL_ENDOFINFO NumericCode = 374
|
|
|
|
RPL_MOTDSTART NumericCode = 375
|
|
|
|
RPL_ENDOFMOTD NumericCode = 376
|
|
|
|
RPL_YOUREOPER NumericCode = 381
|
|
|
|
RPL_REHASHING NumericCode = 382
|
|
|
|
RPL_YOURESERVICE NumericCode = 383
|
|
|
|
RPL_TIME NumericCode = 391
|
|
|
|
RPL_USERSSTART NumericCode = 392
|
|
|
|
RPL_USERS NumericCode = 393
|
|
|
|
RPL_ENDOFUSERS NumericCode = 394
|
|
|
|
RPL_NOUSERS NumericCode = 395
|
|
|
|
ERR_NOSUCHNICK NumericCode = 401
|
|
|
|
ERR_NOSUCHSERVER NumericCode = 402
|
|
|
|
ERR_NOSUCHCHANNEL NumericCode = 403
|
|
|
|
ERR_CANNOTSENDTOCHAN NumericCode = 404
|
|
|
|
ERR_TOOMANYCHANNELS NumericCode = 405
|
|
|
|
ERR_WASNOSUCHNICK NumericCode = 406
|
|
|
|
ERR_TOOMANYTARGETS NumericCode = 407
|
|
|
|
ERR_NOSUCHSERVICE NumericCode = 408
|
|
|
|
ERR_NOORIGIN NumericCode = 409
|
2014-03-01 04:21:33 +01:00
|
|
|
ERR_INVALIDCAPCMD NumericCode = 410
|
2014-02-17 02:23:47 +01:00
|
|
|
ERR_NORECIPIENT NumericCode = 411
|
|
|
|
ERR_NOTEXTTOSEND NumericCode = 412
|
|
|
|
ERR_NOTOPLEVEL NumericCode = 413
|
|
|
|
ERR_WILDTOPLEVEL NumericCode = 414
|
|
|
|
ERR_BADMASK NumericCode = 415
|
|
|
|
ERR_UNKNOWNCOMMAND NumericCode = 421
|
|
|
|
ERR_NOMOTD NumericCode = 422
|
|
|
|
ERR_NOADMININFO NumericCode = 423
|
|
|
|
ERR_FILEERROR NumericCode = 424
|
|
|
|
ERR_NONICKNAMEGIVEN NumericCode = 431
|
|
|
|
ERR_ERRONEUSNICKNAME NumericCode = 432
|
|
|
|
ERR_NICKNAMEINUSE NumericCode = 433
|
|
|
|
ERR_NICKCOLLISION NumericCode = 436
|
|
|
|
ERR_UNAVAILRESOURCE NumericCode = 437
|
|
|
|
ERR_USERNOTINCHANNEL NumericCode = 441
|
|
|
|
ERR_NOTONCHANNEL NumericCode = 442
|
|
|
|
ERR_USERONCHANNEL NumericCode = 443
|
|
|
|
ERR_NOLOGIN NumericCode = 444
|
|
|
|
ERR_SUMMONDISABLED NumericCode = 445
|
|
|
|
ERR_USERSDISABLED NumericCode = 446
|
|
|
|
ERR_NOTREGISTERED NumericCode = 451
|
|
|
|
ERR_NEEDMOREPARAMS NumericCode = 461
|
|
|
|
ERR_ALREADYREGISTRED NumericCode = 462
|
|
|
|
ERR_NOPERMFORHOST NumericCode = 463
|
|
|
|
ERR_PASSWDMISMATCH NumericCode = 464
|
|
|
|
ERR_YOUREBANNEDCREEP NumericCode = 465
|
|
|
|
ERR_YOUWILLBEBANNED NumericCode = 466
|
|
|
|
ERR_KEYSET NumericCode = 467
|
|
|
|
ERR_CHANNELISFULL NumericCode = 471
|
|
|
|
ERR_UNKNOWNMODE NumericCode = 472
|
|
|
|
ERR_INVITEONLYCHAN NumericCode = 473
|
|
|
|
ERR_BANNEDFROMCHAN NumericCode = 474
|
|
|
|
ERR_BADCHANNELKEY NumericCode = 475
|
|
|
|
ERR_BADCHANMASK NumericCode = 476
|
|
|
|
ERR_NOCHANMODES NumericCode = 477
|
|
|
|
ERR_BANLISTFULL NumericCode = 478
|
|
|
|
ERR_NOPRIVILEGES NumericCode = 481
|
|
|
|
ERR_CHANOPRIVSNEEDED NumericCode = 482
|
|
|
|
ERR_CANTKILLSERVER NumericCode = 483
|
|
|
|
ERR_RESTRICTED NumericCode = 484
|
|
|
|
ERR_UNIQOPPRIVSNEEDED NumericCode = 485
|
|
|
|
ERR_NOOPERHOST NumericCode = 491
|
|
|
|
ERR_UMODEUNKNOWNFLAG NumericCode = 501
|
|
|
|
ERR_USERSDONTMATCH NumericCode = 502
|
2014-03-01 04:21:33 +01:00
|
|
|
)
|