[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  scroll back while displaying recent text

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?
(New message)
Subject: scroll back while displaying recent text
Name:
Your forum user name.
Register forum user name
Password:
Your forum password.
Forgotten password?
Message:
Message to be posted (in English, please).
Forum codes:
Check this if your message uses 'forum codes' or templates (auto-detected for new posts).
Forum codes Templates

Save this message ...


Subject review (reverse sequence)

Pages: 1 2  3  

Posted by LupusFatalis   (154 posts)  [Biography] bio
Date Mon 25 May 2009 06:34 AM (UTC)  quote  ]
Message
Checked it out. That is exactly that I imagining at the beginning of this (except matching colors, but no big deal there).

Much thanks!
[Go to top] top

Posted by Nick Gammon   Australia  (18,797 posts)  [Biography] bio   Forum Administrator
Date Sun 24 May 2009 04:50 AM (UTC)  quote  ]
Message
Quote:

Basically, what I want to happen is have the most recent lines (perhaps 10) still displayed at the bottom whenever I scroll back. This way I'm able to react to current events while looking back in time.


See: http://www.gammon.com.au/forum/?id=9454

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by LupusFatalis   (154 posts)  [Biography] bio
Date Sun 03 May 2009 06:49 AM (UTC)  quote  ]
Message
So far so good! Thanks again nick.
[Go to top] top

Posted by Nick Gammon   Australia  (18,797 posts)  [Biography] bio   Forum Administrator
Date Sun 03 May 2009 03:42 AM (UTC)  quote  ]
Message
It looks like you are getting telnet sequences. This stuff:


0a ff fc 01 ff fc 03 3e 20


is:


  • newline (oa)
  • IAC WONT 01 (I won't echo)
  • IAC WONT 03 (I won't suppress go-ahead)


The extras stuff before the prompt (who knows why it is there exactly?) is what is stopping the plugin suppress the prompt. I'm not sure if we should completely eliminate it, but probably changing the order is OK. eg.

Change:


-- get rid of carriage-returns, add new packet to existing partial one

  partial = partial .. string.gsub (s, "\r", "")



to:


-- get rid of carriage-returns, add new packet to existing partial one

  partial = partial .. string.gsub (s, "\r", "")

  partial = string.gsub (partial, "\n\255\252\001", "\255\252\001\n")
  partial = string.gsub (partial, "\n\255\252\003", "\255\252\003\n")


This is moving the telnet stuff to before the newline, so it will still be processed by MUSHclient, however now the tests further down will notice the prompt following the newline.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by LupusFatalis   (154 posts)  [Biography] bio
Date Thu 30 Apr 2009 08:52 PM (UTC)  quote  ]
Message
Ok, this is just the relevant parts of the packets I believe but here is what happens, I log in, and get my room desc. I send anything to the mud and get the response beginning with > .... Now i'm not sure if this error will crop up in other situations, but if possible I want to eliminate it.

50 33 36 6d 77 65 73 74 1b 5b 30 6d 2e 0d 0a 35 30
2 iron weights.. 32 20 69 72 6f 6e 20 77 65 69 67 68 74 73 2e 0d
.ÿü.ÿü.> 0a ff fc 01 ff fc 03 3e 20

Sent packet: 3 (3 bytes) at Thursday, April 30, 2009, 4:43:16 PM

l.. 6c 0d 0a

Incoming packet: 4 (409 bytes) at Thursday, April 30, 2009, 4:43:17 PM

.[1mA garden.[0m 1b 5b 31 6d 41 20 67 61 72 64 65 6e 1b 5b 30 6d
..A small garden 0d 0a 41 20 73 6d 61 6c 6c 20 67 61 72 64 65 6e
looks very well 20 6c 6f 6f 6b 73 20 76 65 72 79 20 77 65 6c 6c
tended.

...502 iron weights.
> A garden
A small garden looks very well tended.

At the moment, I've modified the code a little... it is as follows:
partial = ""

function OnPluginPacketReceived (s)

  local t = {}  -- table of reassembled lines

  if s == "> " then
    s = ""
  end

  -- get rid of carriage-returns, add new packet to existing partial one

  partial = partial .. string.gsub (s, "\r", "")

  -- turn finished lines into table t
  
  partial = string.gsub (partial, "(.-)\n", 
    function (line) 
      
      -- remove prompt as we add to the table
      
      line = string.gsub (line, "^\027%[0m> ", "\027[0m", 1)
      line = string.gsub (line, "^> ", "", 1)
         
      if line ~= "" then
        table.insert (t, line) 
      end -- if not empty
      
      return ""
    end) -- function
  
  if #t > 0 then
    table.insert (t, "")  -- to get final linefeed
  end -- if
    
  -- return table of lines, concatenated with newlines between each one
  return table.concat (t, "\n")

end
[Go to top] top

Posted by LupusFatalis   (154 posts)  [Biography] bio
Date Tue 28 Apr 2009 02:30 AM (UTC)  quote  ]
Message
Ah, that works much better. I haven't rigorously tested to find where it doesn't work as desired. It seems like when getting and mud mail I have to disable it. No big deal there. If I get any glaring errors I'll give a post about it. But so far so good, thanks a lot bud.
[Go to top] top

Posted by Nick Gammon   Australia  (18,797 posts)  [Biography] bio   Forum Administrator
Date Sun 26 Apr 2009 09:40 PM (UTC)  quote  ]

Amended on Sun 26 Apr 2009 09:43 PM (UTC) by Nick Gammon

Message
More simply, you might fix up the prompts as you build the table, like this:


partial = ""

function OnPluginPacketReceived (s)

  local t = {}  -- table of reassembled lines

  -- get rid of carriage-returns, add new packet to existing partial one
  
  partial = partial .. string.gsub (s, "\r", "")

  -- turn finished lines into table t
  
  partial = string.gsub (partial, "(.-)\n", 
    function (line) 
      
      -- remove prompt as we add to the table
      
      line = string.gsub (line, "^\027%[0m> ", "\027[0m", 1)
      line = string.gsub (line, "^> ", "", 1)
         
      if line ~= "" then
        table.insert (t, line) 
      end -- if not empty
      
      return ""
    end) -- function
  
  if #t > 0 then
    table.insert (t, "")  -- to get final linefeed
  end -- if
    
  -- return table of lines, concatenated with newlines between each one
  return table.concat (t, "\n")

end -- OnPluginPacketReceived


- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Nick Gammon   Australia  (18,797 posts)  [Biography] bio   Forum Administrator
Date Sun 26 Apr 2009 09:26 PM (UTC)  quote  ]

Amended on Sun 26 Apr 2009 09:27 PM (UTC) by Nick Gammon

Message
Quote:

partial = string.gsub (partial, "(.-)\n",
function (line)
table.insert (t, line)
return ""
end)

partial = string.gsub (partial, "\r\n\027%[0m> ", "\n\027%[0m")
partial = string.gsub (partial, "\r\n> ", "\n")


No, once you have done the string.gsub, all the lines except the last partial one will be in the table "t", not in the string "partial", so doing a string.gsub on that won't achieve anything.

So now you have a table of lines, so you do your matches on that, eg.


partial = ""

function OnPluginPacketReceived (s)

  -- get rid of carriage-returns
  
  partial = partial .. string.gsub (s, "\r", "")
  local t = {}

  -- turn finished lines into table t
  
  partial = string.gsub (partial, "(.-)\n", 
    function (line) 
    table.insert (t, line) 
    return ""
    end)

  -- get rid of prompts  (in a regexp, ^ indicates the start of a line)
  
  for i, line in ipairs (t) do
    t [i] = string.gsub (line, "^\027%[0m> ", "\027%[0m")
    t [i] = string.gsub (line, "^> ", "")
  end -- for
  
  -- reassemble completed packet with line-based corrections
  
  local fixed_packet = ""
  
  -- drop completely empty lines
  for i, line in ipairs (t) do
    if line ~= "" then
      fixed_packet = fixed_packet .. line .. "\n"
    end -- if
  end -- for
  
  return fixed_packet

end -- OnPluginPacketReceived


(Disclaimer: I didn't test or compile the above code).

Quote:

It doesn't actually display the query "Name:" and "Password:" until after I have already typed them in...


That is exactly what you expect to happen if you batch up lines until you get a newline character. You probably need to do nothing with the incoming packets until some flag is set to indicate you have finished the login sequence.

Or, use the "auto-login" function in MUSHclient which sends down the username and password as soon as you connect, so they will be supplied even if you don't see the question.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by LupusFatalis   (154 posts)  [Biography] bio
Date Sat 25 Apr 2009 07:57 PM (UTC)  quote  ]
Message
3)
Incoming packet: 8 (999 bytes) at Saturday, April 25, 2009, 3:42:08 PM

.[36m       Name   1b 5b 33 36 6d 20 20 20 20 20 20 20 4e 61 6d 65
                   20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
     Idle          20 20 20 20 20 49 64 6c 65 20 20 20 20 20 20 20
    Name           20 20 20 20 4e 61 6d 65 20 20 20 20 20 20 20 20
             Idl   20 20 20 20 20 20 20 20 20 20 20 20 20 49 64 6c
e.[0m..       .[   65 1b 5b 30 6d 0d 0a 20 20 20 20 20 20 20 1b 5b
1;31ma determine   31 3b 33 31 6d 61 20 64 65 74 65 72 6d 69 6e 65
d ranger.[0m       64 20 72 61 6e 67 65 72 1b 5b 30 6d 20 20 20 20
  1m 46s           20 20 31 6d 20 34 36 73 20 20 20 20 20 20 20 20
 .[0;36ma furry    20 1b 5b 30 3b 33 36 6d 61 20 66 75 72 72 79 20
herbalist.[0m      68 65 72 62 61 6c 69 73 74 1b 5b 30 6d 20 20 20
     2s      ..    20 20 20 20 20 32 73 20 20 20 20 20 20 0d 0a 20
      a hapless    20 20 20 20 20 20 61 20 68 61 70 6c 65 73 73 20
adventurer     1   61 64 76 65 6e 74 75 72 65 72 20 20 20 20 20 31
2s            .[   32 73 20 20 20 20 20 20 20 20 20 20 20 20 1b 5b
1;36ma helpful c   31 3b 33 36 6d 61 20 68 65 6c 70 66 75 6c 20 63
rafter.[0m         72 61 66 74 65 72 1b 5b 30 6d 20 20 20 20 20 20
  14s     ..       20 20 31 34 73 20 20 20 20 20 0d 0a 20 20 20 20
   .[1;36ma hung   20 20 20 1b 5b 31 3b 33 36 6d 61 20 68 75 6e 67
ry houri.[0m       72 79 20 68 6f 75 72 69 1b 5b 30 6d 20 20 20 20
       20s         20 20 20 20 20 20 20 32 30 73 20 20 20 20 20 20
      .[1;37ma p   20 20 20 20 20 20 1b 5b 31 3b 33 37 6d 61 20 70
atient wanderer.   61 74 69 65 6e 74 20 77 61 6e 64 65 72 65 72 1b
[0m       16s      5b 30 6d 20 20 20 20 20 20 20 31 36 73 20 20 20
  ..       .[1;3   20 20 0d 0a 20 20 20 20 20 20 20 1b 5b 31 3b 33
3ma peerless cat   33 6d 61 20 70 65 65 72 6c 65 73 73 20 63 61 74
folk.[0m       4   66 6f 6c 6b 1b 5b 30 6d 20 20 20 20 20 20 20 34
s             .[   73 20 20 20 20 20 20 20 20 20 20 20 20 20 1b 5b
1;37ma sparkly e   31 3b 33 37 6d 61 20 73 70 61 72 6b 6c 79 20 65
lfess.[0m          6c 66 65 73 73 1b 5b 30 6d 20 20 20 20 20 20 20
  4s      ..       20 20 34 73 20 20 20 20 20 20 0d 0a 20 20 20 20
   Abraxas the r   20 20 20 41 62 72 61 78 61 73 20 74 68 65 20 72
owan        14s    6f 77 61 6e 20 20 20 20 20 20 20 20 31 34 73 20
           Avar    20 20 20 20 20 20 20 20 20 20 20 41 76 61 72 20
the gnome          74 68 65 20 67 6e 6f 6d 65 20 20 20 20 20 20 20
    2s      ..     20 20 20 20 32 73 20 20 20 20 20 20 0d 0a 20 20
     Azoron the    20 20 20 20 20 41 7a 6f 72 6f 6e 20 74 68 65 20
rowan         10   72 6f 77 61 6e 20 20 20 20 20 20 20 20 20 31 30
s            Cat   73 20 20 20 20 20 20 20 20 20 20 20 20 43 61 74
era the braman     65 72 61 20 74 68 65 20 62 72 61 6d 61 6e 20 20
      34s     ..   20 20 20 20 20 20 33 34 73 20 20 20 20 20 0d 0a
       Daelin th   20 20 20 20 20 20 20 44 61 65 6c 69 6e 20 74 68
e human            65 20 68 75 6d 61 6e 20 20 20 20 20 20 20 20 20
56s            D   35 36 73 20 20 20 20 20 20 20 20 20 20 20 20 44
omik the human     6f 6d 69 6b 20 74 68 65 20 68 75 6d 61 6e 20 20
        20s        20 20 20 20 20 20 20 20 32 30 73 20 20 20 20 20
..       Fisher    0d 0a 20 20 20 20 20 20 20 46 69 73 68 65 72 20
the human          74 68 65 20 68 75 6d 61 6e 20 20 20 20 20 20 20
  38s       .[32   20 20 33 38 73 20 20 20 20 20 20 20 1b 5b 33 32
m[.[0m.[31mB.[0m   6d 5b 1b 5b 30 6d 1b 5b 33 31 6d 42 1b 5b 30 6d
.[37mH.[0m.[32m]   1b 5b 33 37 6d 48 1b 5b 30 6d 1b 5b 33 32 6d 5d
.[0m Kuktuchik t   1b 5b 30 6d 20 4b 75 6b 74 75 63 68 69 6b 20 74
he spyder          68 65 20 73 70 79 64 65 72 20 20 20 20 20 20 20
      ..  .[32m[   20 20 20 20 20 20 0d 0a 20 20 1b 5b 33 32 6d 5b
.[0m.[31mB.[0m.[   1b 5b 30 6d 1b 5b 33 31 6d 42 1b 5b 30 6d 1b 5b
37mH.[0m.[32m].[   33 37 6d 48 1b 5b 30 6d 1b 5b 33 32 6d 5d 1b 5b
0m Napala the el   30 6d 20 4e 61 70 61 6c 61 20 74 68 65 20 65 6c
f           3m 5   66 20 20 20 20 20 20 20 20 20 20 20 33 6d 20 35
2s         Wodeu   32 73 20 20 20 20 20 20 20 20 20 57 6f 64 65 75
m the human        6d 20 74 68 65 20 68 75 6d 61 6e 20 20 20 20 20
    2s      ...[   20 20 20 20 32 73 20 20 20 20 20 20 0d 0a 1b 5b
36m  We extrapol   33 36 6d 20 20 57 65 20 65 78 74 72 61 70 6f 6c
ate tha            61 74 65 20 74 68 61

Incoming packet: 9 (25 bytes) at Saturday, April 25, 2009, 3:42:08 PM

t there are 23 p   74 20 74 68 65 72 65 20 61 72 65 20 32 33 20 70
layers on          6c 61 79 65 72 73 20 6f 6e

Incoming packet: 10 (226 bytes) at Saturday, April 25, 2009, 3:42:08 PM

.  Only 18 retur   2e 20 20 4f 6e 6c 79 20 31 38 20 72 65 74 75 72
ned their census   6e 65 64 20 74 68 65 69 72 20 63 65 6e 73 75 73
 forms...  Most    20 66 6f 72 6d 73 2e 0d 0a 20 20 4d 6f 73 74 20
people seem to b   70 65 6f 70 6c 65 20 73 65 65 6d 20 74 6f 20 62
e in Tirachi rig   65 20 69 6e 20 54 69 72 61 63 68 69 20 72 69 67
ht now...  Estim   68 74 20 6e 6f 77 2e 0d 0a 20 20 45 73 74 69 6d
ated active char   61 74 65 64 20 61 63 74 69 76 65 20 63 68 61 72
acters: 190 this   61 63 74 65 72 73 3a 20 31 39 30 20 74 68 69 73
 month, 70 today   20 6d 6f 6e 74 68 2c 20 37 30 20 74 6f 64 61 79
...  Ferdarchi w   2e 0d 0a 20 20 46 65 72 64 61 72 63 68 69 20 77
as last renewed    61 73 20 6c 61 73 74 20 72 65 6e 65 77 65 64 20
12 days 4 hours    31 32 20 64 61 79 73 20 34 20 68 6f 75 72 73 20
13 minutes 20 se   31 33 20 6d 69 6e 75 74 65 73 20 32 30 20 73 65
conds ago....[0m   63 6f 6e 64 73 20 61 67 6f 2e 0d 0a 1b 5b 30 6d
>                  3e 20

Sent  packet: 6 (3 bytes) at Saturday, April 25, 2009, 3:42:10 PM

l..                6c 0d 0a

Incoming packet: 11 (24 bytes) at Saturday, April 25, 2009, 3:42:10 PM

It is pitch blac   49 74 20 69 73 20 70 69 74 63 68 20 62 6c 61 63
k.  ..>            6b 2e 20 20 0d 0a 3e 20


This actually displays as...
[The Who List, etc...]
> It is pitch black.

[Go to top] top

Posted by LupusFatalis   (154 posts)  [Biography] bio
Date Sat 25 Apr 2009 07:55 PM (UTC)  quote  ]
Message
2)
Incoming packet: 5 (5 bytes) at Saturday, April 25, 2009, 3:42:01 PM

ÿü.>               ff fc 03 3e 20

Incoming packet: 6 (47 bytes) at Saturday, April 25, 2009, 3:42:02 PM

.[32mYou're brig   1b 5b 33 32 6d 59 6f 75 27 72 65 20 62 72 69 67
ht-eyed and bush   68 74 2d 65 79 65 64 20 61 6e 64 20 62 75 73 68
y-tailed..[0m..    79 2d 74 61 69 6c 65 64 2e 1b 5b 30 6d 0d 0a


This actually displays as follows:
> You're bright-eyed and bushy-tailed.
[Go to top] top

Posted by LupusFatalis   (154 posts)  [Biography] bio
Date Sat 25 Apr 2009 07:53 PM (UTC)  quote  ]
Message
There are several places where it goes awry:
1)
Incoming packet: 2 (614 bytes) at Saturday, April 25, 2009, 3:41:56 PM

            _..    20 20 20 20 20 20 20 20 20 20 20 20 5f 0d 0a 20
          | |..    20 20 20 20 20 20 20 20 20 20 7c 20 7c 0d 0a 20
   _ _ _ _|:|___   20 20 20 5f 20 5f 20 5f 20 5f 7c 3a 7c 5f 5f 5f
________________   5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f
________________   5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f
___..  O(_|_|_|_   5f 5f 5f 0d 0a 20 20 4f 28 5f 7c 5f 7c 5f 7c 5f
|:|_____________   7c 3a 7c 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f
________________   5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f
_________>..       5f 5f 5f 5f 5f 5f 5f 5f 5f 3e 0d 0a 20 20 20 20
       |:|..       20 20 20 20 20 20 20 7c 3a 7c 0d 0a 20 20 20 20
       |_|   The   20 20 20 20 20 20 20 7c 5f 7c 20 20 20 54 68 65
 Creators of Dar   20 43 72 65 61 74 6f 72 73 20 6f 66 20 44 61 72
tMUD ....          74 4d 55 44 20 0d 0a 0d 0a 20 20 20 20 20 20 20
                   20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
Welcome You To .   57 65 6c 63 6f 6d 65 20 59 6f 75 20 54 6f 20 0d
...                0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20
               T   20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54
he Lands of Ferd   68 65 20 4c 61 6e 64 73 20 6f 66 20 46 65 72 64
archi!..           61 72 63 68 69 21 0d 0a 20 20 20 20 20 20 20 20
                   20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
                   20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
  _..     The or   20 20 5f 0d 0a 20 20 20 20 20 54 68 65 20 6f 72
iginal and still   69 67 69 6e 61 6c 20 61 6e 64 20 73 74 69 6c 6c
 the best!    |    20 74 68 65 20 62 65 73 74 21 20 20 20 20 7c 20
| -Since-..   __   7c 20 2d 53 69 6e 63 65 2d 0d 0a 20 20 20 5f 5f
________________   5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f
________________   5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f
____|:|_ _ _ _ .   5f 5f 5f 5f 7c 3a 7c 5f 20 5f 20 5f 20 5f 20 0d
.  <____________   0a 20 20 3c 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f
________________   5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f
__________|:|_|_   5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 7c 3a 7c 5f 7c 5f
|_|_)O ..          7c 5f 7c 5f 29 4f 20 0d 0a 20 20 20 20 20 20 20
                   20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
                   20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
  |:| ..           20 20 7c 3a 7c 20 0d 0a 20 20 20 20 20 20 20 20
  [Version 1.3.1   20 20 5b 56 65 72 73 69 6f 6e 20 31 2e 33 2e 31
-3.2.1]            2d 33 2e 32 2e 31 5d 20 20 20 20 20 20 20 20 20
 |_| 1 9 9 1....   20 7c 5f 7c 20 31 20 39 20 39 20 31 0d 0a 0d 0a
Name:              4e 61 6d 65 3a 20

Incoming packet: 3 (13 bytes) at Saturday, April 25, 2009, 3:41:59 PM

Password: ÿû.      50 61 73 73 77 6f 72 64 3a 20 ff fb 01


It doesn't actually display the query "Name:" and "Password:" until after I have already typed them in...
[Go to top] top

Posted by LupusFatalis   (154 posts)  [Biography] bio
Date Sat 25 Apr 2009 07:52 PM (UTC)  quote  ]
Message
Ok, now I'm unfamiliar with LUA, so bear with me... Here is what I have after looking at that page...
partial = ""

function OnPluginPacketReceived (s)

	partial = partial .. string.gsub (s, "\r", "")
	t = {}

	partial = string.gsub (partial, "(.-)\n", 
		function (line) 
		table.insert (t, line) 
		return ""
		end)

	partial = string.gsub (partial, "\r\n\027%[0m> ", "\n\027%[0m")
	partial = string.gsub (partial, "\r\n> ", "\n")
	
	if partial == "> " then 
		partial = ""
	end

	if table.getn (t) > 0 then
		table.insert (t, "")
	end

	return table.concat (t, "\n")

end


Now, I hope I'm doing this correctly... The triggering on regular expressions didn't work to get rid of the "> ". So its not currently in the plugin.
[Go to top] top

Posted by Nick Gammon   Australia  (18,797 posts)  [Biography] bio   Forum Administrator
Date Sat 25 Apr 2009 07:02 AM (UTC)  quote  ]
Message
This thread has an example of concatenating packets until you get a whole line:

http://mushclient.com/forum/?id=7430

What you can do in OnPluginPacketReceived is concatenate packets first (storing a partial line in the plugin), and then extract out whole lines. These can then be reliably checked for prompts.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by LupusFatalis   (154 posts)  [Biography] bio
Date Sat 25 Apr 2009 06:54 AM (UTC)  quote  ]
Message
hmm... I guess its a no-go then. No biggy, I'll try to look at it later when I understand more about these packets and such. Thanks again though.
[Go to top] top

Posted by Nick Gammon   Australia  (18,797 posts)  [Biography] bio   Forum Administrator
Date Sat 25 Apr 2009 04:20 AM (UTC)  quote  ]
Message
You mean the very last one? Looks like it is at the end of the packet (999 bytes) and probably the MUD has broken the output up at the 999 byte mark. It is hard to catch those without batching up packets.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


7,782 views.

This is page 1, subject is 3 pages long: 1 2  3  [Next page]

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]