IRC gateway: Difference between revisions
m
→{{header|Wren}}: Minor tidy
Thundergnat (talk | contribs) m (syntax highlighting fixup automation) |
m (→{{header|Wren}}: Minor tidy) |
||
Line 300:
As it's not possible to access command line arguments directly from Wren when it is being embedded, we instead ask the gateway user to input details of the connections needed.
<syntaxhighlight lang="
import "./dynamic" for Tuple
Line 358:
}</syntaxhighlight>
We now embed this script in the following Go program and run it from a terminal. To close the gateway just press Ctrl-C.
<syntaxhighlight lang="go">/* go run
package main
Line 489:
cfg.LoadModuleFn = moduleFn
vm := cfg.NewVM()
var fileName = "
IRCMethodMap := wren.MethodMap{
"connect(_)": connect,
|