// Function from file: message_server.dm public DataPdaMsg send_pda_message(string recipient = null, string sender = null, string message = null, dynamic photo = null) { recipient = recipient ?? ""; sender = sender ?? ""; message = message ?? ""; DataPdaMsg _default = null; _default = new DataPdaMsg(recipient, sender, message, photo); this.pda_msgs.Add(_default); return(_default); }
// Function from file: message.dm public override dynamic attack_hand(dynamic a = null, bool?b = null, bool?c = null) { string dat = null; int i = 0; int? n = null; int index = 0; DataPdaMsg pda = null; int index2 = 0; DataRcMsg rc = null; Browser popup = null; if (Lang13.Bool(base.attack_hand((object)(a), b, c))) { return(null); } if (this.hacking || Lang13.Bool(this.emagged)) { this.message = this.rebootmsg; } dat = "<center><font color='blue'" + this.message + "</font>/</center>"; if (this.auth) { dat += new Txt("<h4><dd><A href='?src=").Ref(this).str(";auth=1'>	<font color='green'>[Authenticated]</font></a>	/").ToString(); dat += new Txt(" Server Power: <A href='?src=").Ref(this).str(";active=1'>").item((Lang13.Bool(this.linkedServer) && Lang13.Bool(this.linkedServer.active) ? "<font color='green'>[On]</font>" : "<font color='red'>[Off]</font>")).str("</a></h4>").ToString(); } else { dat += new Txt("<h4><dd><A href='?src=").Ref(this).str(";auth=1'>	<font color='red'>[Unauthenticated]</font></a>	/").ToString(); dat += " Server Power: <u>" + (Lang13.Bool(this.linkedServer) && Lang13.Bool(this.linkedServer.active) ? "<font color='green'>[On]</font>" : "<font color='red'>[Off]</font>") + "</u></h4>"; } if (this.hacking || Lang13.Bool(this.emagged)) { this.screen = 2; } else if (!this.auth || !Lang13.Bool(this.linkedServer) || Lang13.Bool(this.linkedServer.stat & 3)) { if (!Lang13.Bool(this.linkedServer) || Lang13.Bool(this.linkedServer.stat & 3)) { this.message = this.noserver; } this.screen = 0; } switch ((int)(this.screen)) { case 0: i = 0; dat += new Txt("<dd><A href='?src=").Ref(this).str(";find=1'>	").item(++i).str(". Link To A Server</a></dd>").ToString(); if (this.auth) { if (!Lang13.Bool(this.linkedServer) || Lang13.Bool(this.linkedServer.stat & 3)) { dat += "<dd><A>	ERROR: Server not found!</A><br></dd>"; } else { dat += new Txt("<dd><A href='?src=").Ref(this).str(";view=1'>	").item(++i).str(". View Message Logs </a><br></dd>").ToString(); dat += new Txt("<dd><A href='?src=").Ref(this).str(";viewr=1'>	").item(++i).str(". View Request Console Logs </a></br></dd>").ToString(); dat += new Txt("<dd><A href='?src=").Ref(this).str(";clear=1'>	").item(++i).str(". Clear Message Logs</a><br></dd>").ToString(); dat += new Txt("<dd><A href='?src=").Ref(this).str(";clearr=1'>	").item(++i).str(". Clear Request Console Logs</a><br></dd>").ToString(); dat += new Txt("<dd><A href='?src=").Ref(this).str(";pass=1'>	").item(++i).str(". Set Custom Key</a><br></dd>").ToString(); dat += new Txt("<dd><A href='?src=").Ref(this).str(";msg=1'>	").item(++i).str(". Send Admin Message</a><br></dd>").ToString(); } } else { n = null; n = ++i; while ((n ?? 0) <= (this.optioncount ?? 0)) { dat += "<dd><font color='blue'>	" + n + ". ---------------</font><br></dd>"; n++; } } if (Task13.User is Mob_Living_Silicon && GlobalFuncs.is_special_character(Task13.User) != 0) { dat += new Txt("<dd><A href='?src=").Ref(this).str(";hack=1'><i><font color='Red'>*&@#. Bruteforce Key</font></i></font></a><br></dd>").ToString(); } else { dat += "<br>"; } if (!this.auth) { dat += "<br><hr><dd><span class='notice'>Please authenticate with the server in order to show additional options.</span>"; } else { dat += "<br><hr><dd><span class='warning'>Reg, #514 forbids sending messages to a Head of Staff containing Erotic Rendering Properties.</span>"; } break; case 1: index = 0; dat += new Txt("<center><A href='?src=").Ref(this).str(";back=1'>Back</a> - <A href='?src=").Ref(this).str(";refresh=1'>Refresh</center><hr>").ToString(); dat += "<table border='1' width='100%'><tr><th width = '5%'>X</th><th width='15%'>Sender</th><th width='15%'>Recipient</th><th width='300px' word-wrap: break-word>Message</th></tr>"; foreach (dynamic _a in Lang13.Enumerate(this.linkedServer.pda_msgs, typeof(DataPdaMsg))) { pda = _a; index++; if (index > 3000) { break; } dat += new Txt("<tr><td width = '5%'><center><A href='?src=").Ref(this).str(";delete=").Ref(pda).str("' style='color: rgb(255,0,0)'>X</a></center></td><td width='15%'>").item(pda.sender).str("</td><td width='15%'>").item(pda.recipient).str("</td><td width='300px'>").item(pda.message).item((Lang13.Bool(pda.photo) ? new Txt("<a href='byond://?src=").Ref(pda).str(";photo=1'>(Photo)</a>").ToString() : "")).str("</td></tr>").ToString(); } dat += "</table>"; break; case 2: if (a is Mob_Living_Silicon_Ai || a is Mob_Living_Silicon_Robot) { dat += "Brute-forcing for server key.<br> It will take 20 seconds for every character that the password has."; dat += "In the meantime, this console can reveal your true intentions if you let someone access it. Make sure no humans enter the room during that time."; } else { dat += @"01000010011100100111010101110100011001010010110<br> 10110011001101111011100100110001101101001011011100110011<br> 10010000001100110011011110111001000100000011100110110010<br> 10111001001110110011001010111001000100000011010110110010<br> 10111100100101110001000000100100101110100001000000111011<br> 10110100101101100011011000010000001110100011000010110101<br> 10110010100100000001100100011000000100000011100110110010<br> 10110001101101111011011100110010001110011001000000110011<br> 00110111101110010001000000110010101110110011001010111001<br> 00111100100100000011000110110100001100001011100100110000<br> 10110001101110100011001010111001000100000011101000110100<br> 00110000101110100001000000111010001101000011001010010000<br> 00111000001100001011100110111001101110111011011110111001<br> 00110010000100000011010000110000101110011001011100010000<br> 00100100101101110001000000111010001101000011001010010000<br> 00110110101100101011000010110111001110100011010010110110<br> 10110010100101100001000000111010001101000011010010111001<br> 10010000001100011011011110110111001110011011011110110110<br> 00110010100100000011000110110000101101110001000000111001<br> 00110010101110110011001010110000101101100001000000111100<br> 10110111101110101011100100010000001110100011100100111010<br> 10110010100100000011010010110111001110100011001010110111<br> 00111010001101001011011110110111001110011001000000110100<br> 10110011000100000011110010110111101110101001000000110110<br> 00110010101110100001000000111001101101111011011010110010<br> 10110111101101110011001010010000001100001011000110110001<br> 10110010101110011011100110010000001101001011101000010111<br> 00010000001001101011000010110101101100101001000000111001<br> 10111010101110010011001010010000001101110011011110010000<br> 00110100001110101011011010110000101101110011100110010000<br> 00110010101101110011101000110010101110010001000000111010<br> 00110100001100101001000000111001001101111011011110110110<br> 10010000001100100011101010111001001101001011011100110011<br> 10010000001110100011010000110000101110100001000000111010<br> 001101001011011010110010100101110" ; } break; case 3: dat += new Txt("<center><A href='?src=").Ref(this).str(";back=1'>Back</a> - <A href='?src=").Ref(this).str(";Reset=1'>Reset</a></center><hr>").ToString(); dat += new Txt("<table border='1' width='100%'>\n <tr><td width='20%'><A href='?src=").Ref(this).str(";select=Sender'>Sender</a></td>\n <td width='20%'><A href='?src=").Ref(this).str(";select=RecJob'>Sender's Job</a></td>\n <td width='20%'><A href='?src=").Ref(this).str(";select=Recepient'>Recipient</a></td>\n <td width='300px' word-wrap: break-word><A href='?src=").Ref(this).str(";select=Message'>Message</a></td></tr>").ToString(); dat += "<tr><td width='20%'>" + this.customsender + "</td>\n <td width='20%'>"+ this.customjob + "</td>\n <td width='20%'>"+ (Lang13.Bool(this.customrecepient) ? this.customrecepient.owner : "NONE") + "</td>\n <td width='300px'>"+ this.custommessage + "</td></tr>"; dat += new Txt("</table><br><center><A href='?src=").Ref(this).str(";select=Send'>Send</a>").ToString(); break; case 4: index2 = 0; dat += new Txt("<center><A href='?src=").Ref(this).str(";back=1'>Back</a> - <A href='?src=").Ref(this).str(";refresh=1'>Refresh</center><hr>").ToString(); dat += "<table border='1' width='100%'><tr><th width = '5%'>X</th><th width='15%'>Sending Dep.</th><th width='15%'>Receiving Dep.</th>\n <th width='300px' word-wrap: break-word>Message</th><th width='15%'>Stamp</th><th width='15%'>ID Auth.</th><th width='15%'>Priority.</th></tr>"; foreach (dynamic _b in Lang13.Enumerate(this.linkedServer.rc_msgs, typeof(DataRcMsg))) { rc = _b; index2++; if (index2 > 3000) { break; } dat += new Txt("<tr><td width = '5%'><center><A href='?src=").Ref(this).str(";deleter=").Ref(rc).str("' style='color: rgb(255,0,0)'>X</a></center></td><td width='15%'>").item(rc.send_dpt).str("</td>\n <td width='15%'>").item(rc.rec_dpt).str("</td><td width='300px'>").item(rc.message).str("</td><td width='15%'>").item(rc.stamp).str("</td><td width='15%'>").item(rc.id_auth).str("</td><td width='15%'>").item(rc.priority).str("</td></tr>").ToString(); } dat += "</table>"; break; } this.message = this.defaultmsg; popup = new Browser(a, "hologram_console", this.name, 700, 700); popup.set_content(dat); popup.set_title_image(((Mob)a).browse_rsc_icon(this.icon, this.icon_state)); popup.open(); return(null); }