Beispiel #1
0
        private void Eval_Redirect(TCPPacketReader packet, uint time)
        {
            if (Settings.GetReg <bool>("block_redirect", false))
            {
                return;
            }

            Redirect redirect = new Redirect();

            redirect.IP   = packet;
            redirect.Port = packet;
            packet.SkipBytes(4);
            redirect.Name     = packet.ReadString(this.crypto);
            redirect.Hashlink = Hashlink.EncodeHashlink(redirect);

            if (ScriptEvents.OnRedirecting(this, redirect))
            {
                this.Credentials.IP   = redirect.IP;
                this.Credentials.Port = redirect.Port;
                this.Credentials.Name = redirect.Name;
                this.ticks            = (time - 19);
                this.state            = SessionState.Sleeping;
                this.sock.Disconnect();
                this.Panel.AnnounceText(StringTemplate.Get(STType.Messages, 15).Replace("+x", redirect.Name));
            }
        }
Beispiel #2
0
        private void ExportHashlink(FavouritesListItem room)
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendLine(room.Name);
            sb.Append("arlnk://");
            sb.AppendLine(Hashlink.EncodeHashlink(room));

            try
            {
                File.WriteAllText(Settings.DataPath + "hashlink.txt", sb.ToString());
                Process.Start("notepad.exe", Settings.DataPath + "hashlink.txt");
            }
            catch { }
        }