Basic userlimit
 

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

Basic userlimit

Started by Northwind, 17 October, 2005, 03:26:58

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Northwind

didnt find any script what does this...

!userlimit


6Marilyn6Manson6

Try this:

iMaxLogins = frmHub:GetMaxLogins()
iLevelHubOwner = 0

function ChatArrival(user, data)
   if user.iProfile == iLevelHubOwner then
	local s,e,sCom, iVal = string.find(data, "%b<>%s+(%S+)%s*(%S*).*|")
	if sCom then
	   if sCom == "!userlimit" then
		if iVal == "" then
		   iVal = iMaxLogins
		else
		   iVal = tonumber(iVal)
		end
		frmHub:SetMaxLogins(iVal)
		user:SendData(frmHub:GetHubBot(), "Max Logins changed to: "..iVal)
		return 1
	   elseif sCom == "!getuserlimit" then
		user:SendData(frmHub:GetHubBot(), "Max Logins is set to: "..frmHub:GetMaxLogins())
		return 1
	   end
	end
   end
end

c ya

Northwind

#2
thank you, have to test it...

edit
Working just fine but how can i change bots name, it allways says <1> as botname ???


Madman

QuoteOriginally posted by Northwind
thank you, have to test it...

edit
Working just fine but how can i change bots name, it allways says <1> as botname ???

change
user:SendData(frmHub:GetHubBot()
to
user:SendData(frmHub:GetHubBotName()
and it will have the hub bot name...
We suffer in silence, we lurk in the shadows, we kill in the night
Site currently down, ETA of returning online is 2099 ;p

6Marilyn6Manson6

QuoteOriginally posted by madman
QuoteOriginally posted by Northwind
thank you, have to test it...

edit
Working just fine but how can i change bots name, it allways says <1> as botname ???

change
user:SendData(frmHub:GetHubBot()
to
user:SendData(frmHub:GetHubBotName()
and it will have the hub bot name...


thanks Madman :)

Northwind

#5
can you 6m6m6 or madman add one thing more tot his awesome script. User redirection when hub is full... ;-) like it is in hubs first page, where userlimit is.


Cêñoßy†ê

QuoteOriginally posted by Northwind
can you 6m6m6 or madman add one thing more tot his awesome script. User redirection when hub is full... ;-) like it is in hubs first page, where userlimit is.

Mayby this will help u
Powered By Leviathan™ 2nd Generation v. 1.9

Northwind

thanks... kiitos ;-)


SMF spam blocked by CleanTalk