PtokaX forum

Development Section => Your Developing Problems => Topic started by: Themaster on 25 December, 2004, 21:57:27

Title: invite user to opchat
Post by: Themaster on 25 December, 2004, 21:57:27
hey ppl.

need some command to invite and uninvite to my opchat.


function OpChatRoom(user,msg)
      local allprofiles = GetProfiles()
      local index, profile, index2, nick
      for index, profile in allprofiles do
         local users = GetUsersByProfile(profile)
         for index2, nick in users do
            local usr = GetItemByName(nick)
            if usr ~= nil then
               if user.sName == usr.sName then
               else
                  if usr.iProfile == 0 or usr.iProfile == 1 or usr.iProfile == 4 or Invited[user.sName] then
                     usr:SendData("$To: "..usr.sName.." From: "..OpChat.." $<"..user.sName.."> "..msg)
                  end
               end
            end
         end
      end
end