14
15
16
17
18
19
20
21
22
23
24
25
26
27
...
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
|
case [uint16](2) then acc:lpush('🔱') end
case [uint16](3) then acc:lpush('⚜️') end
case [uint16](4) then acc:lpush('🗡') end
case [uint16](5) then acc:lpush('🗝') end
else acc:lpush('🕴')
end
end
local push_num_field = macro(function(acc,name,lbl,min,max,value,disable)
name = name:asvalue()
lbl = lbl:asvalue()
local start = '<div class="elem small">'
local enabled = start .. string.format('<label for="%s">%s</label><input type="number" id="%s" name="%s" min="', name, lbl, name, name)
local disabled = start .. string.format('<label>%s</label><div class="txtbox">', lbl)
................................................................................
else
ulst:lpush('<span class="id">')
lib.render.nym(usr, 0, &ulst, false)
ulst:lpush('</span></li>')
end
::skip::end
ulst:lpush('</ul>')
return ulst:finalize()
end
do return pstr.null() end
::e404:: co:complain(404, 'not found', 'there is no user or resource by that identifier on this server') goto quit
::e403:: co:complain(403, 'forbidden', 'you do not have sufficient authority to control that resource')
::quit:: return pstr.null()
end
return render_conf_users
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
...
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
|
case [uint16](2) then acc:lpush('🔱') end
case [uint16](3) then acc:lpush('⚜️') end
case [uint16](4) then acc:lpush('🗡') end
case [uint16](5) then acc:lpush('🗝') end
else acc:lpush('🕴')
end
end
local rnd = lib.crypt.random
local terra
suggest_handle(a: &lib.str.acc)
var start = a.sz
var puncts = array('.','_','-')
var xXx = rnd(uint8, 0, 9) == 0
var leet = rnd(uint8, 0, 8) == 0
var caps = rnd(uint8, 0, 5)
var punct: rawstring = nil
var useadj = rnd(uint8, 0, 4) == 0
if rnd(uint8, 0, 4) == 0 then
punct = puncts[rnd(intptr,0,[puncts.type.N])]
end
var nouns = array(
'thunder','bride','blaze','doom','squad','gun','lord','blaster',
'fuck','hell','hound','piss','shit','killa','terror', 'horror',
'fear', 'slaughter','murder','general','commander', 'commissar',
'terrorist','infinity','slut','cunt','whore','bitch', 'bastard',
'cock','prince','princess','pimp','gay','cop','slayer', 'vampire',
'vampyre','blood','pain','brute','wolf','sword','star','sun','moon',
'killer','murderer','thief','arson','fire','ice','frost','hack',
'hacker','god','master','mistress','slave','rage','freeze','flayer',
'pirate','ninja','shadow','fog','mist','misery','glory','bear',
'king','queen','empress','emperor','majesty','space','martian',
'winter','fall','monk','katana','420','warrior','banana','demon',
'devil','ghost','wraith','cuck','legend','hero','heroine','goblin',
'gremlin','troll','dragon','evil','overlord','radiance'
)
var adjs = array(
'dark','super','supreme','ultra','ultimate','total','infinite',
'omnipotent','crazy','final','deathless','immortal', 'elite',
'leet','1337','bloody','fearless','headless','screaming','insane',
'brutal','legendary','space','frozen','flaming','burning',
'mighty','flayed','hidden','secret','lost','mystery','glorious',
'nude','naked','bare','first','radiant','martian','fallen',
'wandering','dank','demonic','satanic','invisible','based','woke',
'deadly','lethal','heroic','evil','majestic','luminous'
)
if xXx then a:lpush('xXx_') end
if useadj then
var len = rnd(uint8,1,3)
for i = 0, len do
var sz = a.sz
a:push(adjs[rnd(intptr,0,[adjs.type.N])], 0)
if punct ~= nil then a:push(punct, 1) end
if caps == 1 then
a.buf[sz] = lib.str.cupcase(a.buf[sz])
end
end
end
var nounct = rnd(uint8,1,3)
for i = 0, nounct do
var sz = a.sz
a:push(nouns[rnd(intptr,0,[nouns.type.N])], 0)
if punct ~= nil and i+1 ~= nounct then a:push(punct, 1) end
if caps == 1 then
a.buf[sz] = lib.str.cupcase(a.buf[sz])
end
end
if leet or caps == 2 then for i=start, a.sz do
if caps == 2 and rnd(uint8,0,5)==0 then
a.buf[i] = lib.str.cupcase(a.buf[i])
end
if leet then
switch lib.str.cdowncase(a.buf[i]) do
case [uint8]([string.byte('e')]) then a.buf[i] = @'3' end
case [uint8]([string.byte('i')]) then a.buf[i] = @'1' end
case [uint8]([string.byte('l')]) then a.buf[i] = @'1' end
case [uint8]([string.byte('t')]) then a.buf[i] = @'7' end
case [uint8]([string.byte('s')]) then a.buf[i] = @'5' end
case [uint8]([string.byte('o')]) then a.buf[i] = @'0' end
case [uint8]([string.byte('b')]) then a.buf[i] = @'6' end
end
end
end end
if (nounct == 1 and not useadj) or rnd(uint8, 0, 5) == 0 then
if punct ~= nil then a:push(punct, 1) end
a:ipush(rnd(uint16,0,65535))
end
if xXx then a:lpush('_xXx') end
end
local push_num_field = macro(function(acc,name,lbl,min,max,value,disable)
name = name:asvalue()
lbl = lbl:asvalue()
local start = '<div class="elem small">'
local enabled = start .. string.format('<label for="%s">%s</label><input type="number" id="%s" name="%s" min="', name, lbl, name, name)
local disabled = start .. string.format('<label>%s</label><div class="txtbox">', lbl)
................................................................................
else
ulst:lpush('<span class="id">')
lib.render.nym(usr, 0, &ulst, false)
ulst:lpush('</span></li>')
end
::skip::end
ulst:lpush('</ul>')
if co.who.rights.powers.invite() or co.who.rights.invites > 0 then
ulst:lpush('<details><summary>create new user</summary><form method="post"><div class="elem"><label for="handle">handle</label><input type="text" name="handle" id="handle" placeholder="')
suggest_handle(&ulst)
ulst:lpush('"></div><button name="act" value="create">create</button></form></details>')
end
ulst:lpush('<details><summary>instantiate remote actor</summary><form method="post"><div class="elem"><label for="xid">xid</label><input type="text" name="xid" id="xid" placeholder="tweetlord@website.tld"></div><button name="act" value="inst">instantiate</button></form></details>')
return ulst:finalize()
end
do return pstr.null() end
::e404:: co:complain(404, 'not found', 'there is no user or resource by that identifier on this server') goto quit
::e403:: co:complain(403, 'forbidden', 'you do not have sufficient authority to control that resource')
::quit:: return pstr.null()
end
return render_conf_users
|