Mercurial Hosting > nabble
comparison src/nabble/modules/hacks/UserNamespaceExt.java @ 0:7ecd1a4ef557
add content
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 21 Mar 2019 19:15:52 -0600 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:7ecd1a4ef557 |
---|---|
1 package nabble.modules.hacks; | |
2 | |
3 import nabble.model.User; | |
4 import nabble.naml.compiler.Command; | |
5 import nabble.naml.compiler.IPrintWriter; | |
6 import nabble.naml.compiler.Interpreter; | |
7 import nabble.naml.compiler.NamespaceExtension; | |
8 import nabble.view.web.template.UserNamespace; | |
9 | |
10 | |
11 @NamespaceExtension( | |
12 name = "user_hacks", | |
13 target = UserNamespace.class | |
14 ) | |
15 public final class UserNamespaceExt { | |
16 private final User user; | |
17 | |
18 public UserNamespaceExt(UserNamespace ns) { | |
19 user = ns.user(); | |
20 } | |
21 | |
22 @Command | |
23 public void registration_sequence(IPrintWriter out, Interpreter interp) { | |
24 out.print(user == null? -1 : UserHack.of(user).getRegistrationSequence()); | |
25 } | |
26 } |