Add some full stops.
[ircbot] / irccore.tcl
index 7a6f157..1ff6840 100644 (file)
@@ -7,6 +7,7 @@ proc defset {varname val} {
 defset port 6667
 
 defset nick testbot
+defset ident blight
 defset ownfullname "testing bot"
 defset ownmailaddr test-irc-bot@example.com
 
@@ -162,10 +163,10 @@ proc bgerror {msg} {
 }
 
 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
     
@@ -284,7 +285,7 @@ proc fail {msg} {
 }
 
 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
@@ -294,7 +295,7 @@ proc ensure_connecting {} {
     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