illegal VIP scripts
 

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

illegal VIP scripts

Started by Ubikk, 20 December, 2004, 10:38:47

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ubikk

Hey guys :)

I need a screept that kicks unregistered users with nickname [-VIP-]. I have a lot of people in my hub who enter as VIP (and they aren't registered ) and I want to get rid of them ;)

Can someone help me, please? :)

Hava a nice day.

gathering


blackwings

This isn't tested, but I think it should work =
--##Simple blocking of users that has VIP in username, but isn't a VIP 
--##Made by blackwings

function DataArrival(User , data)
	if strsub(data, 1, 7) == "$MyINFO"  and User.iProfile ~= 2 then	
		if strfind(data, "vip") then
			User:Disconnect()
		end
	end
end


enema

QuoteOriginally posted by blackwings
This isn't tested, but I think it should work =
--##Simple blocking of users that has VIP in username, but isn't a VIP 
--##Made by blackwings

function DataArrival(User , data)
	if strsub(data, 1, 7) == "$MyINFO"  and User.iProfile ~= 2 then	
		if strfind(data, "vip") then
			User:Disconnect()
		end
	end
end

Let them know, why they are disconnected! :)

--##Simple blocking of users that has VIP in username, but isn't a VIP 
--##Made by blackwings

function DataArrival(User , data)
	if strsub(data, 1, 7) == "$MyINFO"  and User.iProfile ~= 2 then	
		if strfind(data, "vip") then
			User:SendData(" Remove Vip from your nick!")
			User:Disconnect()
		end
	end
end

Ubikk

Darn, you guys are fast :P

Is it possible for the script to PM someone with the reason they were kicked? :P  I wouldnt want someone to not know why was he/she kicked :)

blackwings

I think it should be =
User:SendData(," Remove Vip from your nick!")

Code with the change in it =
--##Simple blocking of users that has VIP in username, but isn't a VIP 
--##Made by blackwings

function DataArrival(User , data)
	if strsub(data, 1, 7) == "$MyINFO"  and User.iProfile ~= 2 then	
		if strfind(data, "vip") then
			User:SendData(," Remove Vip from your nick!")
			User:Disconnect()
		end
	end
end


enema

If you want this message be sent in PM, change
User:SendData(," Remove Vip from your nick!")

to
User:SendPM(," Remove Vip from your nick!")

should work ;)

Ubikk

Thanks a lot :)

I also have another question related to PtokaX.
Can anyone tell me why in the mainchat these things appear:

[12:38] va
[12:38] va merge netu?
[12:38] <[Xana][dacia]ssir_kon> nuuuuuuuuuuuuuuuuuuuuu
[12:38] acuma
[12:38] acuma a picat?
[12:38] <[Xana][dacia]ssir_kon> da ce draq are
[12:39] mda
[12:39] mda
[12:39] astas
[12:39] astas e
[12:39] :)
[12:39] :)

Each and everytime I write something I get an echo or something like that. I think it's from one of my scripts...  but I'm not sure :(

enema

If u use robocop, then someone is playing with !talk command (should be another OP or something)

Although, there are other possibilities to write something in main without nick

Ubikk

I found the problem... It was from plop's banner scripts :(

Here is the code:
Quote



string 
"   Welcome to Heaven   "
   

stringloop string
length 
20
speed 
1300

function Main()
   
SetTimer(speed)
   
StartTimer()
   
stringloop gsub(stringloop" "" ")
end

function OnTimer()
   if 
== nil then
      T 
strsub(stringloop1length)
      
frmHub:RegBot("<  "..T.."  >")
   else
      
frmHub:UnregBot("<  "..T.."  >")
      
stringloop strsub(stringloop2, -1)
      if 
strlen(stringloop) < length then
         stringloop 
stringloop.." "..string
      end
      T 
strsub(stringloop1length)
      
frmHub:RegBot("<  "..T.."  >")
   
end
end

function OnExit()
   
frmHub:UnregBot("<  "..T.."  >")
end

function DataArrival(userdata)
   if( 
strsub(data11) == "<" then 
      
if user.iProfile == 0 then
         local s
,e,cmd,onoff strfind(data,"^%b<>%s+(%S+)%s*(%S*)"
         
user:SendData(cmd)
         if 
cmd == "!restartscripts" then
            frmHub
:UnregBot("-->"..T.."<--")
            
StopTimer()
         elseif 
cmd == "!light" then
            user
:SendData(onoff)
            if 
onoff == "on" then
               
--SetTimer(speed)
               
nil
               StartTimer
()
               
User:SendData("<banner> started")
               return 
1
            
elseif onoff == "off" then
               StopTimer
()
               
frmHub:UnregBot("-->"..T.."<--")
               
nil
               User
:SendData("<banner> stopped")
               return 
1
            end
         end
      
--else
         --
user:SendData("<banner> user level 2 low")
      
end
   end
end


[/quote]



Maybe someone can help me in eliminating my problem ;)

Ubikk

Btw, the VIP scripts you sent me dont know how to do their job :(
An intruder already entered my hub :P

blackwings

#11
this one is tested and it works =
--##Simple blocking of users that has VIP in username, but isn't a VIP 
--##Made by blackwings
--##Fixed the little bug
bot="Nick_cheker"
function DataArrival(User , data)
	if strsub(data, 1, 7) == "$MyINFO"  and User.iProfile ~= 2 then	
		if strlen(data, "vip") then
			User:SendData(bot," Remove Vip from your nick!")
			User:Disconnect()
		end
	end
end


Ubikk

Weiiird @_o
When I restarted the scripts it disconected me saying "remove VIP from your nick" The only way I could logon to the hub was by deleting the script .... what happened\?

blackwings

#13
sorry, bug in the script, now it does really work =
--##Simple blocking of users that has VIP in username, but isn't a VIP 
--##Made by blackwings
--##Fixed the little bug
--##Fixed another bug
bot="Nick_cheker"
function DataArrival(User , data)
	if strsub(data, 1, 7) == "$MyINFO"  and User.iProfile ~= 2 then	
		if strfind(data, "vip") then
			User:SendData(bot," Remove Vip from your nick!")
			User:Disconnect()
		end
	end
end


Ubikk

it works now... thanks my friends :)

TTB

Another script, maybe usefull for others:

--## PREFIX CHECKER BOT
--## Requested (and a little modified) by TTB
--## Made by nErBoS

sBot = "[BOT]PLAY"

function Main()
	frmHub:RegBot(sBot)
end

function NewUserConnected(user)
	if (strlen(user.sName) > 5 and strlower(strsub(user.sName,1,6)) == "[dump]" and user.iProfile ~= 2) then
		user:SendData(sBot, "----------------> You aren't a DUMP, so you can't use a dump prefix.")
		user:Disconnect()
	end
	
	if (strlen(user.sName) > 4 and strlower(strsub(user.sName,1,5)) == "[vip]" and user.iProfile ~= 2) then	
		user:SendData(sBot, "----------------> You aren't a VIP, so you can't use a vip prefix.")
		user:Disconnect()
	elseif (strlen(user.sName) > 4 and strlower(strsub(user.sName,1,5)) == "[reg]" and user.iProfile ~= 3) then
		user:SendData(sBot, "----------------> You aren't a REG, so you can't use a reg prefix.")
		user:Disconnect()
	end
end
TTB

(? ?.??.-> Admin @ Surfnet hubs <-.??.???)

blackwings

TTB, that script would be fast if it was in dataArrival and the tags/prefix in a table


Herodes

#17
some optimisation ..

--##Simple blocking of users that has VIP in username, but isn't a VIP 
--##Made by blackwings
--##Fixed the little bug
--##Fixed another bug

bot="Nick_cheker"
vip_profile = 2
function DataArrival(user , data)
	--- if (strfind(user.sMyInfoString, "[VvIiPp]*")  and (user.iProfile > vip_profile) then  ---- uncommented because see the comment in this post ...
	if (strfind(user.sName, "[VvIiPp-]*")  and (user.iProfile > vip_profile) ) then
		user:SendData(bot," Remove Vip from your nick!")
		user:Disconnect()
	end
end

usually even one "if" less pays off ;)

NOTE: I uncommented the part that would disconnect when the users $MyINFO has any of 'vip' ..

it is much much safer to use the uncommented 'if' since it is the nickname we are interested in ...

blackwings

#18
herodes, dunno really, but your script looks wierd and it's specific("I think" ),
I had it to look for "vip" becaue people might have tag like this == [vip], [-vip-] or (vip).

+ is your script really optimized? I think extra code/calculation will only make it slower :P


Herodes

#19
strfind(user.sName, "[VvIiPp-]*")

I am using regular expressions ...

[VvIiPp-]* means if there is any case of any of the leters V I P and a dash ( - )  it will even get -v-I-P- ...

also better to make more configurable than to be slow and not configurable .. a global variable is making slow only memory wise .. I dont see this issue (memory) arising anywhere near this script's process ..

blackwings

#20
QuoteOriginally posted by Herodes
strfind(user.sName, "[VvIiPp-]*")

I am using regular expressions ...

[VvIiPp-]* means if there is any case of any of the leters V I P and a dash ( - )  it will even get -v-I-P- ...
this seems to work=
--##Simple blocking of users that has VIP in username, but isn't a VIP 
--##Made by blackwings
--##Fixed the little bug
--##Fixed another bug
--##Added dynamic VIP prefix check
bot="Nick_cheker"
function DataArrival(User , data)
	if strsub(data, 1, 7) == "$MyINFO"  and User.iProfile ~= 2 then	
		if strfind(User.sName, "[VvIiPp-]*") then
			User:SendData(bot," Remove Vip from your nick!")
			User:Disconnect()
		end
	end
end
So I don't really need those other calculation that you made to make it check dynamiclly :)

Or am I wrong??


Herodes

hmm .. you are checking only when they shoot Myinfo ..and you are taking more steps to get there ... the first if that you are doing isnt what you are supp to look for ..

as soon as the user sends a myinfo ptx has a user.sName for him .. no need to check if it is a myinfo arriving ..

blackwings

#22
doh, how do I do so it will only check in the beginning of the username, I have tried to use = strlower(strsub(user.sName,1,5) in many different ways, but I can't get it to work T-T

QuoteOriginally posted by Herodes
as soon as the user sends a myinfo ptx has a user.sName for him .. no need to check if it is a myinfo arriving ..
Ok, but how do I in a simple way make it only do the dynamic search in the beginning?


imby

QuoteOriginally posted by blackwings
QuoteOriginally posted by Herodes
strfind(user.sName, "[VvIiPp-]*")

I am using regular expressions ...

[VvIiPp-]* means if there is any case of any of the leters V I P and a dash ( - )  it will even get -v-I-P- ...
this seems to work=
--##Simple blocking of users that has VIP in username, but isn't a VIP 
--##Made by blackwings
--##Fixed the little bug
--##Fixed another bug
--##Added dynamic VIP prefix check
bot="Nick_cheker"
function DataArrival(User , data)
	if strsub(data, 1, 7) == "$MyINFO"  and 	
		if strfind(User.sName, "[VvIiPp-]*") then
			User:SendData(bot," Remove Vip from your nick!")
			User:Disconnect()
		end
	end
end
So I don't really need those other calculation that you made to make it check dynamiclly :)

Or am I wrong??


This could be changed to work for reg by changing these bits right?

User.iProfile ~= 3 then

if strfind(User.sName, "[RrEeGg-]*")


User:SendData(bot," Remove Reg from your nick! You are not registered here.")

blackwings

ya, imby, but I noticed a problem with my dynamic search, it check the whole username for those letters >_>


SMF spam blocked by CleanTalk