Silly Random Nick Tags 1.0A {API 2}
 

Silly Random Nick Tags 1.0A {API 2}

Started by Tw?sT?d-d?v, 27 March, 2008, 23:19:56

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Tw?sT?d-d?v

-- Mutors Country Code script Modified
-- Silly Random Nick Tags 1.0A {API 2}
-- Added Profile tables
-- Thx Ceno for local ip fix ( cc2 )
-- Warning for users about silly tags
-- ToDo Add r/c for turning tags on/off

cConfig = {
           Tags = {
                    "I am an idiot",
                    "Euro",
                    "Alien",
                    "Master",
                    "Tester",
                    "Rubber Chicken",
                    "GOD",
                    "Twisted",
                   },
           Profile = {
                      [0] = false,     -- Master
                      [1] = false,    -- Operator
                      [2] = false,    -- VIP
                      [3] = false,    -- RegisteredUser
                     },
           ["Bot"] = SetMan.GetString(21),            ---- Bot name or "Custom name "
           cc2 = "GB"     --Put your country country code here  --  GB,FR,FI ect
}

ChatArrival = function(user,data)
	local cc = Core.GetUserValue(user,26)
        if cConfig.Profile[user.iProfile] then
	if cc and not data:lower():find("^%b<> ["..SetMan.GetString(29).."](%a+)") then
                tag = cConfig.Tags[math.random(1,#cConfig.Tags)]
		local d,c = data:gsub("^%<","[ "..tag.." ] <")
		if c then return Core.SendToAll(d),true end
                end
	else    if cc and not data:lower():find("^%b<> ["..SetMan.GetString(29).."](%a+)") then
                if cc ~= "??" then cc = cc else cc = cConfig.cc2 end
		local d,c = data:gsub("^%<","[ "..cc.." ] <")
		if c then return Core.SendToAll(d),true end
                end
	end
end

UserConnected = function(user)
        if cConfig.Profile[user.iProfile] then
		Core.SendToNick(user.sNick,"<"..cConfig.Bot.."> Silly tags are running Please BEWARE :P.|")
        end
end
OpConnected,RegConnected = UserConnected,UserConnected


Tested a little and has worked without error so far.

SMF spam blocked by CleanTalk