defset port 6667
defset nick testbot
+defset ident blight
defset ownfullname "testing bot"
defset ownmailaddr test-irc-bot@example.com
}
proc onread {args} {
- global sock nick calling_nick errorInfo errorCode line_org_1char
+ global sock nick calling_nick errorInfo errorCode line_org_endchar
if {[gets $sock line] == -1} { fail "EOF/error on input" }
- set line_org_1char [string range $line 0 0]
+ set line_org_endchar [string range $line end end]
regsub -all "\[^ -\176\240-\376\]" $line ? line
set org $line
}
proc ensure_connecting {} {
- global sock ownfullname host port nick socketargs
+ global sock ownfullname host port nick ident socketargs
global musthaveping_ms musthaveping_after
ensure_outqueue
fconfigure $sock -buffering line
fconfigure $sock -translation crlf
- sendout USER blight 0 * $ownfullname
+ sendout USER $ident 0 * $ownfullname
sendout NICK $nick
fileevent $sock readable onread