hubinfo script ( not workin )
 

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

hubinfo script ( not workin )

Started by b_w_johan, 04 March, 2005, 08:33:47

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

b_w_johan

ok i have found the script where im looking for....

copyd all parts of it i thought i could use ...

but some how it isn't working....
no errors but no reply to what it should do ...
QuotebotName = "test"
function Main()
   frmHub:RegBot(botName)
   SendToAll("   ? "..botName.." launched"..date(" the %d/%m/%Y at %X ")..". ? type !info to test")
end

function NewUserConnected(user)

end


if(cmd=="!info") then
   doInfo(user)
   return 1
end

function doInfo(user)
   user:SendData(botName,"You are in "..frmHub:GetHubName()..".|")                  -- hubname
   user:SendData(botName,"The description is "..frmHub:GetHubDescr()..".|")            -- discriptie
   user:SendData(botName,"There are "..frmHub:GetUsersCount().." users in the hub at the moment.|")   -- aantal users
   user:SendData(botName,"Redirect adress is "..frmHub:GetRedirectAddress()..".|")            -- redirectadres
   if frmHub:GetRedirectAll()==0 then
      user:SendData(botName,"New users are not redirected.|")                  -- als geen adres
   else
      user:SendData(botName,"New users are redirected to "..frmHub:GetRedirectAddress()..".|")   -- als wel adres
   end
   if frmHub:GetRedirectFull()==0 then
      user:SendData(botName,"New users are not redirected if the hub is full.|")         -- bij vol niet redirect
   else
      user:SendData(botName,"New users are redirect to "..frmHub:GetRedirectAddress()..".|")      -- bij vol wel redirect
   end
   user:SendData(botName,"Hub registed at hubs lists "..frmHub:GetRegServer()..".|")         -- registerd in hublists
   user:SendData(botName,"Max users set to "..frmHub:GetMaxUsers()..".|")               -- maxusers
   user:SendData(botName,"Max slots set to "..maxslots..".|")                  -- maxslots
end

thats what i want to see ...
minshare maxshare minslots maxslots and stuff in script above ...
but now it isn't working and i don't get why not ..
must be something stupid to miss =-p


(its from bot called "slim - en.lua" (dll from plops site =-p ))

checkout http://wwhublist.com/index.php for my World Wide HubList project!

[UK]Madman

function NewUserConnected(user)

end
 
 

Can be removed, as its not doing anything.

if(cmd=="!info") then 
doInfo(user) 
return 1 
end

Will need to read -

function DataArrival(user,data)
data=strsub(data,1,strlen(data)-1)
s,e,cmd = strfind(data,"%b<>%s+(%S+)")

if cmd=="!info" then
doInfo(user)
return 1
end

NightLitch

Here this code is for the New PtokaX with Lua5

not tested but should work

botName = "test"
maxslots = 30

function Main()
	frmHub:RegBot(botName)
	SendToAll(" ? "..botName.." launched"..os.date(" the %d/%m/%Y at %X ")..". ? type !info to test")
end

function ChatArrival(user,data)
	local _,_,cmd = string.find(data, "(%S+)%|")
	if(cmd=="!info") then
		doInfo(user)
		return 1
	end
end

function doInfo(user)
user:SendData(botName,"You are in "..frmHub:GetHubName()..".|") -- hubname
user:SendData(botName,"The description is "..frmHub:GetHubDescr()..".|") -- discriptie
user:SendData(botName,"There are "..frmHub:GetUsersCount().." users in the hub at the moment.|") -- aantal users
user:SendData(botName,"Redirect adress is "..frmHub:GetRedirectAddress()..".|") -- redirectadres
if frmHub:GetRedirectAll()==0 then
user:SendData(botName,"New users are not redirected.|") -- als geen adres
else
user:SendData(botName,"New users are redirected to "..frmHub:GetRedirectAddress()..".|") -- als wel adres
end
if frmHub:GetRedirectFull()==0 then
user:SendData(botName,"New users are not redirected if the hub is full.|") -- bij vol niet redirect
else
user:SendData(botName,"New users are redirect to "..frmHub:GetRedirectAddress()..".|") -- bij vol wel redirect
end
user:SendData(botName,"Hub registed at hubs lists "..frmHub:GetRegServer()..".|") -- registerd in hublists
user:SendData(botName,"Max users set to "..frmHub:GetMaxUsers()..".|") -- maxusers
user:SendData(botName,"Max slots set to "..maxslots..".|") -- maxslots
end

// NL
//NL

b_w_johan

Thx,

its working perfect here =-p

greetings Johan
checkout http://wwhublist.com/index.php for my World Wide HubList project!

b_w_johan

i was wondering is there a possibility to add this:

it shows names of all registerd OPs and Masters not passwords afcourse =-p

cause the network owners want to see that to ...

maybe possible with another command ..
no !info but !regs or something

Greetings Johan
checkout http://wwhublist.com/index.php for my World Wide HubList project!

SMF spam blocked by CleanTalk