PtokaX forum

Archive => Archived 5.1 boards => Request for scripts => Topic started by: meltnmold on 31 January, 2011, 14:36:06

Title: No Public Hubs script for Ptokax 3.3.21 ??
Post by: meltnmold on 31 January, 2011, 14:36:06
I'm looking for a script to kick users who login to a private hub while also logging in to a Public (UnRegged) hub. I'm no longer running a hub since I moved and only can get dial-up for now but need the script for a friend who is still running 3.3.21 and 0.306 since she, and her users, don't want to get into hashing. I can't talk her into upgrading since everything is working now and she's afraid she won't be able to upgrade without crashing the hub. I can walk her through little things but in a week she's forgotten how to do it and we're over 900 miles apart so I need to keep things as simple as possible.

Is there such a script still floating around?

Thanks.....
Title: Re: No Public Hubs script for Ptokax 3.3.21 ??
Post by: Psycho_Chihuahua on 31 January, 2011, 18:17:53
Perhaps this is what you want --> NO Public Bot (http://forum.ptokax.org/index.php?topic=5056#msg51687)
Title: Re: No Public Hubs script for Ptokax 3.3.21 ??
Post by: meltnmold on 31 January, 2011, 21:22:43
Thank you but unless I made an error, I had sent that to her and after taking several days to walk her through installing it, she said it did not work but one of her users, who also runs another hub (not Ptokax however) had a script which kicked a user who had logged into her hub, his hub and a public hub at the same time.

This is what I had found and sent to her:
-----------------------------------------------------------------

-- Anti Open Hub Bot
-- by NightLitch
-- minor bugfix by psycho_chihuahua
DisconnectMessage = "Please close the public Hubs."
function DataArrival( sUser , sData )
if strsub( sData , 1 , 7 ) == "$MyINFO" then
local _,_,openhubs = strfind( sData , ".+H%d+)" );
if ( openhubs ~= "0" ) then
SendToNick( sUser.sName , DisconnectMessage )
sUserisconnect()
end
end
end

---------------------------------------------------------------
Title: Re: No Public Hubs script for Ptokax 3.3.21 ??
Post by: meltnmold on 31 January, 2011, 21:35:19
Ahhhhhhhh I see a difference in Line 7..... from the one I sent and the one you just posted the link to..... I just copied it from where I found it but it appears either something got left out when the other person posted it or when I copied it...

There's one parentheses and a colon missing in the copy I had. Could that be the reason it didn't work for her?


local _,_,openhubs = strfind( sData , ".+H:(%d+)" );
Title: Re: No Public Hubs script for Ptokax 3.3.21 ??
Post by: Psycho_Chihuahua on 01 February, 2011, 01:17:49
Last one was --> This one (http://forum.ptokax.org/index.php?topic=5056#msg51709). For such an old Ptokax version there is nothing else, 3.3.21 is long outdated and no longer supported.
Title: Re: No Public Hubs script for Ptokax 3.3.21 ??
Post by: meltnmold on 01 February, 2011, 06:33:26
But that one was converted to Lua 5?