You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While browsing the backups folder, I found this script I wrote a few years ago. I was wondering if the feature was worth implementing yet again...
functionOnStartup()
tConfig= {
sBotName=SetMan.GetString( 21 ),
sPrefixes="[%!%#%?%/%*%-%+%.]",
tGarble= {
a="4",
e="3",
s="z",
S="5",
A="4",
E="e",
o="0",
O="0",
t="+",
T="7",
l="1",
ph="f",
y="j",
W="\\/\\/",
V="\\/",
x="><"
}
}
tLunarized= {}
tUsingProfiles= {
[-1] =false, -- Regular users
[0] =true, -- Admin
[1] =true, -- Final Years
[2] =true, -- Ops
[3] =true, -- VIPs
[4] =false, -- Moderators
[5] =false, -- Registered users
[6] =false, -- sVIPs
[7] =false-- Gymkhana users
}
endfunctionChatArrival( tUser, sMessage )
local_, _, sCommand, sNick=sMessage:find( "%b<>%s"..tConfig.sPrefixes.."(%w+)%s(%S+)|" )
ifsCommandand (sCommand:lower() =="lunarize" orsCommand:lower() =="lunarise") andtUsingProfiles[tUser.iProfile] thenifnotsNickthenCore.SendToUser( tUser, "<"..tConfig.sBotName.."> Sorry, nickname was not specified." )
returntrueelselocaltTempUser=Core.GetUser( sNick )
ifnottTempUserthenCore.SendToUser( tUser, "<"..tConfig.sBotName.."> Sorry, the user is currently offline." )
returntrueendtLunarized[tTempUser.sNick:lower()] =trueCore.SendToAll( "<"..tConfig.sBotName.."> The user "..tTempUser.sNick.." has been lunarized." )
returntrueendelseifsCommandand (sCommand:lower() =="unlunarize" orsCommand:lower() =="unlunarise") andtUsingProfiles[tUser.iProfile] thenifnotsNickthenCore.SendToUser( tUser, "<"..tConfig.sBotName.."> Sorry, nickname was not specified." )
returntrueelseifnottLunarized[sNick:lower()] thenCore.SendToUser( tUser, "<"..tConfig.sBotName.."> Sorry, the user was not lunarized." )
returntrueendtLunarized[sNick:lower()] =nilCore.SendToAll( "<"..tConfig.sBotName.."> The user "..sNick.." has been unlunarized." )
returntrueendelseifsCommandand (sCommand:lower() =="lunarize" orsCommand:lower() =="lunarise" orsCommand:lower() =="unlunarize" orsCommand:lower() =="unlunarise") andnottUsingProfiles[tUser.iProfile] thenCore.SendToUser( tUser, "<"..tConfig.sBotName.."> You don't have permissions to use this command." )
returnfalseendifnottLunarized[tUser.sNick:lower()] thenreturnfalseelseifsCommandandtUsingProfiles[tUser.iProfile] thenreturnfalseelselocal_, _, sMessage=sMessage:find( "%b<>%s(.*)" )
sMessage=GarbleMessage( sMessage )
Core.SendToAll( "<"..tUser.sNick.."> "..sMessage )
returntrueendreturnfalseendfunctionToArrival( tUser, sMessage )
local_, _, sTo, sCommand=sMessage:find( "^\$To: (%S+) .*%b<>%s"..tConfig.sPrefixes.."(%w+)%s" )
ifsTo==tConfig.sBotNamethenifsCommandand (sCommand:lower() =="lunarize" orsCommand:lower() =="lunarise") andtUsingProfiles[tUser.iProfile] thenlocal_, _, sMessage=sMessage:find( "%b$$(.*)" )
ChatArrival( tUser, sMessage )
returntrueelseifsCommandand (sCommand:lower() =="unlunarize" orsCommand:lower() =="unlunarise") andtUsingProfiles[tUser.iProfile] thenlocal_, _, sMessage=sMessage:find( "%b$$(.*)" )
ChatArrival( tUser, sMessage )
returntrueendendreturnfalseendfunctionGarbleMessage( sLine )
forcIndex, sLeetinpairs( tConfig.tGarble ) dosLine=sLine:gsub( cIndex, sLeet )
endreturnsLineend
The script would need to be rewritten (and probably put inside chatlogger.lua) before actually putting it to use. I just wanted to raise the discussion whether it'd be useful or abused?
The text was updated successfully, but these errors were encountered:
While browsing the backups folder, I found this script I wrote a few years ago. I was wondering if the feature was worth implementing yet again...
The script would need to be rewritten (and probably put inside
chatlogger.lua
) before actually putting it to use. I just wanted to raise the discussion whether it'd be useful or abused?The text was updated successfully, but these errors were encountered: