chiark
/
gitweb
/
~ijackson
/
ircbot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
topicedit: add a timeout; better error handling
[ircbot.git]
/
topicedit.tcl
diff --git
a/topicedit.tcl
b/topicedit.tcl
index 9fc4765285ce61bc85196746f5288daae062a64e..88998782d35edefc0de1c666a6262a8391f6c8b7 100755
(executable)
--- a/
topicedit.tcl
+++ b/
topicedit.tcl
@@
-9,9
+9,11
@@
manyset $argv host port nick ident ownfullname channel topicinfo
set done 0
+after 30000 { set errorInfo {}; bgerror timeout }
+
proc bgerror {msg} {
global errorInfo errorCode
- puts stderr "$msg\n$errorCode\n$errorInfo\n"
+ puts stderr "$msg\n$errorCode\n$errorInfo\n
\nERROR: $msg\n
"
exit 16
}