hi guy?s !
I have been trying do add this script in to the hub but it will not work ????
I am running PtokaX 0.3.2.6 TestDrive 4 for the hub
BotName = "?ISP?"
ISP =
[bbb];
[telia];
[bostream];
[sunet];
[10Mbit];
[2Mbit];
[0,5Mbit];
[5Mbit];
[Bitnet];
[ComHem];
[Spray];
[Tele2];
[Xstream];
[1Mbit];
-- Main Sub
function Main()
frmHub:RegBot(BotName)
end
function NewUserConnected(curUser)
for key, value in ISP do --Loop ISP Array
if (strfind(strlower(curUser.sName), strlower(value),1,1)) then
curUser:SendPM(BotName, "Welcome to [Broadband?] Network")
x=1
break
else
x=0
end
end
if (x == 0) then
-- Kick user
curUser:SendPM(BotName, "")
curUser:SendPM(BotName, "your nick should be[BBB] or [Sunet].")
curUser:SendPM(BotName, "change your name to [BBB] then you welcome back")
curUser:SendPM(BotName, "")
curUser:Disconnect()
end
end
when I add this one
bbb];
[telia];
[bostream];
[sunet];
[10Mbit];
[2Mbit];
[0,5Mbit];
[5Mbit];
[Bitnet];
[ComHem];
[Spray];
[Tele2];
[Xstream];
[1Mbit];
it will not work for me ???
I do hope some one can help me with this problem ...
u need to form a table....
this works
BotName = "?ISP?"
ISP = {
["bbb"]=1,
["telia"]=1,
["bostream"]=1,
["sunet"]=1,
["10Mbit"]=1,
["2Mbit"]=1,
["0,5Mbit"]=1,
["5Mbit"]=1,
["Bitnet"]=1,
["ComHem"]=1,
["Spray"]=1,
["Tele2"]=1,
["Xstream"]=1,
["1Mbit"]=1,
}
-- Main Sub
function Main()
frmHub:RegBot(BotName)
end
function senddetails(curUser)
curUser:SendPM(BotName, "")
curUser:SendPM(BotName, "your nick should be[BBB] or [Sunet].")
curUser:SendPM(BotName, "change your name to [BBB] then you welcome back")
curUser:SendPM(BotName, "")
end
function NewUserConnected(curUser)
for key, value in ISP do --Loop ISP Array
if (strfind(strlower(curUser.sName), strlower(value),1,1)) then
curUser:SendPM(BotName, "Welcome to [Broadband?] Network")
x=1
break
else
x=0
end
end
if (x == 0) then -- Kick user
senddetails(curUser)
curUser:Disconnect()
end
end
Can some one please delete this thread, it is dublicated:
http://board.univ-angers.fr/action.php?action=getlastboard&threadid=1598&boardid=13
If you want to give a list of available options just replace with this script... its working on my test hub...
BotName = "?ISP?"
ISP = {
["bbb"]=1,
["telia"]=1,
["bostream"]=1,
["sunet"]=1,
["10Mbit"]=1,
["2Mbit"]=1,
["0,5Mbit"]=1,
["5Mbit"]=1,
["Bitnet"]=1,
["ComHem"]=1,
["Spray"]=1,
["Tele2"]=1,
["Xstream"]=1,
["1Mbit"]=1,
}
message=""
-- Main Sub
function Main()
frmHub:RegBot(BotName)
end
function senddetails(curUser)
message = "\r\n\r\n"..
"Please change your name to include one of the \r\n"..
"following prefixes and then you are welcome to return:"..
"\r\n"
for key, value in ISP do
message=message.."["..key.."]".."\r\n"
end
curUser:SendPM(BotName, message)
curUser:Disconnect()
end
function NewUserConnected(curUser)
for key, value in ISP do --Loop ISP Array
if (strfind(strlower(curUser.sName), strlower(value),1,1)) then
curUser:SendPM(BotName, "Welcome to [Broadband?] Network")
x=1
break
else
x=0
end
end
if (x == 0) then -- Kick user
senddetails(curUser)
end
end
can someone change the script an little bit?
i would like the users to stay connected , but the get an pm "please put your country in front of your name like [UK]Jimbo "
????
thank you verrrry much :P
Hi there, i tried this nice script on 3.3.0 beta.. i think it did not worked for me :( could someone check it ? plzz, tks. Plz..