Public feed #958531

Anonymous

public text v1 · immutable
Raw Edit
·published 2008-03-26 20:02 UTC
rendered paste body
# Tcl parser 1.1 - art0rz - 05.12.2007

bind pub n "$" tclparser;

proc tclparser {nick host hand chan tcl} {
  array set return {
    0 OK
    1 ERROR
    2 RETURN
    3 BREAK
    4 CONTINUE
  };
  if {![string length $tcl]} { putquick "PRIVMSG $chan :The Tcl interpreter is running. Awaiting commands."; return 0; }
  set code [catch {eval $tcl} result];
  set result "\[$return($code)\] $result";
  foreach line [split $result "\n"] {
    putquick "PRIVMSG $chan :$line";
  }
  return 0;
}