<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<!-- Saved on Saturday, July 23, 2005, 11:04 AM -->
<!-- MuClient version 3.66 -->

<!-- Plugin "ProcessBackspaces" generated by Plugin Wizard -->

<muclient>
<plugin
   name="ProcessBackspaces"
   author="Nick Gammon"
   id="c4fef242b44904d009ade8a0"
   language="Lua"
   purpose="Process backspace characters in individual packets"
   date_written="2005-07-23 11:01:38"
   requires="3.59"
   version="1.0"
   >

</plugin>


<!--  Script  -->


<script>
<![CDATA[
function OnPluginPacketReceived (s)

repeat 

  i, j = string.find (s, "\b") -- find backspace
  
  if i then 
    if i <= 1 then
      s = string.sub (s, 2)  -- just delete the backspace
    elseif i == 2 then
      s = string.sub (s, 3)  -- deleting first character
    else
      s = string.sub (s, 1, i - 2) .. string.sub (s, i + 1)
    end -- if i > 1
  end  -- if backspace found

until not i

return s
  
end -- function OnPluginPacketReceived
]]>
</script>


</muclient>
