#!/usr/bin/env rune # Copyright 2004-2006 Kevin Reid, under the terms of the MIT X license # found at http://www.opensource.org/licenses/mit-license.html ................ pragma.enable("easy-return") pragma.disable("explicit-result-guard") pragma.enable("accumulator") pragma.enable("dot-props") pragma.enable("verb-curry") def network := (privilegedScope) def irc__uriGetter := (network.getRemoteTCPEndpoint, , => stderr) def freenode := # def handler { match msg { println(msg) } } when (freenode <- connect(handler)) -> { conn <- NICK("etest") conn <- USER("etest", "Xenon.local", "irc.freenode.net", "IRC protocol implementation test") conn <- JOIN("#erights") conn <- PRIVMSG("#erights", "test") when (conn <- ping()) -> { conn <- QUIT("Success") } catch p { interp.exitAtTop(p) } finally { interp.continueAtTop() } } catch p { interp.exitAtTop(p) } interp.blockAtTop()