Here is the the biginning of the script i want to write.
I know that i shoult process all the commands, like PM, ConnectToMe,......
At first, i've a problem : all unregged users are automatically unlogged from the hubUserList.
Sorry for my poor english spoken(french)
Script :
--------------------------------------------------------------
PrefixProfLvl1 = "[]"
PrefixProfLvl2 = "[?]"
PrefixProfLvl3 = "[??]"
PrefixProfLvl4 = "[???]"
PrefixOp = "[?OP?]"
ProfileList = nil
PrefixedUser = {}
function Main()
frmHub:EnableFullData(1)
end
function NewUserConnected(curUser)
if curUser.iProfile ~= "-1" then
local PrefixedDesc
frmHub:UnregBot(curUser.sName)
PrefixedDesc = gsub(curUser.sMyInfoString, curUser.sName, AffectPrefixReg(curUser)..curUser.sName)
PrefixedUser[curUser.sName] = PrefixedDesc
SendToAll(PrefixedDesc)
end
end
function OpConnected(curUser)
local PrefixedDesc
frmHub:UnregBot(curUser.sName)
PrefixedDesc = gsub(curUser.sMyInfoString, curUser.sName, PrefixOp..curUser.sName)
PrefixedUser[curUser.sName] = PrefixedDesc
SendToAll(PrefixedDesc)
end
function DataArrival(curUser, data)
local idPrefixed
if strsub(data,1,12)=="$MyINFO $ALL" then
for idPrefixed, user in PrefixedUser do
curUser:SendData(PrefixedUser[idPrefixed])
end
end
end
function AffectPrefixReg(user)
local Prefix
if user.iProfile ~= -1 then
if user.iProfile == 1 then
Prefix = PrefixProfLvl1
elseif user.iProfile == 2 then
Prefix = PrefixProfLvl1
elseif user.iProfile == 3 then
Prefix = PrefixProfLvl2
elseif user.iProfile == 4 then
Prefix = PrefixProfLvl3
end
return Prefix
end
end
--------------------------------------------------------------------
I want to add spaces in the Op Prefix, like : ? nick ?
but, it doesn't work :(
Tks for your help
PenDraggon
QuoteOriginally posted by PenDraggon
Here is the the biginning of the script i want to write.
I know that i shoult process all the commands, like PM, ConnectToMe,......
At first, i've a problem : all unregged users are automatically unlogged from the hubUserList.
Sorry for my poor english spoken(french)
I want to add spaces in the Op Prefix, like : ? nick ?
but, it doesn't work :(
Tks for your help
PenDraggon
aaaah now i fully get what you mean.
well 2 start with you can't have nick's with spaces.
a space is used 2 seperate the nick from the description.
next problem, fully changing the nicks of users login in only confuses the clients, doing it on every data being send gives some problems 2 as you have 2 enable full data 2 be send 2 the scripts.
now here comes a problem again, you can't alter all of that , so it's not a to good idea.
but what can be done is 2 make a script witch regs users with a prefix like you would like them 2 have.
for example i'm a user in your hub and i trigger the command !regme
.
the the bot changes my nick from plop 2 ?plop?.
same can be done for adding op's, plop gets changed for [op]plop.
it's a way in the middle, you force every1 2 follow your idea's for nicks.
plop