From cf8d05ae98c2dc10112f9933cdc033952d79ba3b Mon Sep 17 00:00:00 2001 From: FlaminSarge Date: Fri, 21 Mar 2014 12:14:08 -0400 Subject: [PATCH] Add support for passwords to DisplayAskConnectBox stock (bug 5984, r=psychonic). --- plugins/include/halflife.inc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/plugins/include/halflife.inc b/plugins/include/halflife.inc index 057d30c9..7563b7e1 100644 --- a/plugins/include/halflife.inc +++ b/plugins/include/halflife.inc @@ -583,14 +583,17 @@ stock ShowMOTDPanel(client, const String:title[], const String:msg[], type=MOTDP * * @param client Client index. * @param time Duration to hold the panel on the client's screen. - * @param ip Destionation IP. + * @param ip Destination IP. + * @param password Password to connect to the destination IP. The client will be able to see this. * @noreturn */ -stock DisplayAskConnectBox(client, Float:time, const String:ip[]) +stock DisplayAskConnectBox(client, Float:time, const String:ip[], const String:password[] = "") { + decl String:destination[288]; + FormatEx(destination, "%s/%s", ip, password); new Handle:Kv = CreateKeyValues("data"); KvSetFloat(Kv, "time", time); - KvSetString(Kv, "title", ip); + KvSetString(Kv, "title", destination); CreateDialog(client, Kv, DialogType_AskConnect); CloseHandle(Kv); }