Author Topic: *Connection type: way to parse,....  (Read 1748 times)

0 Members and 1 Guest are viewing this topic.

Offline Guibs

  • Double Ace
  • *
  • Posts: 142
  • Karma: +3/-0
*Connection type: way to parse,....
« on: 07 November, 2003, 01:58:44 »
Hi all,,

Because i've spent a >lot of time< on it (lol),... i post the 'good' way to parse the info to get the correct connection type,...
-----
s,e,connection = strfind(data,"[$]+[^$]+[$]+[^$]+[$]+[^$]+[$]+([^$]+)")
-----
Because before,, i get some beautifull:
---
connection = "DSL"
---
loOol

Enjoy it,, :)

l8tr,, ;)
-- Please,... don\'t ask help in Pm,...Forums are made for that, to help everyone & my Inbox pm will be safe,... Thks,,  :))  --
CB forum     /     CB Home page

PtokaX forum

*Connection type: way to parse,....
« on: 07 November, 2003, 01:58:44 »

Offline Guibs

  • Double Ace
  • *
  • Posts: 142
  • Karma: +3/-0
(No subject)
« Reply #1 on: 07 November, 2003, 05:28:39 »
Hmm,,,

Sometime,, with Dc clients,, it seems it wasn't 'perfect',...

That one seems to work better,,
---------
Code: [Select]
s,e,connection = strfind(data,"[$]+[^$]+[$]+[^$]+[$]+[^$]+[$]+([^$]+)")

if connection  ~= nil then
if strfind(connection,"") then
vstart = strfind(data,connection)
vlenght = strlen(connection)-1
realconnection = strsub(data,vstart,vlenght)
s,e,realconnection = strfind(connection,"(%S+)")
connection = realconnection
end
end

---------

l8tr,,
-- Please,... don\'t ask help in Pm,...Forums are made for that, to help everyone & my Inbox pm will be safe,... Thks,,  :))  --
CB forum     /     CB Home page

PtokaX forum

(No subject)
« Reply #1 on: 07 November, 2003, 05:28:39 »