Commit 05306b46e42013e99b44f385707217b2088c5dd7
- Diff rendering mode:
- inline
- side by side
src/u.mod
(7 / 6)
|   | |||
| 14 | 14 | ||
| 15 | 15 | IMPLEMENTATION MODULE u; | |
| 16 | 16 | ||
| 17 | IMPORT FileSys, Message, ProgExec, StreamFile, Strings, TextIO, IOResult, util, p6Fifo; | ||
| 17 | IMPORT FileSys, Message, ProgExec, StreamFile, Strings, TextIO, Timers, IOResult, util, p6Fifo; | ||
| 18 | 18 | ||
| 19 | 19 | PROCEDURE Uptime(parse : Message.Parse); | |
| 20 | 20 | (* Uptime: How long has the computer that the bot is running on *) | |
| … | … | ||
| 60 | 60 | TextIO.SkipLine(file); | |
| 61 | 61 | UNTIL (IOResult.ReadResult(file) = IOResult.endOfInput); | |
| 62 | 62 | StreamFile.Close(file); | |
| 63 | Strings.Concat(tmp, "DONE", tmp); | ||
| 63 | Strings.Concat(tmp, " DONE", tmp); | ||
| 64 | 64 | Message.PrintLine(parse.chan, "The following sections are not currently maintained:"); | |
| 65 | 65 | IF LENGTH(tmp) > 400 THEN | |
| 66 | 66 | REPEAT | |
| 67 | 67 | Strings.FindPrev(", ", tmp, 401, found, pos); | |
| 68 | 68 | Strings.Extract(tmp, 0, pos+1, str); | |
| 69 | 69 | Message.PrintLine(parse.chan, str); | |
| 70 | Strings.Extract(tmp, pos+2, LENGTH(tmp), str); | ||
| 71 | Message.PrintLine(parse.chan, str); | ||
| 70 | Strings.Extract(tmp, pos+2, LENGTH(tmp), tmp); | ||
| 71 | (* Message.PrintLine(parse.chan, str); *) | ||
| 72 | Timers.Delay(2); | ||
| 72 | 73 | UNTIL LENGTH(tmp) <= 400; | |
| 73 | ELSE | ||
| 74 | END; (* ELSE *) | ||
| 74 | 75 | Message.PrintLine(parse.chan, tmp); | |
| 75 | END; | | ||
| 76 | (* END; *) | | ||
| 76 | 77 | ELSE | |
| 77 | 78 | Message.PrintLine(parse.chan, "I'm sorry. I've encountered and logged an error in !unmaintained"); | |
| 78 | 79 | util.Log("Unable to open file unmaintained.", parse); |

