Differences From
Artifact [faf7450a82]:
59 59
60 60 sid: uint64
61 61 iname: rawstring
62 62 }
63 63 idelegate.metamethods.__methodmissing = macro(function(meth, self, ...)
64 64 local expr = {...}
65 65 local rt
66 +
66 67 for _,f in pairs(lib.store.backend.entries) do
67 68 local fn = f.field or f[1]
68 69 local ft = f.type or f[2]
69 70 if fn == meth then rt = ft.type.returntype break end
70 71 end
71 72
72 73 return quote
................................................................................
113 114 if tmppw[i] >= 36 then
114 115 tmppw[i] = tmppw[i] + (0x61 - 36)
115 116 elseif tmppw[i] >= 10 then
116 117 tmppw[i] = tmppw[i] + (0x41 - 10)
117 118 else tmppw[i] = tmppw[i] + 0x30 end
118 119 end
119 120 lib.dbg('assigning temporary password')
120 - dlg:auth_create_pw(uid, reset, pstr {
121 - ptr = [rawstring](tmppw), ct = 32
122 - })
121 + dlg:auth_attach_pw(uid, reset,
122 + pstr { ptr = [rawstring](tmppw), ct = 32 },
123 + lib.str.plit 'temporary password');
123 124 end
124 125
125 126 local terra ipc_report(acks: lib.mem.ptr(lib.ipc.ack), rep: rawstring)
126 127 var decbuf: int8[21]
127 128 for i=0,acks.ct do
128 129 var num = lib.math.decstr(acks(i).clid, &decbuf[20])
129 130 if acks(i).success then
................................................................................
334 335 if lib.str.cmp(cfmode.arglist(0),'chsec') == 0 then
335 336 var sec: int8[65] gensec(&sec[0])
336 337 dlg:conf_set('server-secret', &sec[0])
337 338 lib.report('server secret reset')
338 339 elseif lib.str.cmp(cfmode.arglist(0),'refresh') == 0 then
339 340 cfmode.no_notify = false -- duh
340 341 else goto cmderr end
342 + elseif cfmode.arglist.ct == 2 and
343 + lib.str.cmp(cfmode.arglist(0),'reset') == 0 or
344 + lib.str.cmp(cfmode.arglist(0),'clear') == 0 or
345 + lib.str.cmp(cfmode.arglist(0),'unset') == 0 then
346 + dlg:conf_reset(cfmode.arglist(1))
347 + lib.report('parameter cleared')
341 348 elseif cfmode.arglist.ct == 3 and
342 349 lib.str.cmp(cfmode.arglist(0),'set') == 0 then
343 350 dlg:conf_set(cfmode.arglist(1),cfmode.arglist(2))
344 351 lib.report('parameter set')
345 352 else goto cmderr end
346 353
347 354 -- successful commands fall through