weird strfind problem on testdrive 4
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

weird strfind problem on testdrive 4

Started by plop, 25 November, 2003, 02:20:54

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

plop

these 2 are the problem.
local s,e,string = strfind(usr.sMyInfoString, "(%b<>)%$")
local s,e,tag = strfind(user.sMyInfoString,"(%b<>)%$")
both work on 0.3.3.0
but the last 1 doesn't seem 2 wanne work on testdrive (4), on NewUserCon... it returns nil, but on DataArival it works fine again.


plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

c h i l l a

simple on dataarrival  the user got no sMyInfoString..  maybe a few seconds later  do it like this...

function NewUserConnected(curUser)
	local s,e,string = strfind(curUser.sMyInfoString, "(%b<>)%$") 
	if string then
		SendToAll(string)
	end
end

function DataArrival(curUser, data)
	if (strsub(data,1,7) == "$MyINFO") then
		local s,e,tag = strfind(data,"(%b<>)%$")
		if tag then
			SendToAll(tag)
		end
	end
end

plop

no it's the oposite.
on dataarival it is there, but on newuserconnected not.

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

c h i l l a

lol i got it the other way around, lol

plop

#4
QuoteOriginally posted by NotRabidWombat
Try "(%b<>)$" instead of "(%b<>)%$"

Your search was looking for <....>$ because you escaped the $ (normally anchor to the end)

-NotRabidWombat
i do want 2 find that $, this 2 make sure i get the right tag incase some wiseass enters with 2 tags.
$MyINFO $ALL [TGA-OP]plop ikke<++ V:0.305,M:A,H:1/1/0,S:2><++ V:0.304,M:A,H:0/1/1,S:4>$ $DSL$halllllllllllo$202528377070$
the last tag as you know is the real and has that trailing $.

plop

* good 2 see you back buddy, hope it's 2 stay, sure missing you a lot.
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

[ES]latinmusic

Notrabit huh? Nice to see around one more time!.

NotRabidWombat

#6
Oh I see. I misunderstood. I thought you were trying to do the same thing a different way, ie: anchoring at the end so they couldn't be sneaky. Nice way of doing it :-)

I tried it out:
function NewUserConnected(curUser)
	local s,e,string = strfind(curUser.sMyInfoString, "(%b<>)%$") 

	SendToAll("test", string or "nil");
end
and this produced:

[01:15] <++ V:0.305,M:A,H:1/0/1,S:3>
[01:16] <++ V:0.305,M:A,H:1/0/0,S:4>

See if this simple version works or maybe you have a crazy TestDrive 4 to go with your crazybot ;-)

Sorry guys, I'm just popping in to let you all know I'm alive. And scheming :-D

-NotRabidWombat


I like childish behavior. Maybe this post will be deleted next.

plop

lol, the crazyness must be infective.
i now see i posted it wrong in the start, problem is the other way around, 0.3.3.0 gives the problem.  lol
artificial insanety is the bot were faking a tag is the worsed idea, if it's done slightly bad your kicked or even banned.
allready seen guy's complain about it on the stealth forum. gnagnagna.
thats for me the best compliment i can get.

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

Optimus

Yes Rabid me also find it nice to see you back on the forum... You allways have been most helpfull thx

well me leave it like this... Mr. Bunny  :]

SMF spam blocked by CleanTalk