1
0

IRCClientView.cs 54 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689
  1. /*
  2. * Copyright (c) Contributors, http://opensimulator.org/
  3. * See CONTRIBUTORS.TXT for a full list of copyright holders.
  4. *
  5. * Redistribution and use in source and binary forms, with or without
  6. * modification, are permitted provided that the following conditions are met:
  7. * * Redistributions of source code must retain the above copyright
  8. * notice, this list of conditions and the following disclaimer.
  9. * * Redistributions in binary form must reproduce the above copyright
  10. * notice, this list of conditions and the following disclaimer in the
  11. * documentation and/or other materials provided with the distribution.
  12. * * Neither the name of the OpenSimulator Project nor the
  13. * names of its contributors may be used to endorse or promote products
  14. * derived from this software without specific prior written permission.
  15. *
  16. * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
  17. * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  18. * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  19. * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
  20. * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  21. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  22. * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  23. * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  24. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  25. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  26. */
  27. using System;
  28. using System.Collections.Generic;
  29. using System.IO;
  30. using System.Net;
  31. using System.Net.Sockets;
  32. using System.Reflection;
  33. using System.Text;
  34. using System.Threading;
  35. using log4net;
  36. using OpenMetaverse;
  37. using OpenMetaverse.Packets;
  38. using OpenSim.Framework;
  39. using OpenSim.Framework.Client;
  40. using OpenSim.Framework.Monitoring;
  41. using OpenSim.Region.Framework.Scenes;
  42. namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
  43. {
  44. public delegate void OnIRCClientReadyDelegate(IRCClientView cv);
  45. public class IRCClientView : IClientAPI, IClientCore
  46. {
  47. public event OnIRCClientReadyDelegate OnIRCReady;
  48. private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
  49. private readonly TcpClient m_client;
  50. private readonly Scene m_scene;
  51. private UUID m_agentID = UUID.Random();
  52. public ISceneAgent SceneAgent { get; set; }
  53. private string m_username;
  54. private string m_nick;
  55. private bool m_hasNick = false;
  56. private bool m_hasUser = false;
  57. private bool m_connected = true;
  58. public IRCClientView(TcpClient client, Scene scene)
  59. {
  60. m_client = client;
  61. m_scene = scene;
  62. Watchdog.StartThread(InternalLoop, "IRCClientView", ThreadPriority.Normal, false, true);
  63. }
  64. private void SendServerCommand(string command)
  65. {
  66. SendCommand(":opensimircd " + command);
  67. }
  68. private void SendCommand(string command)
  69. {
  70. m_log.Info("[IRCd] Sending >>> " + command);
  71. byte[] buf = Util.UTF8.GetBytes(command + "\r\n");
  72. m_client.GetStream().BeginWrite(buf, 0, buf.Length, SendComplete, null);
  73. }
  74. private void SendComplete(IAsyncResult result)
  75. {
  76. m_log.Info("[IRCd] Send Complete.");
  77. }
  78. private string IrcRegionName
  79. {
  80. // I know &Channel is more technically correct, but people are used to seeing #Channel
  81. // Dont shoot me!
  82. get { return "#" + m_scene.RegionInfo.RegionName.Replace(" ", "-"); }
  83. }
  84. private void InternalLoop()
  85. {
  86. try
  87. {
  88. string strbuf = String.Empty;
  89. while (m_connected && m_client.Connected)
  90. {
  91. byte[] buf = new byte[8]; // RFC1459 defines max message size as 512.
  92. int count = m_client.GetStream().Read(buf, 0, buf.Length);
  93. string line = Util.UTF8.GetString(buf, 0, count);
  94. strbuf += line;
  95. string message = ExtractMessage(strbuf);
  96. if (message != null)
  97. {
  98. // Remove from buffer
  99. strbuf = strbuf.Remove(0, message.Length);
  100. m_log.Info("[IRCd] Recieving <<< " + message);
  101. message = message.Trim();
  102. // Extract command sequence
  103. string command = ExtractCommand(message);
  104. ProcessInMessage(message, command);
  105. }
  106. else
  107. {
  108. //m_log.Info("[IRCd] Recieved data, but not enough to make a message. BufLen is " + strbuf.Length +
  109. // "[" + strbuf + "]");
  110. if (strbuf.Length == 0)
  111. {
  112. m_connected = false;
  113. m_log.Info("[IRCd] Buffer zero, closing...");
  114. if (OnDisconnectUser != null)
  115. OnDisconnectUser();
  116. }
  117. }
  118. Thread.Sleep(0);
  119. Watchdog.UpdateThread();
  120. }
  121. }
  122. catch (IOException)
  123. {
  124. if (OnDisconnectUser != null)
  125. OnDisconnectUser();
  126. m_log.Warn("[IRCd] Disconnected client.");
  127. }
  128. catch (SocketException)
  129. {
  130. if (OnDisconnectUser != null)
  131. OnDisconnectUser();
  132. m_log.Warn("[IRCd] Disconnected client.");
  133. }
  134. Watchdog.RemoveThread();
  135. }
  136. private void ProcessInMessage(string message, string command)
  137. {
  138. m_log.Info("[IRCd] Processing [MSG:" + message + "] [COM:" + command + "]");
  139. if (command != null)
  140. {
  141. switch (command)
  142. {
  143. case "ADMIN":
  144. case "AWAY":
  145. case "CONNECT":
  146. case "DIE":
  147. case "ERROR":
  148. case "INFO":
  149. case "INVITE":
  150. case "ISON":
  151. case "KICK":
  152. case "KILL":
  153. case "LINKS":
  154. case "LUSERS":
  155. case "OPER":
  156. case "PART":
  157. case "REHASH":
  158. case "SERVICE":
  159. case "SERVLIST":
  160. case "SERVER":
  161. case "SQUERY":
  162. case "SQUIT":
  163. case "STATS":
  164. case "SUMMON":
  165. case "TIME":
  166. case "TRACE":
  167. case "VERSION":
  168. case "WALLOPS":
  169. case "WHOIS":
  170. case "WHOWAS":
  171. SendServerCommand("421 " + command + " :Command unimplemented");
  172. break;
  173. // Connection Commands
  174. case "PASS":
  175. break; // Ignore for now. I want to implement authentication later however.
  176. case "JOIN":
  177. IRC_SendReplyJoin();
  178. break;
  179. case "MODE":
  180. IRC_SendReplyModeChannel();
  181. break;
  182. case "USER":
  183. IRC_ProcessUser(message);
  184. IRC_Ready();
  185. break;
  186. case "USERHOST":
  187. string[] userhostArgs = ExtractParameters(message);
  188. if (userhostArgs[0] == ":" + m_nick)
  189. {
  190. SendServerCommand("302 :" + m_nick + "=+" + m_nick + "@" +
  191. ((IPEndPoint) m_client.Client.RemoteEndPoint).Address);
  192. }
  193. break;
  194. case "NICK":
  195. IRC_ProcessNick(message);
  196. IRC_Ready();
  197. break;
  198. case "TOPIC":
  199. IRC_SendReplyTopic();
  200. break;
  201. case "USERS":
  202. IRC_SendReplyUsers();
  203. break;
  204. case "LIST":
  205. break; // TODO
  206. case "MOTD":
  207. IRC_SendMOTD();
  208. break;
  209. case "NOTICE": // TODO
  210. break;
  211. case "WHO": // TODO
  212. IRC_SendNamesReply();
  213. IRC_SendWhoReply();
  214. break;
  215. case "PING":
  216. IRC_ProcessPing(message);
  217. break;
  218. // Special case, ignore this completely.
  219. case "PONG":
  220. break;
  221. case "QUIT":
  222. if (OnDisconnectUser != null)
  223. OnDisconnectUser();
  224. break;
  225. case "NAMES":
  226. IRC_SendNamesReply();
  227. break;
  228. case "PRIVMSG":
  229. IRC_ProcessPrivmsg(message);
  230. break;
  231. default:
  232. SendServerCommand("421 " + command + " :Unknown command");
  233. break;
  234. }
  235. }
  236. }
  237. private void IRC_Ready()
  238. {
  239. if (m_hasUser && m_hasNick)
  240. {
  241. SendServerCommand("001 " + m_nick + " :Welcome to OpenSimulator IRCd");
  242. SendServerCommand("002 " + m_nick + " :Running OpenSimVersion");
  243. SendServerCommand("003 " + m_nick + " :This server was created over 9000 years ago");
  244. SendServerCommand("004 " + m_nick + " :opensimirc r1 aoOirw abeiIklmnoOpqrstv");
  245. SendServerCommand("251 " + m_nick + " :There are 0 users and 0 services on 1 servers");
  246. SendServerCommand("252 " + m_nick + " 0 :operators online");
  247. SendServerCommand("253 " + m_nick + " 0 :unknown connections");
  248. SendServerCommand("254 " + m_nick + " 1 :channels formed");
  249. SendServerCommand("255 " + m_nick + " :I have 1 users, 0 services and 1 servers");
  250. SendCommand(":" + m_nick + " MODE " + m_nick + " :+i");
  251. SendCommand(":" + m_nick + " JOIN :" + IrcRegionName);
  252. // Rename to 'Real Name'
  253. SendCommand(":" + m_nick + " NICK :" + m_username.Replace(" ", ""));
  254. m_nick = m_username.Replace(" ", "");
  255. IRC_SendReplyJoin();
  256. IRC_SendChannelPrivmsg("System", "Welcome to OpenSimulator.");
  257. IRC_SendChannelPrivmsg("System", "You are in a maze of twisty little passages, all alike.");
  258. IRC_SendChannelPrivmsg("System", "It is pitch black. You are likely to be eaten by a grue.");
  259. if (OnIRCReady != null)
  260. OnIRCReady(this);
  261. }
  262. }
  263. private void IRC_SendReplyJoin()
  264. {
  265. IRC_SendReplyTopic();
  266. IRC_SendNamesReply();
  267. }
  268. private void IRC_SendReplyModeChannel()
  269. {
  270. SendServerCommand("324 " + m_nick + " " + IrcRegionName + " +n");
  271. //SendCommand(":" + IrcRegionName + " MODE +n");
  272. }
  273. private void IRC_ProcessUser(string message)
  274. {
  275. string[] userArgs = ExtractParameters(message);
  276. // TODO: unused: string username = userArgs[0];
  277. // TODO: unused: string hostname = userArgs[1];
  278. // TODO: unused: string servername = userArgs[2];
  279. string realname = userArgs[3].Replace(":", "");
  280. m_username = realname;
  281. m_hasUser = true;
  282. }
  283. private void IRC_ProcessNick(string message)
  284. {
  285. string[] nickArgs = ExtractParameters(message);
  286. string nickname = nickArgs[0].Replace(":","");
  287. m_nick = nickname;
  288. m_hasNick = true;
  289. }
  290. private void IRC_ProcessPing(string message)
  291. {
  292. string[] pingArgs = ExtractParameters(message);
  293. string pingHost = pingArgs[0];
  294. SendCommand("PONG " + pingHost);
  295. }
  296. private void IRC_ProcessPrivmsg(string message)
  297. {
  298. string[] privmsgArgs = ExtractParameters(message);
  299. if (privmsgArgs[0] == IrcRegionName)
  300. {
  301. if (OnChatFromClient != null)
  302. {
  303. OSChatMessage msg = new OSChatMessage();
  304. msg.Sender = this;
  305. msg.Channel = 0;
  306. msg.From = this.Name;
  307. msg.Message = privmsgArgs[1].Replace(":", "");
  308. msg.Position = Vector3.Zero;
  309. msg.Scene = m_scene;
  310. msg.SenderObject = null;
  311. msg.SenderUUID = this.AgentId;
  312. msg.Type = ChatTypeEnum.Say;
  313. OnChatFromClient(this, msg);
  314. }
  315. }
  316. else
  317. {
  318. // Handle as an IM, later.
  319. }
  320. }
  321. private void IRC_SendNamesReply()
  322. {
  323. EntityBase[] users = m_scene.Entities.GetAllByType<ScenePresence>();
  324. foreach (EntityBase user in users)
  325. {
  326. SendServerCommand("353 " + m_nick + " = " + IrcRegionName + " :" + user.Name.Replace(" ", ""));
  327. }
  328. SendServerCommand("366 " + IrcRegionName + " :End of /NAMES list");
  329. }
  330. private void IRC_SendWhoReply()
  331. {
  332. EntityBase[] users = m_scene.Entities.GetAllByType<ScenePresence>();
  333. foreach (EntityBase user in users)
  334. {
  335. /*SendServerCommand(String.Format("352 {0} {1} {2} {3} {4} {5} :0 {6}", IrcRegionName,
  336. user.Name.Replace(" ", ""), "nohost.com", "opensimircd",
  337. user.Name.Replace(" ", ""), 'H', user.Name));*/
  338. SendServerCommand("352 " + m_nick + " " + IrcRegionName + " n=" + user.Name.Replace(" ", "") + " fakehost.com " + user.Name.Replace(" ", "") + " H " + ":0 " + user.Name);
  339. //SendServerCommand("352 " + IrcRegionName + " " + user.Name.Replace(" ", "") + " nohost.com irc.opensimulator " + user.Name.Replace(" ", "") + " H " + ":0 " + user.Name);
  340. }
  341. SendServerCommand("315 " + m_nick + " " + IrcRegionName + " :End of /WHO list");
  342. }
  343. private void IRC_SendMOTD()
  344. {
  345. SendServerCommand("375 :- OpenSimulator Message of the day -");
  346. SendServerCommand("372 :- Hiya!");
  347. SendServerCommand("376 :End of /MOTD command");
  348. }
  349. private void IRC_SendReplyTopic()
  350. {
  351. SendServerCommand("332 " + IrcRegionName + " :OpenSimulator IRC Server");
  352. }
  353. private void IRC_SendReplyUsers()
  354. {
  355. EntityBase[] users = m_scene.Entities.GetAllByType<ScenePresence>();
  356. SendServerCommand("392 :UserID Terminal Host");
  357. if (users.Length == 0)
  358. {
  359. SendServerCommand("395 :Nobody logged in");
  360. return;
  361. }
  362. foreach (EntityBase user in users)
  363. {
  364. char[] nom = new char[8];
  365. char[] term = "terminal_".ToCharArray();
  366. char[] host = "hostname".ToCharArray();
  367. string userName = user.Name.Replace(" ","");
  368. for (int i = 0; i < nom.Length; i++)
  369. {
  370. if (userName.Length < i)
  371. nom[i] = userName[i];
  372. else
  373. nom[i] = ' ';
  374. }
  375. SendServerCommand("393 :" + nom + " " + term + " " + host + "");
  376. }
  377. SendServerCommand("394 :End of users");
  378. }
  379. private static string ExtractMessage(string buffer)
  380. {
  381. int pos = buffer.IndexOf("\r\n");
  382. if (pos == -1)
  383. return null;
  384. string command = buffer.Substring(0, pos + 2);
  385. return command;
  386. }
  387. private static string ExtractCommand(string msg)
  388. {
  389. string[] msgs = msg.Split(' ');
  390. if (msgs.Length < 2)
  391. {
  392. m_log.Warn("[IRCd] Dropped msg: " + msg);
  393. return null;
  394. }
  395. if (msgs[0].StartsWith(":"))
  396. return msgs[1];
  397. return msgs[0];
  398. }
  399. private static string[] ExtractParameters(string msg)
  400. {
  401. string[] msgs = msg.Split(' ');
  402. List<string> parms = new List<string>(msgs.Length);
  403. bool foundCommand = false;
  404. string command = ExtractCommand(msg);
  405. for (int i=0;i<msgs.Length;i++)
  406. {
  407. if (msgs[i] == command)
  408. {
  409. foundCommand = true;
  410. continue;
  411. }
  412. if (foundCommand != true)
  413. continue;
  414. if (i != 0 && msgs[i].StartsWith(":"))
  415. {
  416. List<string> tmp = new List<string>();
  417. for (int j=i;j<msgs.Length;j++)
  418. {
  419. tmp.Add(msgs[j]);
  420. }
  421. parms.Add(string.Join(" ", tmp.ToArray()));
  422. break;
  423. }
  424. parms.Add(msgs[i]);
  425. }
  426. return parms.ToArray();
  427. }
  428. #region Implementation of IClientAPI
  429. public Vector3 StartPos
  430. {
  431. get { return new Vector3(((int)Constants.RegionSize * 0.5f), ((int)Constants.RegionSize * 0.5f), 50); }
  432. set { }
  433. }
  434. public bool TryGet<T>(out T iface)
  435. {
  436. iface = default(T);
  437. return false;
  438. }
  439. public T Get<T>()
  440. {
  441. return default(T);
  442. }
  443. public UUID AgentId
  444. {
  445. get { return m_agentID; }
  446. }
  447. public void Disconnect(string reason)
  448. {
  449. IRC_SendChannelPrivmsg("System", "You have been eaten by a grue. (" + reason + ")");
  450. m_connected = false;
  451. m_client.Close();
  452. }
  453. public void Disconnect()
  454. {
  455. IRC_SendChannelPrivmsg("System", "You have been eaten by a grue.");
  456. m_connected = false;
  457. m_client.Close();
  458. SceneAgent = null;
  459. }
  460. public UUID SessionId
  461. {
  462. get { return m_agentID; }
  463. }
  464. public UUID SecureSessionId
  465. {
  466. get { return m_agentID; }
  467. }
  468. public UUID ActiveGroupId
  469. {
  470. get { return UUID.Zero; }
  471. }
  472. public string ActiveGroupName
  473. {
  474. get { return "IRCd User"; }
  475. }
  476. public ulong ActiveGroupPowers
  477. {
  478. get { return 0; }
  479. }
  480. public ulong GetGroupPowers(UUID groupID)
  481. {
  482. return 0;
  483. }
  484. public bool IsGroupMember(UUID GroupID)
  485. {
  486. return false;
  487. }
  488. public string FirstName
  489. {
  490. get
  491. {
  492. string[] names = m_username.Split(' ');
  493. return names[0];
  494. }
  495. }
  496. public string LastName
  497. {
  498. get
  499. {
  500. string[] names = m_username.Split(' ');
  501. if (names.Length > 1)
  502. return names[1];
  503. return names[0];
  504. }
  505. }
  506. public IScene Scene
  507. {
  508. get { return m_scene; }
  509. }
  510. public int NextAnimationSequenceNumber
  511. {
  512. get { return 0; }
  513. }
  514. public string Name
  515. {
  516. get { return m_username; }
  517. }
  518. public bool IsActive
  519. {
  520. get { return true; }
  521. set { if (!value) Disconnect("IsActive Disconnected?"); }
  522. }
  523. public bool IsLoggingOut
  524. {
  525. get { return false; }
  526. set { }
  527. }
  528. public bool SendLogoutPacketWhenClosing
  529. {
  530. set { }
  531. }
  532. public uint CircuitCode
  533. {
  534. get { return (uint)Util.RandomClass.Next(0,int.MaxValue); }
  535. }
  536. public IPEndPoint RemoteEndPoint
  537. {
  538. get { return (IPEndPoint)m_client.Client.RemoteEndPoint; }
  539. }
  540. #pragma warning disable 67
  541. public event GenericMessage OnGenericMessage;
  542. public event ImprovedInstantMessage OnInstantMessage;
  543. public event ChatMessage OnChatFromClient;
  544. public event TextureRequest OnRequestTexture;
  545. public event RezObject OnRezObject;
  546. public event ModifyTerrain OnModifyTerrain;
  547. public event BakeTerrain OnBakeTerrain;
  548. public event EstateChangeInfo OnEstateChangeInfo;
  549. public event EstateManageTelehub OnEstateManageTelehub;
  550. public event CachedTextureRequest OnCachedTextureRequest;
  551. public event SetAppearance OnSetAppearance;
  552. public event AvatarNowWearing OnAvatarNowWearing;
  553. public event RezSingleAttachmentFromInv OnRezSingleAttachmentFromInv;
  554. public event RezMultipleAttachmentsFromInv OnRezMultipleAttachmentsFromInv;
  555. public event UUIDNameRequest OnDetachAttachmentIntoInv;
  556. public event ObjectAttach OnObjectAttach;
  557. public event ObjectDeselect OnObjectDetach;
  558. public event ObjectDrop OnObjectDrop;
  559. public event StartAnim OnStartAnim;
  560. public event StopAnim OnStopAnim;
  561. public event LinkObjects OnLinkObjects;
  562. public event DelinkObjects OnDelinkObjects;
  563. public event RequestMapBlocks OnRequestMapBlocks;
  564. public event RequestMapName OnMapNameRequest;
  565. public event TeleportLocationRequest OnTeleportLocationRequest;
  566. public event DisconnectUser OnDisconnectUser;
  567. public event RequestAvatarProperties OnRequestAvatarProperties;
  568. public event SetAlwaysRun OnSetAlwaysRun;
  569. public event TeleportLandmarkRequest OnTeleportLandmarkRequest;
  570. public event TeleportCancel OnTeleportCancel;
  571. public event DeRezObject OnDeRezObject;
  572. public event Action<IClientAPI> OnRegionHandShakeReply;
  573. public event GenericCall1 OnRequestWearables;
  574. public event Action<IClientAPI, bool> OnCompleteMovementToRegion;
  575. public event UpdateAgent OnPreAgentUpdate;
  576. public event UpdateAgent OnAgentUpdate;
  577. public event UpdateAgent OnAgentCameraUpdate;
  578. public event AgentRequestSit OnAgentRequestSit;
  579. public event AgentSit OnAgentSit;
  580. public event AvatarPickerRequest OnAvatarPickerRequest;
  581. public event Action<IClientAPI> OnRequestAvatarsData;
  582. public event AddNewPrim OnAddPrim;
  583. public event FetchInventory OnAgentDataUpdateRequest;
  584. public event TeleportLocationRequest OnSetStartLocationRequest;
  585. public event RequestGodlikePowers OnRequestGodlikePowers;
  586. public event GodKickUser OnGodKickUser;
  587. public event ObjectDuplicate OnObjectDuplicate;
  588. public event ObjectDuplicateOnRay OnObjectDuplicateOnRay;
  589. public event GrabObject OnGrabObject;
  590. public event DeGrabObject OnDeGrabObject;
  591. public event MoveObject OnGrabUpdate;
  592. public event SpinStart OnSpinStart;
  593. public event SpinObject OnSpinUpdate;
  594. public event SpinStop OnSpinStop;
  595. public event UpdateShape OnUpdatePrimShape;
  596. public event ObjectExtraParams OnUpdateExtraParams;
  597. public event ObjectRequest OnObjectRequest;
  598. public event ObjectSelect OnObjectSelect;
  599. public event ObjectDeselect OnObjectDeselect;
  600. public event GenericCall7 OnObjectDescription;
  601. public event GenericCall7 OnObjectName;
  602. public event GenericCall7 OnObjectClickAction;
  603. public event GenericCall7 OnObjectMaterial;
  604. public event RequestObjectPropertiesFamily OnRequestObjectPropertiesFamily;
  605. public event UpdatePrimFlags OnUpdatePrimFlags;
  606. public event UpdatePrimTexture OnUpdatePrimTexture;
  607. public event UpdateVector OnUpdatePrimGroupPosition;
  608. public event UpdateVector OnUpdatePrimSinglePosition;
  609. public event UpdatePrimRotation OnUpdatePrimGroupRotation;
  610. public event UpdatePrimSingleRotation OnUpdatePrimSingleRotation;
  611. public event UpdatePrimSingleRotationPosition OnUpdatePrimSingleRotationPosition;
  612. public event UpdatePrimGroupRotation OnUpdatePrimGroupMouseRotation;
  613. public event UpdateVector OnUpdatePrimScale;
  614. public event UpdateVector OnUpdatePrimGroupScale;
  615. public event StatusChange OnChildAgentStatus;
  616. public event GenericCall2 OnStopMovement;
  617. public event Action<UUID> OnRemoveAvatar;
  618. public event ObjectPermissions OnObjectPermissions;
  619. public event CreateNewInventoryItem OnCreateNewInventoryItem;
  620. public event LinkInventoryItem OnLinkInventoryItem;
  621. public event CreateInventoryFolder OnCreateNewInventoryFolder;
  622. public event UpdateInventoryFolder OnUpdateInventoryFolder;
  623. public event MoveInventoryFolder OnMoveInventoryFolder;
  624. public event FetchInventoryDescendents OnFetchInventoryDescendents;
  625. public event PurgeInventoryDescendents OnPurgeInventoryDescendents;
  626. public event FetchInventory OnFetchInventory;
  627. public event RequestTaskInventory OnRequestTaskInventory;
  628. public event UpdateInventoryItem OnUpdateInventoryItem;
  629. public event CopyInventoryItem OnCopyInventoryItem;
  630. public event MoveInventoryItem OnMoveInventoryItem;
  631. public event RemoveInventoryFolder OnRemoveInventoryFolder;
  632. public event RemoveInventoryItem OnRemoveInventoryItem;
  633. public event UDPAssetUploadRequest OnAssetUploadRequest;
  634. public event XferReceive OnXferReceive;
  635. public event RequestXfer OnRequestXfer;
  636. public event ConfirmXfer OnConfirmXfer;
  637. public event AbortXfer OnAbortXfer;
  638. public event RezScript OnRezScript;
  639. public event UpdateTaskInventory OnUpdateTaskInventory;
  640. public event MoveTaskInventory OnMoveTaskItem;
  641. public event RemoveTaskInventory OnRemoveTaskItem;
  642. public event RequestAsset OnRequestAsset;
  643. public event UUIDNameRequest OnNameFromUUIDRequest;
  644. public event ParcelAccessListRequest OnParcelAccessListRequest;
  645. public event ParcelAccessListUpdateRequest OnParcelAccessListUpdateRequest;
  646. public event ParcelPropertiesRequest OnParcelPropertiesRequest;
  647. public event ParcelDivideRequest OnParcelDivideRequest;
  648. public event ParcelJoinRequest OnParcelJoinRequest;
  649. public event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest;
  650. public event ParcelSelectObjects OnParcelSelectObjects;
  651. public event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest;
  652. public event ParcelAbandonRequest OnParcelAbandonRequest;
  653. public event ParcelGodForceOwner OnParcelGodForceOwner;
  654. public event ParcelReclaim OnParcelReclaim;
  655. public event ParcelReturnObjectsRequest OnParcelReturnObjectsRequest;
  656. public event ParcelDeedToGroup OnParcelDeedToGroup;
  657. public event RegionInfoRequest OnRegionInfoRequest;
  658. public event EstateCovenantRequest OnEstateCovenantRequest;
  659. public event FriendActionDelegate OnApproveFriendRequest;
  660. public event FriendActionDelegate OnDenyFriendRequest;
  661. public event FriendshipTermination OnTerminateFriendship;
  662. public event GrantUserFriendRights OnGrantUserRights;
  663. public event MoneyTransferRequest OnMoneyTransferRequest;
  664. public event EconomyDataRequest OnEconomyDataRequest;
  665. public event MoneyBalanceRequest OnMoneyBalanceRequest;
  666. public event UpdateAvatarProperties OnUpdateAvatarProperties;
  667. public event ParcelBuy OnParcelBuy;
  668. public event RequestPayPrice OnRequestPayPrice;
  669. public event ObjectSaleInfo OnObjectSaleInfo;
  670. public event ObjectBuy OnObjectBuy;
  671. public event BuyObjectInventory OnBuyObjectInventory;
  672. public event RequestTerrain OnRequestTerrain;
  673. public event RequestTerrain OnUploadTerrain;
  674. public event ObjectIncludeInSearch OnObjectIncludeInSearch;
  675. public event UUIDNameRequest OnTeleportHomeRequest;
  676. public event ScriptAnswer OnScriptAnswer;
  677. public event AgentSit OnUndo;
  678. public event AgentSit OnRedo;
  679. public event LandUndo OnLandUndo;
  680. public event ForceReleaseControls OnForceReleaseControls;
  681. public event GodLandStatRequest OnLandStatRequest;
  682. public event DetailedEstateDataRequest OnDetailedEstateDataRequest;
  683. public event SetEstateFlagsRequest OnSetEstateFlagsRequest;
  684. public event SetEstateTerrainBaseTexture OnSetEstateTerrainBaseTexture;
  685. public event SetEstateTerrainDetailTexture OnSetEstateTerrainDetailTexture;
  686. public event SetEstateTerrainTextureHeights OnSetEstateTerrainTextureHeights;
  687. public event CommitEstateTerrainTextureRequest OnCommitEstateTerrainTextureRequest;
  688. public event SetRegionTerrainSettings OnSetRegionTerrainSettings;
  689. public event EstateRestartSimRequest OnEstateRestartSimRequest;
  690. public event EstateChangeCovenantRequest OnEstateChangeCovenantRequest;
  691. public event UpdateEstateAccessDeltaRequest OnUpdateEstateAccessDeltaRequest;
  692. public event SimulatorBlueBoxMessageRequest OnSimulatorBlueBoxMessageRequest;
  693. public event EstateBlueBoxMessageRequest OnEstateBlueBoxMessageRequest;
  694. public event EstateDebugRegionRequest OnEstateDebugRegionRequest;
  695. public event EstateTeleportOneUserHomeRequest OnEstateTeleportOneUserHomeRequest;
  696. public event EstateTeleportAllUsersHomeRequest OnEstateTeleportAllUsersHomeRequest;
  697. public event UUIDNameRequest OnUUIDGroupNameRequest;
  698. public event RegionHandleRequest OnRegionHandleRequest;
  699. public event ParcelInfoRequest OnParcelInfoRequest;
  700. public event RequestObjectPropertiesFamily OnObjectGroupRequest;
  701. public event ScriptReset OnScriptReset;
  702. public event GetScriptRunning OnGetScriptRunning;
  703. public event SetScriptRunning OnSetScriptRunning;
  704. public event Action<Vector3, bool, bool> OnAutoPilotGo;
  705. public event TerrainUnacked OnUnackedTerrain;
  706. public event ActivateGesture OnActivateGesture;
  707. public event DeactivateGesture OnDeactivateGesture;
  708. public event ObjectOwner OnObjectOwner;
  709. public event DirPlacesQuery OnDirPlacesQuery;
  710. public event DirFindQuery OnDirFindQuery;
  711. public event DirLandQuery OnDirLandQuery;
  712. public event DirPopularQuery OnDirPopularQuery;
  713. public event DirClassifiedQuery OnDirClassifiedQuery;
  714. public event EventInfoRequest OnEventInfoRequest;
  715. public event ParcelSetOtherCleanTime OnParcelSetOtherCleanTime;
  716. public event MapItemRequest OnMapItemRequest;
  717. public event OfferCallingCard OnOfferCallingCard;
  718. public event AcceptCallingCard OnAcceptCallingCard;
  719. public event DeclineCallingCard OnDeclineCallingCard;
  720. public event SoundTrigger OnSoundTrigger;
  721. public event StartLure OnStartLure;
  722. public event TeleportLureRequest OnTeleportLureRequest;
  723. public event NetworkStats OnNetworkStatsUpdate;
  724. public event ClassifiedInfoRequest OnClassifiedInfoRequest;
  725. public event ClassifiedInfoUpdate OnClassifiedInfoUpdate;
  726. public event ClassifiedDelete OnClassifiedDelete;
  727. public event ClassifiedDelete OnClassifiedGodDelete;
  728. public event EventNotificationAddRequest OnEventNotificationAddRequest;
  729. public event EventNotificationRemoveRequest OnEventNotificationRemoveRequest;
  730. public event EventGodDelete OnEventGodDelete;
  731. public event ParcelDwellRequest OnParcelDwellRequest;
  732. public event UserInfoRequest OnUserInfoRequest;
  733. public event UpdateUserInfo OnUpdateUserInfo;
  734. public event RetrieveInstantMessages OnRetrieveInstantMessages;
  735. public event PickDelete OnPickDelete;
  736. public event PickGodDelete OnPickGodDelete;
  737. public event PickInfoUpdate OnPickInfoUpdate;
  738. public event AvatarNotesUpdate OnAvatarNotesUpdate;
  739. public event MuteListRequest OnMuteListRequest;
  740. public event AvatarInterestUpdate OnAvatarInterestUpdate;
  741. public event PlacesQuery OnPlacesQuery;
  742. public event FindAgentUpdate OnFindAgent;
  743. public event TrackAgentUpdate OnTrackAgent;
  744. public event NewUserReport OnUserReport;
  745. public event SaveStateHandler OnSaveState;
  746. public event GroupAccountSummaryRequest OnGroupAccountSummaryRequest;
  747. public event GroupAccountDetailsRequest OnGroupAccountDetailsRequest;
  748. public event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest;
  749. public event FreezeUserUpdate OnParcelFreezeUser;
  750. public event EjectUserUpdate OnParcelEjectUser;
  751. public event ParcelBuyPass OnParcelBuyPass;
  752. public event ParcelGodMark OnParcelGodMark;
  753. public event GroupActiveProposalsRequest OnGroupActiveProposalsRequest;
  754. public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest;
  755. public event SimWideDeletesDelegate OnSimWideDeletes;
  756. public event SendPostcard OnSendPostcard;
  757. public event MuteListEntryUpdate OnUpdateMuteListEntry;
  758. public event MuteListEntryRemove OnRemoveMuteListEntry;
  759. public event GodlikeMessage onGodlikeMessage;
  760. public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdate;
  761. #pragma warning restore 67
  762. public int DebugPacketLevel { get; set; }
  763. public void InPacket(object NewPack)
  764. {
  765. }
  766. public void ProcessInPacket(Packet NewPack)
  767. {
  768. }
  769. public void Close()
  770. {
  771. Close(false);
  772. }
  773. public void Close(bool force)
  774. {
  775. Disconnect();
  776. }
  777. public void Kick(string message)
  778. {
  779. Disconnect(message);
  780. }
  781. public void Start()
  782. {
  783. m_scene.AddNewAgent(this, PresenceType.User);
  784. // Mimicking LLClientView which gets always set appearance from client.
  785. AvatarAppearance appearance;
  786. m_scene.GetAvatarAppearance(this, out appearance);
  787. OnSetAppearance(this, appearance.Texture, (byte[])appearance.VisualParams.Clone(),appearance.AvatarSize, new WearableCacheItem[0]);
  788. }
  789. public void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args)
  790. {
  791. m_log.Info("[IRCd ClientStack] Completing Handshake to Region");
  792. if (OnRegionHandShakeReply != null)
  793. {
  794. OnRegionHandShakeReply(this);
  795. }
  796. if (OnCompleteMovementToRegion != null)
  797. {
  798. OnCompleteMovementToRegion(this, true);
  799. }
  800. }
  801. public void Stop()
  802. {
  803. Disconnect();
  804. }
  805. public void SendWearables(AvatarWearable[] wearables, int serial)
  806. {
  807. }
  808. public void SendAppearance(UUID agentID, byte[] visualParams, byte[] textureEntry)
  809. {
  810. }
  811. public void SendCachedTextureResponse(ISceneEntity avatar, int serial, List<CachedTextureResponseArg> cachedTextures)
  812. {
  813. }
  814. public void SendStartPingCheck(byte seq)
  815. {
  816. }
  817. public void SendKillObject(List<uint> localID)
  818. {
  819. }
  820. public void SendAnimations(UUID[] animID, int[] seqs, UUID sourceAgentId, UUID[] objectIDs)
  821. {
  822. }
  823. public void SendChatMessage(
  824. string message, byte type, Vector3 fromPos, string fromName, UUID fromAgentID, UUID ownerID, byte source, byte audible)
  825. {
  826. if (audible > 0 && message.Length > 0)
  827. IRC_SendChannelPrivmsg(fromName, message);
  828. }
  829. private void IRC_SendChannelPrivmsg(string fromName, string message)
  830. {
  831. SendCommand(":" + fromName.Replace(" ", "") + " PRIVMSG " + IrcRegionName + " :" + message);
  832. }
  833. public void SendInstantMessage(GridInstantMessage im)
  834. {
  835. // TODO
  836. }
  837. public void SendGenericMessage(string method, UUID invoice, List<string> message)
  838. {
  839. }
  840. public void SendGenericMessage(string method, UUID invoice, List<byte[]> message)
  841. {
  842. }
  843. public void SendLayerData(float[] map)
  844. {
  845. }
  846. public void SendLayerData(int px, int py, float[] map)
  847. {
  848. }
  849. public void SendWindData(Vector2[] windSpeeds)
  850. {
  851. }
  852. public void SendCloudData(float[] cloudCover)
  853. {
  854. }
  855. public void MoveAgentIntoRegion(RegionInfo regInfo, Vector3 pos, Vector3 look)
  856. {
  857. }
  858. public void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint)
  859. {
  860. }
  861. public AgentCircuitData RequestClientInfo()
  862. {
  863. return new AgentCircuitData();
  864. }
  865. public void CrossRegion(ulong newRegionHandle, Vector3 pos, Vector3 lookAt, IPEndPoint newRegionExternalEndPoint, string capsURL)
  866. {
  867. }
  868. public void SendMapBlock(List<MapBlockData> mapBlocks, uint flag)
  869. {
  870. }
  871. public void SendLocalTeleport(Vector3 position, Vector3 lookAt, uint flags)
  872. {
  873. }
  874. public void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, uint locationID, uint flags, string capsURL)
  875. {
  876. }
  877. public void SendTeleportFailed(string reason)
  878. {
  879. }
  880. public void SendTeleportStart(uint flags)
  881. {
  882. }
  883. public void SendTeleportProgress(uint flags, string message)
  884. {
  885. }
  886. public void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance, int transactionType, UUID sourceID, bool sourceIsGroup, UUID destID, bool destIsGroup, int amount, string item)
  887. {
  888. }
  889. public void SendPayPrice(UUID objectID, int[] payPrice)
  890. {
  891. }
  892. public void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations)
  893. {
  894. }
  895. public void SendAvatarDataImmediate(ISceneEntity avatar)
  896. {
  897. }
  898. public void SendEntityUpdate(ISceneEntity entity, PrimUpdateFlags updateFlags)
  899. {
  900. }
  901. public void ReprioritizeUpdates()
  902. {
  903. }
  904. public void FlushPrimUpdates()
  905. {
  906. }
  907. public void SendInventoryFolderDetails(UUID ownerID, UUID folderID, List<InventoryItemBase> items, List<InventoryFolderBase> folders, int version, bool fetchFolders, bool fetchItems)
  908. {
  909. }
  910. public void SendInventoryItemDetails(UUID ownerID, InventoryItemBase item)
  911. {
  912. }
  913. public void SendInventoryItemCreateUpdate(InventoryItemBase Item, uint callbackId)
  914. {
  915. }
  916. public void SendRemoveInventoryItem(UUID itemID)
  917. {
  918. }
  919. public void SendTakeControls(int controls, bool passToAgent, bool TakeControls)
  920. {
  921. }
  922. public void SendTaskInventory(UUID taskID, short serial, byte[] fileName)
  923. {
  924. }
  925. public void SendBulkUpdateInventory(InventoryNodeBase node)
  926. {
  927. }
  928. public void SendXferPacket(ulong xferID, uint packet, byte[] data)
  929. {
  930. }
  931. public void SendAbortXferPacket(ulong xferID)
  932. {
  933. }
  934. public void SendEconomyData(float EnergyEfficiency, int ObjectCapacity, int ObjectCount, int PriceEnergyUnit, int PriceGroupCreate, int PriceObjectClaim, float PriceObjectRent, float PriceObjectScaleFactor, int PriceParcelClaim, float PriceParcelClaimFactor, int PriceParcelRent, int PricePublicObjectDecay, int PricePublicObjectDelete, int PriceRentLight, int PriceUpload, int TeleportMinPrice, float TeleportPriceExponent)
  935. {
  936. }
  937. public void SendAvatarPickerReply(AvatarPickerReplyAgentDataArgs AgentData, List<AvatarPickerReplyDataArgs> Data)
  938. {
  939. }
  940. public void SendAgentDataUpdate(UUID agentid, UUID activegroupid, string firstname, string lastname, ulong grouppowers, string groupname, string grouptitle)
  941. {
  942. }
  943. public void SendPreLoadSound(UUID objectID, UUID ownerID, UUID soundID)
  944. {
  945. }
  946. public void SendPlayAttachedSound(UUID soundID, UUID objectID, UUID ownerID, float gain, byte flags)
  947. {
  948. }
  949. public void SendTriggeredSound(UUID soundID, UUID ownerID, UUID objectID, UUID parentID, ulong handle, Vector3 position, float gain)
  950. {
  951. }
  952. public void SendAttachedSoundGainChange(UUID objectID, float gain)
  953. {
  954. }
  955. public void SendNameReply(UUID profileId, string firstname, string lastname)
  956. {
  957. }
  958. public void SendAlertMessage(string message)
  959. {
  960. IRC_SendChannelPrivmsg("Alert",message);
  961. }
  962. public void SendAgentAlertMessage(string message, bool modal)
  963. {
  964. }
  965. public void SendLoadURL(string objectname, UUID objectID, UUID ownerID, bool groupOwned, string message, string url)
  966. {
  967. IRC_SendChannelPrivmsg(objectname,url);
  968. }
  969. public void SendDialog(string objectname, UUID objectID, UUID ownerID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, string[] buttonlabels)
  970. {
  971. }
  972. public void SendSunPos(Vector3 sunPos, Vector3 sunVel, ulong CurrentTime, uint SecondsPerSunCycle, uint SecondsPerYear, float OrbitalPosition)
  973. {
  974. }
  975. public void SendViewerEffect(ViewerEffectPacket.EffectBlock[] effectBlocks)
  976. {
  977. }
  978. public void SendViewerTime(int phase)
  979. {
  980. }
  981. public void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, byte[] charterMember, string flAbout, uint flags, UUID flImageID, UUID imageID, string profileURL, UUID partnerID)
  982. {
  983. }
  984. public void SendScriptQuestion(UUID taskID, string taskName, string ownerName, UUID itemID, int question)
  985. {
  986. }
  987. public void SendHealth(float health)
  988. {
  989. }
  990. public void SendEstateList(UUID invoice, int code, UUID[] Data, uint estateID)
  991. {
  992. }
  993. public void SendBannedUserList(UUID invoice, EstateBan[] banlist, uint estateID)
  994. {
  995. }
  996. public void SendRegionInfoToEstateMenu(RegionInfoForEstateMenuArgs args)
  997. {
  998. }
  999. public void SendEstateCovenantInformation(UUID covenant)
  1000. {
  1001. }
  1002. public void SendDetailedEstateData(UUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, UUID covenant, uint covenantChanged, string abuseEmail, UUID estateOwner)
  1003. {
  1004. }
  1005. public void SendLandProperties(int sequence_id, bool snap_selection, int request_result, ILandObject lo, float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags)
  1006. {
  1007. }
  1008. public void SendLandAccessListData(List<LandAccessEntry> accessList, uint accessFlag, int localLandID)
  1009. {
  1010. }
  1011. public void SendForceClientSelectObjects(List<uint> objectIDs)
  1012. {
  1013. }
  1014. public void SendCameraConstraint(Vector4 ConstraintPlane)
  1015. {
  1016. }
  1017. public void SendLandObjectOwners(LandData land, List<UUID> groups, Dictionary<UUID, int> ownersAndCount)
  1018. {
  1019. }
  1020. public void SendLandParcelOverlay(byte[] data, int sequence_id)
  1021. {
  1022. }
  1023. public void SendParcelMediaCommand(uint flags, ParcelMediaCommandEnum command, float time)
  1024. {
  1025. }
  1026. public void SendParcelMediaUpdate(string mediaUrl, UUID mediaTextureID, byte autoScale, string mediaType, string mediaDesc, int mediaWidth, int mediaHeight, byte mediaLoop)
  1027. {
  1028. }
  1029. public void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, UUID AssetFullID)
  1030. {
  1031. }
  1032. public void SendConfirmXfer(ulong xferID, uint PacketID)
  1033. {
  1034. }
  1035. public void SendXferRequest(ulong XferID, short AssetType, UUID vFileID, byte FilePath, byte[] FileName)
  1036. {
  1037. }
  1038. public void SendInitiateDownload(string simFileName, string clientFileName)
  1039. {
  1040. }
  1041. public void SendImageFirstPart(ushort numParts, UUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec)
  1042. {
  1043. }
  1044. public void SendImageNextPart(ushort partNumber, UUID imageUuid, byte[] imageData)
  1045. {
  1046. }
  1047. public void SendImageNotFound(UUID imageid)
  1048. {
  1049. }
  1050. public void SendShutdownConnectionNotice()
  1051. {
  1052. // TODO
  1053. }
  1054. public void SendSimStats(SimStats stats)
  1055. {
  1056. }
  1057. public void SendObjectPropertiesFamilyData(ISceneEntity Entity, uint RequestFlags)
  1058. {
  1059. }
  1060. public void SendObjectPropertiesReply(ISceneEntity entity)
  1061. {
  1062. }
  1063. public void SendAgentOffline(UUID[] agentIDs)
  1064. {
  1065. }
  1066. public void SendAgentOnline(UUID[] agentIDs)
  1067. {
  1068. }
  1069. public void SendSitResponse(UUID TargetID, Vector3 OffsetPos, Quaternion SitOrientation, bool autopilot, Vector3 CameraAtOffset, Vector3 CameraEyeOffset, bool ForceMouseLook)
  1070. {
  1071. }
  1072. public void SendAdminResponse(UUID Token, uint AdminLevel)
  1073. {
  1074. }
  1075. public void SendGroupMembership(GroupMembershipData[] GroupMembership)
  1076. {
  1077. }
  1078. public void SendGroupNameReply(UUID groupLLUID, string GroupName)
  1079. {
  1080. }
  1081. public void SendJoinGroupReply(UUID groupID, bool success)
  1082. {
  1083. }
  1084. public void SendEjectGroupMemberReply(UUID agentID, UUID groupID, bool success)
  1085. {
  1086. }
  1087. public void SendLeaveGroupReply(UUID groupID, bool success)
  1088. {
  1089. }
  1090. public void SendCreateGroupReply(UUID groupID, bool success, string message)
  1091. {
  1092. }
  1093. public void SendLandStatReply(uint reportType, uint requestFlags, uint resultCount, LandStatReportItem[] lsrpia)
  1094. {
  1095. }
  1096. public void SendScriptRunningReply(UUID objectID, UUID itemID, bool running)
  1097. {
  1098. }
  1099. public void SendAsset(AssetRequestToClient req)
  1100. {
  1101. }
  1102. public void SendTexture(AssetBase TextureAsset)
  1103. {
  1104. }
  1105. public virtual void SetChildAgentThrottle(byte[] throttle)
  1106. {
  1107. }
  1108. public byte[] GetThrottlesPacked(float multiplier)
  1109. {
  1110. return new byte[0];
  1111. }
  1112. public event ViewerEffectEventHandler OnViewerEffect;
  1113. public event Action<IClientAPI> OnLogout;
  1114. public event Action<IClientAPI> OnConnectionClosed;
  1115. public void SendBlueBoxMessage(UUID FromAvatarID, string FromAvatarName, string Message)
  1116. {
  1117. IRC_SendChannelPrivmsg(FromAvatarName, Message);
  1118. }
  1119. public void SendLogoutPacket()
  1120. {
  1121. Disconnect();
  1122. }
  1123. public ClientInfo GetClientInfo()
  1124. {
  1125. return new ClientInfo();
  1126. }
  1127. public void SetClientInfo(ClientInfo info)
  1128. {
  1129. }
  1130. public void SetClientOption(string option, string value)
  1131. {
  1132. }
  1133. public string GetClientOption(string option)
  1134. {
  1135. return String.Empty;
  1136. }
  1137. public void Terminate()
  1138. {
  1139. Disconnect();
  1140. }
  1141. public void SendSetFollowCamProperties(UUID objectID, SortedDictionary<int, float> parameters)
  1142. {
  1143. }
  1144. public void SendClearFollowCamProperties(UUID objectID)
  1145. {
  1146. }
  1147. public void SendRegionHandle(UUID regoinID, ulong handle)
  1148. {
  1149. }
  1150. public void SendParcelInfo(RegionInfo info, LandData land, UUID parcelID, uint x, uint y)
  1151. {
  1152. }
  1153. public void SendScriptTeleportRequest(string objName, string simName, Vector3 pos, Vector3 lookAt)
  1154. {
  1155. }
  1156. public void SendDirPlacesReply(UUID queryID, DirPlacesReplyData[] data)
  1157. {
  1158. }
  1159. public void SendDirPeopleReply(UUID queryID, DirPeopleReplyData[] data)
  1160. {
  1161. }
  1162. public void SendDirEventsReply(UUID queryID, DirEventsReplyData[] data)
  1163. {
  1164. }
  1165. public void SendDirGroupsReply(UUID queryID, DirGroupsReplyData[] data)
  1166. {
  1167. }
  1168. public void SendDirClassifiedReply(UUID queryID, DirClassifiedReplyData[] data)
  1169. {
  1170. }
  1171. public void SendDirLandReply(UUID queryID, DirLandReplyData[] data)
  1172. {
  1173. }
  1174. public void SendDirPopularReply(UUID queryID, DirPopularReplyData[] data)
  1175. {
  1176. }
  1177. public void SendEventInfoReply(EventData info)
  1178. {
  1179. }
  1180. public void SendTelehubInfo(UUID ObjectID, string ObjectName, Vector3 ObjectPos, Quaternion ObjectRot, List<Vector3> SpawnPoint)
  1181. {
  1182. }
  1183. public void SendMapItemReply(mapItemReply[] replies, uint mapitemtype, uint flags)
  1184. {
  1185. }
  1186. public void SendAvatarGroupsReply(UUID avatarID, GroupMembershipData[] data)
  1187. {
  1188. }
  1189. public void SendOfferCallingCard(UUID srcID, UUID transactionID)
  1190. {
  1191. }
  1192. public void SendAcceptCallingCard(UUID transactionID)
  1193. {
  1194. }
  1195. public void SendDeclineCallingCard(UUID transactionID)
  1196. {
  1197. }
  1198. public void SendTerminateFriend(UUID exFriendID)
  1199. {
  1200. }
  1201. public void SendAvatarClassifiedReply(UUID targetID, UUID[] classifiedID, string[] name)
  1202. {
  1203. }
  1204. public void SendClassifiedInfoReply(UUID classifiedID, UUID creatorID, uint creationDate, uint expirationDate, uint category, string name, string description, UUID parcelID, uint parentEstate, UUID snapshotID, string simName, Vector3 globalPos, string parcelName, byte classifiedFlags, int price)
  1205. {
  1206. }
  1207. public void SendAgentDropGroup(UUID groupID)
  1208. {
  1209. }
  1210. public void RefreshGroupMembership()
  1211. {
  1212. }
  1213. public void SendAvatarNotesReply(UUID targetID, string text)
  1214. {
  1215. }
  1216. public void SendAvatarPicksReply(UUID targetID, Dictionary<UUID, string> picks)
  1217. {
  1218. }
  1219. public void SendPickInfoReply(UUID pickID, UUID creatorID, bool topPick, UUID parcelID, string name, string desc, UUID snapshotID, string user, string originalName, string simName, Vector3 posGlobal, int sortOrder, bool enabled)
  1220. {
  1221. }
  1222. public void SendAvatarClassifiedReply(UUID targetID, Dictionary<UUID, string> classifieds)
  1223. {
  1224. }
  1225. public void SendAvatarInterestUpdate(IClientAPI client, uint wantmask, string wanttext, uint skillsmask, string skillstext, string languages)
  1226. {
  1227. }
  1228. public void SendParcelDwellReply(int localID, UUID parcelID, float dwell)
  1229. {
  1230. }
  1231. public void SendUserInfoReply(bool imViaEmail, bool visible, string email)
  1232. {
  1233. }
  1234. public void SendUseCachedMuteList()
  1235. {
  1236. }
  1237. public void SendMuteListUpdate(string filename)
  1238. {
  1239. }
  1240. public bool AddGenericPacketHandler(string MethodName, GenericMessage handler)
  1241. {
  1242. return true;
  1243. }
  1244. #endregion
  1245. public void SendRebakeAvatarTextures(UUID textureID)
  1246. {
  1247. }
  1248. public void SendAvatarInterestsReply(UUID avatarID, uint wantMask, string wantText, uint skillsMask, string skillsText, string languages)
  1249. {
  1250. }
  1251. public void SendGroupAccountingDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt)
  1252. {
  1253. }
  1254. public void SendGroupAccountingSummary(IClientAPI sender,UUID groupID, uint moneyAmt, int totalTier, int usedTier)
  1255. {
  1256. }
  1257. public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt)
  1258. {
  1259. }
  1260. public void SendGroupVoteHistory(UUID groupID, UUID transactionID, GroupVoteHistory[] Votes)
  1261. {
  1262. }
  1263. public void SendGroupActiveProposals(UUID groupID, UUID transactionID, GroupActiveProposals[] Proposals)
  1264. {
  1265. }
  1266. public void SendChangeUserRights(UUID agentID, UUID friendID, int rights)
  1267. {
  1268. }
  1269. public void SendTextBoxRequest(string message, int chatChannel, string objectname, UUID ownerID, string ownerFirstName, string ownerLastName, UUID objectId)
  1270. {
  1271. }
  1272. public void SendAgentTerseUpdate(ISceneEntity presence)
  1273. {
  1274. }
  1275. public void SendPlacesReply(UUID queryID, UUID transactionID, PlacesReplyData[] data)
  1276. {
  1277. }
  1278. public void SendPartPhysicsProprieties(ISceneEntity entity)
  1279. {
  1280. }
  1281. }
  1282. }