10 local escape_table = { ["'"] = "'", ["\""] = """, ["<"] = "<", [">"] = ">", ["&"] = "&" }; |
10 local escape_table = { ["'"] = "'", ["\""] = """, ["<"] = "<", [">"] = ">", ["&"] = "&" }; |
11 local function escape(str) return (string.gsub(str, "['&<>\"]", escape_table)); end |
11 local function escape(str) return (string.gsub(str, "['&<>\"]", escape_table)); end |
12 |
12 |
13 local xmlns_caps = "http://jabber.org/protocol/caps"; |
13 local xmlns_caps = "http://jabber.org/protocol/caps"; |
14 local xmlns_disco = "http://jabber.org/protocol/disco#info"; |
14 local xmlns_disco = "http://jabber.org/protocol/disco#info"; |
|
15 |
|
16 if not jid then |
|
17 io.write("Please give a JID as the first argument\n"); |
|
18 os.exit(1); |
|
19 end |
15 |
20 |
16 if not pass then |
21 if not pass then |
17 io.write("Password (not blanked): "); |
22 io.write("Password (not blanked): "); |
18 pass = io.read("*l"); |
23 pass = io.read("*l"); |
19 end |
24 end |