[request] reg check inopchat?
 

[request] reg check inopchat?

Started by P_pan, 12 November, 2008, 17:15:17

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

P_pan

hello i was wondering if there was a script or a setting
for guys that get regged...
that the results of the reg will show in opchat?

like this will be shown in opchat instead or main?

<Security> User successfully added to registered users.

thank you in advance.....

ATAG


P_pan

gracias!!!!You rock aswell...

works great!

bastya_elvtars

Another approach, stealing from the mainchat...

Code: lua
-- Register notification
-- Sends a message about registrations to opchat (must have it enabled)
-- bastya_elvtars, 08-11-12
-- written for P_pan


tProfiles = {}
Prefixes = ""

function OnStartup()
  -- Get the hub prefixes and prepare them for pattern matching
  for pref in string.gmatch(SetMan.GetString(29),"(.)") do
    Prefixes = Prefixes.."%"..pref
  end
  -- Get the available profiles.
  for _, prof in pairs(ProfMan.GetProfiles()) do
    tProfiles[prof.sProfileName:lower()] = 1
  end
end

function ChatArrival (user, data)
  if ProfMan.GetProfilePermission(user.iProfile, 13) then
    local nick, prof = data:match("^%b<>%s+["..Prefixes.."]addreguser%s+(%S+)%s+%S+%s+(%S+).*%|$")
    if nick and prof then
      if not RegMan.GetReg(nick) and ProfMan.GetProfile(prof) then
        Core.SendToOpChat(nick.." has successfully been added to the registered users with profile: "..prof)
      end
    end
  end
end
Everything could have been anything else and it would have just as much meaning.

P_pan

Thank You aswell bastya_elvtars!!

this one ill try out too!

gracias Masters!

SMF spam blocked by CleanTalk