-
Notifications
You must be signed in to change notification settings - Fork 1
/
modules.r3
55 lines (48 loc) · 1.09 KB
/
modules.r3
1
2
3
4
5
6
7
8
9
10
11
12
13
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
Rebol [
Title: "RSO Chat Modules"
Date: 1-May-2014
Author: "Christopher Ross-Gill"
]
logfile: %events.reb
if not exists? logfile [write logfile ""]
debug: true
do rsolog: func [event][
if debug [
print ["logging event" event]
write/append logfile join reform [now/time event] newline
]
]
foreach [module test][
%r3-gui.r3 to-text
%altjson.r3 load-json
%altxml.r3 load-xml
%altwebform.r load-webform
%prot-http.r3 idate-to-idate
][
unless value? :test [
unless exists? module [
rsolog join "fetching " module
switch/default module [
%r3-gui.r3 [
test: body-of :load-gui
either parse url [thru 'try set test block! to end][
parse test [word! set test url!]
write module read test
do module
][
load-gui
]
]
%altwebform.r [
write module read join http://reb4.me/r3/ module
]
%prot-http.r3 [
write module read join https://raw.githubusercontent.com/gchiu/Rebol3/master/protocols/ module
]
][
write module read join https://raw.githubusercontent.com/gchiu/RSOChat/master/ module
]
]
do module
]
]