MCPcopy Create free account
hub / github.com/annmuor/jnode / execute

Method execute

jnode-core/src/jnode/robot/AreaFix.java:62–139  ·  view source on GitHub ↗
(FtnMessage fmsg)

Source from the content-addressed store, hash-verified

60 "^%IGNOREPKTPWD (on|off)$", Pattern.CASE_INSENSITIVE);
61
62 @Override
63 public void execute(FtnMessage fmsg) throws Exception {
64 Link link = getAndCheckLink(fmsg);
65 if (link == null) {
66 return;
67 }
68
69 StringBuilder reply = new StringBuilder();
70 for (String line : fmsg.getText().split("\n")) {
71 line = line.toLowerCase();
72 if (HELP.matcher(line).matches()) {
73 FtnTools.writeReply(fmsg,
74 MessageFormat.format("{0} help", getRobotName()),
75 help());
76 } else if (LIST.matcher(line).matches()) {
77 FtnTools.writeReply(fmsg,
78 MessageFormat.format("{0} list", getRobotName()),
79 list(link));
80 } else if (QUERY.matcher(line).matches()) {
81 FtnTools.writeReply(fmsg,
82 MessageFormat.format("{0} query", getRobotName()),
83 query(link));
84 } else {
85 Matcher m = REM.matcher(line);
86 if (m.matches()) {
87 String area = m.group(1);
88 reply.append(rem(link, area));
89 continue;
90 }
91 m = ADD.matcher(line);
92 if (m.matches()) {
93 String area = m.group(1);
94 reply.append(add(link, area));
95 continue;
96 }
97 m = RESCAN.matcher(line);
98 if (m.matches()) {
99 String area = m.group(1);
100 int num = Integer.valueOf(m.group(2));
101 reply.append(rescan(link, area, num));
102 continue;
103 }
104 m = ADD_RESCAN.matcher(line);
105 if (m.matches()) {
106 String area = m.group(1);
107 int num = Integer.valueOf(m.group(2));
108 reply.append(add(link, area));
109 reply.append(rescan(link, area, num));
110 continue;
111 }
112 m = AFXPASS.matcher(line);
113 if (m.matches()) {
114 String newpwd = m.group(1);
115 reply.append(afxpass(link, newpwd));
116 continue;
117 }
118 m = PKTPASS.matcher(line);
119 if (m.matches()) {

Callers

nothing calls this directly

Calls 15

writeReplyMethod · 0.95
getRobotNameMethod · 0.95
helpMethod · 0.95
listMethod · 0.95
queryMethod · 0.95
remMethod · 0.95
addMethod · 0.95
rescanMethod · 0.95
afxpassMethod · 0.95
pktpassMethod · 0.95
ignorepktpwdMethod · 0.95
getAndCheckLinkMethod · 0.80

Tested by

no test coverage detected