PtokaX forum

Archive => Archived 5.0 boards => Request for scripts => Topic started by: Northwind on 17 October, 2005, 03:26:58

Title: Basic userlimit
Post by: Northwind on 17 October, 2005, 03:26:58
didnt find any script what does this...

!userlimit
Title:
Post by: 6Marilyn6Manson6 on 17 October, 2005, 10:32:57
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
Title:
Post by: Northwind on 17 October, 2005, 11:53:27
thank you, have to test it...

edit
Working just fine but how can i change bots name, it allways says <1> as botname ???
Title:
Post by: Madman on 17 October, 2005, 12:15:13
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...
Title:
Post by: 6Marilyn6Manson6 on 17 October, 2005, 13:00:08
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 :)
Title:
Post by: Northwind on 17 October, 2005, 15:54:59
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.
Title:
Post by: Cêñoßy†ê on 17 October, 2005, 23:34:28
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 (http://board.univ-angers.fr/thread.php?threadid=5390&boardid=28&styleid=1&sid=2e22db016996e533e824aa50e61786cf)
Title:
Post by: Northwind on 18 October, 2005, 01:21:06
thanks... kiitos ;-)