Start checking codebase with the codespell tool
[mudpy.git] / mudpy / telnet.py
index 35fb1c6..ec18f70 100644 (file)
@@ -188,7 +188,7 @@ def negotiate_telnet_options(user):
     # make a local copy to play with
     text = user.partial_input
 
-    # start at the begining of the input
+    # start at the beginning of the input
     position = 0
 
     # as long as we haven't checked it all
@@ -269,6 +269,8 @@ def negotiate_telnet_options(user):
                 if telopt is TELOPT_NAWS:
                     user.columns = (
                         text[position + 3] * 256 + text[position + 4])
+                    user.rows = (
+                        text[position + 5] * 256 + text[position + 6])
                 elif telopt is TELOPT_TTYPE and text[position + 3] is IS:
                     user.ttype = (
                         text[position + 4:end_subnegotiation]).decode("ascii")
@@ -281,7 +283,7 @@ def negotiate_telnet_options(user):
             log("Ignored unknown command %s from" % command, user)
             text = text[:position] + text[position + 2:]
 
-        # and this means we got the begining of an IAC
+        # and this means we got the beginning of an IAC
         else:
             position += 1