IRC gateway: Difference between revisions
m
syntax highlighting fixup automation
(Added Wren) |
Thundergnat (talk | contribs) m (syntax highlighting fixup automation) |
||
Line 5:
<br>
Just a bare-bones gateway.
<
import (
Line 78:
go irc2.Loop()
irc1.Loop()
}</
=={{header|Phix}}==
<!--<
For use with [[Chat_server#Phix]]
<span style="color: #000080;font-style:italic;">--
Line 242:
<span style="color: #000080;font-style:italic;">--?"done"
--{} = wait_key()</span>
<!--</
=={{header|Tcl}}==
This code is called as a complete script, perhaps like this:
<
{{tcllib|picoirc}}
<
package require picoirc
Line 290:
set conn(1) [picoirc::connect handle1to2 $nick1 $url1]
set conn(2) [picoirc::connect handle2to1 $nick2 $url2]
vwait forever</
=={{header|Wren}}==
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.
<
import "./dynamic" for Tuple
Line 356:
irc.addCallback(i, "PRIVMSG", "" , c.channel, c.nick, otherNick)
irc.connect(c.server)
}</
We now embed this script in the following Go program and run it from a terminal. To close the gateway just press Ctrl-C.
<
package main
Line 512:
ircObjs[0].Loop()
vm.Free()
}</
{{omit from|AWK}}
|