PtokaX forum

Archive => Archived 4.0 boards => Request for Lua 4 scripts => Topic started by: peter on 09 March, 2004, 03:57:22

Title: please may I ask for your help
Post by: peter on 09 March, 2004, 03:57:22
hello,

I'm sorry if this is a repost. I have tried to search the forum and also out on DC but not being able to find what I wish.

I wonder if one of you knows a script that upon connect disconnect users not having a "on topic" description in their SETTINGS - DESCRIPTION line, for example "topic1, topic2, topic3" etc. I know there are some general all in one scripts out there including this feature but I don't know how to get it into a stand alone single script and also I don't know if it is proper to do it.

It would also be good if this script had a line that tells people why they have been disconnected. A kind of disconnect message.

Thanks for any help!
Title: block disription
Post by: Creator on 05 June, 2004, 14:33:11
I hope this is wat you are looking for
-----------------------------------------------

               BotName = "(**BioProtectBot**)"

forbiddenLinks =
{
"$ $ [at] [dot]",
" $ $ dot com",
"-site.tk",
"-SITE.TK",
"kakmonster.com",
"dcgui.berlios.de",
"dc.ketelhot.de",
"casper.el1t3.org",
"members.lycos.co.uk",
"soetast.com"
}

function NewUserConnected(curUser)

               for key,checkWord in forbiddenLinks do

               if strfind(curUser.sMyInfoString, checkWord, 1, 1) then
SendToNick(curUser.sName, "<" ..BotName .."> *** You are using unauthorized discription sorry !!! Take a nother discription and reconnect !!!")
      curUser:TimeBan(1)

      end
   end
end


Greetz Creator