"ISP and prefix" - Page 2
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

"ISP and prefix"

Started by texas71, 14 March, 2004, 22:38:42

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Skrollster

Might have messed it up now...
and i can't test it right now cause i'm in school...

I'll fix it then i get home if i screwed it up...

-- Main Sub 
function Main() 
BotName = "[Bot]??Gate-Check??" 
tISPs = {
["[0,5mbit]"] = 1,
["[0.5mbit]"] = 1,
["[1,1mbit]"] = 1,
["[100mbit]"] = 1,
["[10mbit]"] = 1,
["[1mbit]"] = 1,
["[2,5mbit]"] = 1,
["[26mbit]"] = 1,
["[2mbit]"] = 1,
["[3mbit]"] = 1,
["[4mbit]"] = 1,
["[5mbit]"] = 1,
["[6mbit]"] = 1,
["[7mbit]"] = 1,
["[8mbit]"] = 1,
["[9mbit]"] = 1,
["[absnet]"] = 1,
["[ac-net]"] = 1,
["[adsl]"] = 1,
["[alcom]"] = 1,
["[arrowhead]"] = 1,
["[aster]"] = 1,
["[bahnhof]"] = 1,
["[bbb]"] = 1,
["[bitnet]"] = 1,
["[bolina]"] = 1,
["[bostaden]"] = 1,
["[bostream]"] = 1,
["[bostreamadsl]"] = 1,
["[brinet]"] = 1,
["[bs]"] = 1,
["[cenara]"] = 1,
["[chello]"] = 1,
["[comhem]"] = 1,
["[cybercity]"] = 1,
["[dcs]"] = 1,
["[euronet]"] = 1,
["[fastbit]"] = 1,
["[fastcom]"] = 1,
["[fm]"] = 1,
["[funet]"] = 1,
["[gavlenet]"] = 1,
["[geab]"] = 1,
["[glocalnet]"] = 1,
["[iinet]"] = 1,
["[innit]"] = 1,
["[ip-only]"] = 1,
["[istream]"] = 1,
["[jony]"] = 1,
["[kommunicera]"] = 1,
["[kramnet]"] = 1,
["[lidnet]"] = 1,
["[lyse]"] = 1,
["[mimer]"] = 1,
["[nashnet]"] = 1,
["[netvision]"] = 1,
["[nextgentel]"] = 1,
["[ngt.no]"] = 1,
["[norrnod]"] = 1,
["[orexis]"] = 1,
["[plusnet]"] = 1,
["[rr]"] = 1,
["[scream]"] = 1,
["[scream-lite]"] = 1,
["[skekraft]"] = 1,
["[skycom]"] = 1,
["[sonera]"] = 1,
["[spray]"] = 1,
["[ssvl]"] = 1,
["[sunet]"] = 1,
["[sydkraft]"] = 1,
["[tele2]"] = 1,
["[telecom3]"] = 1,
["[telenet]"] = 1,
["[telenordia]"] = 1,
["[telia]"] = 1,
["[tiscali]"] = 1,	
["[tpsa]"] = 1,
["[umenet]"] = 1,
["[uninett]"] = 1,
["[worldnet]"] = 1,
["[xpress]"] = 1,
["[xstream]"] = 1,
}
	frmHub:RegBot(BotName)
	sISPs = ""
	local tempTable = {}
	for k,v in tISPs do
		if k ~= "n" then
			tinsert(tempTable, k)
		end
	end
	sort(tempTable)
	local i
	for i=1, getn(tempTable)-1 do
		sISPs = sISPs..tempTable[i].." ; "
	end
	i = getn(tempTable)
	sISPs = sISPs..tempTable[i]
	ISPCheck = 0 -- change this to 1 to enable the check by default if 0 you have to enable it every time the scripts are restarted
end 


function NewUserConnected(curUser)
	local _,_,firstPrefix,secondPrefix = strfind(strlower(curUser.sName), "^(%b[])(%b[])")
	local x = 0
	if not ( ISPCheck == 1 and ( (firstPrefix and tISPs[firstPrefix]) or (secondPrefix and tISPs[secondPrefix]) ) ) then
		-- Kick user 
		curUser:SendPM(BotName, "Your ISP-Tag is wrong!") 
		curUser:SendPM(BotName, "Your nick should be whit [Your-ISP] Before your nickname!") 
		curUser:SendPM(BotName, "change your name to [Bostream] or what ISP that you have!") 
		curUser:SendPM(BotName, "If your IPS is not in the list! Write your ISP-Speed like: [10Mbit]") 
		curUser:SendPM(BotName, sISPs) 
		curUser:Disconnect() 
	end 

end-- Skrollster

function DataArrival(user, data)
	if user.iProfile == 0 then
		local s,e,cmd = strfind(strlower(data), "%b<>(%S+).*|")
		if ( (strsub(data,1,1)=="<") or (strsub(data,1,strlen(Bot)+5)=="$To: "..BotName) ) then
			data=strsub(data,1,strlen(data)-1)
			if ( cmd==strlower("!ISP0") ) then
				ISPCheck = 0
			elseif ( cmd==strlower("!ISP1") ) then
				ISPCheck = 1
			end
		end
	end
end

[G-T-E]Gate?

Just copied the script and will test it when I get back from work tonight. vid 22tiden

Have a nice day at school.
And conecntrate now, not on  the Cute Teachers , hehehe  :D

[G-T-E]Gate?

Tried the script out but sorry it still works full time .
Couldnt find the Command !ISP0/!ISP1
Iam not looking to change all from 0 to 1 depending on which I want ...
Just the command to main chat will do >> !ISP0/!ISP1

Tks

Skrollster

now it works as i wanted it to work.. test it and se if it works as you want it to work as well..

-- Main Sub 
function Main() 
BotName = "[Bot]??Gate-Check??" 
tISPs = { ["[0,5mbit]"] = 1, ["[0.5mbit]"] = 1, ["[1,1mbit]"] = 1, ["[100mbit]"] = 1, ["[10mbit]"] = 1, ["[1mbit]"] = 1, ["[2,5mbit]"] = 1, 
["[26mbit]"] = 1, ["[2mbit]"] = 1, ["[3mbit]"] = 1, ["[4mbit]"] = 1, ["[5mbit]"] = 1, ["[6mbit]"] = 1, ["[7mbit]"] = 1, ["[8mbit]"] = 1, 
["[9mbit]"] = 1, ["[absnet]"] = 1, ["[ac-net]"] = 1, ["[adsl]"] = 1, ["[alcom]"] = 1, ["[arrowhead]"] = 1, ["[aster]"] = 1, ["[bahnhof]"] = 1, 
["[bbb]"] = 1, ["[bitnet]"] = 1, ["[bolina]"] = 1, ["[bostaden]"] = 1, ["[bostream]"] = 1, ["[bostreamadsl]"] = 1, ["[brinet]"] = 1, ["[bs]"] = 1, 
["[cenara]"] = 1, ["[chello]"] = 1, ["[comhem]"] = 1, ["[cybercity]"] = 1, ["[dcs]"] = 1, ["[euronet]"] = 1, ["[fastbit]"] = 1, ["[fastcom]"] = 1, 
["[fm]"] = 1, ["[funet]"] = 1, ["[gavlenet]"] = 1, ["[geab]"] = 1, ["[glocalnet]"] = 1, ["[iinet]"] = 1, ["[innit]"] = 1, ["[ip-only]"] = 1, 
["[istream]"] = 1, ["[jony]"] = 1, ["[kommunicera]"] = 1, ["[kramnet]"] = 1, ["[lidnet]"] = 1, ["[lyse]"] = 1, ["[mimer]"] = 1, ["[nashnet]"] = 1, 
["[netvision]"] = 1, ["[nextgentel]"] = 1, ["[ngt.no]"] = 1, ["[norrnod]"] = 1, ["[orexis]"] = 1, ["[orexis]"] = 1, ["[plusnet]"] = 1, ["[rr]"] = 1, 
["[scream]"] = 1, ["[scream-lite]"] = 1, ["[skekraft]"] = 1, ["[skycom]"] = 1, ["[sonera]"] = 1, ["[spray]"] = 1, ["[ssvl]"] = 1, ["[sunet]"] = 1, 
["[sydkraft]"] = 1, ["[tele2]"] = 1, ["[telecom3]"] = 1, ["[telenet]"] = 1, ["[telenordia]"] = 1, ["[telia]"] = 1, ["[tiscali]"] = 1, ["[tpsa]"] = 1, 
["[umenet]"] = 1, ["[uninett]"] = 1, ["[worldnet]"] = 1, ["[xpress]"] = 1, ["[xstream]"] = 1, }
	frmHub:RegBot(BotName)
	sISPs = ""
	local tempTable = {}
	for k,v in tISPs do
		if k ~= "n" then
			tinsert(tempTable, k)
		end
	end
	sort(tempTable)
	local i
	for i=1, getn(tempTable)-1 do
		sISPs = sISPs..tempTable[i].." ; "
	end
	i = getn(tempTable)
	sISPs = sISPs..tempTable[i]
	ISPCheck = 0 -- change this to 1 to enable the check by default if 0 you have to enable it every time the scripts are restarted
end 


function NewUserConnected(curUser)
	local _,_,firstPrefix,secondPrefix = strfind(strlower(curUser.sName), "^(%b[])(%b[])")
	local x = 0
	if ISPCheck == 1 and not ( (firstPrefix and tISPs[firstPrefix]) or (secondPrefix and tISPs[secondPrefix]) ) then
		-- Kick user 
		curUser:SendData(BotName, "Your ISP-Tag is wrong!")
		curUser:SendData(BotName, "Your nick should be whit [Your-ISP] Before your nickname!") 
		curUser:SendData(BotName, "change your name to [Bostream] or what ISP that you have!") 
		curUser:SendData(BotName, "If your IPS is not in the list! Write your ISP-Speed like: [10Mbit]") 
		curUser:SendData(BotName, sISPs) 
		curUser:Disconnect() 
	end 

end-- Skrollster

function DataArrival(user, data)
	if user.iProfile == 0 then
		local s,e,cmd = strfind(strlower(data), "%b<>%s(%S+).*|")
		if ( (strsub(data,1,1)=="<") or (strsub(data,1,strlen(BotName)+5)=="$To: "..BotName) ) then
			if ( cmd=="!isp0" ) then
				ISPCheck = 0
				user:SendData(BotName, "ISP check disabled")
			elseif ( cmd=="!isp1" ) then
				ISPCheck = 1
				user:SendData(BotName, "ISP check enabled") 
			end
		end
	end
end

[G-T-E]Gate?

opk Back in a few minutes , Tk

[G-T-E]Gate?

W :D RKS Perfectly changed from 1 to 0 in the script and all well, no errors yet ,
but  , can u add the command to main chat for activate and deactivate dvs !0 and !1 (!0=ISPCheckOff  / !1=ISPCheckOn).

Plus I would appreciate it if u would read a thread I placed which has to do with this script u maybe able to help >>Here PLease
Tk

Skrollster

QuoteOriginally posted by [G-T-E]Gate?
W :D RKS Perfectly changed from 1 to 0 in the script and all well, no errors yet ,
but  , can u add the command to main chat for activate and deactivate dvs !0 and !1 (!0=ISPCheckOff  / !1=ISPCheckOn).

??? didn't get your question quite straight..

[G-T-E]Gate?

As I understand the script  the ISP check has to be set to 1 for checking and 0 for not checking.
I have to changed it everytime within the script, here >>
ISPCheck = 0 -- change this to 1 to enable the check by default if 0 you have to enable it every time the scripts are restarted
to
ISPCheck = 1 -- change this to 1 to enable the check by default if 0 you have to enable it every time the scripts are restarted

Questions is , Can u write so All I have to do is write the following command in man chat > !1 for ISPCheck and !0 for No ISPCheck.

I control the hub thru Remote to another comp.
Tk

Skrollster

tried !isp1 and !isp0 ???

[G-T-E]Gate?

That mistake of mine is like a 10 pointer.   :O
Seems  my eyes are becoming more like _
Sorry , ur right , works like a charm   :]

WickeD

#35
Can eny one fix this script so it checks OP and send this massage to OP:

curUser:SendData(" ")
curUser:SendData("----------- ISP-Check ----------")
curUser:SendData(BotName,""..curUser.sName.." Your [ISP]-Tagg is: "..value.." and are allowed in this fine hub.")
curUser:SendData(" ")




[code]

BotName = "[Bot]??Gate-Check??"
tablename = {
"[Bostaden]",
"[Scream]",
"[Telecom3]",
"[Orexis]",
"[InnIT]",
"[Worldnet]",
"[Umenet]",
"[SkyCom]",
"[Skekraft]",
"[NorrNod]",
"[Nashnet]",
"[Kommunicera]",
"[Brinet]",
"[BostreamADSL]",
"[AC-Net]",
"[Telia]",
"[Bostream]",
"[Sunet]",
"[Bitnet]",
"[ComHem]",
"[Spray]",
"[Tele2]",
"[Xstream]",
"[Istream]",
"[Scream-Lite]",
"[100Mbit]",
"[26Mbit]",
"[10Mbit]",
"[5Mbit]",
"[2,5Mbit]",
"[2Mbit]",
"[1,1Mbit]",
"[1Mbit]",
"[0,5Mbit]",
global }


-- Main Sub
function Main() curUser
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:SendData("----------- ISP-Check ----------")
curUser:SendData(BotName,""..curUser.sName.." Your [ISP]-Tagg is: "..value.." and are allowed in this fine hub.")
curUser:SendData(" ")
x=1
break
else
x=0
end
end

if (x == 0) then
-- Kick user
curUser:SendPM(BotName, "Your ISP-Tag is wrong!")
curUser:SendPM(BotName, "Your nick should be whit [Your-ISP] Before your nickname!")
curUser:SendPM(BotName, "change your name to [Bostream] or what ISP that you have!")
curUser:SendPM(BotName, "If your IPS is not in the list! Write your ISP-Speed like: [10Mbit]")
curUser:Disconnect()
end

end

[G-T-E]Gate?

JO WickeD just a small comment on the script ur using in ur hub for ISP Tags, "[Bot]??Gate-Check??"
I entered ur hub with [Bostream] as tag and it was accepted, ok, Then I tested with [100Mbit] as tag  and Bingo , it was accepted aswell .
 My question is , what use it  when it cant do a Ip check on the ISP Tag I choose, I may have only a ?Mbit speed.
So comment is , The script isnt doing any good, SpeedFakers U'll surely get .
And why do u wnat it to check ur Ops?
Just wondering..Good luck anyway..

acethecase

Hey all..

I have tryed out ISP scrip and it seem to work good,
actuly to good hehe..

I tryed to connect as [BBB],[Bostream] or [10Mbit]
and I cant get in..

[03:37] Your ISP-Tag is wrong!
[03:37] Your nick should be whit [Your-ISP] Before your nickname!

script!;

---------------------------------------------------------------------

-- Main Sub
function Main()
BotName = "?ISP?"
tISPs = {
["[0,5mbit]"] = 1,
["[0.5mbit]"] = 1,
["[1,1mbit]"] = 1,
["[100mbit]"] = 1,
["[10mbit]"] = 1,
["[1mbit]"] = 1,
["[2,5mbit]"] = 1,
["[26mbit]"] = 1,
["[2mbit]"] = 1,
["[3mbit]"] = 1,
["[4mbit]"] = 1,
["[5mbit]"] = 1,
["[6mbit]"] = 1,
["[7mbit]"] = 1,
["[8mbit]"] = 1,
["[9mbit]"] = 1,
["[absnet]"] = 1,
["[ac-net]"] = 1,
["[adsl]"] = 1,
["[alcom]"] = 1,
["[arrowhead]"] = 1,
["[aster]"] = 1,
["[bahnhof]"] = 1,
["[bbb]"] = 1,
["[bitnet]"] = 1,
["[bolina]"] = 1,
["[bostaden]"] = 1,
["[bostream]"] = 1,
["[bostreamadsl]"] = 1,
["[brinet]"] = 1,
["[bs]"] = 1,
["[cenara]"] = 1,
["[chello]"] = 1,
["[comhem]"] = 1,
["[cybercity]"] = 1,
["[dcs]"] = 1,
["[euronet]"] = 1,
["[fastbit]"] = 1,
["[fastcom]"] = 1,
["[fm]"] = 1,
["[funet]"] = 1,
["[gavlenet]"] = 1,
["[geab]"] = 1,
["[glocalnet]"] = 1,
["[iinet]"] = 1,
["[innit]"] = 1,
["[ip-only]"] = 1,
["[istream]"] = 1,
["[jony]"] = 1,
["[kommunicera]"] = 1,
["[kramnet]"] = 1,
["[lidnet]"] = 1,
["[lyse]"] = 1,
["[mimer]"] = 1,
["[nashnet]"] = 1,
["[netvision]"] = 1,
["[nextgentel]"] = 1,
["[ngt.no]"] = 1,
["[norrnod]"] = 1,
["[orexis]"] = 1,
["[plusnet]"] = 1,
["[rr]"] = 1,
["[scream]"] = 1,
["[scream-lite]"] = 1,
["[skekraft]"] = 1,
["[skycom]"] = 1,
["[sonera]"] = 1,
["[spray]"] = 1,
["[ssvl]"] = 1,
["[sunet]"] = 1,
["[sydkraft]"] = 1,
["[tele2]"] = 1,
["[telecom3]"] = 1,
["[telenet]"] = 1,
["[telenordia]"] = 1,
["[telia]"] = 1,
["[tiscali]"] = 1,   
["[tpsa]"] = 1,
["[umenet]"] = 1,
["[uninett]"] = 1,
["[worldnet]"] = 1,
["[xpress]"] = 1,
["[xstream]"] = 1,
}
   frmHub:RegBot(BotName)
   sISPs = ""
   local tempTable = {}
   for k,v in tISPs do
      if k ~= "n" then
         tinsert(tempTable, k)
      end
   end
   sort(tempTable)
   local i
   for i=1, getn(tempTable)-1 do
      sISPs = sISPs..tempTable.." ; "
   end
   i = getn(tempTable)
   sISPs = sISPs..tempTable
   ISPCheck = 0 -- change this to 1 to enable the check by default if 0 you have to enable it every time the scripts are restarted
end


function NewUserConnected(curUser)
   local _,_,firstPrefix,secondPrefix = strfind(strlower(curUser.sName), "^(%b[])(%b[])")
   local x = 0
   if not ( ISPCheck == 1 and ( (firstPrefix and tISPs[firstPrefix]) or (secondPrefix and tISPs[secondPrefix]) ) ) then
      -- Kick user
      curUser:SendPM(BotName, "Your ISP-Tag is wrong!")
      curUser:SendPM(BotName, "Your nick should be whit [Your-ISP] Before your nickname!")
      curUser:SendPM(BotName, "change your name to [Bostream] or what ISP that you have!")
      curUser:SendPM(BotName, "If your IPS is not in the list! Write your ISP-Speed like: [10Mbit]")
      curUser:SendPM(BotName, sISPs)
      curUser:Disconnect()
   end

end-- Skrollster

function DataArrival(user, data)
   if user.iProfile == 0 then
      local s,e,cmd = strfind(strlower(data), "%b<>(%S+).*|")
      if ( (strsub(data,1,1)=="<") or (strsub(data,1,strlen(Bot)+5)=="$To: "..BotName) ) then
         data=strsub(data,1,strlen(data)-1)
         if ( cmd==strlower("!ISP0") ) then
            ISPCheck = 0
         elseif ( cmd==strlower("!ISP1") ) then
            ISPCheck = 1
         end
      end
   end
end

-----------------------------------------------------------------------

No syntax errors in the script.
C:\Documents and Settings\ace\Mina dokument\-=HUB=-\NEW RB7\scripts\?ISP?.lua loaded

SMF spam blocked by CleanTalk