Error processing request

Parameters

CONTENT_LENGTH0
REQUEST_METHODGET
REQUEST_URI/revision/PicoIRC+0.2+explained?V=23
QUERY_STRINGV=23
CONTENT_TYPE
DOCUMENT_URI/revision/PicoIRC+0.2+explained
DOCUMENT_ROOT/var/www/nikit/nikit/nginx/../docroot
SCGI1
SERVER_PROTOCOLHTTP/1.1
HTTPSon
REMOTE_ADDR172.71.254.217
REMOTE_PORT18668
SERVER_PORT4443
SERVER_NAMEwiki.tcl-lang.org
HTTP_HOSTwiki.tcl-lang.org
HTTP_CONNECTIONKeep-Alive
HTTP_ACCEPT_ENCODINGgzip, br
HTTP_X_FORWARDED_FOR18.188.103.162
HTTP_CF_RAY8860ddf2dac4231b-ORD
HTTP_X_FORWARDED_PROTOhttps
HTTP_CF_VISITOR{"scheme":"https"}
HTTP_ACCEPT*/*
HTTP_USER_AGENTMozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; [email protected])
HTTP_REFERERhttp://wiki.tcl.tk/revision/PicoIRC+0%2E2+explained?V=23
HTTP_CF_CONNECTING_IP18.188.103.162
HTTP_CDN_LOOPcloudflare
HTTP_CF_IPCOUNTRYUS

Body


Error

Unknow state transition: LINE -> END

-code

1

-level

0

-errorstack

INNER {returnImm {Unknow state transition: LINE -> END} {}} CALL {my render_wikit {PicoIRC 0.2 explained} \[Richard\ Suchenwirth\]\ 2007-01-31:\ The\ code\ of\ \[picoIRC\ 0.2\]\ is\ sweet\ and\ short,\ but\ a\ user\ asked\ for\ explanations\ on\ how\ and\ why\ things\ are\ done.\ So,\ here\ goes:\n\n\[WikiDbImage\ irc.gif\]\n\n===\n#\ We\ will\ use\ the\ \[Tk\]\ GUI\ toolkit,\ so\ best\ tell\ it\ early\ on\npackage\ require\ Tk\n\n#\ Set\ some\ parameters\ (user\ may\ want\ to\ modify\ these)\nset\ ::server\ irc.freenode.org\nset\ ::chan\ \ \ #tcl\nset\ ::me\ \ \ \ \ \$tcl_platform(user)\n\n#\ The\ GUI\ consists\ mostly\ of\ a\ \[text\]\ widget:\ntext\ .t\ -height\ 30\ -wrap\ word\ -font\ \{Arial\ 9\}\n\n#\ Some\ tags\ to\ make\ emphasized\ strings\ look\ nicer:\n.t\ tag\ config\ bold\ \ \ -font\ \[linsert\ \[.t\ cget\ -font\]\ end\ bold\]\n.t\ tag\ config\ italic\ -font\ \[linsert\ \[.t\ cget\ -font\]\ end\ italic\]\n.t\ tag\ config\ blue\ \ \ -foreground\ blue\n\n#\ Second\ UI\ element\ is\ an\ \[entry\]\ widget\ for\ typing\ messages\nentry\ .cmd\n\n#Brought\ to\ screen\ by\ \[pack\]\ (entry\ first,\ so\ it\ doesn't\ disappear\ on\ resizing)\npack\ .cmd\ -side\ bottom\ -fill\ x\npack\ .t\ -fill\ both\ -expand\ 1\n\n#\ When\ <Return>\ is\ hit\ in\ the\ entry,\ the\ command\ ''post''\ is\ executed\nbind\ .cmd\ <Return>\ post\n\n#\ But\ first\ for\ the\ receiving\ proc,\ which\ is\ called\ when\ the\ socket\ has\ new\n#\ content:\nproc\ recv\ \{\}\ \{\n\ \ \ \ gets\ \$::fd\ line\ \;#--\ read\ a\ line\ from\ socket\n\ \ \ \ #\ handle\ PING\ messages\ from\ server\n\ \ \ \ if\ \{\[lindex\ \[split\ \$line\]\ 0\]\ eq\ \"PING\"\}\ \{\n\ \ \ \ \ \ \ \ send\ \"PONG\ \[info\ hostname\]\ \[lindex\ \[split\ \$line\]\ 1\]\"\ \n\ \ \ \ \ \ \ \ return\n\ \ \ \ \}\n\ \ \ \ #--\ Add\ some\ markup\ for\ messages\ and\ actions\n\ \ \ \ if\ \{\[regexp\ \{:(\[^!\]*)!\[^\ \].*\ +PRIVMSG\ (\[^\ :\]+)\ +:(.*)\}\ \$line\ ->\ \\\n\ \ \ \ \ \ \ \ nick\ target\ msg\]\}\ \{\n\ \ \ \ \ \ \ \ set\ tag\ \{\}\ \n\ \ \ \ \ \ \ \ if\ \[regexp\ \{\\001ACTION(.+)\\001\}\ \$msg\ ->\ msg\]\ \{set\ tag\ italic\}\n\ \ \ \ \ \ \ \ #--\ suppress\ the\ names\ of\ two\ well-known\ bridge\ bots\n\ \ \ \ \ \ \ \ if\ \[in\ \{azbridge\ ijchain\}\ \$nick\]\ \{regexp\ \{<(\[^>\]+)>(.+)\}\ \$msg\ ->\ nick\ msg\}\n\ \ \ \ \ \ \ \ #--\ Display\ nick\ in\ bold,\ message\ as\ tagged\ above\n\ \ \ \ \ \ \ .t\ insert\ end\ \$nick\\t\ bold\ \$msg\\n\ \$tag\n\ \ \ \ \}\ else\ \{.t\ insert\ end\ \$line\\n\ italic\}\n\ \ \ \ #--\ make\ sure\ the\ last\ part\ is\ visible\n\ \ \ \ .t\ yview\ end\n\}\n\n#\ Just\ a\ little\ helper\ to\ check\ list\ membership\nproc\ in\ \{list\ element\}\ \{expr\ \{\[lsearch\ -exact\ \$list\ \$element\]>=0\}\}\n\n#\ This\ command\ is\ called\ on\ <Return>\nproc\ post\ \{\}\ \{\n\ \ \ \ set\ msg\ \[.cmd\ get\]\ \;#--\ read\ what\ was\ typed\ in\ the\ entry\n\ \ \ \ #--\ Lines\ beginning\ with\ /me\ are\ marked\ as\ actions:\n\ \ \ \ if\ \[regexp\ \{^/me\ (.+)\}\ \$msg\ ->\ action\]\ \{set\ msg\ \"\\001ACTION\ \$action\\001\"\}\n\ \ \ \ #--\ Multiple\ lines\ (as\ e.g.\ from\ pasting)\ are\ sent\ one\ by\ one:\n\ \ \ \ foreach\ line\ \[split\ \$msg\ \\n\]\ \{send\ \"PRIVMSG\ \$::chan\ :\$line\"\}\n\ \ \ \ .cmd\ delete\ 0\ end\ \;#--\ clear\ the\ entry\n\ \ \ \ #--\ the\ sent\ message\ is\ locally\ reported\ in\ the\ text,\ with\ possible\ markup\n\ \ \ \ set\ tag\ \"\"\n\ \ \ \ if\ \[regexp\ \{\\001ACTION(.+)\\001\}\ \$msg\ ->\ msg\]\ \{set\ tag\ italic\}\n\ \ \ \ .t\ insert\ end\ \$::me\\t\ \{bold\ blue\}\ \$msg\\n\ \[list\ blue\ \$tag\]\n\ \ \ \ #--\ make\ sure\ the\ end\ of\ the\ text\ widget\ is\ visible\n\ \ \ \ .t\ yview\ end\n\}\n\n#\ A\ very\ simple\ wrapper\ for\ sending\ a\ string,\ not\ forgetting\ to\ \[flush\]\nproc\ send\ str\ \{puts\ \$::fd\ \$str\;\ flush\ \$::fd\}\n\n#\ And\ now,\ the\ action\ begins\ with\ \"logging\ in\"\ to\ the\ IRC\ server\nset\ ::fd\ \[socket\ \$::server\ 6667\]\nsend\ \"NICK\ \$::me\"\nsend\ \"USER\ \$::me\ 0\ *\ :PicoIRC\ user\"\nsend\ \"JOIN\ \$::chan\"\n\n#\ If\ the\ \[socket\]\ gets\ readable,\ ''recv''\ will\ be\ called\nfileevent\ \$::fd\ readable\ recv\n\n#\ This\ is\ just\ a\ convenient\ debugging\ helper\ for\ rapid\ restart\ after\ changes\nbind\ .\ <Escape>\ \{exec\ wish\ \$argv0\ &\;\ exit\}\n======\n\n----\n\nHow\ does\ this\ script\ deal\ with\ the\ ping-pong\ requirements\ of\ an\ IRC\ server?\ Is\ that\ handled\ by\ the\ socket\ itself?\n\n\[RS\]:\ The\ script\ as\ above\ worked\ nicely\ from\ home\ (at\ work,\ IRC\ is\ blocked).\ I\ think\ I\ remember\ timeouts\ if\ I\ wasn't\ chatting\ for\ a\ while,\ but\ I'm\ not\ an\ IRC\ specialist\ anyway...\ Who\ knows\ better,\ please\ let\ us\ know!\n\n\[MJ\]:\ The\ handling\ of\ the\ PING\ request\ has\ been\ added\ to\ the\ script.\n\nRegarding\ that\ particular\ segment\ of\ code\;\n\n======\nsend\ \"PONG\ \[info\ hostname\]\"\n======\n\ncan\ someone\ explain\ the\ \[info\ hostname\]\ command\ to\ me?\n\n\[LV\]:\ Did\ you\ read\ the\ wiki\ page\ to\ which\ you\ referred?\ Basically,\ every\ computer\ has\ some\ sort\ of\ name\ -\ info\ hostname\ returns\ that\ name.\n\nNo\ I\ didn't\ read\ that\ page...\ posted\ the\ question\ without\ even\ looking\ at\ it\ afterwards.\ Many\ thanks\ to\ you\ all\ though!\ You've\ been\ very\ helpful!\n\n----\n\nAlternatively,\ some\ servers\ send\ ping\ requests\ with\ a\ unique\ key\ that\ must\ be\ returned.\ \n\na\ rawlog\ excerpt\ from\ xchat\ on\ irc.sorcery.net:\ \n\n======none\n<<\ PING\ LAG2509966063\ >>\ :nebula.sorcery.net\n\ \ \ \ \ PONG\ nebula.sorcery.net\ :LAG2509966063\n======\n\nIn\ that\ case,\ the\ following\ replacement\ of\ the\ server\ code\ can\ suffice\ (if\ not,\ please\ edit):\n\n======\nif\ \{\[lindex\ \[split\ \$line\]\ 0\]\ eq\ \{PING\}\}\ \{\n\ \ \ \ send\ \"PONG\ \[lindex\ \[split\ \$line\]\ 1\]\"\ \n\ \ \ \ return\n\}\n======\n\n\[MJ\]:\ The\ return\ from\ xchat\ seems\ to\ violate\ RFC1459,\ to\ quote:\n\ \n======none\nCommand:\ \ \ \ \ \ \ PONG\nParameters:\ \ \ \ <daemon>\ \[<daemon2>\]\n\nPONG\ message\ is\ a\ reply\ to\ ping\ message.\ If\ parameter\ <daemon2>\ is\ given\ \nthis\ message\ must\ be\ forwarded\ to\ given\ daemon.\ The\ <daemon>\ parameter\ \nis\ the\ name\ of\ the\ daemon\ who\ has\ responded\ to\ PING\ message\ and\ generated\ this\ message.\n======\n\nSo\ the\ first\ parameter\ of\ pong\ should\ be\ the\ name\ of\ the\ daemon\ who\ has\ responded\ (e.g.\ the\ name\ of\ the\ client)\n\nTherefore\ the\ way\ I\ read\ it,\ the\ correct\ reply\ should\ be:\n\n======\nif\ \{\[lindex\ \[split\ \$line\]\ 0\]\ eq\ \{PING\}\}\ \{\n\ \ \ \ send\ \"PONG\ \[info\ hostname\]\ \[lindex\ \[split\ \$line\]\ 1\]\"\n======\n\n<<categories>>\ Example\ |\ Networking\ |\ Channel\ |\ Tutorial regexp2} CALL {my render {PicoIRC 0.2 explained} \[Richard\ Suchenwirth\]\ 2007-01-31:\ The\ code\ of\ \[picoIRC\ 0.2\]\ is\ sweet\ and\ short,\ but\ a\ user\ asked\ for\ explanations\ on\ how\ and\ why\ things\ are\ done.\ So,\ here\ goes:\n\n\[WikiDbImage\ irc.gif\]\n\n===\n#\ We\ will\ use\ the\ \[Tk\]\ GUI\ toolkit,\ so\ best\ tell\ it\ early\ on\npackage\ require\ Tk\n\n#\ Set\ some\ parameters\ (user\ may\ want\ to\ modify\ these)\nset\ ::server\ irc.freenode.org\nset\ ::chan\ \ \ #tcl\nset\ ::me\ \ \ \ \ \$tcl_platform(user)\n\n#\ The\ GUI\ consists\ mostly\ of\ a\ \[text\]\ widget:\ntext\ .t\ -height\ 30\ -wrap\ word\ -font\ \{Arial\ 9\}\n\n#\ Some\ tags\ to\ make\ emphasized\ strings\ look\ nicer:\n.t\ tag\ config\ bold\ \ \ -font\ \[linsert\ \[.t\ cget\ -font\]\ end\ bold\]\n.t\ tag\ config\ italic\ -font\ \[linsert\ \[.t\ cget\ -font\]\ end\ italic\]\n.t\ tag\ config\ blue\ \ \ -foreground\ blue\n\n#\ Second\ UI\ element\ is\ an\ \[entry\]\ widget\ for\ typing\ messages\nentry\ .cmd\n\n#Brought\ to\ screen\ by\ \[pack\]\ (entry\ first,\ so\ it\ doesn't\ disappear\ on\ resizing)\npack\ .cmd\ -side\ bottom\ -fill\ x\npack\ .t\ -fill\ both\ -expand\ 1\n\n#\ When\ <Return>\ is\ hit\ in\ the\ entry,\ the\ command\ ''post''\ is\ executed\nbind\ .cmd\ <Return>\ post\n\n#\ But\ first\ for\ the\ receiving\ proc,\ which\ is\ called\ when\ the\ socket\ has\ new\n#\ content:\nproc\ recv\ \{\}\ \{\n\ \ \ \ gets\ \$::fd\ line\ \;#--\ read\ a\ line\ from\ socket\n\ \ \ \ #\ handle\ PING\ messages\ from\ server\n\ \ \ \ if\ \{\[lindex\ \[split\ \$line\]\ 0\]\ eq\ \"PING\"\}\ \{\n\ \ \ \ \ \ \ \ send\ \"PONG\ \[info\ hostname\]\ \[lindex\ \[split\ \$line\]\ 1\]\"\ \n\ \ \ \ \ \ \ \ return\n\ \ \ \ \}\n\ \ \ \ #--\ Add\ some\ markup\ for\ messages\ and\ actions\n\ \ \ \ if\ \{\[regexp\ \{:(\[^!\]*)!\[^\ \].*\ +PRIVMSG\ (\[^\ :\]+)\ +:(.*)\}\ \$line\ ->\ \\\n\ \ \ \ \ \ \ \ nick\ target\ msg\]\}\ \{\n\ \ \ \ \ \ \ \ set\ tag\ \{\}\ \n\ \ \ \ \ \ \ \ if\ \[regexp\ \{\\001ACTION(.+)\\001\}\ \$msg\ ->\ msg\]\ \{set\ tag\ italic\}\n\ \ \ \ \ \ \ \ #--\ suppress\ the\ names\ of\ two\ well-known\ bridge\ bots\n\ \ \ \ \ \ \ \ if\ \[in\ \{azbridge\ ijchain\}\ \$nick\]\ \{regexp\ \{<(\[^>\]+)>(.+)\}\ \$msg\ ->\ nick\ msg\}\n\ \ \ \ \ \ \ \ #--\ Display\ nick\ in\ bold,\ message\ as\ tagged\ above\n\ \ \ \ \ \ \ .t\ insert\ end\ \$nick\\t\ bold\ \$msg\\n\ \$tag\n\ \ \ \ \}\ else\ \{.t\ insert\ end\ \$line\\n\ italic\}\n\ \ \ \ #--\ make\ sure\ the\ last\ part\ is\ visible\n\ \ \ \ .t\ yview\ end\n\}\n\n#\ Just\ a\ little\ helper\ to\ check\ list\ membership\nproc\ in\ \{list\ element\}\ \{expr\ \{\[lsearch\ -exact\ \$list\ \$element\]>=0\}\}\n\n#\ This\ command\ is\ called\ on\ <Return>\nproc\ post\ \{\}\ \{\n\ \ \ \ set\ msg\ \[.cmd\ get\]\ \;#--\ read\ what\ was\ typed\ in\ the\ entry\n\ \ \ \ #--\ Lines\ beginning\ with\ /me\ are\ marked\ as\ actions:\n\ \ \ \ if\ \[regexp\ \{^/me\ (.+)\}\ \$msg\ ->\ action\]\ \{set\ msg\ \"\\001ACTION\ \$action\\001\"\}\n\ \ \ \ #--\ Multiple\ lines\ (as\ e.g.\ from\ pasting)\ are\ sent\ one\ by\ one:\n\ \ \ \ foreach\ line\ \[split\ \$msg\ \\n\]\ \{send\ \"PRIVMSG\ \$::chan\ :\$line\"\}\n\ \ \ \ .cmd\ delete\ 0\ end\ \;#--\ clear\ the\ entry\n\ \ \ \ #--\ the\ sent\ message\ is\ locally\ reported\ in\ the\ text,\ with\ possible\ markup\n\ \ \ \ set\ tag\ \"\"\n\ \ \ \ if\ \[regexp\ \{\\001ACTION(.+)\\001\}\ \$msg\ ->\ msg\]\ \{set\ tag\ italic\}\n\ \ \ \ .t\ insert\ end\ \$::me\\t\ \{bold\ blue\}\ \$msg\\n\ \[list\ blue\ \$tag\]\n\ \ \ \ #--\ make\ sure\ the\ end\ of\ the\ text\ widget\ is\ visible\n\ \ \ \ .t\ yview\ end\n\}\n\n#\ A\ very\ simple\ wrapper\ for\ sending\ a\ string,\ not\ forgetting\ to\ \[flush\]\nproc\ send\ str\ \{puts\ \$::fd\ \$str\;\ flush\ \$::fd\}\n\n#\ And\ now,\ the\ action\ begins\ with\ \"logging\ in\"\ to\ the\ IRC\ server\nset\ ::fd\ \[socket\ \$::server\ 6667\]\nsend\ \"NICK\ \$::me\"\nsend\ \"USER\ \$::me\ 0\ *\ :PicoIRC\ user\"\nsend\ \"JOIN\ \$::chan\"\n\n#\ If\ the\ \[socket\]\ gets\ readable,\ ''recv''\ will\ be\ called\nfileevent\ \$::fd\ readable\ recv\n\n#\ This\ is\ just\ a\ convenient\ debugging\ helper\ for\ rapid\ restart\ after\ changes\nbind\ .\ <Escape>\ \{exec\ wish\ \$argv0\ &\;\ exit\}\n======\n\n----\n\nHow\ does\ this\ script\ deal\ with\ the\ ping-pong\ requirements\ of\ an\ IRC\ server?\ Is\ that\ handled\ by\ the\ socket\ itself?\n\n\[RS\]:\ The\ script\ as\ above\ worked\ nicely\ from\ home\ (at\ work,\ IRC\ is\ blocked).\ I\ think\ I\ remember\ timeouts\ if\ I\ wasn't\ chatting\ for\ a\ while,\ but\ I'm\ not\ an\ IRC\ specialist\ anyway...\ Who\ knows\ better,\ please\ let\ us\ know!\n\n\[MJ\]:\ The\ handling\ of\ the\ PING\ request\ has\ been\ added\ to\ the\ script.\n\nRegarding\ that\ particular\ segment\ of\ code\;\n\n======\nsend\ \"PONG\ \[info\ hostname\]\"\n======\n\ncan\ someone\ explain\ the\ \[info\ hostname\]\ command\ to\ me?\n\n\[LV\]:\ Did\ you\ read\ the\ wiki\ page\ to\ which\ you\ referred?\ Basically,\ every\ computer\ has\ some\ sort\ of\ name\ -\ info\ hostname\ returns\ that\ name.\n\nNo\ I\ didn't\ read\ that\ page...\ posted\ the\ question\ without\ even\ looking\ at\ it\ afterwards.\ Many\ thanks\ to\ you\ all\ though!\ You've\ been\ very\ helpful!\n\n----\n\nAlternatively,\ some\ servers\ send\ ping\ requests\ with\ a\ unique\ key\ that\ must\ be\ returned.\ \n\na\ rawlog\ excerpt\ from\ xchat\ on\ irc.sorcery.net:\ \n\n======none\n<<\ PING\ LAG2509966063\ >>\ :nebula.sorcery.net\n\ \ \ \ \ PONG\ nebula.sorcery.net\ :LAG2509966063\n======\n\nIn\ that\ case,\ the\ following\ replacement\ of\ the\ server\ code\ can\ suffice\ (if\ not,\ please\ edit):\n\n======\nif\ \{\[lindex\ \[split\ \$line\]\ 0\]\ eq\ \{PING\}\}\ \{\n\ \ \ \ send\ \"PONG\ \[lindex\ \[split\ \$line\]\ 1\]\"\ \n\ \ \ \ return\n\}\n======\n\n\[MJ\]:\ The\ return\ from\ xchat\ seems\ to\ violate\ RFC1459,\ to\ quote:\n\ \n======none\nCommand:\ \ \ \ \ \ \ PONG\nParameters:\ \ \ \ <daemon>\ \[<daemon2>\]\n\nPONG\ message\ is\ a\ reply\ to\ ping\ message.\ If\ parameter\ <daemon2>\ is\ given\ \nthis\ message\ must\ be\ forwarded\ to\ given\ daemon.\ The\ <daemon>\ parameter\ \nis\ the\ name\ of\ the\ daemon\ who\ has\ responded\ to\ PING\ message\ and\ generated\ this\ message.\n======\n\nSo\ the\ first\ parameter\ of\ pong\ should\ be\ the\ name\ of\ the\ daemon\ who\ has\ responded\ (e.g.\ the\ name\ of\ the\ client)\n\nTherefore\ the\ way\ I\ read\ it,\ the\ correct\ reply\ should\ be:\n\n======\nif\ \{\[lindex\ \[split\ \$line\]\ 0\]\ eq\ \{PING\}\}\ \{\n\ \ \ \ send\ \"PONG\ \[info\ hostname\]\ \[lindex\ \[split\ \$line\]\ 1\]\"\n======\n\n<<categories>>\ Example\ |\ Networking\ |\ Channel\ |\ Tutorial} CALL {my revision {PicoIRC 0.2 explained}} CALL {::oo::Obj1462576 process revision/PicoIRC+0.2+explained} CALL {::oo::Obj1462574 process}

-errorcode

NONE

-errorinfo

Unknow state transition: LINE -> END
    while executing
"error $msg"
    (class "::Wiki" method "render_wikit" line 6)
    invoked from within
"my render_$default_markup $N $C $mkup_rendering_engine"
    (class "::Wiki" method "render" line 8)
    invoked from within
"my render $name $C"
    (class "::Wiki" method "revision" line 31)
    invoked from within
"my revision $page"
    (class "::Wiki" method "process" line 56)
    invoked from within
"$server process [string trim $uri /]"

-errorline

4