The easy to use and full featured Irc Bot everyone is talking about!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CommandTypes.cs 9.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459
  1. using System;
  2. using System.Collections.Generic;
  3. namespace Combot.IRCServices.Commanding
  4. {
  5. abstract public class ICommand : EventArgs
  6. {
  7. public DateTime TimeStamp { get; set; }
  8. public ICommand()
  9. {
  10. TimeStamp = DateTime.Now;
  11. }
  12. }
  13. public class PrivateMessageCommand : ICommand
  14. {
  15. public string Recipient { get; set; }
  16. public string Message { get; set; }
  17. public PrivateMessageCommand()
  18. {
  19. Recipient = string.Empty;
  20. Message = string.Empty;
  21. }
  22. }
  23. public class PrivateNoticeCommand : ICommand
  24. {
  25. public string Recipient { get; set; }
  26. public string Message { get; set; }
  27. public PrivateNoticeCommand()
  28. {
  29. Recipient = string.Empty;
  30. Message = string.Empty;
  31. }
  32. }
  33. public class CTCPMessageCommand : ICommand
  34. {
  35. public string Recipient { get; set; }
  36. public string Command { get; set; }
  37. public string Arguments { get; set; }
  38. public CTCPMessageCommand()
  39. {
  40. Recipient = string.Empty;
  41. Command = string.Empty;
  42. Arguments = string.Empty;
  43. }
  44. }
  45. public class CTCPNoticeCommand : ICommand
  46. {
  47. public string Recipient { get; set; }
  48. public string Command { get; set; }
  49. public string Arguments { get; set; }
  50. public CTCPNoticeCommand()
  51. {
  52. Recipient = string.Empty;
  53. Command = string.Empty;
  54. Arguments = string.Empty;
  55. }
  56. }
  57. public class PasswordCommand : ICommand
  58. {
  59. public string Password { get; set; }
  60. public PasswordCommand()
  61. {
  62. Password = string.Empty;
  63. }
  64. }
  65. public class NickCommand : ICommand
  66. {
  67. public string Nick { get; set; }
  68. public NickCommand()
  69. {
  70. Nick = string.Empty;
  71. }
  72. }
  73. public class UserCommand : ICommand
  74. {
  75. public string Username { get; set; }
  76. public string Hostname { get; set; }
  77. public string Servername { get; set; }
  78. public string Realname { get; set; }
  79. public UserCommand()
  80. {
  81. Username = string.Empty;
  82. Hostname = string.Empty;
  83. Hostname = string.Empty;
  84. Realname = string.Empty;
  85. }
  86. }
  87. public class OperCommand : ICommand
  88. {
  89. public string Username { get; set; }
  90. public string Password { get; set; }
  91. public OperCommand()
  92. {
  93. Username = string.Empty;
  94. Password = string.Empty;
  95. }
  96. }
  97. public class QuitCommand : ICommand
  98. {
  99. public string Message { get; set; }
  100. public QuitCommand()
  101. {
  102. Message = string.Empty;
  103. }
  104. }
  105. public class JoinCommand : ICommand
  106. {
  107. public string Channel { get; set; }
  108. public string Key { get; set; }
  109. public JoinCommand()
  110. {
  111. Channel = string.Empty;
  112. Key = string.Empty;
  113. }
  114. }
  115. public class PartCommand : ICommand
  116. {
  117. public string Channel { get; set; }
  118. public PartCommand()
  119. {
  120. Channel = string.Empty;
  121. }
  122. }
  123. public class ChannelModeCommand : ICommand
  124. {
  125. public string Channel { get; set; }
  126. public ChannelModeInfo Mode { get; set; }
  127. public ChannelModeCommand()
  128. {
  129. Channel = string.Empty;
  130. Mode = new ChannelModeInfo();
  131. }
  132. }
  133. public class UserModeCommand : ICommand
  134. {
  135. public string Nick { get; set; }
  136. public UserModeInfo Mode { get; set; }
  137. public UserModeCommand()
  138. {
  139. Nick = string.Empty;
  140. Mode = new UserModeInfo();
  141. }
  142. }
  143. public class TopicCommand : ICommand
  144. {
  145. public string Channel { get; set; }
  146. public string Topic { get; set; }
  147. public TopicCommand()
  148. {
  149. Channel = string.Empty;
  150. Topic = string.Empty;
  151. }
  152. }
  153. public class NamesCommand : ICommand
  154. {
  155. public string Channel { get; set; }
  156. public NamesCommand()
  157. {
  158. Channel = string.Empty;
  159. }
  160. }
  161. public class ListCommand : ICommand
  162. {
  163. public string Channel { get; set; }
  164. public ListCommand()
  165. {
  166. Channel = string.Empty;
  167. }
  168. }
  169. public class InviteCommand : ICommand
  170. {
  171. public string Channel { get; set; }
  172. public string Nick { get; set; }
  173. public InviteCommand()
  174. {
  175. Channel = string.Empty;
  176. Nick = string.Empty;
  177. }
  178. }
  179. public class KickCommand : ICommand
  180. {
  181. public string Channel { get; set; }
  182. public string Nick { get; set; }
  183. public string Reason { get; set; }
  184. public KickCommand()
  185. {
  186. Channel = string.Empty;
  187. Nick = string.Empty;
  188. Reason = string.Empty;
  189. }
  190. }
  191. public class VersionCommand : ICommand
  192. {
  193. public string Server { get; set; }
  194. public VersionCommand()
  195. {
  196. Server = string.Empty;
  197. }
  198. }
  199. public class StatsCommand : ICommand
  200. {
  201. public string Stat { get; set; }
  202. public string Parameter { get; set; }
  203. public StatsCommand()
  204. {
  205. Stat = string.Empty;
  206. Parameter = string.Empty;
  207. }
  208. }
  209. public class LinksCommand : ICommand
  210. {
  211. public string Mask { get; set; }
  212. public string Server { get; set; }
  213. public LinksCommand()
  214. {
  215. Mask = string.Empty;
  216. Server = string.Empty;
  217. }
  218. }
  219. public class TimeCommand : ICommand
  220. {
  221. public string Server { get; set; }
  222. public TimeCommand()
  223. {
  224. Server = string.Empty;
  225. }
  226. }
  227. public class ConnectCommand : ICommand
  228. {
  229. public string Originator { get; set; }
  230. public int Port { get; set; }
  231. public string Server { get; set; }
  232. public ConnectCommand()
  233. {
  234. Originator = string.Empty;
  235. Port = 0;
  236. Server = string.Empty;
  237. }
  238. }
  239. public class TraceCommand : ICommand
  240. {
  241. public string Target { get; set; }
  242. public TraceCommand()
  243. {
  244. Target = string.Empty;
  245. }
  246. }
  247. public class AdminCommand : ICommand
  248. {
  249. public string Host { get; set; }
  250. public AdminCommand()
  251. {
  252. Host = string.Empty;
  253. }
  254. }
  255. public class InfoCommand : ICommand
  256. {
  257. public string Host { get; set; }
  258. public InfoCommand()
  259. {
  260. Host = string.Empty;
  261. }
  262. }
  263. public class WhoCommand : ICommand
  264. {
  265. public string Host { get; set; }
  266. public WhoCommand()
  267. {
  268. Host = string.Empty;
  269. }
  270. }
  271. public class WhoisCommand : ICommand
  272. {
  273. public string Server { get; set; }
  274. public string Nick { get; set; }
  275. public WhoisCommand()
  276. {
  277. Server = string.Empty;
  278. Nick = string.Empty;
  279. }
  280. }
  281. public class WhowasCommand : ICommand
  282. {
  283. public string Nick { get; set; }
  284. public int Entries { get; set; }
  285. public string Server { get; set; }
  286. public WhowasCommand()
  287. {
  288. Nick = string.Empty;
  289. Entries = 0;
  290. Server = string.Empty;
  291. }
  292. }
  293. public class KillCommand : ICommand
  294. {
  295. public string Nick { get; set; }
  296. public string Comment { get; set; }
  297. public KillCommand()
  298. {
  299. Nick = string.Empty;
  300. Comment = string.Empty;
  301. }
  302. }
  303. public class PingCommand : ICommand
  304. {
  305. public string Recipient { get; set; }
  306. public PingCommand()
  307. {
  308. Recipient = string.Empty;
  309. }
  310. }
  311. public class PongCommand : ICommand
  312. {
  313. public string Sender { get; set; }
  314. public string Recipient { get; set; }
  315. public PongCommand()
  316. {
  317. Sender = string.Empty;
  318. Recipient = string.Empty;
  319. }
  320. }
  321. public class AwayCommand : ICommand
  322. {
  323. public string Message { get; set; }
  324. public AwayCommand()
  325. {
  326. Message = string.Empty;
  327. }
  328. }
  329. public class RehashCommand : ICommand
  330. {
  331. public RehashCommand() { }
  332. }
  333. public class RestartCommand : ICommand
  334. {
  335. public RestartCommand() { }
  336. }
  337. public class SummonCommand : ICommand
  338. {
  339. public string Nick { get; set; }
  340. public string Host { get; set; }
  341. public SummonCommand()
  342. {
  343. Nick = string.Empty;
  344. Host = string.Empty;
  345. }
  346. }
  347. public class UsersCommand : ICommand
  348. {
  349. public string Server { get; set; }
  350. public UsersCommand()
  351. {
  352. Server = string.Empty;
  353. }
  354. }
  355. public class WallopsCommand : ICommand
  356. {
  357. public string Message { get; set; }
  358. public WallopsCommand()
  359. {
  360. Message = string.Empty;
  361. }
  362. }
  363. public class UserhostCommand : ICommand
  364. {
  365. public string Nicks { get; set; }
  366. public UserhostCommand()
  367. {
  368. Nicks = string.Empty;
  369. }
  370. }
  371. public class IsonCommand : ICommand
  372. {
  373. public string Nicks { get; set; }
  374. public IsonCommand()
  375. {
  376. Nicks = string.Empty;
  377. }
  378. }
  379. }