Libraryless. Click here for Pure Java version (1716L/11K/37K).
1 | !752 |
2 | |
3 | static volatile S name = "A-yet-unnamed-copy-of-Eleutheria"; |
4 | static volatile S url, baseURL; // baseURL is the one that bots are under |
5 | |
6 | p {
|
7 | load("name");
|
8 | load("url");
|
9 | load("baseURL");
|
10 | } |
11 | |
12 | synchronized answer {
|
13 | if "what is your name" |
14 | ret name; |
15 | if "what is your url" |
16 | ret url; |
17 | if "what is your base url" |
18 | ret baseURL; |
19 | if "your name is *" {
|
20 | S n = m.unq(0); |
21 | if (eq(n, name)) |
22 | ret "Yes."; |
23 | else if (webAuthed()) {
|
24 | name = n; |
25 | save("name");
|
26 | ret format("OK, master! I am now *", name);
|
27 | } else |
28 | ret "Only my master can tell me that..."; |
29 | } |
30 | |
31 | if "your url is *" |
32 | if (webAuthed()) {
|
33 | if (!isURL(m.unq(0))) |
34 | ret "woot, master?"; |
35 | |
36 | url = m.unq(0); |
37 | save("url");
|
38 | ret "OK"; |
39 | } |
40 | |
41 | if "your base url is *" |
42 | if (webAuthed()) {
|
43 | if (!isURL(m.unq(0))) |
44 | ret "woot, master?"; |
45 | |
46 | baseURL = m.unq(0); |
47 | save("baseURL");
|
48 | ret "OK"; |
49 | } |
50 | } |
51 | |
52 | static S getName() {
|
53 | ret name; |
54 | } |
55 | |
56 | static S getURL() {
|
57 | ret url; |
58 | } |
59 | |
60 | static S getBaseURL() {
|
61 | ret baseURL; |
62 | } |
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1002596 |
| Snippet name: | System Name + URLs Bot |
| Eternal ID of this version: | #1002596/1 |
| Text MD5: | 354a56fd15d9f04a32051f35b8f13624 |
| Transpilation MD5: | 4ce1bca29330ba98fc24b691fea64c80 |
| Author: | stefan |
| Category: | eleu |
| Type: | JavaX source code |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2016-03-14 17:20:06 |
| Source code size: | 1144 bytes / 62 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 876 / 2009 |
| Referenced in: | [show references] |