The easy to use and full featured Irc Bot everyone is talking about!
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

MessageTypes.cs 6.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace Combot.IRCServices.Messaging
  7. {
  8. abstract public class IMessage : EventArgs
  9. {
  10. public DateTime TimeStamp { get; set; }
  11. }
  12. abstract public class IReply : IMessage
  13. {
  14. public string Message { get; set; }
  15. }
  16. public class ServerReplyMessage : IReply
  17. {
  18. public IRCReplyCode ReplyCode { get; set; }
  19. }
  20. public class ServerErrorMessage : IReply
  21. {
  22. public IRCErrorCode ErrorCode { get; set; }
  23. }
  24. public class ErrorMessage : IMessage
  25. {
  26. public string Message { get; set; }
  27. }
  28. public class ChannelMessage : IMessage
  29. {
  30. public Channel Channel { get; set; }
  31. public Nick Sender { get; set; }
  32. public string Message { get; set; }
  33. }
  34. public class PrivateMessage : IMessage
  35. {
  36. public Nick Sender { get; set; }
  37. public string Message { get; set; }
  38. }
  39. public class ServerNotice : IMessage
  40. {
  41. public string Message { get; set; }
  42. }
  43. public class ChannelNotice : IMessage
  44. {
  45. public Channel Channel { get; set; }
  46. public Nick Sender { get; set; }
  47. public string Message { get; set; }
  48. }
  49. public class PrivateNotice : IMessage
  50. {
  51. public Nick Sender { get; set; }
  52. public string Message { get; set; }
  53. }
  54. public class TopicChangeInfo : IMessage
  55. {
  56. public Channel Channel { get; set; }
  57. public Nick Nick { get; set; }
  58. public string Topic { get; set; }
  59. }
  60. public class ChannelModeChangeInfo : IMessage
  61. {
  62. public Channel Channel { get; set; }
  63. public Nick Nick { get; set; }
  64. public List<ChannelModeInfo> Modes { get; set; }
  65. }
  66. public class UserModeChangeInfo : IMessage
  67. {
  68. public Nick Nick { get; set; }
  69. public List<UserModeInfo> Modes { get; set; }
  70. }
  71. public class JoinChannelInfo : IMessage
  72. {
  73. public Channel Channel { get; set; }
  74. public Nick Nick { get; set; }
  75. }
  76. public class PartChannelInfo : IMessage
  77. {
  78. public Channel Channel { get; set; }
  79. public Nick Nick { get; set; }
  80. }
  81. public class KickInfo : IMessage
  82. {
  83. public Channel Channel { get; set; }
  84. public Nick Nick { get; set; }
  85. public Nick KickedNick { get; set; }
  86. public string Reason { get; set; }
  87. }
  88. public class QuitInfo : IMessage
  89. {
  90. public Nick Nick { get; set; }
  91. public string Message { get; set; }
  92. }
  93. public class PingInfo : IMessage
  94. {
  95. public string Message { get; set; }
  96. }
  97. public class PongInfo : IMessage
  98. {
  99. public string Message { get; set; }
  100. }
  101. // IRC Reply Codes //
  102. public enum IRCReplyCode
  103. {
  104. RPL_WELCOME = 1,
  105. RPL_YOURHOST = 2,
  106. RPL_CREATED = 3,
  107. RPL_MYINFO = 4,
  108. RPL_BOUNCE = 5,
  109. RPL_TRACELINK = 200,
  110. RPL_TRACECONNECTING = 201,
  111. RPL_TRACEHANDSHAKE = 202,
  112. RPL_TRACEUNKNOWN = 203,
  113. RPL_TRACEOPERATOR = 204,
  114. RPL_TRACEUSER = 205,
  115. RPL_TRACESERVER = 206,
  116. RPL_TRACESERVICE = 207,
  117. RPL_TRACENEWTYPE = 208,
  118. RPL_TRACECLASS = 209,
  119. RPL_TRACERECONNECT = 210,
  120. RPL_STATSLINKINFO = 211,
  121. RPL_STATSCOMMANDS = 212,
  122. RPL_ENDOFSTATS = 219,
  123. RPL_UMODEIS = 221,
  124. RPL_SERVLIST = 234,
  125. RPL_SERVLISTEND = 235,
  126. RPL_STATSUPTIME = 242,
  127. RPL_STATSOLINE = 243,
  128. RPL_LUSERCLIENT = 251,
  129. RPL_LUSEROP = 252,
  130. RPL_LUSERUNKNOWN = 253,
  131. RPL_LUSERCHANNELS = 254,
  132. RPL_LUSERME = 255,
  133. RPL_ADMINME = 256,
  134. RPL_ADMINLOC1 = 257,
  135. RPL_ADMINLOC2 = 258,
  136. RPL_ADMINEMAIL = 259,
  137. RPL_TRACELOG = 261,
  138. RPL_TRACEEND = 262,
  139. RPL_TRYAGAIN = 263,
  140. RPL_AWAY = 301,
  141. RPL_USERHOST = 302,
  142. RPL_ISON = 303,
  143. RPL_UNAWAY = 305,
  144. RPL_NOWAWAY = 306,
  145. RPL_WHOISUSER = 311,
  146. RPL_WHOISSERVER = 312,
  147. RPL_WHOISOPERATOR = 313,
  148. RPL_WHOWASUSER = 314,
  149. RPL_ENDOFWHO = 315,
  150. RPL_WHOISIDLE = 317,
  151. RPL_ENDOFWHOIS = 318,
  152. RPL_WHOISCHANNELS = 319,
  153. RPL_LISTSTART = 321,
  154. RPL_LIST = 322,
  155. RPL_LISTEND = 323,
  156. RPL_CHANNELMODEIS = 324,
  157. RPL_UNIQOPIS = 325,
  158. RPL_NOTOPIC = 331,
  159. RPL_TOPIC = 332,
  160. RPL_INVITING = 341,
  161. RPL_SUMMONING = 342,
  162. RPL_INVITELIST = 346,
  163. RPL_ENDOFINVITELIST = 347,
  164. RPL_EXCEPTLIST = 348,
  165. RPL_ENDOFEXCEPTLIST = 349,
  166. RPL_VERSION = 351,
  167. RPL_WHOREPLY = 352,
  168. RPL_NAMREPLY = 353,
  169. RPL_LINKS = 364,
  170. RPL_ENDOFLINKS = 365,
  171. RPL_ENDOFNAMES = 366,
  172. RPL_BANLIST = 367,
  173. RPL_ENDOFBANLIST = 368,
  174. RPL_ENDOFWHOWAS = 369,
  175. RPL_INFO = 371,
  176. RPL_MOTD = 372,
  177. RPL_ENDOFINFO = 374,
  178. RPL_MOTDSTART = 375,
  179. RPL_ENDOFMOTD = 376,
  180. RPL_YOUREOPER = 381,
  181. RPL_REHASHING = 382,
  182. RPL_YOURESERVICE = 383,
  183. RPL_TIME = 391,
  184. RPL_USERSSTART = 392,
  185. RPL_USERS = 393,
  186. RPL_ENDOFUSERS = 394,
  187. RPL_NOUSERS = 395
  188. }
  189. // IRC Error Codes //
  190. public enum IRCErrorCode
  191. {
  192. ERR_NOSUCHNICK = 401,
  193. ERR_NOSUCHSERVER = 402,
  194. ERR_NOSUCHCHANNEL = 403,
  195. ERR_CANNOTSENDTOCHAN = 404,
  196. ERR_TOOMANYCHANNELS = 405,
  197. ERR_WASNOSUCHNICK = 406,
  198. ERR_TOOMANYTARGETS = 407,
  199. ERR_NOSUCHSERVICE = 408,
  200. ERR_NOORIGIN = 409,
  201. ERR_NORECIPIENT = 411,
  202. ERR_NOTEXTTOSEND = 412,
  203. ERR_NOTOPLEVEL = 413,
  204. ERR_WILDTOPLEVEL = 414,
  205. ERR_BADMASK = 415,
  206. ERR_UNKNOWNCOMMAND = 421,
  207. ERR_NOMOTD = 422,
  208. ERR_NOADMININFO = 423,
  209. ERR_FILEERROR = 424,
  210. ERR_NONICKNAMEGIVEN = 431,
  211. ERR_ERRONEUSNICKNAME = 432,
  212. ERR_NICKNAMEINUSE = 433,
  213. ERR_NICKCOLLISION = 436,
  214. ERR_UNAVAILRESOURCE = 437,
  215. ERR_USERNOTINCHANNEL = 441,
  216. ERR_NOTONCHANNEL = 442,
  217. ERR_USERONCHANNEL = 443,
  218. ERR_NOLOGIN = 444,
  219. ERR_SUMMONDISABLED = 445,
  220. ERR_USERSDISABLED = 446,
  221. ERR_NOTREGISTERED = 451,
  222. ERR_NEEDMOREPARAMS = 461,
  223. ERR_ALREADYREGISTRED = 462,
  224. ERR_NOPERMFORHOST = 463,
  225. ERR_PASSWDMISMATCH = 464,
  226. ERR_YOUREBANNEDCREEP = 465,
  227. ERR_YOUWILLBEBANNED = 466,
  228. ERR_KEYSET = 467,
  229. ERR_CHANNELISFULL = 471,
  230. ERR_UNKNOWNMODE = 472,
  231. ERR_INVITEONLYCHAN = 473,
  232. ERR_BANNEDFROMCHAN = 474,
  233. ERR_BADCHANNELKEY = 475,
  234. ERR_BADCHANMASK = 476,
  235. ERR_NOCHANMODES = 477,
  236. ERR_BANLISTFULL = 478,
  237. ERR_NOPRIVILEGES = 481,
  238. ERR_CHANOPRIVSNEEDED = 482,
  239. ERR_CANTKILLSERVER = 483,
  240. ERR_RESTRICTED = 484,
  241. ERR_UNIQOPPRIVSNEEDED = 485,
  242. ERR_NOOPERHOST = 491,
  243. ERR_UMODEUNKNOWNFLAG = 501,
  244. ERR_USERSDONTMATCH = 502
  245. }
  246. }